• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • 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
      • Riscv
      • Taspi
      • Bitcoin
      • 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
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
                • Execution
                • Values
                • Dynamic-environments
                • Arithmetic-operations
                • Curve-parameterization
                • Shift-operations
                • Errors
                • Value-expressions
                • Locations
                  • Location
                    • Location-case
                    • Location-fix
                    • Location-count
                    • Location-equiv
                    • Locationp
                    • Location-tuple-comp
                    • Location-struct-comp
                    • Location-var
                    • Location-kind
                  • Input-execution
                  • Edwards-bls12-generator
                  • Equality-operations
                  • Logical-operations
                  • Program-execution
                  • Ordering-operations
                  • Bitwise-operations
                  • Literal-evaluation
                  • Type-maps-for-struct-components
                  • Output-execution
                  • Tuple-operations
                  • Struct-operations
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Location

    Location-kind

    Get the kind (tag) of a location structure.

    Signature
    (location-kind x) → kind
    Arguments
    x — Guard (locationp x).

    Definitions and Theorems

    Function: location-kind$inline

    (defun location-kind$inline (x)
      (declare (xargs :guard (locationp x)))
      (let ((__function__ 'location-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :var)) :var)
                          ((eq (car x) :tuple-comp) :tuple-comp)
                          (t :struct-comp))
             :exec (car x))))

    Theorem: location-kind-possibilities

    (defthm location-kind-possibilities
      (or (equal (location-kind x) :var)
          (equal (location-kind x) :tuple-comp)
          (equal (location-kind x) :struct-comp))
      :rule-classes
      ((:forward-chaining :trigger-terms ((location-kind x)))))