When a run-time check fails, program execution is aborted with an explanatory diagnostic. Hence, good programmers try to ensure that misapplications are impossible by mentally analyzing what form of data can appear as input to each primitive operation. Unfortunately, programmers are not very good at this task and frequently make mistakes, leaving bugs in their code. At each application where the invariants do not imply the preconditions, the analysis highlights the site indicating that the preconditions are unproven and will be checked at run-time, potentially aborting program execution. Although our main concern is static program debugging and validation, our smart environments will also perform some important code optimizations.
Every precondition proven by the analysis eliminates a run-time check from the generated code.
The same information can be used to optimize data representations. DrScheme is still under construction. Comments are welcome. Compositional Set-based Analysis for Static Debugging. The publications are available from the PLT Publications Page.