Skip to content

Multiple queries/API change #6

Open

Description

@RobinWebbers

Right now, the symbolic evaluator API simply permits only a single query to the SMT solver. Sometimes there is benefit in permitting multiple queries however. For example, if you have a query over two disjoint properties it is better to query separately. Splitting the query into two annotations might duplicate work in the evaluation, which is also problematic. Even worse, if we want to conditionally do more queries, we cannot... For example, if we want to increase a bound for iterative deepening.

The solution I propose for now would be through a monadic interface of the evaluator instead. That is, instead of boolean functions, we would expect a function of type Sym (). The Sym monad would have a few built-in functions it exposes:

  1. Query an SMT solver for satisfiability (or validity) of a given expression.
  2. Write a counterexample expression to a function definition Counterexample should not require search over entire module to be provided #5
  3. Optionally enable the fresh variable generation Fresh variable generation API #3

These functions thus should get very special meaning in the evaluator, but it would permit a much richer way to use the symbolic evaluator!

Activity

  1. changed the title [-]Multiple queries[/-] [+]Multiple queries/API change[/+] on Jul 28, 2026
  2. RobinWebbers commented on Oct 16, 2026

    @RobinWebbers
    MemberAuthor

    Here's a few more that might make sense:

    • Halt the evaluator (useful if you e.g. want to crash given a non valid result)
    • 'evaluate' (i.e. force a value), but with specific settings. Alternatively, the settings can be placed in a stateful way? Not sure what is better. Settings could include:
      • Max depth (useful for satisfiability checking)
      • How often to prune
      • Maybe to select the merging strategy? (i.e. some hybrid approach)
    • Fill in an expression with a model from the solver
    • Dump the RTS (i.e. the runtime system, printing all reachable expression of a given expression)
    • Measure timing

    Regarding satisfiability/validity check, perhaps the most modular way to permit these is by having functions to catch Unreachable, UndefinedBehaviour and Raise? The alternative is to bake these into the check.

    Note, we should btw error if we do not get a unit value at the end of eval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions