• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
      • Ipasir
      • Aignet
        • Base-api
        • Aignet-construction
        • Representation
          • Aignet-impl
          • Node
          • Network
          • Combinational-type
          • Stypep
          • Typecode
            • Code->ctype
            • Node->type
            • Typecode-fix
            • Typecodep
            • *ctype-code-map*
        • Aignet-copy-init
        • Aignet-simplify-marked-with-tracking
        • Aignet-cnf
        • Aignet-simplify-with-tracking
        • Aignet-complete-copy
        • Aignet-eval
        • Semantics
        • Aignet-transforms
        • Aignet-simplify-marked
        • Aignet-read-aiger
        • Aignet-write-aiger
        • Aignet-abc-interface
        • Utilities
      • Aig
      • Satlink
      • Truth
      • Ubdds
      • Bdd
      • Faig
      • Bed
      • 4v
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Testing-utilities
    • Math
  • Representation

Typecode

Numeric encoding of a combinational-type keyword.

Signature
(typecode x) → code
Arguments
x — Guard (ctypep x).
Returns
code — Type (natp code).

Definitions and Theorems

Function: typecode

(defun typecode (x)
       (declare (xargs :guard (ctypep x)))
       (let ((__function__ 'typecode))
            (declare (ignorable __function__))
            (cdr (assoc (ctype-fix x)
                        *ctype-code-map*))))

Theorem: natp-of-typecode

(defthm natp-of-typecode
        (b* ((code (typecode x))) (natp code))
        :rule-classes (:rewrite :type-prescription))

Theorem: typecode-bound

(defthm typecode-bound (< (typecode x) 4)
        :rule-classes :linear)

Theorem: typecodep-of-typecode

(defthm typecodep-of-typecode
        (typecodep (typecode x)))

Subtopics

Code->ctype
Get the combinational-type keyword from its numeric encoding.
Node->type
Get the combinational typecode from a logical node.
Typecode-fix
Fixing function for typecodes.
Typecodep
Recognizer for valid typecodes.
*ctype-code-map*