• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
          • Defgrammar-implementation
            • Defgrammar-fn
              • Defgrammar-input-processing
              • Defgrammar-table
              • Defgrammar-event-generation
              • Defgrammar-macro-definition
          • Tree-utilities
          • Notation
          • Grammar-parser
          • Meta-circular-validation
          • Parsing-primitives-defresult
          • Parsing-primitives-seq
          • Operations
          • Examples
          • Differences-with-paper
          • Constructor-utilities
          • Grammar-printer
          • Parsing-tools
        • Vwsim
        • Isar
        • Wp-gen
        • Dimacs-reader
        • Pfcs
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Defgrammar-implementation

    Defgrammar-fn

    Process the inputs and generate the events.

    Signature
    (defgrammar-fn args call ctx state) → (mv erp event state)
    Arguments
    args — Guard (true-listp args).
    call — Guard (pseudo-event-formp call).
    ctx — Guard (ctxp ctx).
    Returns
    event — Type (pseudo-event-formp event), given (true-listp args).

    Definitions and Theorems

    Function: defgrammar-fn

    (defun defgrammar-fn (args call ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (true-listp args)
                                 (pseudo-event-formp call)
                                 (ctxp ctx))))
     (let ((__function__ 'defgrammar-fn))
      (declare (ignorable __function__))
      (b* (((when (defgrammar-table-lookup call (w state)))
            (value '(value-triple :redundant)))
           ((er (list name file untranslate well-formed
                      closed parents short long other-events)
                :iferr '(_))
            (defgrammar-process-inputs args ctx state)))
       (defgrammar-gen-everything name file
                                  untranslate well-formed closed parents
                                  short long other-events call state))))

    Theorem: pseudo-event-formp-of-defgrammar-fn.event

    (defthm pseudo-event-formp-of-defgrammar-fn.event
      (implies (true-listp args)
               (b* (((mv acl2::?erp acl2::?event acl2::?state)
                     (defgrammar-fn args call ctx state)))
                 (pseudo-event-formp event)))
      :rule-classes :rewrite)