summaryrefslogtreecommitdiff
path: root/examples/regulus/toy1/Toy1a.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-06-11 14:53:08 +0000
committeraarne <aarne@cs.chalmers.se>2007-06-11 14:53:08 +0000
commit75a9ea71a27cba432286f0b14fe0be31edff5752 (patch)
tree55c82418df60463ce388322902b34b20440b0f87 /examples/regulus/toy1/Toy1a.gf
parent2b438a6284564feec800e5bdca5fe006bf8aed11 (diff)
toy1 with classes and using resource API
Diffstat (limited to 'examples/regulus/toy1/Toy1a.gf')
-rw-r--r--examples/regulus/toy1/Toy1a.gf35
1 files changed, 35 insertions, 0 deletions
diff --git a/examples/regulus/toy1/Toy1a.gf b/examples/regulus/toy1/Toy1a.gf
new file mode 100644
index 000000000..2478360b4
--- /dev/null
+++ b/examples/regulus/toy1/Toy1a.gf
@@ -0,0 +1,35 @@
+abstract Toy1 = {
+
+flags startcat = Utterance ;
+
+cat
+ Utterance ;
+ Command ;
+ Question ;
+ Kind ;
+ Action Kind ;
+ Device Kind ;
+ Location ;
+
+fun
+ UCommand : Command -> Utterance ;
+ UQuestion : Question -> Utterance ;
+
+ CAction : (k : Kind) -> Action k -> Device k -> Command ;
+ QAction : (k : Kind) -> Action k -> Device k -> Question ;
+
+ DKindOne : (k : Kind) -> Device k ;
+ DKindMany : (k : Kind) -> Device k ;
+ DLoc : (k : Kind) -> Device k -> Location -> Device k ;
+
+ light, fan : Kind ;
+
+ switchOn, switchOff : (k : Kind) -> Action k ;
+
+ dim : Action light ;
+
+ kitchen, livingRoom : Location ;
+
+
+}
+