Documentation

Strata.DL.Imperative.BigStep.Sem

Big-step event semantics of call-free programs #

A big-step presentation of the reference event semantics (StepStmtStarE over EvalCmdE, no calls), with one factory:

Blocks, ite branches and loop iterations project the store on exit (projectStore), as the small-step semantics does. A loop enters its body when its guard admits it (guardEnters) and stops when its guard admits stopping (guardExits); a nondeterministic guard admits both.

Key definitions: PStmts, guardEnters, guardExits, BRun, BReach, evalInterp, FailsAt, Claim, Fails.

@[reducible, inline]

A statement of a program over commands and calls.

Equations
Instances For
    @[reducible, inline]

    A list of statements of a program over commands and calls.

    Equations
    Instances For

      Commands under the event semantics; calls have no step.

      Equations
      Instances For

        How a statement list ends.

        Instances For

          The store an outcome ends with.

          Equations
          Instances For

            The outcome of a block labelled l whose body ended with o.

            Equations
            Instances For

              The loop guard g lets the loop enter its body from the store σ: a deterministic guard evaluates to true; a nondeterministic guard always does.

              Equations
              Instances For

                The loop guard g lets the loop stop at the store σ: a deterministic guard evaluates to false; a nondeterministic guard always does.

                Equations
                Instances For
                  inductive Imperative.BigStep.BRun {P : PureExpr} [HasBool P] [HasFvar P] (F : P.Factory) :
                  PStmts P → SemanticStore P → List (Event P) → Outcome P → Prop

                  Big-step run of a statement list.

                  Instances For
                    inductive Imperative.BigStep.BRunS {P : PureExpr} [HasBool P] [HasFvar P] (F : P.Factory) :
                    PStmt P → SemanticStore P → List (Event P) → Outcome P → Prop

                    Big-step run of one statement.

                    Instances For
                      inductive Imperative.BigStep.BReach {P : PureExpr} [HasBool P] [HasFvar P] (F : P.Factory) :
                      PStmts P → SemanticStore P → List (Event P) → Prop

                      A run of a statement list emits evs and stops right after a command emitting events.

                      Instances For
                        inductive Imperative.BigStep.BReachS {P : PureExpr} [HasBool P] [HasFvar P] (F : P.Factory) :
                        PStmt P → SemanticStore P → List (Event P) → Prop

                        A run of one statement emits evs and stops right after a command emitting events.

                        Instances For

                          The interpretation of a condition as its evaluation to true under the event's factory and store, in a single world.

                          Equations
                          Instances For
                            def Imperative.BigStep.FailsAt {P : PureExpr} [HasBool P] (t : AssertId P) (e : P.Expr) :
                            Event P → Prop

                            The event is a failing occurrence of the target t with the condition e: an assertion with the label and metadata of t and the condition e, evaluating to false, or a cover with the label and metadata of t and the condition e, evaluating to true.

                            Equations
                            Instances For
                              def Imperative.BigStep.Claim {P : PureExpr} [HasBool P] (t : AssertId P) (e : P.Expr) (tr : List (Event P)) :

                              The events tr claim a failure of the target t with the condition e: they end with a failing occurrence of t with the condition e, every assumption before it evaluating to true. A list fails t with the condition e exactly when a reach of it emits events that claim that failure (fails_iff_claim).

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                def Imperative.BigStep.Fails {P : PureExpr} [HasBool P] [HasFvar P] (F : P.Factory) (ss : PStmts P) (σ : SemanticStore P) (t : AssertId P) (e : P.Expr) :

                                A statement list fails target t with the condition e from store σ: a run reaches a failing occurrence of t with the condition e, every assumption before it evaluating to true (Trace.AssumptionsHold under evalInterp).

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