Ensure that definitions have the same ordering with dolmen #771
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The dolmen frontend is adding declarations to the end of the command queue instead of to the front, causing the final command list to be all shuffled. This is the cause of at least some of the regressions with the dolmen frontend, since the solver now processes things in a different order.
This patch ensures that the definitions are added with the correct ordering, so that the command queue should be the same with both frontends, barring additional bugs. This was tested with
-d commands
on a few benchmarks locally, where it produced the exact same output with both frontends.The patch also refactors slightly the [handle_smtt] method in the solving loop: as part of the debugging for this, I realized that we can never end up with
Hyp
constructors with local/global hypotheses names there, because one difference between the Dolmen and legacy frontend is that the legacy frontend extracts the hypotheses from the goal during typechecking (so prior to cnf-conversion) while the Dolmen frontend extracts the hypotheses from the goal during cnf-conversion (i.e. when we encounter aSolve
).