mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-01 15:22:50 -06:00
added Ann-Charlotte's grammars
This commit is contained in:
5
grammars/TALK/GF_GoDiS/Domain/deLux/DB.gf
Normal file
5
grammars/TALK/GF_GoDiS/Domain/deLux/DB.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../../Resource/Home
|
||||
|
||||
abstract DB = Lamps, Rooms ** {
|
||||
|
||||
}
|
||||
5
grammars/TALK/GF_GoDiS/Domain/deLux/DBEng.gf
Normal file
5
grammars/TALK/GF_GoDiS/Domain/deLux/DBEng.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../../Resource/Home
|
||||
|
||||
concrete DBEng of DB= LampsEng, RoomsEng ** {
|
||||
|
||||
}
|
||||
5
grammars/TALK/GF_GoDiS/Domain/deLux/DBPro.gf
Normal file
5
grammars/TALK/GF_GoDiS/Domain/deLux/DBPro.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../../Resource/Home
|
||||
|
||||
concrete DBPro of DB= LampsPro, RoomsPro ** {
|
||||
|
||||
}
|
||||
5
grammars/TALK/GF_GoDiS/Domain/deLux/DBSwe.gf
Normal file
5
grammars/TALK/GF_GoDiS/Domain/deLux/DBSwe.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../../Resource/Home
|
||||
|
||||
concrete DBSwe of DB= LampsSwe, RoomsSwe ** {
|
||||
|
||||
}
|
||||
50
grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomain.gf
Normal file
50
grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedDomain.gf
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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"];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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"];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
58
grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedSpecific.gf
Normal file
58
grammars/TALK/GF_GoDiS/Domain/deLux/Shared/sharedSpecific.gf
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
34
grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomain.gf
Normal file
34
grammars/TALK/GF_GoDiS/Domain/deLux/System/systemDomain.gf
Normal 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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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"];
|
||||
}
|
||||
|
||||
|
||||
@@ -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"];
|
||||
|
||||
|
||||
}
|
||||
@@ -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"];
|
||||
}
|
||||
|
||||
|
||||
13
grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomain.gf
Normal file
13
grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomain.gf
Normal 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;
|
||||
|
||||
|
||||
}
|
||||
12
grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainEng.gf
Normal file
12
grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainEng.gf
Normal 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};
|
||||
}
|
||||
14
grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainPro.gf
Normal file
14
grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainPro.gf
Normal 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 ++ ")"};
|
||||
|
||||
}
|
||||
11
grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainSwe.gf
Normal file
11
grammars/TALK/GF_GoDiS/Domain/deLux/User/userDomainSwe.gf
Normal 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};
|
||||
}
|
||||
Reference in New Issue
Block a user