diff options
| author | aarne <aarne@chalmers.se> | 2011-01-11 15:46:43 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2011-01-11 15:46:43 +0000 |
| commit | e7439d65b0e153434d3acc07df6e2a0972ee79ca (patch) | |
| tree | 36716eec18256eeb600b4a552d9cc80f8ad7f16f /book/examples | |
| parent | 276327f7f264e770478a6d8c6e683266505b0a55 (diff) | |
gf-book web page index and toc
Diffstat (limited to 'book/examples')
106 files changed, 0 insertions, 2155 deletions
diff --git a/book/examples/chapter2/Copy.gf b/book/examples/chapter2/Copy.gf deleted file mode 100644 index 58d74861c..000000000 --- a/book/examples/chapter2/Copy.gf +++ /dev/null @@ -1,7 +0,0 @@ -concrete Copy of CopyAbs = { - lincat S, AB = Str ; - lin s x = x ++ x ; - end = [] ; - a x = "a" ++ x ; - b x = "b" ++ x ; -} diff --git a/book/examples/chapter2/CopyAbs.gf b/book/examples/chapter2/CopyAbs.gf deleted file mode 100644 index 9a915568b..000000000 --- a/book/examples/chapter2/CopyAbs.gf +++ /dev/null @@ -1,6 +0,0 @@ -abstract CopyAbs = { - cat S ; AB ; - fun s : AB -> S ; - end : AB ; - a,b : AB -> AB ; -} diff --git a/book/examples/chapter2/Food.gf b/book/examples/chapter2/Food.gf deleted file mode 100644 index 7cf779b4c..000000000 --- a/book/examples/chapter2/Food.gf +++ /dev/null @@ -1,13 +0,0 @@ -abstract Food = { - flags startcat = Comment ; - cat - Comment ; Item ; Kind ; Quality ; - fun - Pred : Item -> Quality -> Comment ; - This, That : Kind -> Item ; - Mod : Quality -> Kind -> Kind ; - Wine, Cheese, Fish : Kind ; - Very : Quality -> Quality ; - Fresh, Warm, Italian, - Expensive, Delicious, Boring : Quality ; -} diff --git a/book/examples/chapter2/Food.probs b/book/examples/chapter2/Food.probs deleted file mode 100644 index 2d75774a1..000000000 --- a/book/examples/chapter2/Food.probs +++ /dev/null @@ -1,4 +0,0 @@ - This 0.8 - Mod 0.2 - Wine 0.0 - Fresh 0.4 diff --git a/book/examples/chapter2/FoodEng.gf b/book/examples/chapter2/FoodEng.gf deleted file mode 100644 index f2ed510fe..000000000 --- a/book/examples/chapter2/FoodEng.gf +++ /dev/null @@ -1,19 +0,0 @@ -concrete FoodEng of Food = { - lincat - Comment, Item, Kind, Quality = Str ; - lin - Pred item quality = item ++ "is" ++ quality ; - This kind = "this" ++ kind ; - That kind = "that" ++ kind ; - Mod quality kind = quality ++ kind ; - Wine = "wine" ; - Cheese = "cheese" ; - Fish = "fish" ; - Very quality = "very" ++ quality ; - Fresh = "fresh" ; - Warm = "warm" ; - Italian = "Italian" ; - Expensive = "expensive" ; - Delicious = "delicious" ; - Boring = "boring" ; -} diff --git a/book/examples/chapter2/FoodHin.gf b/book/examples/chapter2/FoodHin.gf deleted file mode 100644 index 0f6f25c5e..000000000 --- a/book/examples/chapter2/FoodHin.gf +++ /dev/null @@ -1,24 +0,0 @@ - - concrete FoodHin of Food = { - flags coding = utf8 ; - lincat Comment, Item, Kind, Quality = Str ; - lin - Pred item quality = item ++ quality ++ "है" ; - This kind = "यह" ++ kind ; - That kind = "वह" ++ kind ; - Mod quality kind = quality ++ kind ; - Wine = "मदिरा" ; - Cheese = "पनीर" ; - Fish = "मछली" ; - Very quality = "अति" ++ quality ; - Fresh = "ताज़ा" ; - Warm = "गरम" ; - Italian = "इटली" ; - Expensive = "बहुमूल्य" ; - Delicious = "स्वादिष्ट" ; - Boring = "अरुचिकर" ; - } - - - - diff --git a/book/examples/chapter2/FoodIta.gf b/book/examples/chapter2/FoodIta.gf deleted file mode 100644 index 466104432..000000000 --- a/book/examples/chapter2/FoodIta.gf +++ /dev/null @@ -1,19 +0,0 @@ -concrete FoodIta of Food = { - lincat - Comment, Item, Kind, Quality = Str ; - lin - Pred item quality = item ++ "" ++ quality ; - This kind = "questo" ++ kind ; - That kind = "quel" ++ kind ; - Mod quality kind = kind ++ quality ; - Wine = "vino" ; - Cheese = "formaggio" ; - Fish = "pesce" ; - Very quality = "molto" ++ quality ; - Fresh = "fresco" ; - Warm = "caldo" ; - Italian = "italiano" ; - Expensive = "caro" ; - Delicious = "delizioso" ; - Boring = "noioso" ; -} diff --git a/book/examples/chapter2/Letters.gf b/book/examples/chapter2/Letters.gf deleted file mode 100644 index 2b5a62d2d..000000000 --- a/book/examples/chapter2/Letters.gf +++ /dev/null @@ -1,8 +0,0 @@ -abstract Letters = { - -cat L ; -fun - a, b, c, d, e, f, g, h, i, j, k, l, m, - n, o, p, q, r, s, t, u, v, w, x, y, z : L ; - -} diff --git a/book/examples/chapter2/LettersCnc.gf b/book/examples/chapter2/LettersCnc.gf deleted file mode 100644 index 3301f5465..000000000 --- a/book/examples/chapter2/LettersCnc.gf +++ /dev/null @@ -1,31 +0,0 @@ -concrete LettersCnc of Letters = { - - lincat L = Str ; - lin - a = "a" ; - b = "b" ; - c = "c" ; - d = "d" ; - e = "e" ; - f = "f" ; - g = "g" ; - h = "h" ; - i = "i" ; - j = "j" ; - k = "k" ; - l = "l" ; - m = "m" ; - n = "n" ; - o = "o" ; - p = "p" ; - q = "q" ; - r = "r" ; - s = "s" ; - t = "t" ; - u = "u" ; - v = "v" ; - w = "w" ; - x = "x" ; - y = "y" ; - z = "z" ; -} diff --git a/book/examples/chapter2/Strings.gf b/book/examples/chapter2/Strings.gf deleted file mode 100644 index 411ceed53..000000000 --- a/book/examples/chapter2/Strings.gf +++ /dev/null @@ -1,7 +0,0 @@ -abstract Strings = Letters ** { - -cat S ; -fun - E : S ; - C : L -> S -> S ; -} diff --git a/book/examples/chapter2/StringsBW.gf b/book/examples/chapter2/StringsBW.gf deleted file mode 100644 index 8e558d953..000000000 --- a/book/examples/chapter2/StringsBW.gf +++ /dev/null @@ -1,5 +0,0 @@ -concrete StringsBW of Strings = LettersCnc ** { - lincat S = Str ; - lin E = [] ; - lin C head tail = tail ++ head ; -} diff --git a/book/examples/chapter2/StringsFW.gf b/book/examples/chapter2/StringsFW.gf deleted file mode 100644 index c0f80c313..000000000 --- a/book/examples/chapter2/StringsFW.gf +++ /dev/null @@ -1,5 +0,0 @@ -concrete StringsFW of Strings = LettersCnc ** { - lincat S = Str ; - lin E = [] ; - lin C head tail = head ++ tail ; -} diff --git a/book/examples/chapter2/Ticket.gf b/book/examples/chapter2/Ticket.gf deleted file mode 100644 index f3f2dd851..000000000 --- a/book/examples/chapter2/Ticket.gf +++ /dev/null @@ -1,10 +0,0 @@ -abstract Ticket = { - -flags startcat = Request ; -cat - Request ; Station ; -fun - Ticket : Station -> Station -> Request ; - Hamburg, Paris : Station ; - -} diff --git a/book/examples/chapter2/TicketEng.gf b/book/examples/chapter2/TicketEng.gf deleted file mode 100644 index 54e44741d..000000000 --- a/book/examples/chapter2/TicketEng.gf +++ /dev/null @@ -1,19 +0,0 @@ -concrete TicketEng of Ticket = { - -lincat - Request, Station = Str ; -lin - Ticket X Y = - ((("I" ++ ("would like" | "want") ++ "to get" | - ("may" | "can") ++ "I get" | - "can you give me" | - []) ++ - "a ticket") | - []) ++ - "from" ++ X ++ "to" ++ Y ++ - ("please" | []) ; - - Hamburg = "Hamburg" ; - Paris = "Paris" ; - -} diff --git a/book/examples/chapter2/foodEng.cf b/book/examples/chapter2/foodEng.cf deleted file mode 100644 index 3216f2e30..000000000 --- a/book/examples/chapter2/foodEng.cf +++ /dev/null @@ -1,14 +0,0 @@ -Pred. Comment ::= Item "is" Quality -This. Item ::= "this" Kind -That. Item ::= "that" Kind -Mod. Kind ::= Quality Kind -Wine. Kind ::= "wine" -Cheese. Kind ::= "cheese" -Fish. Kind ::= "fish" -Very. Quality ::= "very" Quality -Fresh. Quality ::= "fresh" -Warm. Quality ::= "warm" -Italian. Quality ::= "Italian" -Expensive. Quality ::= "expensive" -Delicious. Quality ::= "delicious" -Boring. Quality ::= "boring" diff --git a/book/examples/chapter2/foodIta.cf b/book/examples/chapter2/foodIta.cf deleted file mode 100644 index 02b825ed0..000000000 --- a/book/examples/chapter2/foodIta.cf +++ /dev/null @@ -1,14 +0,0 @@ -Pred. Comment ::= Item "è" Quality -This. Item ::= "questo" Kind -That. Item ::= "quel" Kind -Mod. Kind ::= Kind Quality -Wine. Kind ::= "vino" -Cheese. Kind ::= "formaggio" -Fish. Kind ::= "pesce" -Very. Quality ::= "molto" Quality -Fresh. Quality ::= "fresco" -Warm. Quality ::= "caldo" -Italian. Quality ::= "italiano" -Expensive. Quality ::= "caro" -Delicious. Quality ::= "delizioso" -Boring. Quality ::= "noioso" diff --git a/book/examples/chapter3/Arabic.gf b/book/examples/chapter3/Arabic.gf deleted file mode 100644 index e00d02c23..000000000 --- a/book/examples/chapter3/Arabic.gf +++ /dev/null @@ -1,118 +0,0 @@ -resource Arabic = { -oper - Root : Type = {F,C,L : Str} ; - Pattern : Type = Root -> Str ; - - Filling : Type = {F,FC,CL,L : Str} ; - - fill : Filling -> Root -> Str = \p,r -> - p.F + r.F + p.FC + r.C + p.CL + r.L + p.L ; - - dfill : Filling -> Root -> Str = \p,r -> - p.F + r.F + p.FC + r.C + r.C + p.CL + r.L + p.L ; - - getRoot : Str -> Root = \s -> case s of { - F@? + C@? + L@? => {F = F ; C = C ; L = L} ; - _ => Predef.error ("cannot get root from" ++ s) - } ; - - getPattern : Str -> Pattern = \s -> case s of { - F + "F" + FC + "CC" + CL + "L" + L => - dfill {F = F ; FC = FC ; CL = CL ; L = L} ; - F + "F" + FC + "C" + CL + "L" + L => - fill {F = F ; FC = FC ; CL = CL ; L = L} ; - _ => Predef.error ("cannot get pattern from" ++ s) - } ; - - word : Str -> Str -> Str = \p,r -> - getPattern p (getRoot r) ; - -param - Number = Sg | Dl | Pl ; - Gender = Masc | Fem ; - Tense = Perf | Impf ; - - VPer = Vp3 Number Gender | Vp2Sg Gender | Vp2Dl | Vp2Pl Gender | Vp1Sg | Vp1Pl ; - -oper - Verb : Type = {s : Tense => VPer => Str} ; - - pattV_u : Tense -> VPer -> Pattern = \t,v -> getPattern (case t of { - Perf => case v of { - Vp3 Sg Masc => "FaCaLa" ; - Vp3 Sg Fem => "FaCaLat" ; - Vp3 Dl Masc => "FaCaLaA" ; - Vp3 Dl Fem => "FaCaLataA" ; - Vp3 Pl Masc => "FaCaLuwA" ; - Vp3 Pl Fem => "FaCaLona" ; - - Vp2Sg Masc => "FaCaLota" ; - Vp2Sg Fem => "FaCaLoti" ; - Vp2Dl => "FaCaLotumaA" ; - Vp2Pl Masc => "FaCaLotum" ; - Vp2Pl Fem => "FaCaLotunv2a" ; - - Vp1Sg => "FaCaLotu" ; - Vp1Pl => "FaCaLonaA" - } ; - Impf => case v of { - Vp3 Sg Masc => "yaFoCuLu" ; - Vp3 Sg Fem => "taFoCuLu" ; - Vp3 Dl Masc => "yaFoCuLaAni" ; - Vp3 Dl Fem => "taFoCuLaAni" ; - Vp3 Pl Masc => "yaFoCuLuwna" ; - Vp3 Pl Fem => "yaFoCuLna" ; - - Vp2Sg Masc => "taFoCuLu" ; - Vp2Sg Fem => "taFoCuLiyna" ; - Vp2Dl => "taFoCuLaAni" ; - Vp2Pl Masc => "taFoCuLuwna" ; - Vp2Pl Fem => "taFoCuLona" ; - - Vp1Sg => "A?aFoCuLu" ; - Vp1Pl => "naFoCuLu" - } - }) ; - - u_Verb : Str -> Verb = \s -> { - s = \\t,p => pattV_u t p (getRoot s) ; - } ; - --- for html - - tag : Str -> Str = \t -> "<" + t + ">" ; - etag : Str -> Str = \t -> "</" + t + ">" ; - atag : Str -> Str -> Str = \t,a -> "<" + t ++ a + ">" ; - - intag : Str -> Str -> Str = \t,s -> tag t ++ s ++ etag t ; - intagAttr : Str -> Str -> Str -> Str = \t,a,s -> atag t a ++ s ++ etag t ; - - verbTable : Verb -> Str = \v -> - let - vsp = v.s ! Perf ; - vsi = v.s ! Impf ; - tr : Str -> Str = intag "tr" ; - td : Str -> Str = intag "td" ; - ts : Str -> Str = \s -> td ("\"" ++ s ++ "\"") ; - trs : Str -> Str -> VPer -> Str = \s,n,v -> - tr (td s ++ td n ++ ts (vsp ! v) ++ ts (vsi ! v)) - in - intagAttr "table" "border=1" ( - tr ((td "Persona") ++ (td "Numerus") ++ (td "Perfectum") ++ (td "Imperfectum")) ++ - trs "3. masc." "sing." (Vp3 Sg Masc) ++ - trs "3. fem." "sing." (Vp3 Sg Fem) ++ - trs "2. masc." "sing." (Vp2Sg Masc) ++ - trs "2. fem." "sing." (Vp2Sg Fem) ++ - trs "1." "sing." (Vp1Sg) ++ - trs "3. masc." "dual." (Vp3 Dl Masc) ++ - trs "3. fem." "dual." (Vp3 Dl Fem) ++ - trs "2." "dual." (Vp2Dl) ++ - trs "3. masc." "plur." (Vp3 Pl Masc) ++ - trs "3. fem." "plur." (Vp3 Pl Fem) ++ - trs "2. masc." "plur." (Vp2Pl Masc) ++ - trs "2. fem." "plur." (Vp2Pl Fem) ++ - trs "1." "plur." (Vp1Pl) - ) ; - - -} diff --git a/book/examples/chapter3/Discont.gf b/book/examples/chapter3/Discont.gf deleted file mode 100644 index 879bedc4c..000000000 --- a/book/examples/chapter3/Discont.gf +++ /dev/null @@ -1,11 +0,0 @@ -abstract Discont = { - cat - S ; Cl ; NP ; VP ; AP ; - fun - DeclCl : Cl -> S ; - QuestCl : Cl -> S ; - PredVP : NP -> VP -> Cl ; - CompAP : AP -> VP ; - John : NP ; - Old : AP ; -} diff --git a/book/examples/chapter3/DiscontEng.gf b/book/examples/chapter3/DiscontEng.gf deleted file mode 100644 index 93d70a02c..000000000 --- a/book/examples/chapter3/DiscontEng.gf +++ /dev/null @@ -1,21 +0,0 @@ -concrete DiscontEng of Discont = { - param - SForm = SDecl | SQuest ; - lincat - S, NP, AP = Str ; - Cl = SForm => Str ; - VP = {verb,comp : Str} ; - lin - DeclCl cl = cl ! SDecl ; - QuestCl cl = cl ! SQuest ; - PredVP np vp = table { - SDecl => np ++ vp.verb ++ vp.comp ; - SQuest => vp.verb ++ np ++ vp.comp - } ; - CompAP ap = { - verb = "is" ; - comp = ap - } ; - John = "John" ; - Old = "old" ; -} diff --git a/book/examples/chapter3/Foods.gf b/book/examples/chapter3/Foods.gf deleted file mode 100644 index e60f0ea09..000000000 --- a/book/examples/chapter3/Foods.gf +++ /dev/null @@ -1,13 +0,0 @@ -abstract Foods = { - flags startcat = Comment ; - cat - Comment ; Item ; Kind ; Quality ; - fun - Pred : Item -> Quality -> Comment ; - This, That, These, Those : Kind -> Item ; - Mod : Quality -> Kind -> Kind ; - Wine, Cheese, Fish, Pizza : Kind ; - Very : Quality -> Quality ; - Fresh, Warm, Italian, - Expensive, Delicious, Boring : Quality ; -} diff --git a/book/examples/chapter3/FoodsEng.gf b/book/examples/chapter3/FoodsEng.gf deleted file mode 100644 index 82bae2148..000000000 --- a/book/examples/chapter3/FoodsEng.gf +++ /dev/null @@ -1,40 +0,0 @@ -concrete FoodsEng of Foods = { - lincat - Comment, Quality = {s : Str} ; - Kind = {s : Number => Str} ; - Item = {s : Str ; n : Number} ; - lin - Pred item quality = - {s = item.s ++ copula ! item.n ++ quality.s} ; - This = det Sg "this" ; - That = det Sg "that" ; - These = det Pl "these" ; - Those = det Pl "those" ; - Mod quality kind = - {s = \\n => quality.s ++ kind.s ! n} ; - Wine = regNoun "wine" ; - Cheese = regNoun "cheese" ; - Fish = noun "fish" "fish" ; - Pizza = regNoun "pizza" ; - Very a = {s = "very" ++ a.s} ; - Fresh = adj "fresh" ; - Warm = adj "warm" ; - Italian = adj "Italian" ; - Expensive = adj "expensive" ; - Delicious = adj "delicious" ; - Boring = adj "boring" ; - param - Number = Sg | Pl ; - oper - det : Number -> Str -> - {s : Number => Str} -> {s : Str ; n : Number} = - \n,det,noun -> {s = det ++ noun.s ! n ; n = n} ; - noun : Str -> Str -> {s : Number => Str} = - \man,men -> {s = table {Sg => man ; Pl => men}} ; - regNoun : Str -> {s : Number => Str} = - \car -> noun car (car + "s") ; - adj : Str -> {s : Str} = - \cold -> {s = cold} ; - copula : Number => Str = - table {Sg => "is" ; Pl => "are"} ; -} diff --git a/book/examples/chapter3/FoodsIta.gf b/book/examples/chapter3/FoodsIta.gf deleted file mode 100644 index 6f7015694..000000000 --- a/book/examples/chapter3/FoodsIta.gf +++ /dev/null @@ -1,32 +0,0 @@ -concrete FoodsIta of Foods = open ResIta in { - lincat - Comment = {s : Str} ; - Quality = Adjective ; - Kind = Noun ; - Item = NounPhrase ; - lin - Pred item quality = - {s = item.s ++ copula ! item.n ++ - quality.s ! item.g ! item.n} ; - This = det Sg "questo" "questa" ; - That = det Sg "quel" "quella" ; - These = det Pl "questi" "queste" ; - Those = det Pl "quei" "quelle" ; - Mod quality kind = { - s = \\n => kind.s ! n ++ quality.s ! kind.g ! n ; - g = kind.g - } ; - Wine = noun "vino" "vini" Masc ; - Cheese = noun "formaggio" "formaggi" Masc ; - Fish = noun "pesce" "pesci" Masc ; - Pizza = noun "pizza" "pizze" Fem ; - Very qual = {s = \\g,n => "molto" ++ qual.s ! g ! n} ; - Fresh = - adjective "fresco" "fresca" "freschi" "fresche" ; - Warm = regAdj "caldo" ; - Italian = regAdj "italiano" ; - Expensive = regAdj "caro" ; - Delicious = regAdj "delizioso" ; - Boring = regAdj "noioso" ; -} - diff --git a/book/examples/chapter3/ResIta.gf b/book/examples/chapter3/ResIta.gf deleted file mode 100644 index 17809c498..000000000 --- a/book/examples/chapter3/ResIta.gf +++ /dev/null @@ -1,36 +0,0 @@ -resource ResIta = open Prelude in { - param - Number = Sg | Pl ; - Gender = Masc | Fem ; - oper - NounPhrase : Type = - {s : Str ; g : Gender ; n : Number} ; - Noun : Type = {s : Number => Str ; g : Gender} ; - Adjective : Type = {s : Gender => Number => Str} ; - - det : Number -> Str -> Str -> Noun -> NounPhrase = - \n,m,f,cn -> { - s = table {Masc => m ; Fem => f} ! cn.g ++ - cn.s ! n ; - g = cn.g ; - n = n - } ; - noun : Str -> Str -> Gender -> Noun = - \vino,vini,g -> { - s = table {Sg => vino ; Pl => vini} ; - g = g - } ; - adjective : (nero,nera,neri,nere : Str) -> Adjective = - \nero,nera,neri,nere -> { - s = table { - Masc => table {Sg => nero ; Pl => neri} ; - Fem => table {Sg => nera ; Pl => nere} - } - } ; - regAdj : Str -> Adjective = \nero -> - let ner : Str = init nero - in - adjective nero (ner+"a") (ner+"i") (ner+"e") ; - copula : Number => Str = - table {Sg => "" ; Pl => "sono"} ; -} diff --git a/book/examples/chapter4/Clothes.gf b/book/examples/chapter4/Clothes.gf deleted file mode 100644 index e17400a27..000000000 --- a/book/examples/chapter4/Clothes.gf +++ /dev/null @@ -1,5 +0,0 @@ -abstract Clothes = Comments ** { - fun - Shirt, Jacket : Kind ; - Comfortable, Elegant : Quality ; -} diff --git a/book/examples/chapter4/ClothesEng.gf b/book/examples/chapter4/ClothesEng.gf deleted file mode 100644 index c6b9a2520..000000000 --- a/book/examples/chapter4/ClothesEng.gf +++ /dev/null @@ -1,10 +0,0 @@ ---# -path=.:present - -concrete ClothesEng of Clothes = CommentsEng ** - open SyntaxEng, ParadigmsEng in { - lin - Shirt = mkCN (mkN "shirt") ; - Jacket = mkCN (mkN "jacket") ; - Comfortable = mkAP (mkA "comfortable") ; - Elegant = mkAP (mkA "elegant") ; -} diff --git a/book/examples/chapter4/ClothesIta.gf b/book/examples/chapter4/ClothesIta.gf deleted file mode 100644 index fc4415b07..000000000 --- a/book/examples/chapter4/ClothesIta.gf +++ /dev/null @@ -1,8 +0,0 @@ -concrete ClothesIta of Clothes = CommentsIta ** - open SyntaxIta, ParadigmsIta in { - lin - Shirt = mkCN (mkN "camicia") ; - Jacket = mkCN (mkN "giacca") ; - Comfortable = mkAP (mkA "comodo") ; - Elegant = mkAP (mkA "elegante") ; -} diff --git a/book/examples/chapter4/Comment.gf b/book/examples/chapter4/Comment.gf deleted file mode 100644 index 0a812c6ef..000000000 --- a/book/examples/chapter4/Comment.gf +++ /dev/null @@ -1,13 +0,0 @@ -abstract Comment = { - flags startcat = Comment ; - cat - Comment ; Item ; Kind ; Quality ; - fun - Pred : Item -> Quality -> Comment ; - This, That, These, Those : Kind -> Item ; - Mod : Quality -> Kind -> Kind ; - Wine, Cheese, Fish, Pizza : Kind ; - Very : Quality -> Quality ; - Fresh, Warm, Italian, - Expensive, Delicious, Boring : Quality ; -} diff --git a/book/examples/chapter4/Comments.gf b/book/examples/chapter4/Comments.gf deleted file mode 100644 index ba36024f3..000000000 --- a/book/examples/chapter4/Comments.gf +++ /dev/null @@ -1,10 +0,0 @@ -abstract Comments = { - flags startcat = Comment ; - cat - Comment ; Item ; Kind ; Quality ; - fun - Pred : Item -> Quality -> Comment ; - This, That, These, Those : Kind -> Item ; - Mod : Quality -> Kind -> Kind ; - Very : Quality -> Quality ; -} diff --git a/book/examples/chapter4/CommentsEng.gf b/book/examples/chapter4/CommentsEng.gf deleted file mode 100644 index 8fe3ed965..000000000 --- a/book/examples/chapter4/CommentsEng.gf +++ /dev/null @@ -1,4 +0,0 @@ ---# -path=.:present - -concrete CommentsEng of Comments = CommentsI with - (Syntax = SyntaxEng) ; diff --git a/book/examples/chapter4/CommentsI.gf b/book/examples/chapter4/CommentsI.gf deleted file mode 100644 index b7cf0e8f7..000000000 --- a/book/examples/chapter4/CommentsI.gf +++ /dev/null @@ -1,15 +0,0 @@ -incomplete concrete CommentsI of Comments = open Syntax in { - lincat - Comment = Cl ; - Item = NP ; - Kind = CN ; - Quality = AP ; - lin - Pred item quality = mkCl item quality ; - This kind = mkNP this_QuantSg kind ; - That kind = mkNP that_QuantSg kind ; - These kind = mkNP these_QuantPl kind ; - Those kind = mkNP those_QuantPl kind ; - Mod quality kind = mkCN quality kind ; - Very quality = mkAP very_AdA quality ; -} diff --git a/book/examples/chapter4/CommentsIta.gf b/book/examples/chapter4/CommentsIta.gf deleted file mode 100644 index c9010c939..000000000 --- a/book/examples/chapter4/CommentsIta.gf +++ /dev/null @@ -1,4 +0,0 @@ ---# -path=.:present - -concrete CommentsIta of Comments = CommentsI with - (Syntax = SyntaxIta) ; diff --git a/book/examples/chapter4/Computers.gf b/book/examples/chapter4/Computers.gf deleted file mode 100644 index 6bbafd215..000000000 --- a/book/examples/chapter4/Computers.gf +++ /dev/null @@ -1,5 +0,0 @@ -abstract Computers = Comments ** { - fun - Computer, HardDisk : Kind ; - Efficient, Slow : Quality ; -} diff --git a/book/examples/chapter4/ComputersEng.gf b/book/examples/chapter4/ComputersEng.gf deleted file mode 100644 index c902be7a7..000000000 --- a/book/examples/chapter4/ComputersEng.gf +++ /dev/null @@ -1,10 +0,0 @@ ---# -path=.:present - -concrete ComputersEng of Computers = CommentsEng ** - open SyntaxEng, ParadigmsEng in { - lin - Computer = mkCN (mkN "computer") ; - HardDisk = mkCN (mkA "hard") (mkN "disk") ; - Efficient = mkAP (mkA "efficient") ; - Slow = mkAP (mkA "slow") ; -} diff --git a/book/examples/chapter4/ComputersIta.gf b/book/examples/chapter4/ComputersIta.gf deleted file mode 100644 index 274bf6089..000000000 --- a/book/examples/chapter4/ComputersIta.gf +++ /dev/null @@ -1,9 +0,0 @@ -concrete ComputersIta of Computers = - CommentsIta ** open ResIta in { - lin - Computer = noun "computer" "computer" Masc ; - HardDisk = noun "disco rigido" "dischi rigidi" Masc ; - Efficient = adjective "efficiente" "efficiente" - "efficienti" "efficienti" ; - Slow = regAdj "lento" ; -} diff --git a/book/examples/chapter4/DefArtGer.gf b/book/examples/chapter4/DefArtGer.gf deleted file mode 100644 index 1ef9394eb..000000000 --- a/book/examples/chapter4/DefArtGer.gf +++ /dev/null @@ -1,16 +0,0 @@ -resource DefArtGer = { - - param DetForm = DSg Gender Case | DPl Case ; - param Gender = Masc | Fem | Neutr ; - param Case = Nom | Acc | Dat | Gen ; - - oper artDef : DetForm => Str = table { - DSg Masc Acc | DPl Dat => "den" ; - DSg (Masc | Neutr) Dat => "dem" ; - DSg (Masc | Neutr) Gen => "des" ; - DSg Neutr _ => "das" ; - DSg Fem (Nom | Acc) | DPl (Nom | Acc) => "die" ; - _ => "der" - } ; - -} diff --git a/book/examples/chapter4/Foods.gf b/book/examples/chapter4/Foods.gf deleted file mode 100644 index d09135421..000000000 --- a/book/examples/chapter4/Foods.gf +++ /dev/null @@ -1,6 +0,0 @@ -abstract Foods = Comments ** { - fun - Wine, Cheese, Fish, Pizza : Kind ; - Fresh, Warm, Italian, - Expensive, Delicious, Boring : Quality ; -} diff --git a/book/examples/chapter4/FoodsEng.gf b/book/examples/chapter4/FoodsEng.gf deleted file mode 100644 index 39711d908..000000000 --- a/book/examples/chapter4/FoodsEng.gf +++ /dev/null @@ -1,16 +0,0 @@ ---# -path=.:present - -concrete FoodsEng of Foods = CommentsEng ** - open SyntaxEng, ParadigmsEng in { - lin - Wine = mkCN (mkN "wine") ; - Pizza = mkCN (mkN "pizza") ; - Cheese = mkCN (mkN "cheese") ; - Fish = mkCN (mkN "fish" "fish") ; - Fresh = mkAP (mkA "fresh") ; - Warm = mkAP (mkA "warm") ; - Italian = mkAP (mkA "Italian") ; - Expensive = mkAP (mkA "expensive") ; - Delicious = mkAP (mkA "delicious") ; - Boring = mkAP (mkA "boring") ; -} diff --git a/book/examples/chapter4/FoodsIta.gf b/book/examples/chapter4/FoodsIta.gf deleted file mode 100644 index 502a29cc2..000000000 --- a/book/examples/chapter4/FoodsIta.gf +++ /dev/null @@ -1,16 +0,0 @@ ---# -path=.:present - -concrete FoodsIta of Foods = CommentsIta ** - open SyntaxIta, ParadigmsIta in { - lin - Wine = mkCN (mkN "vino") ; - Pizza = mkCN (mkN "pizza") ; - Cheese = mkCN (mkN "formaggio") ; - Fish = mkCN (mkN "pesce") ; - Fresh = mkAP (mkA "fresco") ; - Warm = mkAP (mkA "caldo") ; - Italian = mkAP (mkA "italiano") ; - Expensive = mkAP (mkA "caro") ; - Delicious = mkAP (mkA "delizioso") ; - Boring = mkAP (mkA "noioso") ; -} diff --git a/book/examples/chapter4/Shopping.gf b/book/examples/chapter4/Shopping.gf deleted file mode 100644 index 99deb46d9..000000000 --- a/book/examples/chapter4/Shopping.gf +++ /dev/null @@ -1,2 +0,0 @@ -abstract Shopping = Foods, Clothes ; - diff --git a/book/examples/chapter4/ShoppingEng.gf b/book/examples/chapter4/ShoppingEng.gf deleted file mode 100644 index 9233a00af..000000000 --- a/book/examples/chapter4/ShoppingEng.gf +++ /dev/null @@ -1,4 +0,0 @@ ---# -path=.:present - -concrete ShoppingEng of Shopping = FoodsEng, ClothesEng ; - diff --git a/book/examples/chapter4/ShoppingIta.gf b/book/examples/chapter4/ShoppingIta.gf deleted file mode 100644 index 5abae2674..000000000 --- a/book/examples/chapter4/ShoppingIta.gf +++ /dev/null @@ -1,4 +0,0 @@ ---# -path=.:present - -concrete ShoppingIta of Shopping = FoodsIta, ClothesIta ; - diff --git a/book/examples/chapter4/SmallShopping.gf b/book/examples/chapter4/SmallShopping.gf deleted file mode 100644 index 10c7c1a17..000000000 --- a/book/examples/chapter4/SmallShopping.gf +++ /dev/null @@ -1,3 +0,0 @@ -abstract SmallShopping = - Foods - [Wine], - Clothes [Kind,Quality,Shirt,Elegant] ; diff --git a/book/examples/chapter5/Foods.gf b/book/examples/chapter5/Foods.gf deleted file mode 100644 index 8ea02f39d..000000000 --- a/book/examples/chapter5/Foods.gf +++ /dev/null @@ -1,15 +0,0 @@ --- (c) 2009 Aarne Ranta under LGPL - -abstract Foods = { - flags startcat = Comment ; - cat - Comment ; Item ; Kind ; Quality ; - fun - Pred : Item -> Quality -> Comment ; - This, That, These, Those : Kind -> Item ; - Mod : Quality -> Kind -> Kind ; - Wine, Cheese, Fish, Pizza : Kind ; - Very : Quality -> Quality ; - Fresh, Warm, Italian, - Expensive, Delicious, Boring : Quality ; -} diff --git a/book/examples/chapter5/FoodsCat.gf b/book/examples/chapter5/FoodsCat.gf deleted file mode 100644 index 5ad38d0dc..000000000 --- a/book/examples/chapter5/FoodsCat.gf +++ /dev/null @@ -1,7 +0,0 @@ ---# -path=.:present - --- (c) 2009 Jordi Saludes under LGPL - -concrete FoodsCat of Foods = FoodsI with - (Syntax = SyntaxCat), - (LexFoods = LexFoodsCat) ; diff --git a/book/examples/chapter5/FoodsEng.gf b/book/examples/chapter5/FoodsEng.gf deleted file mode 100644 index e1bc40c7a..000000000 --- a/book/examples/chapter5/FoodsEng.gf +++ /dev/null @@ -1,28 +0,0 @@ ---# -path=.:present - -concrete FoodsEng of Foods = - open SyntaxEng,ParadigmsEng in { - lincat - Comment = Utt ; - Item = NP ; - Kind = CN ; - Quality = AP ; - lin - Pred item quality = mkUtt (mkCl item quality) ; - This kind = mkNP this_Quant kind ; - That kind = mkNP that_Quant kind ; - These kind = mkNP this_Quant plNum kind ; - Those kind = mkNP that_Quant plNum kind ; - Mod quality kind = mkCN quality kind ; - Wine = mkCN (mkN "wine") ; - Pizza = mkCN (mkN "pizza") ; - Cheese = mkCN (mkN "cheese") ; - Fish = mkCN (mkN "fish" "fish") ; - Very quality = mkAP very_AdA quality ; - Fresh = mkAP (mkA "fresh") ; - Warm = mkAP (mkA "warm") ; - Italian = mkAP (mkA "Italian") ; - Expensive = mkAP (mkA "expensive") ; - Delicious = mkAP (mkA "delicious") ; - Boring = mkAP (mkA "boring") ; -} diff --git a/book/examples/chapter5/FoodsFin.gf b/book/examples/chapter5/FoodsFin.gf deleted file mode 100644 index 34da5764b..000000000 --- a/book/examples/chapter5/FoodsFin.gf +++ /dev/null @@ -1,7 +0,0 @@ ---# -path=.:present - --- (c) 2009 Aarne Ranta under LGPL - -concrete FoodsFin of Foods = FoodsI with - (Syntax = SyntaxFin), - (LexFoods = LexFoodsFin) ; diff --git a/book/examples/chapter5/FoodsGer.gf b/book/examples/chapter5/FoodsGer.gf deleted file mode 100644 index 934cefb9c..000000000 --- a/book/examples/chapter5/FoodsGer.gf +++ /dev/null @@ -1,7 +0,0 @@ ---# -path=.:present - --- (c) 2009 Aarne Ranta under LGPL - -concrete FoodsGer of Foods = FoodsI with - (Syntax = SyntaxGer), - (LexFoods = LexFoodsGer) ; diff --git a/book/examples/chapter5/FoodsI.gf b/book/examples/chapter5/FoodsI.gf deleted file mode 100644 index f4113b724..000000000 --- a/book/examples/chapter5/FoodsI.gf +++ /dev/null @@ -1,29 +0,0 @@ --- (c) 2009 Aarne Ranta under LGPL - -incomplete concrete FoodsI of Foods = - open Syntax, LexFoods in { - lincat - Comment = Utt ; - Item = NP ; - Kind = CN ; - Quality = AP ; - lin - Pred item quality = mkUtt (mkCl item quality) ; - This kind = mkNP this_Det kind ; - That kind = mkNP that_Det kind ; - These kind = mkNP these_Det kind ; - Those kind = mkNP those_Det kind ; - Mod quality kind = mkCN quality kind ; - Very quality = mkAP very_AdA quality ; - - Wine = mkCN wine_N ; - Pizza = mkCN pizza_N ; - Cheese = mkCN cheese_N ; - Fish = mkCN fish_N ; - Fresh = mkAP fresh_A ; - Warm = mkAP warm_A ; - Italian = mkAP italian_A ; - Expensive = mkAP expensive_A ; - Delicious = mkAP delicious_A ; - Boring = mkAP boring_A ; -} diff --git a/book/examples/chapter5/FoodsIta.gf b/book/examples/chapter5/FoodsIta.gf deleted file mode 100644 index 51baf9d70..000000000 --- a/book/examples/chapter5/FoodsIta.gf +++ /dev/null @@ -1,8 +0,0 @@ ---# -path=.:present - --- (c) 2009 Aarne Ranta under LGPL - -concrete FoodsIta of Foods = FoodsI with - (Syntax = SyntaxIta), - (LexFoods = LexFoodsIta) ; - diff --git a/book/examples/chapter5/FoodsSwe.gf b/book/examples/chapter5/FoodsSwe.gf deleted file mode 100644 index cbb35fb98..000000000 --- a/book/examples/chapter5/FoodsSwe.gf +++ /dev/null @@ -1,7 +0,0 @@ ---# -path=.:present - --- (c) 2009 Aarne Ranta under LGPL - -concrete FoodsSwe of Foods = FoodsI with - (Syntax = SyntaxSwe), - (LexFoods = LexFoodsSwe) ** {flags language = sv_SE;} ; diff --git a/book/examples/chapter5/LexFoods.gf b/book/examples/chapter5/LexFoods.gf deleted file mode 100644 index 12ace208c..000000000 --- a/book/examples/chapter5/LexFoods.gf +++ /dev/null @@ -1,15 +0,0 @@ --- (c) 2009 Aarne Ranta under LGPL - -interface LexFoods = open Syntax in { - oper - wine_N : N ; - pizza_N : N ; - cheese_N : N ; - fish_N : N ; - fresh_A : A ; - warm_A : A ; - italian_A : A ; - expensive_A : A ; - delicious_A : A ; - boring_A : A ; -} diff --git a/book/examples/chapter5/LexFoodsCat.gf b/book/examples/chapter5/LexFoodsCat.gf deleted file mode 100644 index 624fc98c8..000000000 --- a/book/examples/chapter5/LexFoodsCat.gf +++ /dev/null @@ -1,18 +0,0 @@ --- (c) 2009 Jordi Saludes under LGPL - -instance LexFoodsCat of LexFoods = - open SyntaxCat, ParadigmsCat, (M = MorphoCat) in { - flags - coding = utf8 ; - oper - wine_N = mkN "vi" "vins" M.Masc ; - pizza_N = mkN "pizza" ; - cheese_N = mkN "formatge" ; - fish_N = mkN "peix" "peixos" M.Masc; - fresh_A = mkA "fresc" "fresca" "frescos" "fresques" "frescament"; - warm_A = mkA "calent" ; - italian_A = mkA "italià" "italiana" "italians" "italianes" "italianament" ; - expensive_A = mkA "car" ; - delicious_A = mkA "deliciós" "deliciosa" "deliciosos" "delicioses" "deliciosament"; - boring_A = mkA "aburrit" "aburrida" "aburrits" "aburrides" "aburridament" ; -} diff --git a/book/examples/chapter5/LexFoodsEng.gf b/book/examples/chapter5/LexFoodsEng.gf deleted file mode 100644 index 01024b356..000000000 --- a/book/examples/chapter5/LexFoodsEng.gf +++ /dev/null @@ -1,20 +0,0 @@ -instance LexFoodsEng of LexFoods = open SyntaxEng, ParadigmsEng, IrregEng in { - oper - wine_N = mkN "wine" ; - pizza_N = mkN "pizza" ; - cheese_N = mkN "cheese" ; - fish_N = mkN "fish" "fish" ; - fresh_A = mkA "fresh" ; - warm_A = mkA "warm" ; - italian_A = mkA "Italian" ; - expensive_A = mkA "expensive" ; - delicious_A = mkA "delicious" ; - boring_A = mkA "boring" ; - - eat_V2 = mkV2 eat_V ; - drink_V2 = mkV2 drink_V ; - pay_V2 = mkV2 pay_V ; - lady_N = mkN "lady" ; - gentleman_N = mkN "gentleman" "gentlemen" ; - -} diff --git a/book/examples/chapter5/LexFoodsFin.gf b/book/examples/chapter5/LexFoodsFin.gf deleted file mode 100644 index 4cf26511a..000000000 --- a/book/examples/chapter5/LexFoodsFin.gf +++ /dev/null @@ -1,20 +0,0 @@ --- (c) 2009 Aarne Ranta under LGPL - -instance LexFoodsFin of LexFoods = - open SyntaxFin, ParadigmsFin in { - oper - wine_N = mkN "viini" ; - pizza_N = mkN "pizza" ; - cheese_N = mkN "juusto" ; - fish_N = mkN "kala" ; - fresh_A = mkA "tuore" ; - warm_A = mkA - (mkN "lmmin" "lmpimn" "lmmint" "lmpimn" "lmpimn" - "lmpimin" "lmpimi" "lmpimien" "lmpimiss" "lmpimiin" - ) - "lmpimmpi" "lmpimin" ; - italian_A = mkA "italialainen" ; - expensive_A = mkA "kallis" ; - delicious_A = mkA "herkullinen" ; - boring_A = mkA "tyls" ; -} diff --git a/book/examples/chapter5/LexFoodsGer.gf b/book/examples/chapter5/LexFoodsGer.gf deleted file mode 100644 index a420e22d3..000000000 --- a/book/examples/chapter5/LexFoodsGer.gf +++ /dev/null @@ -1,16 +0,0 @@ --- (c) 2009 Aarne Ranta under LGPL - -instance LexFoodsGer of LexFoods = - open SyntaxGer, ParadigmsGer in { - oper - wine_N = mkN "Wein" ; - pizza_N = mkN "Pizza" "Pizzen" feminine ; - cheese_N = mkN "Kse" "Kse" masculine ; - fish_N = mkN "Fisch" ; - fresh_A = mkA "frisch" ; - warm_A = mkA "warm" "wrmer" "wrmste" ; - italian_A = mkA "italienisch" ; - expensive_A = mkA "teuer" ; - delicious_A = mkA "kstlich" ; - boring_A = mkA "langweilig" ; -} diff --git a/book/examples/chapter5/LexFoodsIta.gf b/book/examples/chapter5/LexFoodsIta.gf deleted file mode 100644 index 11de5fcda..000000000 --- a/book/examples/chapter5/LexFoodsIta.gf +++ /dev/null @@ -1,16 +0,0 @@ --- (c) 2009 Aarne Ranta under LGPL - -instance LexFoodsIta of LexFoods = - open SyntaxIta, ParadigmsIta in { - oper - wine_N = mkN "vino" ; - pizza_N = mkN "pizza" ; - cheese_N = mkN "formaggio" ; - fish_N = mkN "pesce" ; - fresh_A = mkA "fresco" ; - warm_A = mkA "caldo" ; - italian_A = mkA "italiano" ; - expensive_A = mkA "caro" ; - delicious_A = mkA "delizioso" ; - boring_A = mkA "noioso" ; -} diff --git a/book/examples/chapter5/LexFoodsSwe.gf b/book/examples/chapter5/LexFoodsSwe.gf deleted file mode 100644 index 72e7e3e86..000000000 --- a/book/examples/chapter5/LexFoodsSwe.gf +++ /dev/null @@ -1,16 +0,0 @@ --- (c) 2009 Aarne Ranta under LGPL - -instance LexFoodsSwe of LexFoods = - open SyntaxSwe, ParadigmsSwe in { - oper - wine_N = mkN "vin" "vinet" "viner" "vinerna" ; - pizza_N = mkN "pizza" ; - cheese_N = mkN "ost" ; - fish_N = mkN "fisk" ; - fresh_A = mkA "frsk" ; - warm_A = mkA "varm" ; - italian_A = mkA "italiensk" ; - expensive_A = mkA "dyr" ; - delicious_A = mkA "lcker" ; - boring_A = mkA "trkig" ; -} diff --git a/book/examples/chapter6/Aggregation.gf b/book/examples/chapter6/Aggregation.gf deleted file mode 100644 index 28cbd39ef..000000000 --- a/book/examples/chapter6/Aggregation.gf +++ /dev/null @@ -1,33 +0,0 @@ -abstract Aggregation = { - cat S ; NP ; VP ; - data - PredVP : NP -> VP -> S ; - ConjS : S -> S -> S ; - ConjVP : VP -> VP -> VP ; - ConjNP : NP -> NP -> NP ; - Run, Walk : VP ; - John, Mary : NP ; - - fun aggr : S -> S ; -- main aggregation function - def aggr (ConjS (PredVP x X) (PredVP y Y)) = - ifS (eqNP x y) - (PredVP x (ConjVP X Y)) - (ifS (eqVP X Y) - (PredVP (ConjNP x y) X) - (ConjS (PredVP x X) (PredVP y Y))) ; - fun ifS : Bool -> S -> S -> S ; -- if b then x else y - def - ifS True x _ = x ; - ifS False _ y = y ; - fun eqNP : NP -> NP -> Bool ; -- x == y - def - eqNP John John = True ; - eqNP Mary Mary = True ; - eqNP _ _ = False ; - fun eqVP : VP -> VP -> Bool ; -- X == Y - def - eqVP Run Run = True ; - eqVP Walk Walk = True ; - eqVP _ _ = False ; - cat Bool ; data True, False : Bool ; -} diff --git a/book/examples/chapter6/AggregationEng.gf b/book/examples/chapter6/AggregationEng.gf deleted file mode 100644 index 9ed403c79..000000000 --- a/book/examples/chapter6/AggregationEng.gf +++ /dev/null @@ -1,17 +0,0 @@ -concrete AggregationEng of Aggregation = { - -lincat S, NP, VP = Str ; - -lin - PredVP x y = x ++ y ; - ConjS a b = a ++ "or" ++ b ; - ConjVP a b = a ++ "or" ++ b ; - ConjNP a b = a ++ "or" ++ b ; - - Run = "runs" ; - Walk = "walks" ; - John = "John" ; - Mary = "Mary" ; - -} - diff --git a/book/examples/chapter6/Arithm.gf b/book/examples/chapter6/Arithm.gf deleted file mode 100644 index 685627745..000000000 --- a/book/examples/chapter6/Arithm.gf +++ /dev/null @@ -1,30 +0,0 @@ -abstract Arithm = { - cat - Prop ; -- proposition - Nat ; -- natural number - data - Zero : Nat ; -- 0 - Succ : Nat -> Nat ; -- the successor of x - fun - Even : Nat -> Prop ; -- x is even - And : Prop -> Prop -> Prop ; -- A and B - - cat Less Nat Nat ; - data LessZ : (y : Nat) -> Less Zero (Succ y) ; - data LessS : (x,y : Nat) -> Less x y -> Less (Succ x) (Succ y) ; - - cat Span ; - data FromTo : (m,n : Nat) -> Less m n -> Span ; - - fun one : Nat ; - def one = Succ Zero ; - - fun twice : Nat -> Nat ; - def twice x = plus x x ; - - fun plus : Nat -> Nat -> Nat ; - def - plus x Zero = x ; - plus x (Succ y) = Succ (plus x y) ; - -} diff --git a/book/examples/chapter6/Bin.gf b/book/examples/chapter6/Bin.gf deleted file mode 100644 index c181656f8..000000000 --- a/book/examples/chapter6/Bin.gf +++ /dev/null @@ -1,50 +0,0 @@ -abstract Bin = { - -cat Nat ; Bin ; Pos ; - -data - Zero : Nat ; - Succ : Nat -> Nat ; - - BZero : Bin ; -- 0 - BPos : Pos -> Bin ; -- p - BOne : Pos ; -- 1 - AZero : Pos -> Pos ; -- p0 - AOne : Pos -> Pos ; -- p1 - -fun - bin2nat : Bin -> Nat ; -def - bin2nat BZero = Zero ; - bin2nat (BPos p) = pos2nat p ; -fun - pos2nat : Pos -> Nat ; -def - pos2nat BOne = one ; - pos2nat (AZero p) = twice (pos2nat p) ; - pos2nat (AOne p) = Succ (twice (pos2nat p)) ; -fun one : Nat ; -def one = Succ Zero ; -fun twice : Nat -> Nat ; -def - twice Zero = Zero ; - twice (Succ n) = Succ (Succ (twice n)) ; - -fun - nat2bin : Nat -> Bin ; -def - nat2bin Zero = BZero ; - nat2bin (Succ n) = bSucc (nat2bin n) ; -fun - bSucc : Bin -> Bin ; -def - bSucc BZero = BPos BOne ; - bSucc (BPos p) = BPos (pSucc p) ; -fun - pSucc : Pos -> Pos ; -def - pSucc BOne = AZero BOne ; - pSucc (AZero p) = AOne p ; - pSucc (AOne p) = AZero (pSucc p) ; - -}
\ No newline at end of file diff --git a/book/examples/chapter6/Classes.gf b/book/examples/chapter6/Classes.gf deleted file mode 100644 index ac7430d25..000000000 --- a/book/examples/chapter6/Classes.gf +++ /dev/null @@ -1,28 +0,0 @@ -abstract Classes = { - -flags - startcat = Command ; - -cat - Command ; - Kind ; - Class ; - Instance Class Kind ; - Action Class ; - Device Kind ; - -fun - Act : (c : Class) -> (k : Kind) -> Instance c k -> Action c -> Device k -> Command ; - The : (k : Kind) -> Device k ; - - Light, Fan : Kind ; - Switchable, Dimmable : Class ; - - SwitchOn, SwitchOff : Action Switchable ; - Dim : Action Dimmable ; - - switchable_Light : Instance Switchable Light ; - switchable_Fan : Instance Switchable Fan ; - dimmable_Light : Instance Dimmable Light ; - -} diff --git a/book/examples/chapter6/ClassesEng.gf b/book/examples/chapter6/ClassesEng.gf deleted file mode 100644 index 5bdf80c35..000000000 --- a/book/examples/chapter6/ClassesEng.gf +++ /dev/null @@ -1,29 +0,0 @@ ---# -path=.:present - -concrete ClassesEng of Classes = open SyntaxEng, ParadigmsEng in { - -lincat - Command = Utt ; - Kind = CN ; - Class = {} ; - Instance = {} ; - Action = V2 ; - Device = NP ; - -lin - Act _ _ _ a d = mkUtt (mkImp a d) ; - The k = mkNP the_Det k ; - - Light = mkCN (mkN "light") ; - Fan = mkCN (mkN "fan") ; - Switchable, Dimmable = <> ; - - SwitchOn = mkV2 (partV (mkV "switch") "on") ; - SwitchOff = mkV2 (partV (mkV "switch") "off") ; - Dim = mkV2 (mkV "dim") ; - - switchable_Light = <> ; - switchable_Fan = <> ; - dimmable_Light = <> ; - -} diff --git a/book/examples/chapter6/DShopping.gf b/book/examples/chapter6/DShopping.gf deleted file mode 100644 index a5a06e070..000000000 --- a/book/examples/chapter6/DShopping.gf +++ /dev/null @@ -1,24 +0,0 @@ -abstract DShopping = { - flags startcat = Comment ; - cat - Comment ; - Dom ; - Item Dom ; - Kind Dom ; - Quality Dom ; - fun - DFood, DCloth : Dom ; - - Pred : (d : Dom) -> Item d -> Quality d -> Comment ; - This, That : (d : Dom) -> Kind d -> Item d ; - Mod : (d : Dom) -> Quality d -> Kind d -> Kind d ; - Wine, Cheese, Fish : Kind DFood ; - Very : (d : Dom) -> Quality d -> Quality d ; - Fresh, Warm, Delicious, Boring : Quality DFood ; - - Shirt, Jacket : Kind DCloth ; - Comfortable : Quality DCloth ; - - Italian, Expensive, Elegant : (d : Dom) -> Quality d ; - -} diff --git a/book/examples/chapter6/DShoppingEng.gf b/book/examples/chapter6/DShoppingEng.gf deleted file mode 100644 index 3dc3a2cc2..000000000 --- a/book/examples/chapter6/DShoppingEng.gf +++ /dev/null @@ -1,33 +0,0 @@ ---# -path=.:present - -concrete DShoppingEng of DShopping = open SyntaxEng, ParadigmsEng in { - - lincat - Comment = Cl ; - Item = NP ; - Kind = CN ; - Quality = AP ; - lin - Pred _ item quality = mkCl item quality ; - This _ kind = mkNP this_QuantSg kind ; - That _ kind = mkNP that_QuantSg kind ; - Mod _ quality kind = mkCN quality kind ; - Very _ quality = mkAP very_AdA quality ; - - Shirt = mkCN (mkN "shirt") ; - Jacket = mkCN (mkN "jacket") ; - Wine = mkCN (mkN "wine") ; - Cheese = mkCN (mkN "cheese") ; - Fish = mkCN (mkN "fish" "fish") ; - Fresh = mkAP (mkA "fresh") ; - Warm = mkAP (mkA "warm") ; - Italian _ = mkAP (mkA "Italian") ; - Expensive _ = mkAP (mkA "expensive") ; - Elegant _ = mkAP (mkA "elegant") ; - Delicious = mkAP (mkA "delicious") ; - Boring = mkAP (mkA "boring") ; - Comfortable = mkAP (mkA "comfortable") ; - - DFood, DCloth = {s = []} ; - -} diff --git a/book/examples/chapter6/Nat.gf b/book/examples/chapter6/Nat.gf deleted file mode 100644 index ba0dfe4a1..000000000 --- a/book/examples/chapter6/Nat.gf +++ /dev/null @@ -1,22 +0,0 @@ -abstract Nat = { - cat - Prop ; -- proposition - Nat ; -- natural number - data - Zero : Nat ; -- 0 - Succ : Nat -> Nat ; -- the successor of x - fun - Even : Nat -> Prop ; -- x is even - And : Prop -> Prop -> Prop ; -- A and B - - fun one : Nat ; - def one = Succ Zero ; - - fun twice : Nat -> Nat ; - def twice x = plus x x ; - - fun plus : Nat -> Nat -> Nat ; - def - plus x Zero = x ; - plus x (Succ y) = Succ (plus x y) ; -} diff --git a/book/examples/chapter6/Smart.gf b/book/examples/chapter6/Smart.gf deleted file mode 100644 index 6fc3e0bc5..000000000 --- a/book/examples/chapter6/Smart.gf +++ /dev/null @@ -1,16 +0,0 @@ -abstract Smart = { - - cat - Command ; - Kind ; - Device Kind ; - Action Kind ; - - fun - Act : (k : Kind) -> Action k -> Device k -> Command ; - The : (k : Kind) -> Device k ; -- the light - Light, Fan : Kind ; - Dim : Action Light ; - SwitchOn, SwitchOff : (k : Kind) -> Action k ; - -} diff --git a/book/examples/chapter6/Verbs.gf b/book/examples/chapter6/Verbs.gf deleted file mode 100644 index 371450aeb..000000000 --- a/book/examples/chapter6/Verbs.gf +++ /dev/null @@ -1,22 +0,0 @@ -abstract Verbs = { - -cat - S ; NP ; Subcat ; V Subcat ; Args Subcat ; - -fun - cIntr : Subcat ; - cTr : Subcat ; - cS : Subcat ; - - aIntr : NP -> Args cIntr ; - aTr : NP -> NP -> Args cTr ; - aS : NP -> S -> Args cS ; - - pred : (s : Subcat) -> V s -> Args s -> S ; - - john, mary : NP ; - walk : V cIntr ; - love : V cTr ; - know : V cS ; - -}
\ No newline at end of file diff --git a/book/examples/chapter6/VerbsEng.gf b/book/examples/chapter6/VerbsEng.gf deleted file mode 100644 index b235178d9..000000000 --- a/book/examples/chapter6/VerbsEng.gf +++ /dev/null @@ -1,22 +0,0 @@ -concrete VerbsEng of Verbs = { - -lincat - S, NP, Subcat, V = Str ; Args = Str * Str ; - -lin - cIntr = [] ; - cTr = [] ; - cS = [] ; - - aIntr su = <su,[]> ; - aTr su ob = <su,ob> ; - aS su s = <su,"that" ++ s> ; - - pred _ v xs = xs.p1 ++ v ++ xs.p2 ; - - john = "John" ; mary = "Mary" ; - walk = "walks" ; - love = "loves" ; - know = "knows" ; - -} diff --git a/book/examples/chapter7/Map.gf b/book/examples/chapter7/Map.gf deleted file mode 100644 index 52deebb87..000000000 --- a/book/examples/chapter7/Map.gf +++ /dev/null @@ -1,10 +0,0 @@ -abstract Map = { -flags startcat = Query ; -cat - Query ; Input ; Place ; Click ; -fun - GoFromTo : Place -> Place -> Input ; - ThisPlace : Click -> Place ; - QueryInput : Input -> Query ; - ClickCoord : Int -> Int -> Click ; -} diff --git a/book/examples/chapter7/MapEng.gf b/book/examples/chapter7/MapEng.gf deleted file mode 100644 index fee0b502c..000000000 --- a/book/examples/chapter7/MapEng.gf +++ /dev/null @@ -1,17 +0,0 @@ -concrete MapEng of Map = { -lincat - Query = {s : Str} ; - Input, Place = {s : Str ; p : Str} ; - Click = {p : Str} ; -lin - GoFromTo x y = { - s = "I want to go from" ++ x.s ++ "to" ++ y.s ; - p = x.p ++ y.p - } ; - ThisPlace c = { - s = "this place" ; - p = c.p - } ; - QueryInput i = {s = i.s ++ ";" ++ i.p} ; - ClickCoord x y = {p = "(" ++ x.s ++ "," ++ y.s ++ ")"} ; -} diff --git a/book/examples/chapter7/Query.gf b/book/examples/chapter7/Query.gf deleted file mode 100644 index b6f83e357..000000000 --- a/book/examples/chapter7/Query.gf +++ /dev/null @@ -1,12 +0,0 @@ -abstract Query = { - flags startcat=Question ; - cat - Answer ; Question ; Object ; - fun - Even : Object -> Question ; - Odd : Object -> Question ; - Prime : Object -> Question ; - Number : Int -> Object ; - Yes : Answer ; - No : Answer ; -} diff --git a/book/examples/chapter7/QueryEng.gf b/book/examples/chapter7/QueryEng.gf deleted file mode 100644 index cc14d5eb7..000000000 --- a/book/examples/chapter7/QueryEng.gf +++ /dev/null @@ -1,13 +0,0 @@ -concrete QueryEng of Query = { - lincat - Answer, Question, Object = Str ; - lin - Even = pred "even" ; - Odd = pred "odd" ; - Prime = pred "prime" ; - Number i = i.s ; - Yes = "yes" ; - No = "no" ; - oper - pred : Str -> Str -> Str = \f,x -> "is" ++ x ++ f ; -} diff --git a/book/examples/chapter7/QueryFin.gf b/book/examples/chapter7/QueryFin.gf deleted file mode 100644 index b3461e34a..000000000 --- a/book/examples/chapter7/QueryFin.gf +++ /dev/null @@ -1,13 +0,0 @@ -concrete QueryFin of Query = { - lincat - Answer, Question, Object = Str ; - lin - Even = pred "parillinen" ; - Odd = pred "pariton" ; - Prime = pred "alkuluku" ; - Number i = i.s ; - Yes = "kyll" ; - No = "ei" ; - oper - pred : Str -> Str -> Str = \f,x -> "onko" ++ x ++ f ; -} diff --git a/book/examples/chapter8/Calculator.gf b/book/examples/chapter8/Calculator.gf deleted file mode 100644 index 188c150e0..000000000 --- a/book/examples/chapter8/Calculator.gf +++ /dev/null @@ -1,7 +0,0 @@ -abstract Calculator = { -flags startcat = Exp ; -cat Exp ; -fun - EPlus, EMinus, ETimes, EDiv : Exp -> Exp -> Exp ; - EInt : Int -> Exp ; -} diff --git a/book/examples/chapter8/CalculatorC.gf b/book/examples/chapter8/CalculatorC.gf deleted file mode 100644 index 99db80530..000000000 --- a/book/examples/chapter8/CalculatorC.gf +++ /dev/null @@ -1,10 +0,0 @@ -concrete CalculatorC of Calculator = open Formal, Prelude in { -lincat - Exp = TermPrec ; -lin - EPlus = infixl 0 "+" ; - EMinus = infixl 0 "-" ; - ETimes = infixl 1 "*" ; - EDiv = infixl 1 "/" ; - EInt i = constant i.s ; -} diff --git a/book/examples/chapter8/CalculatorJ.gf b/book/examples/chapter8/CalculatorJ.gf deleted file mode 100644 index c5f40c8d3..000000000 --- a/book/examples/chapter8/CalculatorJ.gf +++ /dev/null @@ -1,13 +0,0 @@ -concrete CalculatorJ of Calculator = open Prelude in { -lincat - Exp = SS ; -lin - EPlus = postfix "iadd" ; - EMinus = postfix "isub" ; - ETimes = postfix "imul" ; - EDiv = postfix "idiv" ; - EInt i = ss ("ldc" ++ i.s) ; -oper - postfix : Str -> SS -> SS -> SS = \op,x,y -> - ss (x.s ++ ";" ++ y.s ++ ";" ++ op) ; -} diff --git a/book/examples/chapter8/CalculatorP.gf b/book/examples/chapter8/CalculatorP.gf deleted file mode 100644 index 4e6315827..000000000 --- a/book/examples/chapter8/CalculatorP.gf +++ /dev/null @@ -1,14 +0,0 @@ -concrete CalculatorP of Calculator = open Prelude in { - -lincat - Exp = SS ; -lin - EPlus = infix "+" ; - EMinus = infix "-" ; - ETimes = infix "*" ; - EDiv = infix "/" ; - EInt i = i ; -oper - infix : Str -> SS -> SS -> SS = \f,x,y -> - ss ("(" ++ x.s ++ f ++ y.s ++ ")") ; -} diff --git a/book/examples/chapter8/CalculatorS.gf b/book/examples/chapter8/CalculatorS.gf deleted file mode 100644 index d8c1df456..000000000 --- a/book/examples/chapter8/CalculatorS.gf +++ /dev/null @@ -1,11 +0,0 @@ -concrete CalculatorS of Calculator = open Prelude in { - lin - EPlus = infix "plus" ; - EMinus = infix "minus" ; - ETimes = infix "times" ; - EDiv = infix ["divided by"] ; - EInt i = i ; - oper - infix : Str -> SS -> SS -> SS = \op,x,y -> - ss (x.s ++ op ++ y.s ++ "PAUSE") ; -} diff --git a/book/examples/chapter8/Geometry.gf b/book/examples/chapter8/Geometry.gf deleted file mode 100644 index 0b27d8714..000000000 --- a/book/examples/chapter8/Geometry.gf +++ /dev/null @@ -1,7 +0,0 @@ -abstract Geometry = Logic ** { -fun - Line, Point, Circle : Dom ; - Intersect, Parallel : Ind -> Ind -> Atom ; - Vertical : Ind -> Atom ; - Centre : Ind -> Ind ; -} diff --git a/book/examples/chapter8/GeometryEng.gf b/book/examples/chapter8/GeometryEng.gf deleted file mode 100644 index e2e22776e..000000000 --- a/book/examples/chapter8/GeometryEng.gf +++ /dev/null @@ -1,13 +0,0 @@ ---# -path=.:present - -concrete GeometryEng of Geometry = LogicEng ** - open SyntaxEng, ParadigmsEng in { -lin - Line = mkCN (mkN "line") ; - Point = mkCN (mkN "point") ; - Circle = mkCN (mkN "circle") ; - Intersect = pred (mkV2 "intersect") ; - Parallel = pred (mkA2 (mkA "parallel") (mkPrep "to")) ; - Vertical = pred (mkA "vertical") ; - Centre = app (mkN2 (mkN "centre") (mkPrep "of")) ; -} diff --git a/book/examples/chapter8/GeometryEngb.gf b/book/examples/chapter8/GeometryEngb.gf deleted file mode 100644 index 265f3f71a..000000000 --- a/book/examples/chapter8/GeometryEngb.gf +++ /dev/null @@ -1,11 +0,0 @@ -concrete GeometryEng of Geometry = LogicEng ** - open SyntaxEng, ParadigmsEng in { -lin - Line = mkN "line" ; - Point = mkN "point" ; - Circle = mkN "circle" ; - Intersect = pred (mkV2 "intersect") ; - Parallel = pred (mkA2 (mkA "parallel") (mkPrep "to")) ; - Vertical = pred (mkA "vertical") ; - Centre = app (mkN2 (mkN "centre") (mkPrep "of")) ; -} diff --git a/book/examples/chapter8/Geometryb.gf b/book/examples/chapter8/Geometryb.gf deleted file mode 100644 index dc39c9ce4..000000000 --- a/book/examples/chapter8/Geometryb.gf +++ /dev/null @@ -1,7 +0,0 @@ -abstract Geometry = Logic ** { -fun - Line, Point, Circle : Dom ; - Intersect, Parallel : Ind -> Ind -> Prop ; - Vertical : Ind -> Prop ; - Centre : Ind -> Ind ; -} diff --git a/book/examples/chapter8/Graftal.gf b/book/examples/chapter8/Graftal.gf deleted file mode 100644 index e85b9b2f7..000000000 --- a/book/examples/chapter8/Graftal.gf +++ /dev/null @@ -1,7 +0,0 @@ --- (c) Krasimir Angelov 2009 -abstract Graftal = { - cat N; S; - fun z : N ; - s : N -> N ; - c : N -> S ; - } diff --git a/book/examples/chapter8/Logic.gf b/book/examples/chapter8/Logic.gf deleted file mode 100644 index f2b292428..000000000 --- a/book/examples/chapter8/Logic.gf +++ /dev/null @@ -1,21 +0,0 @@ -abstract Logic = { -flags startcat = Stm ; -cat - Stm ; -- top-level statement - Prop ; -- proposition - Atom ; -- atomic formula - Ind ; -- individual term - Dom ; -- domain expression - Var ; -- variable - [Prop] {2} ; -- list of propositions, 2 or more - [Var] {1} ; -- list of variables, 1 or more -fun - SProp : Prop -> Stm ; - And, Or : [Prop] -> Prop ; - If : Prop -> Prop -> Prop ; - Not : Prop -> Prop ; - PAtom : Atom -> Prop ; - All, Exist : [Var] -> Dom -> Prop -> Prop ; - IVar : Var -> Ind ; - VString : String -> Var ; -} diff --git a/book/examples/chapter8/LogicBEng.gf b/book/examples/chapter8/LogicBEng.gf deleted file mode 100644 index b950c6b39..000000000 --- a/book/examples/chapter8/LogicBEng.gf +++ /dev/null @@ -1,38 +0,0 @@ -concrete LogicEng of Logic = open - SyntaxEng, (P = ParadigmsEng), SymbolicEng, Prelude in { -lincat - Stm = Text ; - Prop = S ; - Atom = Cl ; - Ind = NP ; - Dom = CN ; - Var = NP ; - [Prop] = [S] ; - [Var] = NP ; -lin - SProp = mkText ; - And = mkS and_Conj ; -- A, B ... and C - Or = mkS or_Conj ; -- A, B ... or C - If A B = -- if A B - mkS (mkAdv if_Subj A) B ; - Not A = -- it is not the case that A - mkS negativePol (mkCl - (mkVP (mkNP the_Quant - (mkCN case_CN A)))) ; - All xs A B = -- for all A's xs, B - mkS (mkAdv for_Prep - (mkNP all_Predet (mkNP a_Quant - plNum (mkCN A xs)))) B ; - Exist xs A B = -- for some A's xs, B - mkS (mkAdv for_Prep - (mkNP somePl_Det (mkCN A xs))) B ; - PAtom = mkS ; - IVar x = x ; - VString s = symb s ; - BaseProp A B = mkListS A B ; - ConsProp A As = mkListS A As ; - BaseVar x = x ; - ConsVar x xs = mkNP and_Conj (mkListNP x xs) ; -oper - case_CN : CN = mkCN (P.mkN "case") ; -} diff --git a/book/examples/chapter8/LogicEng.gf b/book/examples/chapter8/LogicEng.gf deleted file mode 100644 index eae85d255..000000000 --- a/book/examples/chapter8/LogicEng.gf +++ /dev/null @@ -1,39 +0,0 @@ -concrete LogicEng of Logic = open - SyntaxEng, (P = ParadigmsEng), SymbolicEng, Prelude in { -lincat - Stm = Text ; - Prop = {pos,neg : S ; isAtom : Bool} ; - Atom = Cl ; - Ind = NP ; - Dom = CN ; - Var = NP ; - [Prop] = ListS ; - [Var] = NP ; -lin - SProp p = mkText p.pos ; - And ps = complexProp (mkS and_Conj ps) ; - Or ps = complexProp (mkS or_Conj ps) ; - If A B = complexProp (mkS if_then_Conj (mkListS A.pos B.pos)) ; - Not A = complexProp A.neg ; - All xs A B = complexProp (mkS (mkAdv for_Prep - (mkNP all_Predet (mkNP a_Quant plNum (mkCN A xs)))) B.pos) ; - Exist xs A B = complexProp (mkS (mkAdv for_Prep - (mkNP somePl_Det (mkCN A xs))) B.pos) ; - PAtom p = - {pos = mkS p ; neg = mkS negativePol p ; isAtom = True} ; - IVar x = x ; - VString s = symb s ; - BaseProp A B = mkListS A.pos B.pos ; - ConsProp A As = mkListS A.pos As ; - BaseVar x = x ; - ConsVar x xs = mkNP and_Conj (mkListNP x xs) ; -oper - complexProp : S -> {pos,neg : S ; isAtom : Bool} = \s -> { - pos = s ; - neg = negS s ; - isAtom = False - } ; - negS : S -> S = \s -> mkS negativePol (mkCl (mkNP it_Pron) - (mkNP the_Quant (mkCN (mkCN (P.mkN "case")) s))) ; - if_Then_Conj : Conj = P.mkConj "if" "then" ; -} diff --git a/book/examples/chapter8/Logicb.gf b/book/examples/chapter8/Logicb.gf deleted file mode 100644 index 5b5aa9ab9..000000000 --- a/book/examples/chapter8/Logicb.gf +++ /dev/null @@ -1,11 +0,0 @@ -abstract Logic = { -cat - Prop ; Ind ; Dom ; Var ; [Prop] {2} ; [Var] {1} ; -fun - And, Or : [Prop] -> Prop ; - If : Prop -> Prop -> Prop ; - Not : Prop -> Prop ; - All, Exist : [Var] -> Dom -> Prop -> Prop ; - IVar : Var -> Ind ; - VString : String -> Var ; -} diff --git a/book/examples/chapter8/Sierpinski.gf b/book/examples/chapter8/Sierpinski.gf deleted file mode 100644 index 722088ce5..000000000 --- a/book/examples/chapter8/Sierpinski.gf +++ /dev/null @@ -1,16 +0,0 @@ -concrete Sierpinski of Graftal = { - lincat N = {a : Str; b : Str} ; - lincat S = {s : Str} ; - - lin z = {a = A; b = B} ; - lin s x = { - a = x.b ++ R ++ x.a ++ R ++ x.b ; - b = x.a ++ L ++ x.b ++ L ++ x.a - } ; - lin c x = {s = "newpath 300 550 moveto" ++ x.a ++ "stroke showpage"} ; - - oper A : Str = "0 2 rlineto" ; - oper B : Str = "0 2 rlineto" ; - oper L : Str = "+60 rotate" ; - oper R : Str = "-60 rotate" ; -} diff --git a/book/examples/chapter9/Anaphora.gf b/book/examples/chapter9/Anaphora.gf deleted file mode 100644 index 5cbb92c94..000000000 --- a/book/examples/chapter9/Anaphora.gf +++ /dev/null @@ -1,17 +0,0 @@ -abstract Anaphora = TestSemantics - [she_NP] ** { - -cat - Proof Prop ; - -fun - IfS : (A : S) -> (Proof (iS A) -> S) -> S ; - - AnaNP : (A : CN) -> (a : Ind) -> Proof (iCN A a) -> NP ; - - pe : (B : Ind -> Prop) -> Proof (Exist B) -> Ind ; - qe : (B : Ind -> Prop) -> (c : Proof (Exist B)) -> Proof (B (pe B c)) ; - - pc : (A,B : Prop) -> Proof (And A B) -> Proof A ; - qc : (A,B : Prop) -> Proof (And A B) -> Proof B ; - -} diff --git a/book/examples/chapter9/AnaphoraIta.gf b/book/examples/chapter9/AnaphoraIta.gf deleted file mode 100644 index 288872160..000000000 --- a/book/examples/chapter9/AnaphoraIta.gf +++ /dev/null @@ -1,17 +0,0 @@ -concrete AnaphoraIta of Anaphora = TestSemanticsIta - [she_NP] ** - open ResIta, Prelude, Formal in { - -lincat - Proof = {} ; - -lin - IfS A B = {s = "se" ++ A.s ++ B.s} ; - - AnaNP cn _ _ = case cn.g of { - Masc => pronNP "lui" "lo" "gli" Masc Sg Per3 ; - Fem => pronNP "lei" "la" "le" Fem Sg Per3 - } ; - - pe _ _ = constant [] ; ---- - -} diff --git a/book/examples/chapter9/Grammar.gf b/book/examples/chapter9/Grammar.gf deleted file mode 100644 index 57e3f8dcc..000000000 --- a/book/examples/chapter9/Grammar.gf +++ /dev/null @@ -1,39 +0,0 @@ -abstract Grammar = { - - flags startcat = S ; - - cat - S ; Cl ; NP ; VP ; AP ; CN ; - Det ; N ; A ; V ; V2 ; AdA ; - Tense ; Pol ; - Conj ; - data - UseCl : Tense -> Pol -> Cl -> S ; - PredVP : NP -> VP -> Cl ; - ComplV2 : V2 -> NP -> VP ; - DetCN : Det -> CN -> NP ; - ModCN : AP -> CN -> CN ; - - CompAP : AP -> VP ; - AdAP : AdA -> AP -> AP ; - - ConjS : Conj -> S -> S -> S ; - ConjNP : Conj -> NP -> NP -> NP ; - - UseV : V -> VP ; - UseN : N -> CN ; - UseA : A -> AP ; - - a_Det, the_Det, every_Det : Det ; - this_Det, these_Det : Det ; - that_Det, those_Det : Det ; - i_NP, she_NP, we_NP : NP ; - very_AdA : AdA ; - - Pos, Neg : Pol ; - Pres, Perf : Tense ; - - and_Conj, or_Conj : Conj ; - - -} diff --git a/book/examples/chapter9/GrammarIta.gf b/book/examples/chapter9/GrammarIta.gf deleted file mode 100644 index 93b2b78fb..000000000 --- a/book/examples/chapter9/GrammarIta.gf +++ /dev/null @@ -1,141 +0,0 @@ -concrete GrammarIta of Grammar = open ResIta, Prelude in { - lincat - S = {s : Str} ; - Cl = {s : ResIta.Tense => Bool => Str} ; - NP = ResIta.NP ; - -- {s : Case => {clit,obj : Str ; isClit : Bool} ; a : Agr} ; - VP = ResIta.VP ; - -- {v : Verb ; clit : Str ; clitAgr : ClitAgr ; obj : Agr => Str} ; - AP = {s : Gender => Number => Str ; isPre : Bool} ; - CN = Noun ; -- {s : Number => Str ; g : Gender} ; - Det = {s : Gender => Case => Str ; n : Number} ; - N = Noun ; -- {s : Number => Str ; g : Gender} ; - A = Adj ; -- {s : Gender => Number => Str ; isPre : Bool} ; - V = Verb ; -- {s : VForm => Str ; aux : Aux} ; - V2 = Verb ** {c : Case} ; - AdA = {s : Str} ; - Pol = {s : Str ; b : Bool} ; - Tense = {s : Str ; t : ResIta.Tense} ; - Conj = {s : Str ; n : Number} ; - lin - UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! p.b} ; - PredVP np vp = - let - subj = (np.s ! Nom).obj ; - obj = vp.obj ! np.a ; - clit = vp.clit ; - verb = table { - Pres => agrV vp.v np.a ; - Perf => agrV (auxVerb vp.v.aux) np.a ++ agrPart vp.v np.a vp.clitAgr - } - in { - s = \\t,b => subj ++ neg b ++ clit ++ verb ! t ++ obj - } ; - - ComplV2 v2 np = - let - nps = np.s ! v2.c - in { - v = v2 ; - clit = nps.clit ; - clitAgr = case <nps.isClit,v2.c> of { - <True,Acc> => CAgr np.a ; - _ => CAgrNo - } ; - obj = \\_ => nps.obj - } ; - - UseV v = { - v = v ; - clit = [] ; - clitAgr = CAgrNo ; - obj = \\_ => [] - } ; - - DetCN det cn = { - s = \\c => { - obj = det.s ! cn.g ! c ++ cn.s ! det.n ; - clit = [] ; - isClit = False - } ; - a = Ag cn.g det.n Per3 - } ; - - ModCN ap cn = { - s = \\n => preOrPost ap.isPre (ap.s ! cn.g ! n) (cn.s ! n) ; - g = cn.g - } ; - - CompAP ap = { - v = essere_V ; - clit = [] ; - clitAgr = CAgrNo ; - obj = \\ag => case ag of { - Ag g n _ => ap.s ! g ! n - } - } ; - - AdAP ada ap = { - s = \\g,n => ada.s ++ ap.s ! g ! n ; - isPre = ap.isPre ; - } ; - - ConjNP co nx ny = { - s = \\c => { - obj = (nx.s ! c).obj ++ co.s ++ (ny.s ! c).obj ; - clit = [] ; - isClit = False - } ; - a = conjAgr co.n nx.a ny.a - } ; - - ConjS co x y = {s = x.s ++ co.s ++ y.s} ; - - UseN n = n ; - - UseA adj = adj ; - - a_Det = adjDet (mkAdj "un" "una" [] [] True) Sg ; - - every_Det = adjDet (regAdj "ogni") Sg ; - - the_Det = { - s = table { - Masc => table { - Nom | Acc => elisForms "lo" "l'" "il" ; - Dat => elisForms "allo" "all'" "al" - } ; - Fem => table { - Nom | Acc => elisForms "la" "'l" "la" ; - Dat => elisForms "alla" "all'" "alla" - } - } ; - n = Sg - } ; - - this_Det = adjDet (regAdj "questo") Sg ; - these_Det = adjDet (regAdj "questo") Pl ; - that_Det = adjDet quello_A Sg ; - those_Det = adjDet quello_A Pl ; - - i_NP = pronNP "io" "mi" "mi" Masc Sg Per1 ; - she_NP = pronNP "lei" "la" "le" Fem Sg Per3 ; - we_NP = pronNP "noi" "ci" "ci" Masc Pl Per1 ; - - very_AdA = ss "molto" ; - - Pos = {s = [] ; b = True} ; - Neg = {s = [] ; b = False} ; - Pres = {s = [] ; t = ResIta.Pres} ; - Perf = {s = [] ; t = ResIta.Perf} ; - - and_Conj = {s = "e" ; n = Pl} ; - or_Conj = {s = "o" ; n = Sg} ; - - oper - quello_A : Adj = mkAdj - (elisForms "quello" "quell'" "quel") "quella" - (elisForms "quegli" "quegli" "quei") "quelle" - True ; - -} diff --git a/book/examples/chapter9/Logic.gf b/book/examples/chapter9/Logic.gf deleted file mode 100644 index 0ce8df7e9..000000000 --- a/book/examples/chapter9/Logic.gf +++ /dev/null @@ -1,9 +0,0 @@ -abstract Logic = { - cat - Prop ; Ind ; - data - And, Or, If : Prop -> Prop -> Prop ; - Not : Prop -> Prop ; - All, Exist : (Ind -> Prop) -> Prop ; - Past : Prop -> Prop ; -} diff --git a/book/examples/chapter9/LogicIta.gf b/book/examples/chapter9/LogicIta.gf deleted file mode 100644 index f94edc11c..000000000 --- a/book/examples/chapter9/LogicIta.gf +++ /dev/null @@ -1,54 +0,0 @@ -concrete LogicIta of Logic = GrammarIta ** open ResIta, Formal, Prelude in { - - -lincat - T, I = SS ; -lin - And x y = infixSS "&" x y ; - Or x y = infixSS "v" x y ; - If x y = infixSS "->" x y ; - Not x = prefixSS "~" x ; - All P = prefixSS (parenth ("A" ++ P.$0)) P ; - Exist P = prefixSS (parenth ("E" ++ P.$0)) P ; - Past P = prefixSS "Past" P ; - -lin - iN f = star (f.s ! Sg) ; - iA f = star (f.s ! Masc ! Sg) ; - iV f = star (f.s ! VInf) ; - iV2 f x y = star (f.s ! VInf) (cc2 x y) ; - -oper star : Str -> SS -> SS = \f,x -> prefixSS f (ss (parenth x.s)) ; - -{- - -lincat - T, I = TermPrec ; -lin - And = infixl 2 "&" ; - Or = infixl 2 "v" ; - If = infixr 1 "->" ; --- Not = prefix 3 "~" ; --- All : (I -> T) -> T ; --- Exist : (I -> T) -> T ; --- Past : T -> T ; - -lin - iS : S -> T ; - iCl : Cl -> T ; - iNP : NP -> (I -> T) -> T ; - iVP : VP -> I -> T ; - iAP : AP -> I -> T ; - iCN : CN -> I -> T ; - iDet : Det -> (I -> T) -> (I -> T) -> T ; - iN : N -> I -> T ; - iA : A -> I -> T ; - iV : V -> I -> T ; - iV2 : V2 -> I -> I -> T ; - iAdA : AdA -> (I -> T) -> I -> T ; - iTense : Tense -> T -> T ; - iPol : Pol -> T -> T ; - iConj : Conj -> T -> T -> T ; --} - -} diff --git a/book/examples/chapter9/LogicSymb.gf b/book/examples/chapter9/LogicSymb.gf deleted file mode 100644 index 14932fe9b..000000000 --- a/book/examples/chapter9/LogicSymb.gf +++ /dev/null @@ -1,13 +0,0 @@ -concrete LogicSymb of Logic = open Formal, Prelude in { - -lincat - Prop, Ind = TermPrec ; -lin - And = infixl 2 "\\&" ; - Or = infixl 2 "\\vee" ; - If = infixr 1 "\\sup" ; - Not = prefix 3 "\\sim" ; - All P = prefix 3 (parenth ("\\forall" ++ P.$0)) P ; - Exist P = prefix 3 (parenth ("\\exists" ++ P.$0)) P ; - Past = prefix 3 "P" ; -} diff --git a/book/examples/chapter9/ParadigmsIta.gf b/book/examples/chapter9/ParadigmsIta.gf deleted file mode 100644 index 010140a62..000000000 --- a/book/examples/chapter9/ParadigmsIta.gf +++ /dev/null @@ -1,47 +0,0 @@ -resource ParadigmsIta = GrammarIta [N,A,V] ** - open ResIta, GrammarIta, Prelude in { - -oper - masculine : Gender = Masc ; - feminine : Gender = Fem ; - - accusative : Case = Acc ; - dative : Case = Dat ; - - mkN = overload { - mkN : (vino : Str) -> N - = \n -> lin N (regNoun n) ; - mkN : (uomo, uomini : Str) -> Gender -> N - = \s,p,g -> lin N (mkNoun s p g) ; - } ; - - mkA = overload { - mkA : (nero : Str) -> A - = \a -> lin A (regAdj a) ; - mkA : (buono,buona,buoni,buone : Str) -> Bool -> A - = \sm,sf,pm,pf,p -> lin A (mkAdj sm sf pm pf False) ; - } ; - - preA : A -> A - = \a -> lin A {s = a.s ; isPre = True} ; - - mkV = overload { - mkV : (finire : Str) -> V - = \v -> lin V (regVerb v) ; - mkV : (andare,vado,vadi,va,andiamo,andate,vanno,andato : Str) -> V - = \i,p1,p2,p3,p4,p5,p6,p -> lin V (mkVerb i p1 p2 p3 p4 p5 p6 p Avere) ; - } ; - - essereV : V -> V - = \v -> lin V {s = v.s ; aux = Essere} ; - - mkV2 = overload { - mkV2 : Str -> V2 - = \s -> lin V2 (regVerb s ** {c = accusative}) ; - mkV2 : V -> V2 - = \v -> lin V2 (v ** {c = accusative}) ; - mkV2 : V -> Case -> V2 - = \v,c -> lin V2 (v ** {c = c}) ; - } ; - -} diff --git a/book/examples/chapter9/ResIta.gf b/book/examples/chapter9/ResIta.gf deleted file mode 100644 index f39db69f9..000000000 --- a/book/examples/chapter9/ResIta.gf +++ /dev/null @@ -1,178 +0,0 @@ -resource ResIta = open Prelude in { - --- parameters - -param - Number = Sg | Pl ; - Gender = Masc | Fem ; - Case = Nom | Acc | Dat ; - Agr = Ag Gender Number Person ; - Aux = Avere | Essere ; - Tense = Pres | Perf ; - Person = Per1 | Per2 | Per3 ; - - VForm = VInf | VPres Number Person | VPart Gender Number ; - - ClitAgr = CAgrNo | CAgr Agr ; - --- parts of speech - -oper - VP = { - v : Verb ; - clit : Str ; - clitAgr : ClitAgr ; - obj : Agr => Str - } ; - NP = { - s : Case => {clit,obj : Str ; isClit : Bool} ; - a : Agr - } ; - --- the preposition word of an abstract case - - prepCase : Case -> Str = \c -> case c of { - Dat => "a" ; - _ => [] - } ; - --- for predication - - agrV : Verb -> Agr -> Str = \v,a -> case a of { - Ag _ n p => v.s ! VPres n p - } ; - - auxVerb : Aux -> Verb = \a -> case a of { - Avere => - mkVerb "avere" "ho" "hai" "ha" "abbiamo" "avete" "hanno" "avuto" Avere ; - Essere => - mkVerb "essere" "sono" "sei" "" "siamo" "siete" "sono" "stato" Essere - } ; - - agrPart : Verb -> Agr -> ClitAgr -> Str = \v,a,c -> case v.aux of { - Avere => case c of { - CAgr (Ag g n _) => v.s ! VPart g n ; - _ => v.s ! VPart Masc Sg - } ; - Essere => case a of { - Ag g n _ => v.s ! VPart g n - } - } ; - - neg : Bool -> Str = \b -> case b of {True => [] ; False => "non"} ; - - essere_V = auxVerb Essere ; - --- for coordination - - conjAgr : Number -> Agr -> Agr -> Agr = \n,xa,ya -> - let - x = agrFeatures xa ; y = agrFeatures ya - in Ag - (conjGender x.g y.g) - (conjNumber (conjNumber x.n y.n) n) - (conjPerson x.p y.p) ; - - agrFeatures : Agr -> {g : Gender ; n : Number ; p : Person} = \a -> - case a of {Ag g n p => {g = g ; n = n ; p = p}} ; - - conjGender : Gender -> Gender -> Gender = \g,h -> - case g of {Masc => Masc ; _ => h} ; - - conjNumber : Number -> Number -> Number = \m,n -> - case m of {Pl => Pl ; _ => n} ; - - conjPerson : Person -> Person -> Person = \p,q -> - case <p,q> of { - <Per1,_> | <_,Per1> => Per1 ; - <Per2,_> | <_,Per2> => Per2 ; - _ => Per3 - } ; - - - --- for morphology - - Noun : Type = {s : Number => Str ; g : Gender} ; - Adj : Type = {s : Gender => Number => Str ; isPre : Bool} ; - Verb : Type = {s : VForm => Str ; aux : Aux} ; - - mkNoun : Str -> Str -> Gender -> Noun = \vino,vini,g -> { - s = table {Sg => vino ; Pl => vini} ; - g = g - } ; - - regNoun : Str -> Noun = \vino -> case vino of { - fuo + c@("c"|"g") + "o" => mkNoun vino (fuo + c + "hi") Masc ; - ol + "io" => mkNoun vino (ol + "i") Masc ; - vin + "o" => mkNoun vino (vin + "i") Masc ; - cas + "a" => mkNoun vino (cas + "e") Fem ; - pan + "e" => mkNoun vino (pan + "i") Masc ; - _ => mkNoun vino vino Masc - } ; - - mkAdj : (_,_,_,_ : Str) -> Bool -> Adj = \buono,buona,buoni,buone,p -> { - s = table { - Masc => table {Sg => buono ; Pl => buoni} ; - Fem => table {Sg => buona ; Pl => buone} - } ; - isPre = p - } ; - - regAdj : Str -> Adj = \nero -> case nero of { - ner + "o" => mkAdj nero (ner + "a") (ner + "i") (ner + "e") False ; - verd + "e" => mkAdj nero nero (verd + "i") (verd + "i") False ; - _ => mkAdj nero nero nero nero False - } ; - - mkVerb : (_,_,_,_,_,_,_,_ : Str) -> Aux -> Verb = - \amare,amo,ami,ama,amiamo,amate,amano,amato,aux -> { - s = table { - VInf => amare ; - VPres Sg Per1 => amo ; - VPres Sg Per2 => ami ; - VPres Sg Per3 => ama ; - VPres Pl Per1 => amiamo ; - VPres Pl Per2 => amate ; - VPres Pl Per3 => amano ; - VPart g n => (regAdj amato).s ! g ! n - } ; - aux = aux - } ; - - regVerb : Str -> Verb = \amare -> case amare of { - am + "are" => mkVerb amare (am+"o") (am+"i") (am+"a") - (am+"iamo") (am+"ate") (am+"ano") (am+"ato") Avere ; - tem + "ere" => mkVerb amare (tem+"o") (tem+"i") (tem+"e") - (tem+"iamo") (tem+"ete") (tem+"ono") (tem+"uto") Avere ; - fin + "ire" => mkVerb amare (fin+"isco") (fin+"isci") (fin+"isce") - (fin+"iamo") (fin+"ite") (fin+"iscono") (fin+"ito") Avere - } ; - --- for structural words - - adjDet : Adj -> Number -> {s : Gender => Case => Str ; n : Number} = - \adj,n -> { - s = \\g,c => prepCase c ++ adj.s ! g ! n ; - n = n - } ; - - pronNP : (s,a,d : Str) -> Gender -> Number -> Person -> NP = - \s,a,d,g,n,p -> { - s = table { - Nom => {clit = [] ; obj = s ; isClit = False} ; - Acc => {clit = a ; obj = [] ; isClit = True} ; - Dat => {clit = d ; obj = [] ; isClit = True} - } ; - a = Ag g n p - } ; - --- phonological auxiliaries - - vowel : pattern Str = #("a" | "e" | "i" | "o" | "u" | "h") ; - s_impuro : pattern Str = #("z" | "s" + ("b"|"c"|"d"|"f"|"m"|"p"|"q"|"t")) ; - - elisForms : (_,_,_ : Str) -> Str = \lo,l',il -> - pre {#s_impuro => lo ; #vowel => l' ; _ => il} ; - -} diff --git a/book/examples/chapter9/Semantics.gf b/book/examples/chapter9/Semantics.gf deleted file mode 100644 index 0976caa93..000000000 --- a/book/examples/chapter9/Semantics.gf +++ /dev/null @@ -1,39 +0,0 @@ -abstract Semantics = Grammar, Logic ** { -fun - iS : S -> Prop ; - iCl : Cl -> Prop ; - iNP : NP -> (Ind -> Prop) -> Prop ; - iVP : VP -> Ind -> Prop ; - iAP : AP -> Ind -> Prop ; - iCN : CN -> Ind -> Prop ; - iDet : Det -> (Ind -> Prop) -> (Ind -> Prop) -> Prop ; - iN : N -> Ind -> Prop ; - iA : A -> Ind -> Prop ; - iV : V -> Ind -> Prop ; - iV2 : V2 -> Ind -> Ind -> Prop ; - iAdA : AdA -> (Ind -> Prop) -> Ind -> Prop ; - iTense : Tense -> Prop -> Prop ; - iPol : Pol -> Prop -> Prop ; - iConj : Conj -> Prop -> Prop -> Prop ; -def - iS (UseCl t p cl) = iTense t (iPol p (iCl cl)) ; - iCl (PredVP np vp) = iNP np (iVP vp) ; - iVP (ComplV2 v2 np) i = iNP np (iV2 v2 i) ; - iNP (DetCN det cn) f = iDet det (iCN cn) f ; - iCN (ModCN ap cn) i = And (iAP ap i) (iCN cn i) ; - iVP (CompAP ap) i = iAP ap i ; - iAP (AdAP ada ap) i = iAdA ada (iAP ap) i ; - iS (ConjS conj x y) = iConj conj (iS x) (iS y) ; - iNP (ConjNP conj x y) f = iConj conj (iNP x f) (iNP y f) ; - iVP (UseV v) i = iV v i ; - iAP (UseA a) i = iA a i ; - iCN (UseN n) i = iN n i ; - iDet a_Det d f = Exist (\x -> And (d x) (f x)) ; - iDet every_Det d f = All (\x -> If (d x) (f x)) ; - iPol Pos t = t ; - iPol Neg t = Not t ; - iTense Pres t = t ; - iTense Perf t = Past t ; - iConj and_Conj a b = And a b ; - iConj or_Conj a b = Or a b ; -} diff --git a/book/examples/chapter9/SemanticsIta.gf b/book/examples/chapter9/SemanticsIta.gf deleted file mode 100644 index 70d4b79b9..000000000 --- a/book/examples/chapter9/SemanticsIta.gf +++ /dev/null @@ -1,42 +0,0 @@ -concrete SemanticsIta of Semantics = GrammarIta, LogicSymb ** open ResIta, Formal, Prelude in { - -lin - iN f = star (f.s ! Sg) ; - iA f = star (f.s ! Masc ! Sg) ; - iV f = star (f.s ! VInf) ; - iV2 f x y = star (f.s ! VInf) (cc2 x y) ; - -oper star : Str -> SS -> TermPrec = \f,x -> prefix 3 (f ++ "*") (constant (parenth x.s)) ; - -{- - -lincat - T, I = TermPrec ; -lin - And = infixl 2 "&" ; - Or = infixl 2 "v" ; - If = infixr 1 "->" ; --- Not = prefix 3 "~" ; --- All : (I -> T) -> T ; --- Exist : (I -> T) -> T ; --- Past : T -> T ; - -lin - iS : S -> T ; - iCl : Cl -> T ; - iNP : NP -> (I -> T) -> T ; - iVP : VP -> I -> T ; - iAP : AP -> I -> T ; - iCN : CN -> I -> T ; - iDet : Det -> (I -> T) -> (I -> T) -> T ; - iN : N -> I -> T ; - iA : A -> I -> T ; - iV : V -> I -> T ; - iV2 : V2 -> I -> I -> T ; - iAdA : AdA -> (I -> T) -> I -> T ; - iTense : Tense -> T -> T ; - iPol : Pol -> T -> T ; - iConj : Conj -> T -> T -> T ; --} - -} diff --git a/book/examples/chapter9/Syntax.gf b/book/examples/chapter9/Syntax.gf deleted file mode 100644 index 01a51d0ee..000000000 --- a/book/examples/chapter9/Syntax.gf +++ /dev/null @@ -1,47 +0,0 @@ -interface Syntax = Grammar - - [UseCl,PredVP,ComplV2,UseV,DetCN,ModCN,CompAP,AdAP, - ConjS,ConjNP,UseN,UseA,Pres,Perf,Pos,Neg] ** - open Grammar in { - -oper - mkS = overload { - mkS : Cl -> S = UseCl Pres Pos ; - mkS : Tense -> Cl -> S = \t -> UseCl t Pos ; - mkS : Pol -> Cl -> S = UseCl Pres ; - mkS : Tense -> Pol -> Cl -> S = UseCl ; - mkS : Conj -> S -> S -> S = ConjS ; - } ; - - mkCl = overload { - mkCl : NP -> V -> Cl = \np,v -> PredVP np (UseV v) ; - mkCl : NP -> V2 -> NP -> Cl = \np,v,o -> PredVP np (ComplV2 v o) ; - mkCl : NP -> A -> Cl = \np,a -> PredVP np (CompAP (UseA a)) ; - mkCl : NP -> AP -> Cl = \np,ap -> PredVP np (CompAP ap) ; - mkCl : NP -> VP -> Cl = PredVP ; - } ; - - mkAP = overload { - mkAP : A -> AP = UseA ; - mkAP : AdA -> AP -> AP = AdAP ; - } ; - - mkNP = overload { - mkNP : Det -> N -> NP = \d,n -> DetCN d (UseN n) ; - mkNP : Det -> CN -> NP = \d,n -> DetCN d n ; - mkNP : Conj -> NP -> NP -> NP = ConjNP ; - } ; - - mkCN = overload { - mkCN : N -> CN = UseN ; - mkCN : A -> N -> CN = \a,n -> ModCN (UseA a) (UseN n) ; - mkCN : A -> CN -> CN = \a,n -> ModCN (UseA a) n ; - mkCN : AP -> N -> CN = \a,n -> ModCN a (UseN n) ; - mkCN : AP -> CN -> CN = \a,n -> ModCN a n ; - } ; - - presTense : Tense = Pres ; - perfTense : Tense = Perf ; - posPol : Pol = Pos ; - negPol : Pol = Neg ; - -} diff --git a/book/examples/chapter9/SyntaxIta.gf b/book/examples/chapter9/SyntaxIta.gf deleted file mode 100644 index b4562b0de..000000000 --- a/book/examples/chapter9/SyntaxIta.gf +++ /dev/null @@ -1,3 +0,0 @@ -instance SyntaxIta of Syntax = GrammarIta - - [PredVP,ComplV2,UseV,DetCN,ModCN,CompAP,AdAP,UseN,UseA] ** - open GrammarIta in {} ; diff --git a/book/examples/chapter9/Test.gf b/book/examples/chapter9/Test.gf deleted file mode 100644 index ebe55e7e0..000000000 --- a/book/examples/chapter9/Test.gf +++ /dev/null @@ -1,9 +0,0 @@ -abstract Test = Grammar ** { - -fun - man_N, woman_N, house_N, tree_N : N ; - big_A, small_A, green_A : A ; - walk_V, arrive_V : V ; - love_V2, please_V2 : V2 ; - -} ; diff --git a/book/examples/chapter9/TestIta.gf b/book/examples/chapter9/TestIta.gf deleted file mode 100644 index 8ae524371..000000000 --- a/book/examples/chapter9/TestIta.gf +++ /dev/null @@ -1,17 +0,0 @@ -concrete TestIta of Test = GrammarIta ** open ParadigmsIta in { - -lin - man_N = mkN "uomo" "uomini" masculine ; - woman_N = mkN "donna" ; - house_N = mkN "casa" ; - tree_N = mkN "albero" ; - big_A = preA (mkA "grande") ; - small_A = preA (mkA "piccolo") ; - green_A = mkA "verde" ; - walk_V = mkV "camminare" ; - arrive_V = essereV (mkV "arrivare") ; - love_V2 = mkV2 "amare" ; - please_V2 = mkV2 (essereV (mkV "piacere" "piaccio" "piaci" "piace" - "piacciamo" "piacete" "piacciono" "piaciuto")) dative ; - -} ; diff --git a/book/examples/chapter9/TestSemantics.gf b/book/examples/chapter9/TestSemantics.gf deleted file mode 100644 index ce8fe4428..000000000 --- a/book/examples/chapter9/TestSemantics.gf +++ /dev/null @@ -1 +0,0 @@ -abstract TestSemantics = Test, Semantics ; diff --git a/book/examples/chapter9/TestSemanticsIta.gf b/book/examples/chapter9/TestSemanticsIta.gf deleted file mode 100644 index ce6abfc09..000000000 --- a/book/examples/chapter9/TestSemanticsIta.gf +++ /dev/null @@ -1 +0,0 @@ -concrete TestSemanticsIta of TestSemantics = TestIta, SemanticsIta ; |
