blob: 8d08eeb408fd758336c74742d63fd42d7416c373 (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
--# -path=.:../Common:prelude
concrete TramSystemSem of TramSystem = GodisSystemSem, StopsSem, LinesSem ** open Prolog in {
lincat
Route,
Leg,
[Leg] = PStr;
lin
-----------------------------------------------------------
-- Route
lineLeg line s1 s2 = pp3 "leg" line s1 s2;
oneLeg leg = pList1 leg;
mkRoute legs = pBrackets legs;
BaseLeg leg leg' = pSeq leg leg';
ConsLeg leg legs = pSeq leg legs;
-----------------------------------------------------------
-- Predicates and questions
shortest_route_Q = pWhQ "shortest_path";
shortest_route_P route = pp1 "shortest_path" route;
dest_stop_Q = pWhQ "dest_stop";
dest_stop_P = pp1 "dest_stop";
dept_stop_Q = pWhQ "dept_stop";
dept_stop_P = pp1 "dept_stop";
------------------------------------------------------------
-- Short answers
stop = pp1 "stop";
-------------------------------------------------------------
-- Actions
top = pp0 "top";
help = pp0 "help";
}
|