-
Notifications
You must be signed in to change notification settings - Fork 2
/
lio.ott
691 lines (566 loc) · 22 KB
/
lio.ott
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
embed
{{ coq
Require Import SfLib.
}}
metavar termvar, x ::= {{ com term variable }}
{{ tex \mathit{[[termvar]]} }}
{{ coq nat }} {{ coq-equality }}
metavar typvar, Y ::= {{ com type variable }}
{{ tex \mathit{[[typvar]]} }}
{{ coq nat }} {{ coq-equality }}
metavar n ::= {{ com index count }}
{{ coq nat }} {{ coq-equality }}
grammar
b :: 'b_' ::= {{ com isexception }} {{ coq bool }} {{ coq-equality }}
| noex :: :: noex {{ coq false }} {{ tex \_ }} {{ com noexception }}
| ex :: :: ex {{ coq true }} {{ tex X }} {{ com exception }}
%{{{ LABELS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
l, c :: 'l_' ::= {{ com label }}
| bot :: :: LBot {{ com bottom }} {{ tex \bot }}
| A :: :: LA {{ com medium-label }} {{ tex l_[[A]] }}
| B :: :: LB {{ com medium-label }} {{ tex l_[[B]] }}
| top :: :: LTop {{ com top }} {{ tex \top }}
%}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%{{{ VALUES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
v :: 'v_' ::= {{ com value }}
% ----------------------------------------------------------------------------------------------
| bot :: :: LBot {{ com bottom }} {{ tex \bot }}
| A :: :: LA {{ com medium-label }} {{ tex l_[[A]] }}
| B :: :: LB {{ com medium-label }} {{ tex l_[[B]] }}
| top :: :: LTop {{ com top }} {{ tex \top }}
% ----------------------------------------------------------------------------------------------
| true :: :: VTrue {{ com Boolean true }}
| false :: :: VFalse {{ com Boolean false }}
| () :: :: VUnit {{ com unit value }}
| \ x . t :: :: VAbs {{ com abstraction }}
| LIO b t :: :: VLIO {{ com LIO value }}
{{ tex ([[t]])^{[[LIO]]_[[b]]} }}
| Lb b t1 t2 :: :: VLabeled {{ com labeled value }}
{{ tex [[Lb]]_[[b]]\ [[t1]]\ [[t2]] }}
| X :: :: VException {{ com exception value }} {{ tex \varepsilon }}
%}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%{{{ TERMS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
t :: 't_' ::= {{ com term }}
% ----------------------------------------------------------------------------------------------
| bot :: :: LBot {{ com bottom }} {{ tex \bot }}
| A :: :: LA {{ com medium-label }} {{ tex l_[[A]] }}
| B :: :: LB {{ com medium-label }} {{ tex l_[[B]] }}
| top :: :: LTop {{ com top }} {{ tex \top }}
% ----------------------------------------------------------------------------------------------
| true :: :: VTrue {{ com Boolean true }}
| false :: :: VFalse {{ com Boolean false }}
| () :: :: VUnit {{ com unit value }}
| \ x . t :: :: VAbs {{ com abstraction }}
| LIO b t :: :: VLIO {{ com LIO value }}
{{ tex ([[t]])^{[[LIO]]_[[b]]} }}
| Lb b t1 t2 :: :: VLabeled {{ com labeled value }}
{{ tex [[Lb]]_[[b]]\ [[t1]]\ [[t2]] }}
| X :: :: VException {{ com exception value }} {{ tex \varepsilon }}
| hole :: :: VHole {{ com hole }} {{ tex \bullet }}
% ----------------------------------------------------------------------------------------------
| x :: :: Var {{ com variable }}
| t t' :: :: App {{ com application }}
| fix t :: :: Fix {{ com fixpoint }}
| if t1 then t2 else t3 :: :: IfEl {{ com conditional }}
| join t1 t2 :: :: Join {{ com join }} {{ tex [[t1]] \sqcup [[t2]]}}
| meet t1 t2 :: :: Meet {{ com meet }} {{ tex [[t1]] \sqcap [[t2]]}}
| canFlowTo t1 t2 :: :: CanFlowTo {{ com can-flow-to }}
{{ tex [[t1]] \sqsubseteq [[t2]]}}
| return t :: :: Return {{ com return }}
| bind t t' :: :: Bind {{ com bind }} {{ tex [[t]] >\!\!>\!\!= [[t']] }}
| getLabel :: :: GetLabel {{ com get current label }}
| getClearance :: :: GetClearance {{ com get current clearance }}
| labelOf t :: :: LabelOf {{ com get label of value }}
| label t t' :: :: Label {{ com label }}
| unlabel t :: :: UnLabel {{ com unlabel }}
| toLabeled t1 t2 :: :: ToLabeled {{ com execute sensitive computation }}
| lowerClr t1 :: :: LowerClr {{ com lower clearance }}
| throwLIO t :: :: ThrowLIO {{ com throw exception }}
| catchLIO t1 t2 :: :: CatchLIO {{ com catch exception }}
| ( t ) :: S :: paren {{ ich [[t]] }}
| { t / x } t' :: M :: tsub {{ ich ( tsubst_t [[t]] [[x]] [[t']] ) }}
%}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
m :: 'm_' ::= {{ com monadic LIO term }}
| conf t1 t2 t3 :: :: Config {{ com configuration }}
{{ tex \langle [[t1]], [[t2]], [[t3]] \rangle }}
%{{{ TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
T {{ tex \tau }} :: T_ ::= {{ com type }}
| Bool :: :: TBool {{ com Boolean }}
| () :: :: TUnit {{ com unit }}
| Label :: :: TLabel {{ com label }} {{ tex \ell }}
| LIO T :: :: TLIO {{ com LIO action }} {{ tex [[LIO]] [[T]] }}
| Labeled T :: :: TLabeled {{ com labeled value }}
| Exception :: :: TException {{ com exception value }}
| Y :: :: TVar {{ com variable }}
| T -> T' :: :: TArrow {{ com function }}
| ( T ) :: S :: paren {{ ich [[T]] }}
%}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
G {{ tex \Gamma }} :: G_ ::= {{ com type environment }} {{ coq list (termvar*T) }}
| G_empty :: :: em {{ tex \emptyset }} {{ coq G_nil }}
| G , x : T :: :: vn {{ coq (cons ([[x]],[[T]]) [[G]]) }}
terminals :: 'terminals_' ::=
| \ :: :: lambda {{ tex \lambda }}
| --> :: :: lio_reduce {{ tex \longrightarrow }}
| -->* :: :: lio_reduce_multi {{ tex \longrightarrow^* }}
| ~> :: :: pure_reduce {{ tex \leadsto }}
| -> :: :: arrow {{ tex \rightarrow }}
| |- :: :: turnstile {{ tex \vdash }}
| <= :: :: le {{ tex \leq }}
| in :: :: in {{ tex \in }}
formula :: 'formula_' ::=
| judgement :: :: judgement
| not ( formula ) :: :: not {{ tex \neg ([[ formula]]) }}
{{ coq (not ([[formula]])) }}
| t = t' :: :: eqv {{ ich [[t]]=[[t']] }}
| x : T in G :: :: xTG {{ coq (bound [[x]] [[T]] [[G]]) }}
| n = 0 :: :: eqvN0 {{ ich [[n]]=0 }}
| n = n' :: :: eqvN {{ ich [[n]]=[[n']] }}
| n <= n' :: :: leN {{ ich [[n]]<=[[n']] }}
| n = succ n' :: :: succ {{ ich [[n]]=[[n']]+1 }} {{ tex [[n]]=[[n']]+1 }}
embed
{{ coq
Notation G_nil := (@nil (termvar*T)).
Definition bound x T0 G :=
exists G1, exists G2,
(G = List.app G1 (List.cons (x,T0) G2)) /\
~In x (List.map (@fst termvar T) G1).
}}
subrules
l <:: v
v <:: t
freevars
t x :: fv
substitutions
single t x :: tsubst
defns
Jtype :: '' ::=
defn
G |- t : T :: :: GtT :: GtT_ by
---------------- :: true
G |- true : Bool
----------------- :: false
G |- false : Bool
------------ :: unit
G |- () : ()
---------------- :: labelBot
G |- bot : Label
---------------- :: labelA
G |- A : Label
---------------- :: labelB
G |- B : Label
---------------- :: labelTop
G |- top : Label
G |- t1 : Label
G |- t2 : T2
-------------------------- :: labeledVal
G |- Lb b t1 t2 : Labeled T2
G |- t : T
------------------ :: lioVal
G |- LIO b t : LIO T
------------------ :: exception
G |- X : Exception
------------- :: hole
G |- hole : T
x : T in G
---------- :: valName
G |- x : T
G , x : T1 |- t : T2
-------------------- :: abs
G |- \x.t : T1 -> T2
G |- t : T1 -> T2
G |- t1 : T1
-------------- :: app
G |- t t1 : T2
G |- t : T -> T
--------------- :: fix
G |- fix t : T
G |- t1 : Bool
G |- t2 : T
G |- t3 : T
------------------------------ :: ifEl
G |- if t1 then t2 else t3 : T
G |- t2 : Label
----------------------- :: join
G |- join t1 t2 : Label
G |- t1 : Label
G |- t2 : Label
----------------------- :: meet
G |- meet t1 t2 : Label
G |- t1 : Label
G |- t2 : Label
--------------------------- :: canFlowTo
G |- canFlowTo t1 t2 : Bool
G |- t : T
--------------------- :: return
G |- return t : LIO T
G |- t : LIO T1
G |- t' : T1 -> LIO T2
----------------------- :: bind
G |- bind t t' : LIO T2
------------------------- :: getLabel
G |- getLabel : LIO Label
----------------------------- :: getClearance
G |- getClearance : LIO Label
G |- t : Labeled T
---------------------- :: labelOf
G |- labelOf t : Label
G |- t : Label
G |- t' : T
--------------------------------- :: label
G |- label t t' : LIO (Labeled T)
G |- t : Labeled T
---------------------- :: unlabel
G |- unlabel t : LIO T
G |- t1 : Label
G |- t2 : LIO T
-------------------------------------- :: toLabeled
G |- toLabeled t1 t2 : LIO (Labeled T)
G |- t1 : Label
------------------------- :: lowerClr
G |- lowerClr t1 : LIO ()
G |- t : Exception
------------------------- :: throwLIO
G |- throwLIO t : LIO T
G |- t1 : LIO T
G |- t2 : Exception -> LIO T
------------------------- :: catchLIO
G |- catchLIO t1 t2 : LIO T
defns
Jpop :: '' ::=
defn
t1 ~> t2 :: :: pure_reduce :: Pr_ {{ com [[t1]] reduces to [[t2]] }} by
t1 ~> t1'
--------------- :: appCtx
t1 t2 ~> t1' t2
----------------------- :: app
(\x.t1) t2 ~> {t2/x}t1
t ~> t'
--------------- :: fixCtx
fix t ~> fix t'
------------------------------- :: fix
fix (\x.t) ~> {(fix (\x.t))/x}t
t1 ~> t1'
----------------------------------------------- :: ifCtx
if t1 then t2 else t3 ~> if t1' then t2 else t3
----------------------------- :: ifTrue
if true then t2 else t3 ~> t2
------------------------------ :: ifFalse
if false then t2 else t3 ~> t3
t1 ~> t1'
------------------------- :: joinCtxL
join t1 t2 ~> join t1' t2
t2 ~> t2'
------------------------- :: joinCtxR
join l1 t2 ~> join l1 t2'
not (l = bot)
--------------- :: joinBotL
join bot l ~> l
not (l = bot)
--------------- :: joinBotR
join l bot ~> l
l1 = l2
---------------- :: joinEq
join l1 l2 ~> l1
--------------- :: joinAB
join A B ~> top
--------------- :: joinBA
join B A ~> top
not (l = top)
----------------- :: joinTopL
join top l ~> top
not (l = top)
----------------- :: joinTopR
join l top ~> top
t1 ~> t1'
------------------------- :: meetCtxL
meet t1 t2 ~> meet t1' t2
t2 ~> t2'
------------------------- :: meetCtxR
meet l1 t2 ~> meet l1 t2'
not (l = bot)
----------------- :: meetBotL
meet bot l ~> bot
not (l = bot)
----------------- :: meetBotR
meet l bot ~> bot
l1 = l2
---------------- :: meetEq
meet l1 l2 ~> l1
--------------- :: meetAB
meet A B ~> bot
--------------- :: meetBA
meet B A ~> bot
not (l = top)
--------------- :: meetTopL
meet top l ~> l
not (l = top)
--------------- :: meetTopR
meet l top ~> l
t1 ~> t1'
----------------------------------- :: canFlowToCtxL
canFlowTo t1 t2 ~> canFlowTo t1' t2
t2 ~> t2'
----------------------------------- :: canFlowToCtxR
canFlowTo l1 t2 ~> canFlowTo l1 t2'
not (l = bot)
----------------------- :: canFlowToBot
canFlowTo bot l ~> true
l1 = l2
----------------------- :: canFlowToEq
canFlowTo l1 l2 ~> true
---------------------- :: canFlowToAB
canFlowTo A B ~> false
---------------------- :: canFlowToBA
canFlowTo B A ~> false
not (l = top)
----------------------- :: canFlowToTop
canFlowTo l top ~> true
t ~> t'
----------------------- :: labelOfCtx
labelOf t ~> labelOf t'
------------------------ :: labelOf
labelOf (Lb b l1 t2) ~> l1
------------ :: hole
hole ~> hole
defns
Jop :: '' ::=
defn
m1 --> n m2 :: :: lio_reduce :: LIO_ {{ com [[m1]] reduces to [[m2]] and executes [[n]] toLabeled-computations}} {{ tex [[m1]] \longrightarrow_[[n]] [[m2]] }} by
n = 0
-------------------------------------------------- :: return
conf l c return t --> n conf l c LIO noex t
conf l c t1 -->* n conf l' c' LIO noex t1'
------------------------------------------------ :: bind
conf l c bind t1 t2 --> n conf l' c' (t2 t1')
conf l c t1 -->* n conf l' c' LIO ex t1'
------------------------------------------------ :: bindEx
conf l c bind t1 t2 --> n conf l' c' throwLIO t1'
n = 0
----------------------------------------- :: getLabel
conf l c getLabel --> n conf l c return l
n = 0
--------------------------------------------- :: getClearance
conf l c getClearance --> n conf l c return c
t1 ~> t1'
n = 0
------------------------------------------------ :: labelCtx
conf l c label t1 t2 --> n conf l c label t1' t2
canFlowTo l l1 ~> true
canFlowTo l1 c ~> true
n = 0
----------------------------------------------------- :: label
conf l c label l1 t2 --> n conf l c return (Lb noex l1 t2)
t ~> t'
n = 0
-------------------------------------------- :: unlabelCtx
conf l c unlabel t --> n conf l c unlabel t'
join l l1 ~> l2
canFlowTo l2 c ~> true
n = 0
----------------------------------------------------- :: unlabel
conf l c unlabel (Lb noex l1 t2) --> n conf l2 c return t2
join l l1 ~> l2
canFlowTo l2 c ~> true
n = 0
----------------------------------------------------- :: unlabelEx
conf l c unlabel (Lb ex l1 t2) --> n conf l2 c throwLIO t2
t1 ~> t1'
n = 0
---------------------------------------------------------- :: toLabeledCtx
conf l c toLabeled t1 t2 --> n conf l c toLabeled t1' t2
canFlowTo l l1 ~> true
canFlowTo l1 c ~> true
conf l c t -->* n conf l' c' LIO noex t'
n' = succ n
canFlowTo l' l1 ~> true
--------------------------------------------------- :: toLabeled
conf l c toLabeled l1 t --> n' conf l c label l1 t'
canFlowTo l l1 ~> true
canFlowTo l1 c ~> true
conf l c t -->* n conf l' c' LIO ex t'
n' = succ n
canFlowTo l' l1 ~> true
--------------------------------------------------- :: toLabeledEx
conf l c toLabeled l1 t --> n' conf l c return (Lb ex l t')
t ~> t'
n = 0
---------------------------------------------- :: lowerClrCtx
conf l c lowerClr t --> n conf l c lowerClr t'
n = 0
canFlowTo l c1 ~> true
canFlowTo c1 c ~> true
---------------------------------------------- :: lowerClr
conf l c lowerClr c1 --> n conf l c1 return ()
n = 0
---------------------------------------------- :: throwLIO
conf l c throwLIO t --> n conf l c LIO ex t
conf l c t1 -->* n conf l' c' LIO noex t1'
-------------------------------------------------------- :: catchLIO
conf l c catchLIO t1 t2 --> n conf l' c' return t1'
conf l c t1 -->* n conf l' c' LIO ex t1'
-------------------------------------------------------- :: catchLIOEx
conf l c catchLIO t1 t2 --> n conf l' c' (t2 t1')
------------------------------------- :: hole
conf hole hole hole --> n conf hole hole hole
t1 ~> t1'
n = 0
------------------------------ :: pure
conf l c t1 --> n conf l c t1'
defn
m1 -->* n m2 :: :: lio_reduce_multi :: LIO_ {{ com [[m1]] (big-step) reduces to [[m2]] executing [[n]] toLabeled-computations }} {{ tex [[m1]] \longrightarrow^*_[[n]] [[m2]] }} by
conf l c t --> n conf l' c' t'
------------------------------- :: onestep
conf l c t -->* n conf l' c' t'
---------------------------- :: done
conf l c t -->* n conf l c t
embed
{{ coq
Hint Constructors pure_reduce lio_reduce GtT : rules.
Tactic Notation "label_cases" tactic(first) ident(c) :=
first;
[ Case_aux c "label_LBot"
| Case_aux c "label_LA"
| Case_aux c "label_LB"
| Case_aux c "label_LTop" ].
Tactic Notation "value_cases" tactic(first) ident(c) :=
first;
[ Case_aux c "value_LBot"
| Case_aux c "value_LA"
| Case_aux c "value_LB"
| Case_aux c "value_LTop"
| Case_aux c "value_VTrue"
| Case_aux c "value_VFalse"
| Case_aux c "value_VUnit"
| Case_aux c "value_VAbs"
| Case_aux c "value_VLIO"
| Case_aux c "value_VLabeled"
| Case_aux c "value_VException" ].
Tactic Notation "term_cases" tactic(first) ident(c) :=
first;
[ Case_aux c "term_LBot"
| Case_aux c "term_LA"
| Case_aux c "term_LB"
| Case_aux c "term_LTop"
| Case_aux c "term_VTrue"
| Case_aux c "term_VFalse"
| Case_aux c "term_VUnit"
| Case_aux c "term_VAbs"
| Case_aux c "term_VLIO"
| Case_aux c "term_VLabeled"
| Case_aux c "term_VException"
| Case_aux c "term_VHole"
| Case_aux c "term_Var"
| Case_aux c "term_App"
| Case_aux c "term_Fix"
| Case_aux c "term_IfEl"
| Case_aux c "term_Join"
| Case_aux c "term_Meet"
| Case_aux c "term_CanFlowTo"
| Case_aux c "term_Return"
| Case_aux c "term_Bind"
| Case_aux c "term_GetLabel"
| Case_aux c "term_GetClearance"
| Case_aux c "term_LabelOf"
| Case_aux c "term_Label"
| Case_aux c "term_UnLabel"
| Case_aux c "term_ToLabeled"
| Case_aux c "term_LowerClr"
| Case_aux c "term_ThrowLIO"
| Case_aux c "term_CatchLIO"
].
Tactic Notation "type_cases" tactic(first) ident(c) :=
first;
[ Case_aux c "GtT_true"
| Case_aux c "GtT_false"
| Case_aux c "GtT_unit"
| Case_aux c "GtT_labelBot"
| Case_aux c "GtT_labelA"
| Case_aux c "GtT_labelB"
| Case_aux c "GtT_labelTop"
| Case_aux c "GtT_labeledVal"
| Case_aux c "GtT_lioVal"
| Case_aux c "GtT_exception"
| Case_aux c "GtT_hole"
| Case_aux c "GtT_valName"
| Case_aux c "GtT_abs"
| Case_aux c "GtT_fix"
| Case_aux c "GtT_app"
| Case_aux c "GtT_ifEl"
| Case_aux c "GtT_join"
| Case_aux c "GtT_meet"
| Case_aux c "GtT_canFlowTo"
| Case_aux c "GtT_return"
| Case_aux c "GtT_bind"
| Case_aux c "GtT_bindEx"
| Case_aux c "GtT_getLabel"
| Case_aux c "GtT_getClearance"
| Case_aux c "GtT_labelOf"
| Case_aux c "GtT_label"
| Case_aux c "GtT_unlabel"
| Case_aux c "GtT_throwLIO"
| Case_aux c "GtT_catchLIO" ].
Tactic Notation "pure_reduce_cases" tactic(first) ident(c) :=
first;
[ Case_aux c "Pr_appCtx"
| Case_aux c "Pr_app"
| Case_aux c "Pr_fixCtx"
| Case_aux c "Pr_fix"
| Case_aux c "Pr_ifCtx"
| Case_aux c "Pr_ifTrue"
| Case_aux c "Pr_ifFalse"
| Case_aux c "Pr_joinCtxL"
| Case_aux c "Pr_joinCtxR"
| Case_aux c "Pr_joinBotL"
| Case_aux c "Pr_joinBotR"
| Case_aux c "Pr_joinEq"
| Case_aux c "Pr_joinAB"
| Case_aux c "Pr_joinBA"
| Case_aux c "Pr_joinTopL"
| Case_aux c "Pr_joinTopR"
| Case_aux c "Pr_meetCtxL"
| Case_aux c "Pr_meetCtxR"
| Case_aux c "Pr_meetBotL"
| Case_aux c "Pr_meetBotR"
| Case_aux c "Pr_meetEq"
| Case_aux c "Pr_meetAB"
| Case_aux c "Pr_meetBA"
| Case_aux c "Pr_meetTopL"
| Case_aux c "Pr_meetTopR"
| Case_aux c "Pr_canFlowToCtxL"
| Case_aux c "Pr_canFlowToCtxR"
| Case_aux c "Pr_canFlowToBot"
| Case_aux c "Pr_canFlowToEq"
| Case_aux c "Pr_canFlowToAB"
| Case_aux c "Pr_canFlowToBA"
| Case_aux c "Pr_canFlowToTop"
| Case_aux c "Pr_labelOfCtx"
| Case_aux c "Pr_labelOf"
| Case_aux c "Pr_hole" ].
Tactic Notation "lio_reduce_cases" tactic(first) ident(c) :=
first;
[ Case_aux c "LIO_return"
| Case_aux c "LIO_bind"
| Case_aux c "LIO_bindEx"
| Case_aux c "LIO_getLabel"
| Case_aux c "LIO_getClearance"
| Case_aux c "LIO_labelCtx"
| Case_aux c "LIO_label"
| Case_aux c "LIO_unlabelCtx"
| Case_aux c "LIO_unlabel"
| Case_aux c "LIO_unlabelEx"
| Case_aux c "LIO_toLabeledCtx"
| Case_aux c "LIO_toLabeled"
| Case_aux c "LIO_toLabeledEx"
| Case_aux c "LIO_lowerClrCtx"
| Case_aux c "LIO_lowerClr"
| Case_aux c "LIO_throwLIO"
| Case_aux c "LIO_catchLIO"
| Case_aux c "LIO_catchLIOEx"
| Case_aux c "LIO_hole"
| Case_aux c "LIO_pure"
].
Tactic Notation "lio_reduce_multi_cases" tactic(first) ident(c) :=
first;
[ Case_aux c "LIO_onestep"
| Case_aux c "LIO_done"].
}}