Pluggable conservative simplifier for ESIM fixpoint extraction
Esim-simplify-update-fns is a constrained function that is called in conservative versions of ESIM such as ESIM-SEXPR-SIMP. It is constrained to produce a conservative approximation of the update functions that it is passed. An executable function that obeys these constraints can be attached to it. Thus, it can be used to (say) replace the update functions with Xes, rewrite them into a nicer form, perform Shannon expansion on certain signals, etc. Esim-simplify-update-fns is also passed the module that is currently being examined, so that you may choose to only perform simplifcations on certain modules. By default, esim-simplify-update-fns has an attachment that simply preserves the existing update functions without modification.Theorem:
(defthm esim-simplify-update-fns-conservative (4v-sexpr-alist-<= (esim-simplify-update-fns mod update-fns) update-fns))
Theorem:
(defthm esim-simplify-update-fns-alist-keys-same (set-equiv (alist-keys (esim-simplify-update-fns mod update-fns)) (alist-keys update-fns)))
Theorem:
(defthm esim-simplify-update-fns-4v-sexpr-vars-subset (subsetp-equal (4v-sexpr-vars-list (alist-vals (esim-simplify-update-fns mod update-fns))) (append (4v-sexpr-vars-list (alist-vals update-fns)) (alist-keys (mod-varmap mod)))))
Theorem:
(defthm good-sexpr-varmap-esim-simplify-update-fns (implies (good-sexpr-varmap (mod-varmap mod) update-fns) (good-sexpr-varmap (mod-varmap mod) (esim-simplify-update-fns mod update-fns))))