Documentation

LeanPool.MRiscX.Hoare.HoareAssignmentElab

HoareAssignmentElab #

This module provides elaboration of MRiscX Hoare assignment chains.

Traverse stx and replace the keyword notations (x[..], mem[..], labels[..], ⸨pc⸩, ⸨terminated⸩) by the corresponding MState function calls on curState.

Equations
Instances For
    def getHoareAssignmentArray (stx : Lean.TSyntax `hoareAssignmentChain) (curArr : Array (Lean.TSyntax `hoareAssignment)) :

    Collect every assignment in the ⟦⟧ chain stx into a single array.

    Equations
    Instances For
      def foldTermArray (element : Lean.TSyntax `hoareAssignment) (curTerm : Lean.TSyntax `term) :

      Fold a single Hoare assignment onto the accumulated state-update term, turning it into the corresponding MState mutation.

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

        Construct the final state-update lambda term from a chain of Hoare assignments.

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