File tree 1 file changed +10
-9
lines changed
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -57,14 +57,11 @@ simplify0 env c =
57
57
simplify0 env (both (scale ob c1) (scale ob c2))
58
58
Scale r t -> scale (eval env r) (simplify0 env t)
59
59
Transl i t' -> transl i (simplify0 (promote env i) t')
60
- TransfOne _ _ _ -> c
60
+ TransfOne _ _ _ -> c
61
61
If e c1 c2 -> let e' = eval env e
62
62
c1' = simplify0 env c1
63
63
c2' = simplify0 env c2
64
- in case e' of -- if e' known, iff constr. will shorten
65
- B True -> c1'
66
- B False -> c2'
67
- _ -> iff e' c1' c2'
64
+ in iff e' c1' c2' -- just eval e, no branch elimination
68
65
CheckWithin e i c1 c2
69
66
-> let env' = emptyEnv -- (emp,#2 G)
70
67
substE = eval env'
@@ -105,10 +102,14 @@ elimBrs env (Scale r t) = scale r (elimBrs env t)
105
102
elimBrs env (Transl i t') = transl i (elimBrs (promote env i) t')
106
103
elimBrs env c@ (TransfOne _ _ _) = c
107
104
-- the interesting ones:
108
- elimBrs env (If e c1 c2) = let e = eval env e
109
- c1 = elimBrs env c1
110
- c2 = elimBrs env c2
111
- in iff e c1 c2 -- if e known, iff will shorten
105
+ elimBrs env (If e c1 c2) =
106
+ let e' = eval env e
107
+ c1' = elimBrs env c1
108
+ c2' = elimBrs env c2
109
+ in case e' of -- if e known, iff will shorten
110
+ B True -> c1'
111
+ B False -> c2'
112
+ _ -> iff e' c1' c2'
112
113
elimBrs env (CheckWithin e 0 c1 c2) = elimBrs env (If e c1 c2)
113
114
-- elimBrs env (CheckWithin e i c1 c2)
114
115
-- = let env' = emptyEnv -- (emp,#2 G)
You can’t perform that action at this time.
0 commit comments