1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859(*Generated by Lem from abstract_linker_script.lem.*)openLem_basic_classesopenLem_listopenLem_numtypebinary_relation=Eq0|Lt0typebinary_connective=And0(** Conjunction *)|Or0(** Disjunction *)(** The type [expression] denotes addresses, whether known or to be ascertained.
*)typeexpression=Var0ofstring(** Ranges over memory addresses *)|ConstofNat_big_num.num(** Fixed memory address *)(* These are *one-place* predicates on unsigned integer solutions (usually representing
* addresses). Implicitly, every binary relation is being applied to the solution. HMM: is
* this sane? Taking my lead from KLEE / SMT solver formulae. What we're describing is a
* big SMT instance; it's sane if we can always factor the instances we want into this
* form, i.e. into a big conjunction of per-variable formulae where each two-place relation
* has the variable in one of its places.
*
* Could try to claim it follows from taking CNF and assigning
* each conjunct to one of the variables it contains. But what if that conjunct is a big
* disjunction including some other binary operators applied to two other variables?
* Might need to factor those out into a "global" extra conjunct. YES. *)typevalue_formula=VFTrue|VFFalse|VFBinaryRelationof(binary_relation*expression)|VFBinaryConnectiveof(binary_connective*value_formula*value_formula)|VFNotofvalue_formulatypememory_image_formula=MIFTrue|MIFFalse|MIFExistsof(string*memory_image_formula)|MIFBinaryRelationof(binary_relation*expression*expression)|MIFBinaryConnectiveof(binary_connective*memory_image_formula*memory_image_formula)|MIFAssertValueFormulaof(expression*value_formula)|MIFNotofmemory_image_formulatypememory_image0=MemoryImageofmemory_image_formula(*val mk_range : natural -> natural -> value_formula*)letrecmk_rangeleftright:value_formula=(ifNat_big_num.equalleftrightthenVFTrueelseifNat_big_num.lessrightleftthenVFFalseelseletl=(Constleft)inletr=(Constright)inVFBinaryConnective(And0,VFBinaryRelation(Lt0,r),VFNot(VFBinaryRelation(Lt0,l))))