• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
        • Notation
          • Syntax-abstraction
          • Semantics
          • Abstract-syntax
            • Convenience-constructors
            • Num-val
            • Char-val
            • Repeat-range
            • Rulename
            • Rule
              • Rule-fix
              • Rulep
              • Rule-equiv
              • Make-rule
                • Rule->incremental
                • Change-rule
                • Rule->definiens
                • Rule->name
              • Rulename-option
              • Num-base
              • Rule-option
              • Prose-val
              • Rulelist
              • Char-val-set
              • Rulename-set
              • Rulename-list
              • Grammar
              • Alt/conc/rep/elem
            • Core-rules
            • Concrete-syntax
          • 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
    • Rule

    Make-rule

    Basic constructor macro for rule structures.

    Syntax
    (make-rule [:name <name>] 
               [:incremental <incremental>] 
               [:definiens <definiens>]) 
    

    This is the usual way to construct rule structures. It simply conses together a structure with the specified fields.

    This macro generates a new rule structure from scratch. See also change-rule, which can "change" an existing structure, instead.

    Definition

    This is an ordinary make- macro introduced by fty::defprod.

    Macro: make-rule

    (defmacro make-rule (&rest args)
      (std::make-aggregate 'rule
                           args
                           '((:name) (:incremental) (:definiens))
                           'make-rule
                           nil))

    Function: rule

    (defun rule (name incremental definiens)
      (declare (xargs :guard (and (rulenamep name)
                                  (booleanp incremental)
                                  (alternationp definiens))))
      (declare (xargs :guard t))
      (let ((__function__ 'rule))
        (declare (ignorable __function__))
        (b* ((name (mbe :logic (rulename-fix name)
                        :exec name))
             (incremental (mbe :logic (acl2::bool-fix incremental)
                               :exec incremental))
             (definiens (mbe :logic (alternation-fix definiens)
                             :exec definiens)))
          (cons :rule (list name incremental definiens)))))