- inputCtx : Parser.InputContext
- globalContext : GlobalContext
Instances For
Equations
Instances For
Equations
Equations
Instances For
Equations
- Strata.SourceRange.toMetaData ictx sr = #[{ fld := Imperative.MetaData.fileRange, value := Imperative.MetaDataElem.Value.fileRange { file := Strata.Uri.file ictx.fileName, range := sr } }]
Instances For
Equations
- Strata.getOpMetaData op = do let __do_lift ← StateT.get pure (Strata.SourceRange.toMetaData __do_lift.inputCtx op.ann)
Instances For
Equations
- Strata.getArgMetaData arg = do let __do_lift ← StateT.get pure (Strata.SourceRange.toMetaData __do_lift.inputCtx (Strata.ArgF.ann arg))
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.
- Strata.checkOpArg arg name argc = pure (Array.ofFn fun (x : Fin argc) => default)
Instances For
Equations
- Strata.translateCommaSep f (Strata.ArgF.seq ann Strata.SepFormat.comma args) = Array.mapM f args
- Strata.translateCommaSep f arg = Strata.TransM.error (toString "Expected commaSepList: " ++ toString (repr arg))
Instances For
Equations
- Strata.translateOption f (Strata.ArgF.option ann maybe_arg) = f maybe_arg
- Strata.translateOption f arg = Strata.TransM.error (toString "Expected Option: " ++ toString (repr arg))
Instances For
Equations
- Strata.translateIdent Identifier (Strata.ArgF.ident ann name) = pure (Coe.coe name)
- Strata.translateIdent Identifier arg = Strata.TransM.error (toString "Expected ident: " ++ toString (repr arg))
Instances For
Equations
- Strata.translateNat (Strata.ArgF.num ann n) = pure n
- Strata.translateNat arg = Strata.TransM.error (toString "translateNat expects num lit")
Instances For
Equations
- Strata.translateBitVec width (Strata.ArgF.num ann n) = pure (n % 2 ^ width)
- Strata.translateBitVec width arg = Strata.TransM.error (toString "translateBitVec expects num lit")
Instances For
Equations
- Strata.translateStr (Strata.ArgF.strlit ann s) = pure s
- Strata.translateStr arg = Strata.TransM.error (toString "translateStr expects string lit")
Instances For
Equations
- Strata.translateReal (Strata.ArgF.decimal ann d) = pure d
- Strata.translateReal arg = Strata.TransM.error (toString "translateReal expects decimal lit")
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Strata.instReprGenNum = { reprPrec := Strata.instReprGenNum.repr }
- boundTypeVars : Array Lambda.TyIdentifier
- boundVars : Array (Lambda.LExpr Core.CoreLParams.mono)
- gen : GenNum
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.
Equations
- One or more equations did not get rendered due to their size.
Equations
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
Equations
Instances For
Equations
Instances For
Equations
- Strata.translateTypeVar op = do let args ← Strata.checkOpArg op { dialect := "Core", name := "type_var" } 1 Strata.translateIdent Lambda.TyIdentifier args[0]!
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
- One or more equations did not get rendered due to their size.
Instances For
Translate a forward type declaration. This creates a placeholder entry that will be replaced when the actual datatype definition is encountered in a mutual block.
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.
- Strata.translateLhs arg = Strata.TransM.error (toString "translateLhs expected op " ++ toString (repr arg))
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Strata.translateBindMk bindings arg = Strata.TransM.error (toString "translateBindMk expected op " ++ toString (repr arg))
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Strata.translateMonoBindMk bindings arg = Strata.TransM.error (toString "translateMonoBindMk expected op " ++ toString (repr arg))
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
- Strata.dealiasTypeArg p (Strata.ArgF.type tp) = Strata.ArgF.type (Strata.dealiasTypeExpr p tp)
- Strata.dealiasTypeArg p a = a
Instances For
Equations
- Strata.isArithTy (Lambda.LMonoTy.tcons "int" []) = true
- Strata.isArithTy (Lambda.LMonoTy.tcons "real" []) = true
- Strata.isArithTy (Lambda.LMonoTy.bitvec size) = true
- Strata.isArithTy x✝ = false
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Strata.translateInvariant p bindings arg = pure none
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
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Strata.translateInitMkBindings bindings ops = Array.mapM (fun (op : Strata.Arg) => Strata.translateInitMkBinding bindings op) ops
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Strata.translateModifies arg = do let args ← Strata.checkOpArg arg { dialect := "Core", name := "modifies_spec" } 1 Strata.translateIdent Core.CoreIdent args[0]!
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Strata.translateOptionFree (Strata.ArgF.option ann none) = pure Core.Procedure.CheckAttr.Default
- Strata.translateOptionFree arg = Strata.TransM.error (toString "translateOptionFree unexpected " ++ toString (repr arg))
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
- One or more equations did not get rendered due to their size.
- Strata.translateSpecElem p name count bindings arg = Strata.TransM.error (toString "translateSpecElem expects an op " ++ toString (repr arg))
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
Translate a top-level block command as a nameless parameterless procedure
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
- 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
- Strata.instReprFnInterp = { reprPrec := Strata.instReprFnInterp.repr }
Equations
- Strata.instReprFnInterp.repr Strata.FnInterp.Definition prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Strata.FnInterp.Definition")).group prec✝
- Strata.instReprFnInterp.repr Strata.FnInterp.Declaration prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Strata.FnInterp.Declaration")).group prec✝
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Strata.translateOptionInline (Strata.ArgF.option ann none) = pure #[]
- Strata.translateOptionInline arg = Strata.TransM.error (toString "translateOptionInline unexpected " ++ toString (repr arg))
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Information about a single constructor extracted during translation.
This is the Strata Core-specific version of ConstructorInfo from AST.lean,
with types translated from TypeExpr to LMonoTy.
- name : Core.CoreIdent
Constructor name
- fields : Array (Core.CoreIdent × Lambda.LMonoTy)
Fields as (fieldName, fieldType) pairs with translated types
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Extract and translate constructor information from a constructor list argument.
Parameters:
p: The DDM Program (provides dialect map for annotation lookup)bindings: Current translation bindings (for type variable resolution)arg: The constructor list argument from the parsed datatype command
Equations
- Strata.translateConstructorList p bindings arg = Array.mapM (Strata.translateConstructorInfo✝ bindings) (Strata.GlobalContext.extractConstructorInfo p.dialects arg)
Instances For
Extract type arguments from a datatype's optional bindings argument.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Create a placeholder LDatatype for recursive type references.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Filter factory function declarations to extract constructor, tester, and field accessor decls for a single datatype.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build LConstr list from TransConstructorInfo array.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Generate factory function declarations from a list of LDatatypes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Translate a datatype declaration to Boogie declarations, updating bindings appropriately.
Important: The returned Core.Decls only contains the type declaration
itself. Factory functions (constructors, testers, destructors) are generated
automatically by Env.addDatatypes during program evaluation to avoid
duplicates.
Parameters:
p: The DDM Program (provides dialect map)bindings: Current translation bindingsop: Thecommand_datatypeoperation to translate
Equations
- One or more equations did not get rendered due to their size.
Instances For
Translate a mutual block containing mutually recursive datatype definitions. This collects all datatypes, creates a single TypeDecl.data with all of them, and updates the forward-declared entries in bindings.freeVars.
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
- Strata.translateCoreDecls p bindings = do let __discr ← Strata.translateCoreDecls.go p 0 p.commands.size bindings p.commands match __discr with | (decls, snd) => pure decls
Instances For
Equations
- One or more equations did not get rendered due to their size.