• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
      • Gl
      • Witness-cp
      • Ccg
      • Install-not-normalized
      • Rewrite$
      • Removable-runes
      • Efficiency
      • Rewrite-bounds
      • Bash
      • Def-dag-measure
      • Fgl
        • Fgl-rewrite-rules
          • Fgl-syntactic-checker-binders
            • Integer-length-bound
            • Check-int-sign
            • Check-int-endp
            • Check-unsigned-byte-p
            • Check-signed-byte-p
            • Check-integerp
            • Check-true
            • Check-non-integerp
            • Check-non-consp
            • Check-non-booleanp
            • Check-booleanp
            • Check-natp
            • Check-equal
            • Check-consp
            • Check-bitp
          • Binder
          • Fancy-ev
          • Def-fgl-program
          • Bind-var
          • Add-fgl-brewrites
          • Def-fgl-rewrite
          • Narrow-equiv
          • Def-fgl-branch-merge
          • Add-fgl-rewrites
          • Fgl-interp-obj
          • Fgl-prog2
          • Collect-cmr-rewrites-for-formula-name
          • Syntax-bind
          • Fgl-time
          • Assume
          • Add-fgl-binder-meta
          • Add-fgl-primitive
          • Add-fgl-meta
          • Add-fgl-branch-merges
          • Cmr::rewritelist->lhses
          • Remove-fgl-brewrites
          • Remove-fgl-branch-merges
          • Lhses->branch-function-syms
          • Enable-execution
          • Abort-rewrite
          • Syntax-interp
          • Remove-fgl-rewrites
          • Lhses->leading-function-syms
          • Remove-fgl-primitive
          • Remove-fgl-binder-meta
          • If!
          • Disable-execution
          • Remove-fgl-meta
          • Fgl-time-fn
          • Disable-definition
          • Def-fgl-brewrite
        • Fgl-function-mode
        • Fgl-object
        • Fgl-solving
        • Fgl-handling-if-then-elses
        • Fgl-getting-bits-from-objects
        • Fgl-primitive-and-meta-rules
        • Fgl-interpreter-overview
        • Fgl-counterexamples
        • Fgl-correctness-of-binding-free-variables
        • Fgl-debugging
        • Fgl-testbenches
        • Def-fgl-boolean-constraint
        • Fgl-stack
        • Fgl-rewrite-tracing
        • Def-fgl-param-thm
        • Def-fgl-thm
        • Fgl-fast-alist-support
        • Advanced-equivalence-checking-with-fgl
        • Fgl-array-support
        • Fgl-internals
      • Bdd
      • Remove-hyps
      • Contextual-rewriting
      • Simp
      • Rewrite$-hyps
      • Bash-term-to-dnf
      • Use-trivial-ancestors-check
      • Minimal-runes
      • Clause-processor-tools
      • Fn-is-body
      • Without-subsumption
      • Rewrite-equiv-hint
      • Def-bounds
      • Rewrite$-context
      • Try-gl-concls
      • Hint-utils
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Testing-utilities
    • Math
  • Fgl-rewrite-rules

Fgl-syntactic-checker-binders

Functions for checking syntactic properties of objects, and inferring the logical properties that they imply

These functions are useful for creating FGL rewrite rules that prescribe some behavior based on the syntax of the objects passed in. See binder for background on the FGL binder facility, which these depend on. Each checker function, when encountered in the FGL interpreter, checks some syntactic property of its input. Its logical definition reflects what it checks. For example, (check-integerp ans x) implies (integerp x) in its logical formulation. Under the FGL interpreter, when invoked as (binder (check-integerp x-intp x)) where x-intp is an unbound variable, its meta rule checks whether x can be syntactically determined to be an integer; if so, it returns T.

Each of these checker functions also has a corresponding macro whose name is suffixed with ! and simply wraps the function invocation in (binder ...).

Subtopics

Integer-length-bound
FGL binder that finds a bound for the integer-length of X if possible.
Check-int-sign
FGL binder that checks whether x is syntactically known to be either positive or negative when fixed to an integer; returns 0 or -1 (the tail of the integer) if it can be determined and NIL otherwise.
Check-int-endp
FGL binder that checks whether X is syntactically a int-endp, i.e. either 0, -1, or not an integer.
Check-unsigned-byte-p
FGL binder that checks whether X is syntactically an unsigned integer of length at most n.
Check-signed-byte-p
FGL binder that checks whether X is syntactically a signed integer of length at most n.
Check-integerp
FGL binder that checks whether X is syntactically an integer.
Check-true
FGL binder that checks whether X is syntactically known true.
Check-non-integerp
FGL binder that checks whether X is syntactically a non-integer, i.e. known not to be an integer.
Check-non-consp
FGL binder that checks whether X is syntactically a non-cons.
Check-non-booleanp
FGL binder that checks whether X is syntactically a non-Boolean.
Check-booleanp
FGL binder that checks whether X is syntactically a Boolean.
Check-natp
FGL binder that checks whether X is syntactically a natural number.
Check-equal
FGL binder that checks whether X and Y are syntactically equal.
Check-consp
FGL binder that checks whether X is syntactically cons.
Check-bitp
FGL binder that checks whether X is syntactically a bit.