Commit c13b1932 authored by Léon Gondelman's avatar Léon Gondelman

converted standard library and drivers

parent 8dd0e736
......@@ -46,9 +46,9 @@ drivers () {
if [[ $f == drivers/ocaml*.drv ]]; then continue; fi
echo -n " $f... "
# running Why
if ! echo "theory Test goal G : 1=2 end" | $pgm -F why --driver $f - > /dev/null 2>&1; then
if ! echo "theory Test goal G : 1=2 end" | $pgm -F whyml --driver $f - > /dev/null 2>&1; then
echo "why FAILED"
echo "theory Test goal G : 1=2 end" | $pgm -F why --driver $f -
echo "theory Test goal G : 1=2 end" | $pgm -F whyml --driver $f -
exit 1
fi
echo "ok"
......
module M
use import int.Int
use import ref.Ref
let test (a: (ref int, int)) =
'L:
let (r,_) = a in
r := !r + 1;
assert { let (x, _) = a in !x = (at !x 'L) + 1 }
end
(*
Local Variables:
compile-command: "unset LANG; make -C ../../.. bench/programs/bad-typing/at2"
End:
*)
......@@ -10,10 +10,3 @@ theory BuiltIn
meta "eliminate_algebraic" "keep_enums"
meta "printer_option" "no_type_cast"
end
(*
Local Variables:
mode: why
compile-command: "make -C .. bench"
End:
*)
......@@ -263,7 +263,7 @@ end
theory list.Mem
syntax predicate mem "member(%1, %2)"
end
theory list.Nth
......@@ -297,30 +297,29 @@ theory set.Set
syntax function empty "(emptyset :: %t0)"
syntax predicate is_empty "empty?(%1)"
remove prop empty_def1
remove prop empty_def
syntax function add "add(%1, %2)"
remove prop add_def1
remove prop add_def
syntax function singleton "singleton(%1)"
syntax function remove "remove(%1, %2)"
remove prop remove_def1
remove prop remove_def
remove prop subset_remove
syntax function union "union(%1, %2)"
remove prop union_def1
remove prop union_def
syntax function inter "intersection(%1, %2)"
remove prop inter_def1
remove prop inter_def
syntax function diff "difference(%1, %2)"
remove prop diff_def1
remove prop diff_def
remove prop subset_diff
(* TODO: choose *)
syntax function all "fullset"
remove prop all_def
end
theory set.Fset
......@@ -334,24 +333,24 @@ theory set.Fset
syntax function empty "(emptyset :: %t0)"
syntax predicate is_empty "empty?(%1)"
remove prop empty_def1
remove prop empty_def
syntax function add "add(%1, %2)"
remove prop add_def1
remove prop add_def
syntax function singleton "singleton(%1)"
syntax function remove "remove(%1, %2)"
remove prop remove_def1
remove prop remove_def
remove prop subset_remove
syntax function union "union(%1, %2)"
remove prop union_def1
remove prop union_def
syntax function inter "intersection(%1, %2)"
remove prop inter_def1
remove prop inter_def
syntax function diff "difference(%1, %2)"
remove prop diff_def1
remove prop diff_def
remove prop subset_diff
(* TODO: choose *)
......
This diff is collapsed.
......@@ -48,6 +48,7 @@ theory Rat
predicate (< ) (x y : rat)
predicate (> ) (x y : rat) = y < x
predicate (<=) (x y : rat) = x < y \/ x = y
predicate (>=) (x y : rat) = y <= x
clone export algebra.OrderedField
with type t = rat, predicate (<=) = (<=)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment