runtimeverification / haskell-backend

The symbolic execution engine powering the K Framework
BSD 3-Clause "New" or "Revised" License
208 stars 41 forks source link

Make SMTContext mandatory and merge Unknown with ReasonUnknown #4003

Closed goodlyrottenapple closed 2 months ago

goodlyrottenapple commented 2 months ago

I have changed my mind and think we should have SMTContext mandatory and not an optional, as the current design makes it way too easy to give a default Nothing value when extending the code-base in the future. This then has the potential to re-introduce a similar bug. Another advantage tot his approach is the removal of the ugly pattern matching present each time we actually want to use the solver. Instead, in this PR, the Maybe is pushed into SMTContext, where the dummy/empty instance now has to be consciously built using the new noSolver function. The fallout is fairly minimal and we confide the logic of not having a solver to the SMT interface. I.e. the only places where not having a solver has a different behavior are: