Documentation

Strata.Languages.Laurel.Grammar.ConcreteToAbstractTreeTranslator

  • uri : Uri

    The file the program being translated came from. Compiler-embedded preludes name their defining .lean file and set synthesized.

  • synthesized : Bool

    True when the source is a compiler-embedded prelude rather than a user file. Only affects the Core MetaData provenance; FileRanges still name uri so every AST node carries a real file.

  • errors : Array String
Instances For
    @[reducible, inline]
    Equations
    Instances For
      def Strata.Laurel.TransM.run {α : Type} (uri : Uri) (m : TransM α) (synthesized : Bool := false) :
      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
            • One or more equations did not get rendered due to their size.
            Instances For
              Equations
              Instances For
                @[implicit_reducible]
                Equations
                Equations
                Instances For
                  Equations
                  Instances For
                    @[irreducible]
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Equations
                      Instances For
                        @[implicit_reducible]
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Equations
                        Instances For

                          Translate a Seq InvariantClause into the list of invariant conditions, using translate for each clause body. Shared by the while, forLoop, and doWhile arms. Takes translate as a parameter so it can stay outside the translateStmtExpr mutual block and thus be a total def.

                          Equations
                          Instances For

                            Translate the target of an increment/decrement operator. The target must be an lvalue: either a local variable reference (Var (.Local _)) or a field access (Var (.Field _ _)). Anything else is reported as a translation error.

                            User modifies clauses fold into a single unguarded ModifiesGroup — one frame, exactly the pre-guard semantics. A modifiesWhenClause (pass-generated, but parsed here so printed output round-trips) contributes its own guarded group.

                            Equations
                            Instances For
                              Equations
                              Instances For
                                Equations
                                Instances For

                                  Translate the single-output Laurel.returnType op into the implicit $result output parameter.

                                  A producer may attach a source range only to the outer returnType op: the Java front-end builds the inner type op from a javac Type, which carries no tree position, so the inner op's range is the SourceRange.none sentinel. Fall back to the outer op's range in that case, so the ensures that ConstrainedTypeElim synthesizes for a constrained output type (e.g. int32 for a Java int) inherits a real location — otherwise an implicit no-overflow failure is reported at the whole-file fallback position instead of at the return type.

                                  The jverify producer now stamps the declared type tree's range on the inner op itself (this CR's StrataJavaFrontEnd commit), so for current jverify the inner range wins and this fallback is a safety net — it remains load-bearing for other producers and previously-emitted Ion.

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

                                                  Translate one non-global top-level command, preserving the existing public API.

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

                                                    Translate concrete Laurel syntax into abstract Laurel syntax

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