Whiley / WhileyTheoremProver

The Whiley Theorem Prover (WyTP) is an automatic and interactive theorem prover designed to discharge verification conditions generated by the Whiley Compiler. WyTP operates over a variant of first-order logic which includes integer arithmetic, arrays and quantification.
Apache License 2.0
8 stars 2 forks source link

Reworking TypeTestClosure #75

Closed DavePearce closed 7 years ago

DavePearce commented 7 years ago

Currently, we need to rework the way that TypeTestClosure operates. The problem is that it replaced references to VariableDeclaration with those for updated VariableDeclarations. This is no longer viable (I believe) because the current model does not make it easy to replace existing facts which are "in the future".

DavePearce commented 7 years ago

One useful solution is be to maintain a separate typing environment for existential variables. This environment is initialised when a variable is pulled out of an exists truth. The following rules employs the TypeSystem.inferType() method and would be affected in some way:

The key challenge is that these rules make use of TypeSystem.inferType(), but this provides a static view of types based on their VariableDeclarations.