• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
      • Satlink
      • Truth
      • Ubdds
      • Bdd
      • Faig
      • Bed
      • 4v
        • 4v-sexprs
          • 4v-sexpr-vars
          • 4v-sexpr-eval
          • 4v-sexpr-to-faig
          • 4v-sexpr-restrict-with-rw
          • 4vs-constructors
          • 4v-sexpr-compose-with-rw
          • 4v-sexpr-restrict
          • 4v-sexpr-alist-extract
          • 4v-sexpr-compose
          • 4v-nsexpr-p
          • 4v-sexpr-purebool-p
          • 4v-sexpr-<=
          • Sfaig
          • Sexpr-equivs
          • 3v-syntax-sexprp
          • Sexpr-rewriting
            • 4v-shannon-expansion
            • Onehot-rewriting
            • 4v-sexpr-restrict-with-rw
            • 4v-sexpr-compose-with-rw
            • Sexpr-rewrite
            • Sexpr-rewrite-default
            • Sexpr-rewriting-internals
              • Sexpr-unify
              • Sexpr-rewrite
              • Sexpr-rewrite-try-rules
              • Sexpr-rewrite-ground
              • 4v-sexpr-compose-nofal
              • Sexpr-rewrite-sigma
              • Sexpr-rewrite-fncall
            • *sexpr-rewrites*
          • 4v-sexpr-ind
          • 4v-alist-extract
        • 4v-monotonicity
        • 4v-operations
        • Why-4v-logic
        • 4v-<=
        • 4vp
        • 4vcases
        • 4v-fix
        • 4v-lookup
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Sexpr-rewriting

Sexpr-rewriting-internals

Subtopics

Sexpr-unify
Unifies an S-expression with a pattern and returns the resulting substitution as an alist binding variables to subterms.
Sexpr-rewrite
Applies inside-out rewriting to an s-expression using a user-provided set of rewrite rules.
Sexpr-rewrite-try-rules
Given the args of a term and a list of possible rewrites for terms with the same top function symbol, tries each of the rewrites until one matches.
Sexpr-rewrite-ground
Checks whether the given s-expression's arguments are all constants, and if so, rewrites it to a constant by evaluating it under the empty environment.
4v-sexpr-compose-nofal
Identical to 4v-sexpr-compose, but not memoized and does not use fast alist lookups.
Sexpr-rewrite-sigma
Apply sexpr-rewriting to an sexpr with a substitution. The expressions in the substitution are assumed to already be simplified.
Sexpr-rewrite-fncall
Apply sexpr-rewriting to a function applied to some args, which are assumed to already be simplified.