BitVec Automata Tactic #
There are two ways of expressing BitVec expressions. One is:
(x &&& y) ||| y + 0
the other way is:
Term.add (Term.or (Term.and (Term.var 0) (Term.var 1)) (Term.var 1)) Term.zero
The goal of this tactic is to convert expressions of the first kind into the second kind, because we have a decision procedure that decides equality on expressions of the second kind.
Equations
- quoteFVar x = Lean.mkNatLit ↑(hash x).val
Instances For
Instances For
Given an Expr e, return a pair e', p where e' is an expression and p is a proof that e and e' are equal on the fist w bits
Push all ofBitVecs down to the lowest level
Instances For
Introduce vars which maps variable ids to the variable values.
let vars (n : Nat) : BitStream := BitStream.ofBitVec (if n = 0 then v0 else if n = 1 then v1 else if n = 2 then v2 ......)
Term.var 0 -- represent the 0th variable Term.var 1 -- represent the 1st variable
Instances For
Equations
- tacticIntroduceMapIndexToFVar = Lean.ParserDescr.node `tacticIntroduceMapIndexToFVar 1024 (Lean.ParserDescr.nonReservedSymbol "introduceMapIndexToFVar" false)
Instances For
Create bv_automata tactic which solves equalities on bitvectors.
Equations
- tacticBv_automata = Lean.ParserDescr.node `tacticBv_automata 1024 (Lean.ParserDescr.nonReservedSymbol "bv_automata" false)