isla icon indicating copy to clipboard operation
isla copied to clipboard

[FEATURE] Grammatical Case Distinction for SMT Formulas

Open rindPHI opened this issue 1 year ago • 0 comments

Implement solving SMT formulas by grammatical case distinction: A predicate holds iff it holds for all direct children of an involved variable. Several issues need to be resolved for this, see #83.

Originally posted by @leonbett in https://github.com/rindPHI/isla/issues/83#issuecomment-1667448425:

In this particular example, one idea would be to transform:

(= (str.indexof <entry> "x") (- 1))

into

 (= (str.indexof <entry>.<A> "x") (- 1)) and
(= (str.indexof <entry>.<X> "x") (- 1)) and
(= (str.indexof <entry>.<A> "x") (- 1))

and solve each subexpression separately.

My intuition is that Z3 would return unsat for (= (str.indexof <entry>.<X> "x") (- 1)), which implies unsat for the full expression. Unfortunately I can‘t test this currently as I am replying from my phone.

rindPHI avatar Aug 07 '23 08:08 rindPHI