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.
Process the file located in path
and returns the result as a list of
where each element represents a procedure in the file in
the order that the procedures appeared.
Process the file located in path and launch a GUI that allows for the contracts to be viewed and applied.
refers to the name of the function. path
path refers to the path of the file.
is a character-set
denoting which character to delete.
contains an s expression of the contract generated.
refers to the position of the end of the
define in a procedure and the start of the body. These two location essentially points
to where the contracts are added. desirability
is an internal measure of how
desirable the contract generated is.
This function returns a character set with characters included in c1 but not in c2