summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-05-16 21:10:47 +0000
committeraarne <aarne@cs.chalmers.se>2006-05-16 21:10:47 +0000
commit63f03f8c731f3392e72f92d65b2c200fd342551d (patch)
tree612c63b9d96971e5e29a80351f9385482ff4712c
parent29d04d8a90e1db9c8cc040ae5d83bdf7c84359cc (diff)
field names added to Prolog
-rw-r--r--examples/dialogue/AgendaProlog.gf4
-rw-r--r--examples/dialogue/DialogueI.gf4
-rw-r--r--examples/dialogue/DialogueProlog.gf12
-rw-r--r--examples/dialogue/LightsProlog.gf8
-rw-r--r--examples/dialogue/ResProlog.gf3
5 files changed, 17 insertions, 14 deletions
diff --git a/examples/dialogue/AgendaProlog.gf b/examples/dialogue/AgendaProlog.gf
index 060086812..0bdc4aebf 100644
--- a/examples/dialogue/AgendaProlog.gf
+++ b/examples/dialogue/AgendaProlog.gf
@@ -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" ;
diff --git a/examples/dialogue/DialogueI.gf b/examples/dialogue/DialogueI.gf
index 7a00e67db..e88497135 100644
--- a/examples/dialogue/DialogueI.gf
+++ b/examples/dialogue/DialogueI.gf
@@ -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)
diff --git a/examples/dialogue/DialogueProlog.gf b/examples/dialogue/DialogueProlog.gf
index 30e397f0d..26e6e6157 100644
--- a/examples/dialogue/DialogueProlog.gf
+++ b/examples/dialogue/DialogueProlog.gf
@@ -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" ;
diff --git a/examples/dialogue/LightsProlog.gf b/examples/dialogue/LightsProlog.gf
index 4a93ee469..82fd43212 100644
--- a/examples/dialogue/LightsProlog.gf
+++ b/examples/dialogue/LightsProlog.gf
@@ -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" ;
diff --git a/examples/dialogue/ResProlog.gf b/examples/dialogue/ResProlog.gf
index 5ecb1f3c0..8b6dadef6 100644
--- a/examples/dialogue/ResProlog.gf
+++ b/examples/dialogue/ResProlog.gf
@@ -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" ;