1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071(* This file is free software, part of dolmen. See file "LICENSE" for more information. *)moduleTptp=structletsymbolm~attr~locid=lett=matchidwith(* Base builtins *)|{Id.name="$_";ns=Id.Term}->Term.(builtin?locWildcard())|{Id.name="$tType";ns=Id.Term}->Term.(builtin?locTtype())|{Id.name="$o";ns=Id.Term}->Term.(builtin?locProp())|{Id.name="$true";ns=Id.Term}->Term.(builtin?locTrue())|{Id.name="$false";ns=Id.Term}->Term.(builtin?locFalse())(* Arithmetic builtins *)|{Id.name="$int";ns=Id.Term}->Term.(builtin?locInt())|{Id.name="$less";ns=Id.Term}->Term.(builtin?locLt())|{Id.name="$lesseq";ns=Id.Term}->Term.(builtin?locLeq())|{Id.name="$greater";ns=Id.Term}->Term.(builtin?locGt())|{Id.name="$greatereq";ns=Id.Term}->Term.(builtin?locGeq())|{Id.name="$uminus";ns=Id.Term}->Term.(builtin?locMinus())|{Id.name="$sum";ns=Id.Term}->Term.(builtin?locAdd())|{Id.name="$difference";ns=Id.Term}->Term.(builtin?locSub())|{Id.name="$product";ns=Id.Term}->Term.(builtin?locMult())|_->Term.(const?locid)inletattrs=List.map(Term.mapm)attrinTerm.add_attrsattrstletmapper={Term.id_mapperwithsymbol}endmoduleSmtlib=structletsymbolm~attr~locid=lett=matchidwith|{Id.name="Bool";ns=Id.Sort}->Term.(builtin?locProp())|{Id.name="true";ns=Id.Term}->Term.(builtin?locTrue())|{Id.name="false";ns=Id.Term}->Term.(builtin?locFalse())|{Id.name="not";ns=Id.Term}->Term.(builtin?locNot())|{Id.name="and";ns=Id.Term}->Term.(builtin?locAnd())|{Id.name="or";ns=Id.Term}->Term.(builtin?locOr())|{Id.name="xor";ns=Id.Term}->Term.(builtin?locXor())|{Id.name="=>";ns=Id.Term}->Term.(builtin?locImply())|{Id.name="=";ns=Id.Term}->Term.(builtin?locEq())|{Id.name="distinct";ns=Id.Term}->Term.(builtin?locDistinct())|{Id.name="ite";ns=Id.Term}->Term.(builtin?locIte())|_->Term.(const?locid)inletattrs=List.map(Term.mapm)attrinTerm.add_attrsattrstletbinder_let_eqmt=matchtwith|{Term.term=Term.Colon(u,v);_}->Term.eq?loc:t.Term.loc(Term.mapmu)(Term.mapmv)|_->assertfalseletbinderm~attr~locblbody=matchbwith|Term.Let->letattrs=List.map(Term.mapm)attrinletl'=List.map(binder_let_eqm)linTerm.add_attrsattrs(Term.letin?locl'(Term.mapmbody))|_->Term.(id_mapper.binderm~attr~locblbody)letmapper={Term.id_mapperwithsymbol;binder}end