A macro to verify a multiplier using VeSCmul from an already created simulation test vector with vesmul-parse
vescmul-verify can take the following arguments:
vescmul-verify will create a proof-summary file under the generated-proof-summary directory showing the proof time and what the program verified about multiplier design.
Example call 1:
(vescmul-verify :name my-multiplier-example :concl (equal result (loghead 128 (* (logext 64 in1) (logext 64 in2)))) :read-from-file "parsed/")
Example call 2:
(vescmul-verify :name my-multiplier-example :concl (equal result (loghead 128 (* (logext 64 in1) (logext 64 in2)))))
Example call 3:
;; Casesplit on 63th bits of in1 and in2. This may be helpful in some corner ;; cases. (vescmul-verify :name my-multiplier-example :cases ((logbitp 63 in1) (logbitp 63 in2)) :concl (equal result (loghead 128 (* (logext 64 in1) (logext 64 in2)))))
Example call 4:
;; If VeSCmul cannot finish the proofs, this will call FGL after rewriting is done (vescmul-verify :name my-multiplier-example :then-fgl t :concl (equal result (loghead 128 (* (logext 64 in1) (logext 64 in2)))))
You may also configure FGL. For example this will call kissat for SAT Solver:
Or, this will perform AIG transform using incremental SAT solvers. You need to set up IPASIR library (see ipasir::ipasir). This can improve the performance in some cases such as equivalance checking during hierarchical reasoning scheme.(local (progn (defun my-sat-config () (declare (xargs :guard t)) (satlink::make-config :cmdline "kissat " :verbose t :mintime 1/2 :remove-temps t)) (defattach fgl::fgl-satlink-config my-sat-config)))
(progn (local (include-book "centaur/ipasir/ipasir-backend" :dir :system)) (local (include-book "centaur/aignet/transforms" :dir :system)) (local (defun transforms-config () (declare (Xargs :guard t)) #!aignet (list (make-observability-config) (make-balance-config :search-higher-levels t :search-second-lit t) (change-fraig-config *fraig-default-config* :random-seed-name 'my-random-seed :ctrex-queue-limit 8 :sim-words 1 :ctrex-force-resim nil :ipasir-limit 4 :initial-sim-rounds 2 :initial-sim-words 2 :ipasir-recycle-count 2000) ))) (local (defattach fgl::fgl-aignet-transforms-config transforms-config)) (local (define monolithic-sat-with-transforms () (fgl::make-fgl-satlink-monolithic-sat-config :transform t))) (local (defattach fgl::fgl-toplevel-sat-check-config monolithic-sat-with-transforms)))