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

Binding-Oriented Design (BOD) #149

Open DavePearce opened 5 years ago

DavePearce commented 5 years ago

The purpose of this discussion is to begin the process of redesigning WyTP. Specifically, to address all of the issues around quantifiers which, today, remain the biggest source of problems.

The rough outline is:

The instantiation engine drives this by instantiating quantifiers and then using the contradiction engine to search for a problem. There are a bunch of different heuristics it can use here (e.g. instantiate individual or in batches; depth-first on a single quantified variable or breadth-first across all variables).

This mostly seems like it will work, though it raises a bunch of questions:

DavePearce commented 5 years ago

An interesting question is what the complete list of transformation rules currently employed is:

  1. Inequality Introduction. Apply transitive closure.

  2. Array Equality Case Analysis. Break down array equality expressions.

  3. Array Index Axiom. Infer requirements that index be within bounds.

  4. Array Index Case Analysis. Break down accesses on array constants.

  5. Function Call Axiom. Infer requirements that precondition be met.

  6. Macro Expansion. Expand property macros and similar (non-recursively).

  7. And and Or Elimination. Simple logical simplifications.

  8. Exists Elimination. Skolemisation.

There must also be axioms for divide by zero and array (generator) length, etc.