toy1 with classes and using resource API
This commit is contained in:
1 parent
2b438a6284
commit
75a9ea71a2
9 files changed
+313
-8
No files matched your search
@@ -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 ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user