Documentation

Lean.Meta.Tactic.BVDecide.EPR.InstSets

This module implements a Z3 style analysis of instantiation sets for the MBQI procedure on BitVec encoded EPR problems. The procedure tracks the following sets:

In an initial step we analyze all existing quantifiers and visit their propositional atoms with polarity information:

After this initial analysis of the quantifiers we can inspect the ground instances (and continue to do so as the CEGAR loop works), here we are interested in correctly maintaining the A_p_i sets by inserting ground terms t occuring at position i in p. In particular, only the positions where where a variable occurs matter, the rest can be discarded.

By continously updating the instantiation sets during the CEGAR loop we maintain candidate sets of interesting values for all variables in the form of the S_x sets. We use these to limit the search to interesting instances as opposed to always allowing any member of the sort in.

The avoid and exception sets are used to build clever models of predicates that help this procedure.

If e is toBvAux elems h x, return x.

Equations
Instances For

    If e is a full application of toBvPredₙ, return n. A full application consists of 4 * n sort encoding arguments, the predicate itself and n BitVec arguments.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      If e is a full application of toBvPredₙ return the original predicate and the BitVec arguments it is applied to.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        The information associated with a frozen class of the instantiation set analysis.

        • sort : SortId
        • full : Bool

          Whether the instantiation set contains all elements of the sort.

        • terms : Array Expr

          The ground terms in the instantiation set, in the order they were discovered.

        • termSet : Std.HashSet Expr
        • exceptions : Std.HashSet Expr

          Ground terms whose value the projection else value should avoid.

        • Classes whose projection else value the projection else value of this class should avoid.

        Instances For

          The frozen result of the instantiation set analysis, enriched with ground terms as the CEGAR loop discovers them.

          • Map from eqc roots to their information.

          • varRoots : Array (Array Nat)

            For each quantified fact and each of its variables the eqc root of S_x.

          • posRoot : Std.HashMap (Expr × Nat) Nat

            For each (p, i) that has a quantified variable at argument i of p the eqc root of A_p_i. Exactly these positions require a projection.

          Instances For

            Analyze the quantified facts of problem. The ground terms of the problem are not taken into account yet, they have to be added through addGround.

            Equations
            Instances For

              Add the arguments of all ground predicate applications in e to the instantiation sets.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Trace the instantiation sets of all classes that are not unrestricted.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For