Documentation

StrataDDM.Format

Check if a character is valid for starting a regular identifier. Regular identifiers must start with a letter or underscore.

NOTE: When updating this function, you will want to consider updating Strata/DDM/Parser.lean as well.

Equations
Instances For

    Check if a character is valid for continuing a regular identifier. Includes @ and $ which are valid in SMT-LIB 2.6 simple symbols and used by the encoder for disambiguated names (e.g. x@1) and generated names (e.g. $__bv0). Note: ' (apostrophe) is intentionally excluded. Although SMT-LIB 2.6 allows it in simple symbols, both cvc5 and Z3 reject it as an unquoted character. Names containing ' (e.g. Lean's v') will be pipe-quoted instead.

    Equations
    Instances For

      Quote an identifier string for SMT-LIB, adding pipe delimiters if needed.

      Equations
      Instances For
        Instances For

          Options to control parenthesis

          • alwaysParen : Bool

            Always add parenthesis when feasible.

          • smtStringEscaping : Bool

            Use SMT-LIB 2.7 string escaping ("" for quotes) instead of C-style (\").

          • Force a format mode per literal kind (e.g. "decimal"), overriding any dialect-declared spec. An absent entry means "use each type's default".

          Instances For

            A format context provides callbacks and information needed to properly pretty-print Strata AST types.

            Instances For

              Set the format mode carried from the current argument's declaration.

              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

                  Format state

                  Instances For

                    A format context that uses no syntactic sugar.

                    Equations
                    Instances For
                      Equations
                      Instances For

                        A StrataFormat is a closure which given contextual information produces a format operation as well as a precedence. This is used for auto-inserting parenthesis when needed.

                        Formats should return maxPrec when parenthesis are not required.

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

                              This renders an operation returning its string representation and new state.

                              Equations
                              Instances For
                                @[implicit_reducible]
                                Equations
                                • One or more equations did not get rendered due to their size.
                                def StrataDDM.DialectMap.format (dialects : DialectMap) (name : DialectName) (mem : name ∈ dialects) (opts : FormatOptions := { }) :

                                Pretty print the dialect with the given name in the map.

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