defensive-to-contracts
(require defensive-to-contracts) | |
package: defensive-to-contracts |
This tool is highly experimental and has not been tested on a lot of codebases.
This package presents a tool that converts defensive programming into equivalent contracts. Currently, the tool is still at its infancy and have not been tested on many code bases. The sample folder contains some example files to get you started. So far I have exposed two functions that allows you to input a path and either returns the raw result or load up a GUI that allows you to change a file.
procedure
(contract-infos-on-path path) โ (listof func-contract-info?)
path : path-string?
procedure
(path-addcontracts-withGUI path) โ void?
path : path-string?
procedure
(func-contract-info? v) โ boolean?
v : any/c
procedure
(func-contract-info func-name path spanset contract define-end body-start desirability) โ func-contract-info? func-name : any/c path : string? spanset : character-set? contract : any/c define-end : integer? body-start : integer? desirability : integer?
(serializable-struct func-contract-info (func-name path spanset contract define-end body-start desirability) #:guard (struct-guard/c any/c path-string? character-set? any/c integer? integer? integer?))
procedure
(character-set? v) โ boolean?
v : any/c
procedure
(character-set s) โ character-set?
s : set?
procedure
(charset-size s) โ integer?
s : character-set?
procedure
(charset-empty? s) โ boolean?
s : character-set?
procedure
(empty-charset) โ character-set?
procedure
(union-charset c1 c2) โ character-set?
c1 : character-set? c2 : character-set?
procedure
(subtract-charset c1 c2) โ character-set?
c1 : character-set? c2 : character-set?