Documentation

Cvc.Gen.View

Generating views #

A view takes a term apart one level: its operator, as a constructor, and its kids. Each theory has its own view, generated from its specification beside its constructors — or, for what no specification describes, written by hand and registered — and def.term_view V gathers the views of every theory the current module imports into one inductive.

Which theories def.term_view gathers is decided by the registry, which holds exactly the views of the modules imported: importing a theory is what makes its operators visible.

Like Cvc.Gen.Term, this module imports neither layer: every name the generated code mentions is built with mkIdent, fully qualified.

The registry #

A registered sort-erased view.

Instances For

    The registered sort-erased views, imported ones included.

    Every registered sort-erased view.

    Equations
    Instances For

      Emitted names #

      Built with mkIdent and spliced, never written in a quotation: a name written there resolves against this module's environment, which imports neither layer.

      Cvc.Untyped.Term.

      Equations
      Instances For

        Cvc.Untyped.Kids.

        Equations
        Instances For

          Cvc.Untyped.BVar.

          Equations
          Instances For

            Cvc.Untyped.Term.asBVar.

            Equations
            Instances For

              cvc5.Kind.<k>.

              Equations
              Instances For

                The kinds of values: the leaves own them, so no view does.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def Cvc.viewDoc (s : String) :
                  Lean.TSyntax `Lean.Parser.Command.docComment

                  A docstring node.

                  Equations
                  Instances For
                    def Cvc.viewCtorDoc (spec : OpSpec) (nary : Bool) :

                    A view constructor's docstring: its entry's, plus where the operands are when nary.

                    Equations
                    Instances For

                      A theory's sort-erased view #

                      @[reducible, inline]

                      A view's constructor, and its viewer's alternative.

                      Equations
                      Instances For

                        One entry's constructor in its theory's view, and the viewer's alternative for it.

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

                          Generates and registers a theory's sort-erased view from its specification module.

                          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

                              Registers a hand-written sort-erased view: its inductive, and each constructor with the kind it owns. The theory is the inductive's last component.

                              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

                                  Lists the registered sort-erased views: each theory, how many operators it takes apart, and the specification entries it has no constructor for.

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

                                      The sort-erased aggregate #

                                      The aggregate's variant holding a theory's view: ofArith, which no operator's name can clash with.

                                      Equations
                                      Instances For

                                        Generates the sort-erased aggregate V from every registered view.

                                        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

                                            Declares V, a sort-erased term taken apart one level, over every theory imported.

                                            V.of t takes t apart; a match on it names operators directly (.add kids, .ite c a b), the leaves .value, .symbol and .bvar, or .other for a term no imported theory takes apart. Needs variable [Ω] in scope.

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