This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
M1 k1 = (call/cc (M2 k1)) + 3 | |
M2 k1 k2 = if b then (k1 1) else (k2 2) | |
(call/cc M1) + 4 | |
S1 k1 = (shift (λk2. k2 (S2 k1 k2))) + 3 | |
S2 k1 k2 = if b then (k1 1) else (k2 2) | |
reset(exit(shift (λk1. k1 (S1 k1)) + 4)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 失敗版 | |
sig Coin {} | |
abstract sig State { | |
candidates : set Coin, | |
} | |
sig Branch extends State { | |
left, right : set Coin, | |
eq, lt, gt : State |