• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
          • Syntax-for-tools
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Compilation-database
            • Printer
            • Output-files
            • Abstract-syntax-operations
              • Expr-priority
                • Expr-priority-fix
                • Expr-priority-case
                • Expr-priorityp
                  • Expr-priority-equiv
                  • Expr-priority-kind
                  • Expr-priority-xor
                  • Expr-priority-unary
                  • Expr-priority-sh
                  • Expr-priority-rel
                  • Expr-priority-primary
                  • Expr-priority-postfix
                  • Expr-priority-mul
                  • Expr-priority-logor
                  • Expr-priority-logand
                  • Expr-priority-ior
                  • Expr-priority-expr
                  • Expr-priority-eq
                  • Expr-priority-cond
                  • Expr-priority-cast
                  • Expr-priority-asg
                  • Expr-priority-and
                  • Expr-priority-add
                • Expr-priority-<=
                • Combine-dirabsdeclor-into-dirabsdeclor
                • Declor/dirdeclor-rename
                • Check-decl-spec-list-all-typespec/stoclass
                • Binop-expected-priorities
                • Expr->priority
                • Transunit-at-path
                • Declor/dirdeclor->ident
                • Declor/dirdeclor-has-params-p
                • Check-expr-binary
                • Apply-post-inc/dec-ops
                • Check-spec/qual-list-all-typespec
                • Apply-pre-inc/dec-ops
                • Check-decl-spec-list-all-typespec
                • Expr-to-asg-expr-list
                • Check-expr-mul
                • Expr-unary/postfix/primary-p
                • Transunit-ensemble-paths
                • Check-struni-spec-no-members
                • Expr-postfix/primary-p
                • Dirabsdeclor-declor?-nil-p
                • Check-enum-spec-no-list
                • Expr-zerop
                • Expr-priority->=
                • Decl-spec-list-to-stor-spec-list
                • Spec/qual-list-to-type-spec-list
                • Expr-priority->
                • Expr-priority-<
                • Declor-spec-list-filter-out-linkage-specs
                • Decl-spec-list-to-type-spec-list
                • Ident-list-map-expr-ident
                • Binop->priority
                • Stringlit-list->prefix?-list
                • Declor-spec-list-make-static
                • Binop-strictp
                • Check-expr-iconst
                • Initdeclor->ident
                • Check-expr-ident
                • Dirabsdeclor-to-dirdeclor
                • Dirabsdeclor-option-to-dirdeclor
                • Dirdeclor-has-params-p
                • Absdeclor-to-declor
                • Dirdeclor-rename
                • Declor-rename
                • Declor-has-params-p
                • Dirdeclor->ident
                • Declor->ident
              • Implementation-environments
              • Abstract-syntax
              • Concrete-syntax
              • Disambiguation
              • Validation
              • Gcc-builtins
              • Preprocessing
              • Parsing
            • Atc
            • Transformation-tools
            • Language
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Expr-priority

    Expr-priorityp

    Recognizer for expr-priority structures.

    Signature
    (expr-priorityp x) → *

    Definitions and Theorems

    Function: expr-priorityp

    (defun expr-priorityp (x)
      (declare (xargs :guard t))
      (and (consp x)
           (cond ((or (atom x) (eq (car x) :primary))
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :postfix)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :unary)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :cast)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :mul)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :add)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :sh)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :rel)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :eq)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :and)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :xor)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :ior)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :logand)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :logor)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :cond)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 ((eq (car x) :asg)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 (t (and (eq (car x) :expr)
                         (and (true-listp (cdr x))
                              (eql (len (cdr x)) 0))
                         (b* nil t))))))

    Theorem: consp-when-expr-priorityp

    (defthm consp-when-expr-priorityp
      (implies (expr-priorityp x) (consp x))
      :rule-classes :compound-recognizer)