(* Why driver for Why3 syntax *)

printer "why3"
filename "%f-%t-%g.why"

transformation "inline_trivial"
transformation "eliminate_builtin"
transformation "detect_polymorphism"

transformation "eliminate_definition"
(* We could keep more definitions by using
   transformation "eliminate_definition_conditionally"
   instead, but some proofs are lost
   (examples/logic/triangle_inequality.why)
*)
transformation "eliminate_inductive"
transformation "eliminate_epsilon"

transformation "simplify_formula"
(*transformation "simplify_trivial_quantification"*)

transformation "eliminate_projections_sums"
transformation "discriminate_if_poly"
transformation "eliminate_algebraic_if_poly"
transformation "encoding_smt_if_poly"

theory BuiltIn
  syntax type  int  "int"
  syntax type  real "real"
  syntax predicate (=)  "(%1 = %2)"

  meta "encoding:kept" type int
  meta "encoding:kept" type real
  meta "encoding:ignore_polymorphism_ls" predicate (=)
end

theory bool.Ite
  meta "encoding:lskept" function ite
  meta "encoding:ignore_polymorphism_ls" function ite
end

theory HighOrd
  meta "encoding:lskept" function (@)
  meta "encoding:ignore_polymorphism_ts" type (->)
  meta "encoding:ignore_polymorphism_ls" function (@)
end

theory map.Map
  meta "encoding:lskept" function get
  meta "encoding:lskept" function set
  meta "encoding:ignore_polymorphism_ls" function get
  meta "encoding:ignore_polymorphism_ls" function ([])
  meta "encoding:ignore_polymorphism_ls" function set
  meta "encoding:ignore_polymorphism_ls" function ([<-])
end

import "discrimination.gen"
theory BuiltIn
  meta "select_alginst_default" "local"
  meta "eliminate_algebraic" "keep_mono"
end
