summaryrefslogtreecommitdiff
path: root/prolog/problems/denotational_semantics/prog_listswap_2/common.py
blob: b3da01fa2640966720f8721528e120cb3ac99041 (plain)
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
id = 175
number = 10
visible = True
facts = None

solution = '''\
prog_listswap --> [begin], instructs175, [end].

instructs175 --> instr175.
instructs175 --> instr175, instructs175.

instr175 --> [left].
instr175 --> [right].
instr175 --> [swap].
'''

# nothing to do in this exercise
initial = '''\
prog_listswap --> [begin], instructs, [end].

instructs --> instr.
instructs --> instr, instructs.

instr --> [left].
instr --> [right].
instr --> [swap].
'''