Documentation

Strata.Languages.Core.StatementEval

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

    Evaluate a procedure call lhs := pname(args).

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Core.Statement.Command.eval (E : Env) (old_var_subst : SubstMap) (c : Command) :
      Equations
      Instances For
        @[irreducible]

        Generic function to check if a statement contains a specific command type.

        Equations
        Instances For
          @[irreducible]

          Generic function to check if statements contain a specific command type.

          Equations
          Instances For

            Detect if statements contain any cover commands.

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

              Detect if statements contain any assert commands.

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

                Substitute free variables in an expression with their current values from the environment, excluding the given parameter names (which are bound by the function, not free). This implements value capture semantics for local function declarations (funcDecl).

                Unlike global functions (which are evaluated at the top level with no local state), local functions capture the values of free variables at the point of declaration. Parameters are excluded because they are bound by the function definition and should not be substituted with values from the enclosing scope.

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

                        An environment with an optional exit label and transformed statements (i.e., statements that have already been evaluated).

                        Instances For

                          Process an exit statement. When exitLabel is active, skip remaining statements. The exit propagates up through blocks until a matching block is found.

                          • exit (no label): exits the nearest enclosing block
                          • exit l: exits the nearest enclosing block labeled l
                          Equations
                          Instances For
                            @[irreducible]
                            def Core.Statement.evalAuxGo (steps : Nat) (old_var_subst : SubstMap) (Ewn : EnvWithNext) (ss : Statements) (optExit : Option (Option String)) :
                            Equations
                            Instances For
                              @[irreducible]
                              def Core.Statement.processIteBranches (steps : Nat) (old_var_subst : SubstMap) (Ewn : EnvWithNext) (cond cond' : Expression.Expr) (then_ss else_ss : Statements) (md : Imperative.MetaData Expression) (orig_stk : StmtsStack) :
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                def Core.Statement.evalAux (E : Env) (old_var_subst : SubstMap) (ss : Statements) (optExit : Option (Option String)) :
                                Equations
                                Instances For
                                  Equations
                                  Instances For
                                    def Core.Statement.eval (E : Env) (old_var_subst : SubstMap) (ss : Statements) :

                                    Partial evaluator for statements yielding a list of environments and transformed statements.

                                    The argument old_var_subst below is a substitution map from global variables to their pre-state value in the enclosing procedure of ss.

                                    Equations
                                    Instances For
                                      def Core.Statement.evalOne (E : Env) (old_var_subst : SubstMap) (ss : Statements) :

                                      Partial evaluator for statements yielding one environment and transformed statements.

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