File size: 758 Bytes
339ddd8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
-- Node planner (to retriever): fixes the Python task order and required gates.
-- NOTE: this specification has not been compiled with the GF toolchain in the authoring environment.
abstract PythonPlan = {
  cat
    Plan ; Tasks ; Task ; Gate ; Gates ;
  fun
    Schedule : Tasks -> Gates -> Plan ;
    Start : Task -> Tasks ;
    Then : Task -> Tasks -> Tasks ;
    GateNamed : String -> Gate ;
    Required : Gate -> Gates ;
    Demand : Gate -> Gates -> Gates ;
}

concrete PythonPlanEng of PythonPlan = {
  lincat
    Plan, Tasks, Task, Gate, Gates = Str ;
  lin
    Schedule ts gs = "plan" ++ ts ++ "gates" ++ gs ;
    Start t = t ;
    Then t ts = t ++ "then" ++ ts ;
    GateNamed s = s.s ;
    Required g = g ;
    Demand g gs = g ++ "and" ++ gs ;
}