Skip to content
Snippets Groups Projects
Commit 45c4a1f9 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[wp] cleanup vset.mlw

parent 3855869e
No related branches found
No related tags found
No related merge requests found
......@@ -110,7 +110,7 @@ let typecheck_singleton (params:tau option list) : tau =
let typecheck_range (_:tau option list) : tau =
tau_of_set Logic.Int
let p_member = Lang.extern_p ~library ~bool:"member_bool" ~prop:"mem" ()
let p_member = Lang.extern_p ~library ~bool:"memb" ~prop:"mem" ()
let f_empty = Lang.extern_f ~library "empty"
let f_union = Lang.extern_f ~library ~typecheck:typecheck_binop "union"
let f_inter = Lang.extern_f ~library ~typecheck:typecheck_binop "inter"
......
......@@ -21,32 +21,27 @@
(**************************************************************************)
(* -------------------------------------------------------------------------- *)
(* --- Sets for Why-3 --- *)
(* --- Additional Sets Symbols for WP --- *)
(* -------------------------------------------------------------------------- *)
theory Vset
use bool.Bool
use int.Int
use map.Map
use map.Const
use export set.Set
(* -------------------------------------------------------------------------- *)
(* --- Classical Sets for Alt-Ergo --- *)
(* -------------------------------------------------------------------------- *)
function member_bool (x:'a) (s:set 'a) : bool = s x
function memb (x:'a) (s:set 'a) : bool = s x
let function range (inf sup:int) : set int (* [a..b] *) =
fun elt -> if inf <= elt <= sup then true else false
fun elt -> inf <= elt <= sup
function range_sup (sup:int) : set int (* [a..] *) =
fun elt -> if elt <= sup then true else false
fun elt -> elt <= sup
function range_inf (inf:int) : set int (* [..b] *) =
fun elt -> if inf <= elt then true else false
fun elt -> inf <= elt
function range_all : set int (* [..] *) = fun _ -> true
function range_all : set int (* [..] *) = const true
(* -------------------------------------------------------------------------- *)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment