Skip to content

Commit

Permalink
strategy to remove constraints from lhs, lsegex4_slk-1 goes through
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaspena authored and nishantjr committed May 5, 2020
1 parent be93ff7 commit f4a6e03
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
20 changes: 20 additions & 0 deletions prover/lib/testlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,25 @@ def read_list(file):
) .
""".replace('\n', ' ')

lsegex4_slk_1_strategy = """
normalize . or-split-rhs
. lift-constraints . instantiate-existentials . substitute-equals-for-equals
. left-unfold-Nth(0)
. ( ( normalize . or-split-rhs . lift-constraints
. instantiate-existentials . substitute-equals-for-equals
. check-lhs-constraint-unsat . fail
)
| ( normalize . or-split-rhs . lift-constraints
. instantiate-existentials . substitute-equals-for-equals
. right-unfold-Nth(0,0)
. normalize . or-split-rhs . lift-constraints
. instantiate-existentials . substitute-equals-for-equals
. remove-constraints
. search-sl(kt-bound: 2, unfold-bound: 2)
)
) .
""".replace('\n', ' ')

# prefix KT RU timeout tests
test_lists = [ ('unfold-mut-recs . ', 3, 3, '5m', read_list('t/test-lists/passing-3-3-5'))
, ('unfold-mut-recs . ', 5, 12, '40m', read_list('t/test-lists/passing-5-12-40'))
Expand Down Expand Up @@ -309,6 +328,7 @@ def read_list(file):
, (nll_vc08_10_strategy, 2, 2, '10m', ['t/SL-COMP18/bench/qf_shid_entl/nll-vc08.smt2'])
, (nll_vc08_10_strategy, 2, 2, '10m', ['t/SL-COMP18/bench/qf_shid_entl/nll-vc10.smt2'])
, ('', 3, 2, '10m', ['t/SL-COMP18/bench/qf_shid_entl/tseg_join_tree_entail_tseg.sb.smt2'])
, (lsegex4_slk_1_strategy, 2, 2, '10m', ['t/SL-COMP18/bench/qf_shid_entl/lsegex4_slk-1.smt2'])
]
qf_shid_entl_unsat_tests = read_list('t/test-lists/qf_shid_entl.unsat')

Expand Down
1 change: 1 addition & 0 deletions prover/prover.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module STRATEGIES-EXPORTED-SYNTAX
| "match" | "match-debug" | "match-pto"
| "frame"
| "footprint-analysis" | "nullity-analysis" "(" Strategy ")"
| "remove-constraints"
| "unfold-mut-recs"
| "apply-equation"
RewriteDirection AxiomOrClaimName
Expand Down
15 changes: 15 additions & 0 deletions prover/strategies/simplification.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,21 @@ We define a similar strategy for quantified implication contexts:
rule removeTrivialEqualities(P, Ps) => P, removeTrivialEqualities(Ps) [owise]
```

### Substitute Equals for equals

```
PHI /\ C => PSI
----------------- where C is a predicate pattern
PHI -> PSI
```

```k
rule <k> \implies(\and(LHS), RHS)
=> \implies(\and(LHS -Patterns getPredicatePatterns(LHS)), RHS)
</k>
<strategy> remove-constraints => noop ... </strategy>
```

```k
endmodule
```
Expand Down

0 comments on commit f4a6e03

Please sign in to comment.