Skip to content

Lift simplifyConjunctions into the SideCondition #2249

@ttuegel

Description

@ttuegel

The table of term replacements used in simplifyConjunctions should be kept in the SideCondition. Instead of running simplifyConjunctions in the Condition simplifier, the TermLike and Predicate simplifiers will look up their argument in the SideCondition.

This will enable us to apply assumptions from the SideCondition while applying equations, which is not currently possible.


  1. Make SideCondition a MultiAnd of Predicate.
    Appetite: S. This is not the final form it will take, but this change will expose any places in the code where we make assumptions about the form of SideCondition. At this point, we are still only using the SideCondition to send to the solver. There should be instances From (Predicate variable) (SideCondition variable) and From (SideCondition variable) (Predicate variable). These instances must continue to work through the following steps.
  2. Specialize for looking up Predicate.
    Appetite: S. The SideCondition should contain a HashSet for looking up if a predicate is \top or \bottom. The SideCondition should contain a HashMap from TermLike variable to the same, storing the map used here so it's not computed every time. The Predicate simplifier should look up its argument in the SideCondition. Before Predicate should have a distinguished representation #1442: We need to set the sort to predicateSort when storing or looking up a Predicate. After Predicate should have a distinguished representation #1442: Predicate sorts will be erased automatically.
  3. Specialize the representation of \equals.
    Appetite: S. The SideCondition should contain a HashMap for looking up TermLikes for substitution.
  4. Combine SideConditions with normalization.
    Appetite: S. Combining SideConditions (by sappend or mappend) should apply the substitutions from each to the other so that the result is normalized. Note: This makes Include the side condition when evaluating functions in the side condition #1416 trivial.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions