added Ann-Charlotte's grammars

This commit is contained in:
aarne
2005-06-27 12:20:33 +00:00
parent 10d6757558
commit ec444e9e7e
122 changed files with 687204 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
--# -path=.:../../Resource/Home
abstract DB = Lamps, Rooms ** {
}

View File

@@ -0,0 +1,5 @@
--# -path=.:../../Resource/Home
concrete DBEng of DB= LampsEng, RoomsEng ** {
}

View File

@@ -0,0 +1,5 @@
--# -path=.:../../Resource/Home
concrete DBPro of DB= LampsPro, RoomsPro ** {
}

View File

@@ -0,0 +1,5 @@
--# -path=.:../../Resource/Home
concrete DBSwe of DB= LampsSwe, RoomsSwe ** {
}

View File

@@ -0,0 +1,50 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System
abstract sharedDomain = sharedCore, DB ** {
fun
-- ANSWERS
answerLampOn : Lamp -> Proposition onTask;
answerLampOff : Lamp -> Proposition offTask;
answerLocation : Room -> Proposition locateTask;
-- Ask Answers
questionWhichLamp : Lamp -> Proposition lampQuestion;
questionLocation : Room -> Proposition locQuestion;
-- LEXICON
onTask : Task;
offTask : Task;
locateTask : Task;
lampQuestion : Task;
locQuestion : Task;
turnOn : Action onTask;
turnOff : Action offTask;
turnOnThis : SingleAction;
turnOffThis : SingleAction;
dimmerUp : SingleAction;
dimmerDown : SingleAction;
--askLamp : Ask lampQuestion;
--askLocation : Ask locQuestion;
askStatusLamp : SingleAsk;
}

View File

@@ -0,0 +1,46 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System
concrete sharedDomainEng of sharedDomain = sharedCoreEng, DBEng **
open SpecResEng in {
lin
-- ANSWERS
answerLampOn lamp = {s = lamp.s};
answerLampOff lamp = {s = lamp.s};
answerLocation loc = {s = loc.s};
questionWhichLamp lamp = {s = lamp.s};
questionLocation loc = {s = loc.s};
-- LEXICON
pattern
turnOn = ["turn on"];
turnOff = ["turn off"];
turnOnThis = ["turn on"];
turnOffThis = ["turn off"];
dimmerUp = ["dim up"];
dimmerDown = ["dim down"];
--askLamp = ["do i have a"];
--askLocation = ["is there a"];
askStatusLamp = ["what lights are on"];
}

View File

@@ -0,0 +1,43 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System
concrete sharedDomainPro of sharedDomain = sharedCorePro, DBPro ** {
lin
-- ANSWERS
answerLampOn lamp = {s = lamp.s};
answerLampOff lamp = {s = lamp.s};
answerLocation loc = {s = loc.s};
questionWhichLamp lamp = {s = lamp.s};
questionLocation loc = {s = loc.s};
-- LEXICON
pattern
turnOn = "turnOn";
turnOff = "turnOff";
turnOnThis = "turnOn_closest";
turnOffThis = "turnOff_closest";
dimmerUp = "dimmer_up";
dimmerDown = "dimmer_down";
--askLamp = "lamps";
--askLocation = "locations";
askStatusLamp = "status";
}

View File

@@ -0,0 +1,48 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System
concrete sharedDomainSwe of sharedDomain = sharedCoreSwe, DBSwe ** {
lin
-- ANSWERS
answerLampOn lamp = {s = lamp.s};
answerLampOff lamp = {s = lamp.s};
answerLocation loc = {s = loc.s};
questionWhichLamp lamp = {s = lamp.s};
questionLocation loc = {s = loc.s};
-- LEXICON
pattern
turnOn = "tända";
turnOff = "släcka";
turnOnThis = "tända";
turnOffThis = "släcka";
dimmerUp = ["dimma upp"];
dimmerDown = ["dimma ner"];
--askLamp = ["har jag en"];
--askLocation = ["finns det ett"];
askStatusLamp = ["vilka lampor är tända"];
}

View File

@@ -0,0 +1,58 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System
abstract sharedDomain = sharedCore, DB ** {
fun
-- ANSWERS
-- Ett alternativ är att gära en Task för varje action som
-- finns i domänen. Alltså En erase Task, en play Task och en add Task
-- på det sattet kan man gora funktioner som tar "nummer fem" och gör en
-- "Object play" och en "Object erase" men inte en "Object add".
-- Request Answers
answerLampOn : Lamp -> Object onTask;
answerLampOff : Lamp -> Object offTask;
answerLocation : Location -> Object locateTask;
-- Ask Answers
questionWhichLamp : Lamp -> Object lampQuestion;
questionLocation : Location -> Object locQuestion;
-- LEXICON
onTask : Task;
offTask : Task;
locateTask : Task;
lampQuestion : Task;
locQuestion : Task;
turnOn : Action onTask;
turnOff : Action offTask;
turnOnThis : SingleAction;
turnOffThis : SingleAction;
dimmerUp : SingleAction;
dimmerDown : SingleAction;
--askLamp : Ask lampQuestion;
--askLocation : Ask locQuestion;
askStatusLamp : SingleAsk;
}

View File

@@ -0,0 +1,34 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System
abstract systemDomain = sharedDomain, systemCore ** {
fun
-- PROPOSITIONS.
--
lampProp : Lamp -> Proposition onTask;
locProp : Room -> Proposition onTask;
whatToTurnOffProp : Lamp -> Proposition offTask;
whatToTurnOnProp : Lamp -> Proposition onTask;
-- Asks
whatLampQuestion : SingleAsk; -- "what song do you mean?"
whatLocQuestion : SingleAsk; -- "what artist do you mean?"
-- Confirms
turnedOnLamp : Confirm;
turnedOffLamp : Confirm;
}

View File

@@ -0,0 +1,32 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System
--# -path=.:../:../DBase/:../Shared
concrete systemDomainEng of systemDomain = sharedDomainEng, systemCoreEng ** {
lin
-- PROPOSITIONS
lampProp lamp = { s = lamp.s };
locProp loc = { s = loc.s };
whatToTurnOffProp lamp = { s = lamp.s };
whatToTurnOnProp lamp = { s = lamp.s };
pattern
-- Asks
whatLampQuestion = ["what lamp do you mean"];
whatLocQuestion = ["what room do you mean"];
-- Confirms
turnedOnLamp = ["the light is on"];
turnedOffLamp = ["the light is turned off"];
}

View File

@@ -0,0 +1,28 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System
concrete systemDomainPro of systemDomain = sharedDomainPro, systemCorePro ** {
lin
-- PROPOSITIONS
lampProp lamp = { s = lamp.s };
locProp loc = { s = loc.s };
whatToTurnOffProp lamp = { s = lamp.s };
whatToTurnOnProp lamp = { s = lamp.s };
pattern
-- Asks
whatLampQuestion = ["X^lamp(X)"];
whatLocQuestion = ["X^loc(X)"];
-- Confirms
turnedOnLamp = ["turnOn"];
turnedOffLamp = ["turnOff"];
}

View File

@@ -0,0 +1,28 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/System
concrete systemDomainSwe of systemDomain = sharedDomainSwe, systemCoreSwe ** {
lin
-- PROPOSITIONS
lampProp lamp = { s = lamp.s };
locProp loc = { s = loc.s };
whatToTurnOffProp lamp = { s = lamp.s };
whatToTurnOnProp lamp = { s = lamp.s };
pattern
-- Asks
whatLampQuestion = ["vilken lampa menar du"];
whatLocQuestion = ["vilket rum menar du"];
-- Confirms
turnedOnLamp = ["lampan är tänd"];
turnedOffLamp = ["lampan är släckt"];
}

View File

@@ -0,0 +1,13 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/User
abstract userDomain = userCore, sharedDomain ** {
fun
-- CompoundedAnswers
answerLampLocTurnOn : Lamp -> Room -> AnswerList onTask;
answerLampLocTurnOff : Lamp -> Room -> AnswerList offTask;
}

View File

@@ -0,0 +1,12 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/User
concrete userDomainEng of userDomain = userCoreEng, sharedDomainEng ** {
lin
-- CompoundedAnswers
-- CompoundedAnswers
answerLampLocTurnOn lamp loc = {s = lamp.s ++ "in" ++ loc.s};
answerLampLocTurnOff lamp loc = {s = lamp.s ++ "in" ++ loc.s};
}

View File

@@ -0,0 +1,14 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/User
concrete userDomainPro of userDomain = userCorePro, sharedDomainPro ** {
lin
-- CompoundedAnswers
answerLampLocTurnOn lamp loc = {s = "answer(lamp(" ++ lamp.s ++ ")," ++
"answer(loc(" ++ loc.s ++ ")"};
answerLampLocTurnOff lamp loc = {s = "answer(lamp(" ++ lamp.s ++ ")," ++
"answer(loc(" ++ loc.s ++ ")"};
}

View File

@@ -0,0 +1,11 @@
--# -path=.:../:../../:../Shared/:../../../Resource/Home/:../../../Core:../../../Core/Shared/:../../../Core/User
concrete userDomainSwe of userDomain = userCoreSwe, sharedDomainSwe ** {
lin
-- CompoundedAnswers
answerLampLocTurnOn lamp loc = {s = lamp.s ++ "i" ++ loc.s};
answerLampLocTurnOff lamp loc = {s = lamp.s ++ "i" ++ loc.s};
}