16 lines
290 B
Plaintext
16 lines
290 B
Plaintext
|
module chap7
|
||
|
imports libstrategolib signatures/-
|
||
|
|
||
|
rules
|
||
|
|
||
|
A : Or(False(), x) -> x
|
||
|
B : Or(Impl(True(),x), y) -> Or(x, Impl(True(), y))
|
||
|
|
||
|
strategies
|
||
|
|
||
|
BthenA = B; A
|
||
|
Btwice = B; B
|
||
|
maybeB-id-thenB = (B <+ id); B
|
||
|
maybeBtwice-idthenB = Btwice <+ (id; B)
|
||
|
repeatmaybeAB = repeat(A <+ B)
|