@@ -44,6 +44,7 @@ instance : Inhabited (RegisterRef RegisterType Nat) where
4444abbrev exception := Unit
4545
4646abbrev SailM := PreSailM RegisterType trivialChoiceSource exception
47+ abbrev SailME := PreSailME RegisterType trivialChoiceSource exception
4748
4849
4950XXXXXXXXX
@@ -68,7 +69,7 @@ open option
6869open Register
6970open E
7071
71- /-- Type quantifiers: k_ex2332_ : Bool, k_ex2331_ : Bool -/
72+ /-- Type quantifiers: k_ex2346_ : Bool, k_ex2345_ : Bool -/
7273def neq_bool (x : Bool) (y : Bool) : Bool :=
7374 (! (x == y))
7475
@@ -446,7 +447,7 @@ def match_early_return_loop (x : E) : SailM E := SailME.run do
446447 | C => writeReg r_C A
447448 readReg r_B
448449
449- /-- Type quantifiers: k_ex2648_ : Bool -/
450+ /-- Type quantifiers: k_ex2662_ : Bool -/
450451def ite_early_return (x : Bool) : SailM E := SailME.run do
451452 writeReg r_A (← readReg r_C)
452453 let y ← (( do
@@ -457,7 +458,7 @@ def ite_early_return (x : Bool) : SailM E := SailME.run do
457458 else readReg r_B ) : SailME E E )
458459 readReg r_B
459460
460- /-- Type quantifiers: k_ex2650_ : Bool -/
461+ /-- Type quantifiers: k_ex2664_ : Bool -/
461462def ite_early_return_inloop (x : Bool) : SailM E := SailME.run do
462463 let loop_i_lower := 0
463464 let loop_i_upper := 10
@@ -476,7 +477,7 @@ def ite_early_return_inloop (x : Bool) : SailM E := SailME.run do
476477 (pure loop_vars)
477478 readReg r_B
478479
479- /-- Type quantifiers: k_ex2654_ : Bool -/
480+ /-- Type quantifiers: k_ex2668_ : Bool -/
480481def ite_early_return_loop (x : Bool) : SailM E := SailME.run do
481482 if (x : Bool)
482483 then
@@ -496,7 +497,7 @@ def ite_early_return_loop (x : Bool) : SailM E := SailME.run do
496497def unit_type (x : E) : SailM Unit := do
497498 writeReg r_A x
498499
499- /-- Type quantifiers: k_ex2658_ : Bool -/
500+ /-- Type quantifiers: k_ex2672_ : Bool -/
500501def ite_early_return_seq (x : Bool) : SailM E := SailME.run do
501502 writeReg r_A (← readReg r_C)
502503 let y ← (( do
@@ -508,6 +509,20 @@ def ite_early_return_seq (x : Bool) : SailM E := SailME.run do
508509 else readReg r_B ) : SailME E E )
509510 readReg r_B
510511
512+ /-- Type quantifiers: k_ex2674_ : Bool -/
513+ def ite_early_return_exit (x : Bool) : SailM E := SailME.run do
514+ writeReg r_A (← readReg r_C)
515+ let y ← (( do
516+ if (x : Bool)
517+ then
518+ SailME.throw (← do
519+ readReg r_A)
520+ else readReg r_B ) : SailME E E )
521+ if (x : Bool)
522+ then throw Error.Exit
523+ else (pure ())
524+ readReg r_B
525+
511526def initialize_registers (_ : Unit) : SailM Unit := do
512527 writeReg r_A (← (undefined_E ()))
513528 writeReg r_B (← (undefined_E ()))
0 commit comments