@@ -506,18 +506,12 @@ module Lattices_mono = struct
506
506
| Id : ('a , 'a , 'd ) morph (* * identity morphism *)
507
507
| Meet_with : 'a -> ('a , 'a , 'l * 'r ) morph
508
508
(* * Meet the input with the parameter *)
509
- | Restrict_below : 'a -> ('a , 'a , 'l * disallowed ) morph
510
- (* * [Restrict_below c] is identity for input lower than [c], and
511
- undefined otherwise. This is the partial left joint of [Meet_with]. *)
512
509
| Imply : 'a -> ('a , 'a , disallowed * 'd ) morph
513
510
(* * The right adjoint of [Meet_with] *)
514
511
| Join_with : 'a -> ('a , 'a , 'l * 'r ) morph
515
512
(* * Join the input with the parameter *)
516
513
| Subtract : 'a -> ('a , 'a , 'd * disallowed ) morph
517
514
(* * The left adjoint of [Join_with] *)
518
- | Restrict_above : 'a -> ('a , 'a , disallowed * 'r ) morph
519
- (* * [Restrict_above c] is identity for input higher than [c], and
520
- undefined otherwise. It is the partial right adjoint of [Join_with] *)
521
515
| Proj : 't obj * ('t , 'r_ ) Axis .t -> ('t , 'r_ , 'l * 'r ) morph
522
516
(* * Project from a product to an axis *)
523
517
| Max_with : ('t , 'r_ ) Axis .t -> ('r_ , 't , disallowed * 'r ) morph
@@ -563,7 +557,6 @@ module Lattices_mono = struct
563
557
| Proj (src , ax ) -> Proj (src, ax)
564
558
| Min_with ax -> Min_with ax
565
559
| Meet_with c -> Meet_with c
566
- | Restrict_below c -> Restrict_below c
567
560
| Join_with c -> Join_with c
568
561
| Subtract c -> Subtract c
569
562
| Compose (f , g ) ->
@@ -587,7 +580,6 @@ module Lattices_mono = struct
587
580
| Proj (src , ax ) -> Proj (src, ax)
588
581
| Max_with ax -> Max_with ax
589
582
| Join_with c -> Join_with c
590
- | Restrict_above c -> Restrict_above c
591
583
| Meet_with c -> Meet_with c
592
584
| Imply c -> Imply c
593
585
| Compose (f , g ) ->
@@ -612,10 +604,8 @@ module Lattices_mono = struct
612
604
| Min_with ax -> Min_with ax
613
605
| Max_with ax -> Max_with ax
614
606
| Join_with c -> Join_with c
615
- | Restrict_above c -> Restrict_above c
616
607
| Subtract c -> Subtract c
617
608
| Meet_with c -> Meet_with c
618
- | Restrict_below c -> Restrict_below c
619
609
| Imply c -> Imply c
620
610
| Compose (f , g ) ->
621
611
let f = disallow_left f in
@@ -641,10 +631,8 @@ module Lattices_mono = struct
641
631
| Min_with ax -> Min_with ax
642
632
| Max_with ax -> Max_with ax
643
633
| Join_with c -> Join_with c
644
- | Restrict_above c -> Restrict_above c
645
634
| Subtract c -> Subtract c
646
635
| Meet_with c -> Meet_with c
647
- | Restrict_below c -> Restrict_below c
648
636
| Imply c -> Imply c
649
637
| Compose (f , g ) ->
650
638
let f = disallow_right f in
@@ -692,9 +680,7 @@ module Lattices_mono = struct
692
680
| Max_with ax -> proj_obj ax dst
693
681
| Min_with ax -> proj_obj ax dst
694
682
| Join_with _ -> dst
695
- | Restrict_above _ -> dst
696
683
| Meet_with _ -> dst
697
- | Restrict_below _ -> dst
698
684
| Imply _ -> dst
699
685
| Subtract _ -> dst
700
686
| Compose (f , g ) ->
@@ -742,11 +728,7 @@ module Lattices_mono = struct
742
728
not requird to be complete: i.e., it's allowed to return [None] when
743
729
it should return [Some]. It would cause duplication but not error. *)
744
730
if c0 = c1 then Some Refl else None
745
- | Restrict_below c0 , Restrict_below c1 ->
746
- if c0 = c1 then Some Refl else None
747
731
| Join_with c0 , Join_with c1 -> if c0 = c1 then Some Refl else None
748
- | Restrict_above c0 , Restrict_above c1 ->
749
- if c0 = c1 then Some Refl else None
750
732
| Imply c0 , Imply c1 -> if c0 = c1 then Some Refl else None
751
733
| Subtract c0 , Subtract c1 -> if c0 = c1 then Some Refl else None
752
734
| Monadic_to_comonadic_min , Monadic_to_comonadic_min -> Some Refl
@@ -765,8 +747,7 @@ module Lattices_mono = struct
765
747
match equal g0 g1 with None -> None | Some Refl -> Some Refl ))
766
748
| Map_comonadic f , Map_comonadic g -> (
767
749
match equal f g with Some Refl -> Some Refl | None -> None )
768
- | ( ( Id | Proj _ | Max_with _ | Min_with _ | Meet_with _
769
- | Restrict_below _ | Join_with _ | Restrict_above _
750
+ | ( ( Id | Proj _ | Max_with _ | Min_with _ | Meet_with _ | Join_with _
770
751
| Monadic_to_comonadic_min | Comonadic_to_monadic _
771
752
| Monadic_to_comonadic_max | Local_to_regional
772
753
| Locality_as_regionality | Global_to_regional | Regional_to_local
@@ -783,9 +764,7 @@ module Lattices_mono = struct
783
764
fun dst ppf -> function
784
765
| Id -> Format. fprintf ppf " id"
785
766
| Join_with c -> Format. fprintf ppf " join_%a" (print dst) c
786
- | Restrict_above c -> Format. fprintf ppf " restrict_above_%a" (print dst) c
787
767
| Meet_with c -> Format. fprintf ppf " meet_%a" (print dst) c
788
- | Restrict_below c -> Format. fprintf ppf " restrict_below_%a" (print dst) c
789
768
| Imply c -> Format. fprintf ppf " imply_%a" (print dst) c
790
769
| Subtract c -> Format. fprintf ppf " subtract_%a" (print dst) c
791
770
| Proj (_ , ax ) -> Format. fprintf ppf " proj_%a" Axis. print ax
@@ -842,14 +821,6 @@ module Lattices_mono = struct
842
821
843
822
let max_with dst ax a = Axis. update ax a (max dst)
844
823
845
- let restrict_below obj c a =
846
- assert (le obj a c);
847
- a
848
-
849
- let restrict_above obj c a =
850
- assert (le obj c a);
851
- a
852
-
853
824
let monadic_to_comonadic_min :
854
825
type a . a comonadic_with obj -> Monadic_op. t -> a comonadic_with =
855
826
fun obj (uniqueness , () ) ->
@@ -884,9 +855,7 @@ module Lattices_mono = struct
884
855
| Max_with ax -> max_with dst ax a
885
856
| Min_with ax -> min_with dst ax a
886
857
| Meet_with c -> meet dst c a
887
- | Restrict_below c -> restrict_below dst c a
888
858
| Join_with c -> join dst c a
889
- | Restrict_above c -> restrict_above dst c a
890
859
| Imply c -> imply dst c a
891
860
| Subtract c -> subtract dst c a
892
861
| Monadic_to_comonadic_min -> monadic_to_comonadic_min dst a
@@ -921,10 +890,6 @@ module Lattices_mono = struct
921
890
match m0, m1 with
922
891
| Id , m -> Some m
923
892
| m , Id -> Some m
924
- | Restrict_below _ , m -> Some m
925
- | m , Restrict_below _ -> Some m
926
- | Restrict_above _ , m -> Some m
927
- | m , Restrict_above _ -> Some m
928
893
| Meet_with c0 , Meet_with c1 -> Some (Meet_with (meet dst c0 c1))
929
894
| Join_with c0 , Join_with c1 -> Some (Join_with (join dst c0 c1))
930
895
| Imply c0 , Imply c1 -> Some (Imply (meet dst c0 c1))
@@ -1084,8 +1049,7 @@ module Lattices_mono = struct
1084
1049
let g' = left_adjoint mid g in
1085
1050
Compose (g', f')
1086
1051
| Join_with c -> Subtract c
1087
- | Restrict_above c -> Join_with c
1088
- | Meet_with c -> Restrict_below c
1052
+ | Meet_with _ -> Id
1089
1053
| Imply c -> Meet_with c
1090
1054
| Comonadic_to_monadic _ -> Monadic_to_comonadic_min
1091
1055
| Monadic_to_comonadic_max -> Comonadic_to_monadic dst
@@ -1112,9 +1076,8 @@ module Lattices_mono = struct
1112
1076
let g' = right_adjoint mid g in
1113
1077
Compose (g', f')
1114
1078
| Meet_with c -> Imply c
1115
- | Restrict_below c -> Meet_with c
1116
1079
| Subtract c -> Join_with c
1117
- | Join_with c -> Restrict_above c
1080
+ | Join_with _ -> Id
1118
1081
| Comonadic_to_monadic _ -> Monadic_to_comonadic_max
1119
1082
| Monadic_to_comonadic_min -> Comonadic_to_monadic dst
1120
1083
| Local_to_regional -> Regional_to_local
0 commit comments