LeventErkok / sbv

SMT Based Verification in Haskell. Express properties about Haskell programs and automatically prove them using SMT solvers.
https://github.com/LeventErkok/sbv
Other
240 stars 33 forks source link

Can we separate Provable from Satisfiable #648

Closed LeventErkok closed 1 year ago

LeventErkok commented 1 year ago

Currently we allow sat calls on Goal. That's just fine. But we also allow prove calls on Goal's. That's semantically fine too, but is a bit bizarre. Would be nice to be able to do the former but not the latter.

Unfortunately, my experiment with this in the provableAndSatisfiable branch didn't go too far; it lead to a lot of code, and also didn't accomplish the task:

     - REJECT: prove $ \x -> (do { constrain ( x .> (5::SInteger)) } :: Goal)
     - REJECT: prove (pure () :: Goal)
     - ACCEPT: sat   $ \x -> (do { constrain ( x .> (5::SInteger)) } :: Goal)
     - ACCEPT: sat (pure () :: Goal)

Perhaps this idea can be revisited at some point.