-
Notifications
You must be signed in to change notification settings - Fork 0
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
Allow for checking proposed solution #9
Comments
Let us do this on the cleanup branch rather than main (perhaps after resolving #10 so we are sure that things are working correctly). The more accurate version of (ii) that can be used even if we have quantified constraints and such is to collect the constraints, make a disjunction over them, negate that expression and give that as one big constraints. Now check if the solver says 'unsat'. This says that there is no way the given candidate can refute even one of the constraints, and is a better check. In our case all of our constraints are variable-free, and therefore it is sufficient to simply do the above suggestion. |
Component (i) should be implementable via the Cocke-Younger-Kasami algorithm in polynomial time, but this requires converting the grammar to Chomsky normal form first (also polynomial). |
Thanks to the lisplike module, this became much simpler than suggested in my earlier comment. This needs more testing, but I believe component (i) is complete via the is_admissible function in SyGuSGrammar. An example of use, when The return is currently just a bool, but could be extended to give the replacement rule tree certifying admissibility. |
That's great! It's good to have some component doing the job. We can always have two versions, a 'cheap' check that checks only if the proposed solution satisfies the constraints, and the 'expensive' check that involves checking membership in the grammar as well. |
The core solution to (ii) is set-up, but I'm not sure the interface is yet as desired. Currently, solutions may be proposed (and run for satisfiability in stead of the synthesized function as the lemma "body") via the options arguments in Here's an example from a notebook:
The printed result is:
The program does not check for admissibility when replacing synthesized functions with proposed solutions (the line to do so is currently commented out) in order for the default to be the 'cheap' check Adithya mentioned above. So the user must run the 'expensive' check manually. Since the grammar is required for the 'expensive' check, this (manual check) occurs after running N.B. In the above example, |
Develop a feature which can input a proposed model-lemma to a grammar and decide whether or not this proposition could have been the result of some model applied to the grammar's synthesized lemma.
This could be done by checking all possible models (mod equivalence from nested
ite
statements) to see if any generate the proposed solution when applied to the synthesized lemma.The text was updated successfully, but these errors were encountered: