forked from GitHub/gf-core
field names added to Prolog
This commit is contained in:
@@ -6,8 +6,8 @@ concrete AgendaProlog of Agenda =
|
||||
lin
|
||||
Day = ss "day" ;
|
||||
Meeting = ss "meeting" ;
|
||||
Add = ss "add" ;
|
||||
Remove = ss "remove" ;
|
||||
Add = op2 "add_event" "event_to_store" "date_to_store" ;
|
||||
Remove = op1 "remove_event" "event_to_remove" ;
|
||||
Interrupt = ss "interrupt" ;
|
||||
|
||||
day = apps "weekday" ;
|
||||
|
||||
@@ -48,10 +48,10 @@ incomplete concrete DialogueI of Dialogue = open Lang, Prelude in {
|
||||
} ;
|
||||
|
||||
aImp : VP -> Str = \vp ->
|
||||
(PhrUtt NoPConj (UttImpPl PPos (ImpVP vp)) NoVoc).s ;
|
||||
(PhrUtt NoPConj (UttImpSg PPos (ImpVP vp)) NoVoc).s ;
|
||||
|
||||
aImpPlease : VP -> Str = \vp ->
|
||||
(PhrUtt NoPConj (UttImpPl PPos (ImpVP vp)) please_Voc).s ;
|
||||
(PhrUtt NoPConj (UttImpSg PPos (ImpVP vp)) please_Voc).s ;
|
||||
|
||||
aWant : VP -> Str = \vp ->
|
||||
(PhrUtt NoPConj (UttS (UseCl TPres ASimul PPos (PredVP (UsePron i_Pron)
|
||||
|
||||
@@ -10,8 +10,8 @@ concrete DialogueProlog of Dialogue = open ResProlog, Prelude in {
|
||||
Kind = SS ;
|
||||
Object = SS ;
|
||||
Oper0 = SS ;
|
||||
Oper1 = SS ;
|
||||
Oper2 = SS ;
|
||||
Oper1 = {s, x : Str} ;
|
||||
Oper2 = {s, x, y : Str} ;
|
||||
|
||||
lin
|
||||
MRequest a = a ;
|
||||
@@ -19,11 +19,11 @@ concrete DialogueProlog of Dialogue = open ResProlog, Prelude in {
|
||||
|
||||
MQuery k = ss (bracket (app1 "query" k.s)) ; ---
|
||||
|
||||
AOper0 op = ss (bracket (request op.s)) ;
|
||||
AOper1 k op x = ss (req_ans op.s k.s x.s) ;
|
||||
AOper2 k m op x y =
|
||||
AOper0 op = ss (bracket (request op.s)) ;
|
||||
AOper1 _ op x = ss (req_ans op.s op.x x.s) ;
|
||||
AOper2 _ _ op x y =
|
||||
ss (bracket (request op.s ++ "," ++
|
||||
answer (app1 k.s x.s) ++ "," ++ answer (app1 m.s y.s))) ;
|
||||
answer (app1 op.x x.s) ++ "," ++ answer (app1 op.y y.s))) ;
|
||||
|
||||
OAll = apps "all" ;
|
||||
OIndef = apps "indef" ;
|
||||
|
||||
@@ -6,10 +6,10 @@ concrete LightsProlog of Lights =
|
||||
lin
|
||||
Light = ss "light" ;
|
||||
Room = ss "room" ;
|
||||
SwitchOnIn = ss "switch_on" ;
|
||||
SwitchOffIn = ss "switch_off" ;
|
||||
SwitchOn = ss "switch_on" ;
|
||||
SwitchOff = ss "switch_off" ;
|
||||
SwitchOnIn = op2 "switch_on" "switch_what" "switch_where" ;
|
||||
SwitchOffIn = op2 "switch_off" "switch_what" "switch_where" ;
|
||||
SwitchOn = op1 "switch_on" "switch_what" ;
|
||||
SwitchOff = op1 "switch_off" "switch_what" ;
|
||||
|
||||
LivingRoom = ss "living_room" ;
|
||||
Kitchen = ss "kitchen" ;
|
||||
|
||||
@@ -7,6 +7,9 @@ resource ResProlog = open Prelude in {
|
||||
|
||||
apps : Str -> SS -> SS = \f,x -> ss (app1 f x.s) ;
|
||||
|
||||
op1 : (s,x : Str) -> {s,x : Str} = \s,x -> {s = s ; x = x} ;
|
||||
op2 : (s,x,y : Str) -> {s,x,y : Str} = \s,x,y -> {s = s ; x = x ; y = y} ;
|
||||
|
||||
request : Str -> Str = app1 "request" ;
|
||||
answer : Str -> Str = app1 "answer" ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user