-
Notifications
You must be signed in to change notification settings - Fork 21
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
Heap-dependent function with QPs generates triggerless axiom #522
Comments
After some testing, it seems that an equivalent Skolemized formula can perform much better in place of the quantified LHS here. Continuing the above example, this would look like:
where the inner (LHS) quantifier is dropped, and Preliminary tests indicate that only one member of each equivalence class of heap-based function applications that produce identical outputs will appear as a trigger of this axiom for subsequent heaps. So, if
(whereas, in the original axiom, this would potentially be proved twice, for "Skolem constant" I am working on a pull request to generate the Skolemized form of the axiom. |
While considering performance issues for heap-dependent functions, we found that the following function definition in Viper:
will generate this axiom in the Boogie translation using Carbon:
The inner quantifier
(forall ref: Ref :: ...)
is missing a trigger, presumably because in the context of the outer implication, it will become an existential that the solver uses to generate a Skolemized term with the bound variableref
replaced.@alexanderjsummers and I discussed two changes:
(forall ref: Ref :: ...)
to at indicate (at least to anyone reading this Boogie code) that this quantifier shouldn't be triggered.heapFun#condqp1(Heap2Heap, refs)
andheapFun#condqp1(Heap1Heap, refs)
as arguments. This could potentially reduce the number ofMap#Equal
obligations arising from the quantifier body of the Skolemized(forall ref: Ref :: ...)
terms in the situation whereheapFun
must be framed across many heaps (so that thisaxiom (forall Heap2Heap: HeapType, Heap1Heap: HeapType, refs: (Set Ref) :: ...)
gets triggered on many pairs ofHeapType
objects, and we lose progress on input values for whichheapFun
has previously been shown to be equal).The text was updated successfully, but these errors were encountered: