(*
This file is part of the dpll(t) engine sammy
Copyright (C) 2004  The University of Iowa
Michael Decoster
George Hagen
                                                                                
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
                                                                                
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
                                                                                
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*)

(** Expressions used by the parser. *)
                                                                                

(** adds a predicate to the pred_db with a specified id and its name *)
val add_pred : Global.pred_id -> string -> unit

(** adds an uninterpreted predicate to the pred_db with a specified id and its name *)
val add_uninterpreted_pred : Global.pred_id -> string -> unit

(** adds a quantified predicate to the pred_db given its id *)
val add_quant_abs_pred : Global.pred_id -> unit 

(** adds an abstract predicate to the pred_db given its id *)
val add_abs_pred : Global.pred_id -> unit

(** takes a predicate id and returns the corresponding literal*)
val get_lit : Global.pred_id -> Pred.lit

(** the type id of boolean*)
val bool_type_id : Global.type_id

(** the predicate id for true*)
val true_id : Global.pred_id

(** removes a predicate with the specified id from the pred_db *)
val remove_pred : Global.pred_id option -> unit

(** returns true if a predicate of the specified id has been declared *)
val is_pred : Global.pred_id -> bool

(** makes an interpreted propositional (non-functional) predicate *)
val make_proposition_pred : string -> Global.pred_id

(** makes an uninterpreted, abstract pred, returns its id *)
val make_abs_pred : unit -> Global.pred_id
  
(** makes an quantified uninterpreted, abstract pred, returns its id *)
val make_quant_abs_pred : unit -> Global.pred_id

(** makes an unnamed boolean pred object, returns its id *)
val make_uninterpreted_pred : unit -> Global.pred_id

(** marks an existing predicate as interpreted (safe to do after construction) *)
(** also declares it to the theory (in case it wasn't previously) *)
val mark_interpreted : Global.pred_id -> unit

(** makes an uninterpreted pred object, returns its id *)
val make_named_uninterpreted_pred : string -> Global.pred_id

(** declares a predicate that is true to the theory*)
val make_true_pred : unit -> unit

val appDiv : Global.term_id -> Global.term_id -> Global.term_id
(** Returns term_id for x/y *)

val appFunction : Global.term_id -> Global.term_id list -> Global.term_id
(** Returns term_id for f(t1,...,tn) *)

val appIntDiv : Global.term_id -> Global.term_id -> Global.term_id
(** Returns term_id for x DIV y *)

val appMinus : Global.term_id -> Global.term_id -> Global.term_id
(** Returns term_id for x-y *)

val appMod : Global.term_id -> Global.term_id -> Global.term_id
(** Returns term_id for x%y *)

val appMult : Global.term_id -> Global.term_id -> Global.term_id
(** Returns term_id for x*y *)

val appPlus : Global.term_id -> Global.term_id -> Global.term_id
(** Returns term_id for x+y *)

val appPow : Global.term_id -> Global.term_id -> Global.term_id
(** Returns term_id for x^y *)

val appUnaryMinus : Global.term_id -> Global.term_id
(** Returns term_id for -x *)

val create_equals : Global.term_id -> Global.term_id -> Global.pred_id
(** Returns the id for x=y *)

val create_greater_than : Global.term_id -> Global.term_id -> Global.pred_id
(** Returns the id for x>y *)

val create_greater_than_or_equals : Global.term_id -> Global.term_id -> Global.pred_id
(** Returns the id for x>=y *)

val create_less_than : Global.term_id -> Global.term_id -> Global.pred_id
(** Returns the id for x<y *)

val create_less_than_or_equals : Global.term_id -> Global.term_id -> Global.pred_id
(** Returns the id for x=<y *)
