-
Notifications
You must be signed in to change notification settings - Fork 33
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
Remove the Record
theory
#1095
base: next
Are you sure you want to change the base?
Remove the Record
theory
#1095
Conversation
0e0a6a1
to
3ba843d
Compare
117dfe2
to
1d30760
Compare
1d30760
to
4ac01de
Compare
2e54e7a
to
79099b0
Compare
Records
theory into ADT
theoryRecord
theory
As I expected, we got regressions if we do not produce a context in the (set-logic ALL)
(declare-datatype unit ((void)))
(declare-datatype t ((box (unbox unit))))
(declare-fun f (t t) Bool)
(assert (forall ((u t) (v t)) (f u (box (unbox v)))))
(assert (not (f (box void) (box void))))
(check-sat) We expect that If you modify the input file as follows: (set-logic ALL)
(declare-datatype unit ((void)))
(declare-datatype t ((box (unbox unit))))
(declare-fun f (t) Bool)
(assert (forall ((v t)) (f (box (unbox v)))))
(assert (not (f (box void))))
(check-sat) Alt-Ergo outputs Notice that there is specific code in (set-logic ALL)
(declare-datatype t ((c (b Bool))))
(declare-fun f (t) Bool)
(declare-const x t)
(assert (forall ((y Bool)) (f (c y))))
(assert (not (f x)))
(check-sat) Alt-Ergo outputs I removed this code in the present branch and did not write anything to replace it but still the test passes. It works for a good reason! First of all, the ADT |
75b2d25
to
31c4c66
Compare
In the last patch, I use the context of I am running benchmarks to check if this patch removes most of the regressions. Even if it does, I would prefer a solution without using the context of |
+55-12 on ae-format and the solver is slightly faster :) |
Okay, I was not completely satisfied by the last commit. It is sad to still use the context of Another way to solve this issue consists in eliminating as earlier as possible terms of the form
where If we replace it by:
Alt-Ergo should generate the trigger Actually, I tried another transformation:
It works if we disable some simplifications done in the smart constructor |
7d55bc9
to
20d966c
Compare
As we load by default prelude with plenty of axioms, we got a lot of messages about these axioms in the debugging printers of `Matching`. This commit changes this behavior. We only print messages if there is at least one candidate.
Currently, the test `record.smt2` of the issue 1008 only succeeds with the Tableaux SAT solver
The function `xs_modulo_records` is not useful anymore. Indeed, all the ADT variables are sent to the ADT relation thanks to the `init` function of `Uf`. As record type has only one constructor by definition, this will always replace a record variable by a record definition in the union find and we can match patterns of the form `{ lbl1 = ..; ...; lblk = ..}`.
I think that this PR is now ready to review. I keep the current code with context in |
This PR removes the Record theory and sends all the records to the ADT theory.
This modification does not fix #1008 as expected because SatML does not send some terms generated by
Adt_rel
to the instantiation engine.