Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding-Oriented Design (BOD) #149

Open
DavePearce opened this issue Oct 23, 2018 · 1 comment
Open

Binding-Oriented Design (BOD) #149

DavePearce opened this issue Oct 23, 2018 · 1 comment

Comments

@DavePearce
Copy link
Member

DavePearce commented Oct 23, 2018

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:

  • Instantiation Engine. This instantiates quantifiers in a given state.

  • Contradiction Engine. For a given state, this searches for a contraction by through congruence, inequalities, and other rules.

  • State. The state consists of a a bunch of variable declarations (inc. quantified variables) and terms. There are no longer any specific quantifiers as before, leaving a flat hierarchy.

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:

  • Efficiency. Can we incrementally update a State after more things are instantiated? For example, if a given State is expanded into a tree then we only need to propagate instantiated terms through to unresolved leaves.

  • Axioms. Are these expanded in the contradiction engine, or can we do something else? Perhaps we can fit this together somehow with the interpreter.

@DavePearce
Copy link
Member Author

DavePearce commented Oct 24, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant