-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorder.ml
50 lines (42 loc) · 1.19 KB
/
order.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
open Function
open Name
open Formula
(* This file is part of Arsenic, a proofchecker for New Lace logic.
Copyright (c) 2015 Richard Bornat.
Licensed under the MIT license (sic): see LICENCE.txt or
https://opensource.org/licenses/MIT
*)
type order = So | Lo | Bo | Uo | Go
let string_of_order order =
match order with
| So -> "so"
| Lo -> "lo"
| Bo -> "bo"
| Uo -> "uo"
| Go -> "go"
let combine o1 o2 =
match o1,o2 with
| So, So -> So
| Go, Uo | Uo, Go -> Uo
| _ , So | So , _
| _ , Go | Go , _ -> raise (Invalid_argument "Order.combine")
| _ , Uo | Uo , _ -> Uo
| _ , Bo | Bo , _ -> Bo
| _ -> Lo
let is_go = function
| Go -> true
| _ -> false
(*
type ikind = Internal | External
let string_of_ikind = function
| Internal -> "Internal"
| External -> "External"
let quotient order ikind assertion =
match order, ikind, !Settings.param_LocalSpec with
(* | Go, _ , false -> _recTrue *)
| Go, Internal, _ ->
let frees = Formula.frees assertion in
let binders = NameSet.filter (not <.> Name.is_logc) frees in
bindExists binders assertion
| _ -> assertion
*)