sig
  type location = Errormsg.location
  type var = string
  type exp =
    Logic.exp =
      Int of Int32.t
    | UnOp of unop * exp
    | BinOp of binop * exp * exp
    | Fun of string * exp list
    | Var of int
    | NVar of var
    | UVar of int
  and unop = Logic.unop = Mod32 | BNot | RepS32 | RepU32
  and binop =
    Logic.binop =
      Plus
    | Minus
    | Times
    | Add
    | Sub
    | Mult
    | Div
    | BAnd
    | BOr
    | BXor
    | Sll
    | Srl
    | Sra
    | SetEq
    | SetNe
    | SetGt
    | SetGe
    | SetLt
    | SetLe
    | SetAb
    | SetAe
    | SetBl
    | SetBe
    | SetPe
    | SetPo
    | SignExt
  type pred =
    Logic.pred =
      Bool of bool
    | PNez of exp
    | PFun of string * exp list
    | And of pred list
    | Or of pred list
    | Imply of pred * pred
    | All of string * pred
    | Exist of string * pred
  exception CannotNegate of pred
  val negateExp : exp -> exp
  val negatePredRaise : pred -> pred
  val negatePred : pred -> pred
  val integer : int -> exp
  exception IntegerTooLarge
  val to_int : int32 -> int
  val newVar : string -> var
  val resetVars : unit -> unit
  val varName : string -> string
  val isAtomPred : pred -> bool
  val zero : exp
  val one : exp
  val minus : exp -> exp -> exp
  val plus : exp -> exp -> exp
  val times : exp -> exp -> exp
  val eq : exp -> exp -> pred
  val ne : exp -> exp -> pred
  val geq : exp -> exp -> pred
  val leq : exp -> exp -> pred
  val gt : exp -> exp -> pred
  val lt : exp -> exp -> pred
  val makeMap : (int * exp) list -> exp
  val findMap : exp -> int -> exp
  val insertMap : exp -> int -> exp -> exp
  val substPred : ?depth:int -> (int -> exp -> exp option) -> pred -> pred
  val substExp : ?depth:int -> (int -> exp -> exp option) -> exp -> exp
  type soption = Logic.soption = Unif | Done of sexp
  and subst = soption array
  and sexp = exp * subst
  and spred = pred * subst
  val eunify :
    (subst -> int -> sexp -> bool) -> exp * subst -> exp * subst -> bool
  val punify :
    (subst -> int -> sexp -> bool) -> pred * subst -> pred * subst -> bool
  val unrollUVars : subst -> exp -> exp
  val unrollUVarsRaise : subst -> exp -> exp
  val unrollUVarsPredRaise : subst -> pred -> pred
  val unrollExp : sexp -> sexp
  exception HasUVar
  val unrollUVarsError : subst -> exp -> exp
  val newSubst : int -> subst
  val emptySubst : subst
  val newSubstFromList : exp list -> subst
  val d_sexp : unit -> sexp -> Pretty.doc
  val d_spred : unit -> spred -> Pretty.doc
  val d_subst : unit -> subst -> Pretty.doc
  val d_sexpNoUnroll : unit -> sexp -> Pretty.doc
  val simplifyArith : exp -> int option
  type 'a visitAction =
    'Logic.visitAction =
      SkipChildren
    | DoChildren
    | ChangeTo of 'a
    | ChangeDoChildrenPost of 'a * ('-> 'a)
  class type logicVisitor =
    object
      method vexp : exp -> exp visitAction
      method vpred : pred -> pred visitAction
    end
  class nopLogicVisitor : logicVisitor
  val visitLogicExp : logicVisitor -> exp -> exp
  val visitLogicPred : logicVisitor -> pred -> pred
  val unop_to_string : unop -> string
  val binop_to_string : binop -> string
  class type logicPrinter =
    object
      method pExp : exp -> Pretty.doc option
      method pPred : pred -> Pretty.doc option
    end
  class defaultLogicPrinterClass : logicPrinter
  val defaultLogicPrinter : logicPrinter
  class infixLogicPrinterClass : logicPrinter
  val infixLogicPrinter : logicPrinter
  val printExp : logicPrinter -> exp -> Pretty.doc
  val printPred : logicPrinter -> pred -> Pretty.doc
  val d_pred : unit -> pred -> Pretty.doc
  val d_exp : unit -> exp -> Pretty.doc
  val d_explist : unit -> exp list -> Pretty.doc
  val d_loc : unit -> location -> Pretty.doc
  class uvarLogicPrinterClass : subst -> logicPrinter
  val renameVariable : pred -> string -> string -> pred
end