diff options
| author | john.j.camilleri <john.j.camilleri@chalmers.se> | 2013-09-16 07:17:27 +0000 |
|---|---|---|
| committer | john.j.camilleri <john.j.camilleri@chalmers.se> | 2013-09-16 07:17:27 +0000 |
| commit | f5461eb3d4eb2605b546a4ed202c12bcdaa1f4e4 (patch) | |
| tree | 946c9e8542b8e8271b6b529a95c0400fa6613cb4 /examples/jem-math | |
| parent | 8e1c6cca407c82fc09569d80c231b8d256735989 (diff) | |
Remove contribs and examples
Everything has now been moved to a separate repository at
https://github.com/GrammaticalFramework/gf-contrib
The contents of the examples folder are build during SetupWeb
Diffstat (limited to 'examples/jem-math')
| -rw-r--r-- | examples/jem-math/LexMath.gf | 16 | ||||
| -rw-r--r-- | examples/jem-math/LexMathFre.gf | 18 | ||||
| -rw-r--r-- | examples/jem-math/LexMathSpa.gf | 18 | ||||
| -rw-r--r-- | examples/jem-math/LexMathSwe.gf | 18 | ||||
| -rw-r--r-- | examples/jem-math/Math.gf | 34 | ||||
| -rw-r--r-- | examples/jem-math/MathEng.gf | 42 | ||||
| -rw-r--r-- | examples/jem-math/MathFre.gf | 8 | ||||
| -rw-r--r-- | examples/jem-math/MathI.gf | 51 | ||||
| -rw-r--r-- | examples/jem-math/MathIta.gf | 40 | ||||
| -rw-r--r-- | examples/jem-math/MathIta1.gf | 112 | ||||
| -rw-r--r-- | examples/jem-math/MathSpa.gf | 8 | ||||
| -rw-r--r-- | examples/jem-math/MathSwe.gf | 8 |
12 files changed, 0 insertions, 373 deletions
diff --git a/examples/jem-math/LexMath.gf b/examples/jem-math/LexMath.gf deleted file mode 100644 index f6f22bb46..000000000 --- a/examples/jem-math/LexMath.gf +++ /dev/null @@ -1,16 +0,0 @@ -interface LexMath = open Syntax in { - -oper - zero_PN : PN ; - successor_N2 : N2 ; - sum_N2 : N2 ; - product_N2 : N2 ; - even_A : A ; - odd_A : A ; - prime_A : A ; - equal_A2 : A2 ; - small_A : A ; - great_A : A ; - divisible_A2 : A2 ; - number_N : N ; -} diff --git a/examples/jem-math/LexMathFre.gf b/examples/jem-math/LexMathFre.gf deleted file mode 100644 index fefacda1e..000000000 --- a/examples/jem-math/LexMathFre.gf +++ /dev/null @@ -1,18 +0,0 @@ -instance LexMathFre of LexMath = - open SyntaxFre, ParadigmsFre, (L = LexiconFre) in { - -oper - zero_PN = mkPN "zéro" ; - successor_N2 = mkN2 (mkN "successeur") genitive ; - sum_N2 = mkN2 (mkN "somme") genitive ; - product_N2 = mkN2 (mkN "produit") genitive ; - even_A = mkA "pair" ; - odd_A = mkA "impair" ; - prime_A = mkA "premier" ; - equal_A2 = mkA2 (mkA "égal") dative ; - small_A = L.small_A ; - great_A = L.big_A ; - divisible_A2 = mkA2 (mkA "divisible") (mkPrep "par") ; - number_N = mkN "entier" ; - -} diff --git a/examples/jem-math/LexMathSpa.gf b/examples/jem-math/LexMathSpa.gf deleted file mode 100644 index a52ae1599..000000000 --- a/examples/jem-math/LexMathSpa.gf +++ /dev/null @@ -1,18 +0,0 @@ -instance LexMathSpa of LexMath = - open SyntaxSpa, ParadigmsSpa, (L = LexiconSpa) in { - -oper - zero_PN = mkPN "cero" ; - successor_N2 = mkN2 (mkN "sucesor") genitive ; - sum_N2 = mkN2 (mkN "suma") genitive ; - product_N2 = mkN2 (mkN "producto") genitive ; - even_A = mkA "par" ; - odd_A = mkA "impar" ; - prime_A = mkA "primo" ; - equal_A2 = mkA2 (mkA "igual") dative ; - small_A = L.small_A ; - great_A = L.big_A ; - divisible_A2 = mkA2 (mkA "divisible") (mkPrep "por") ; - number_N = mkN "entero" ; - -} diff --git a/examples/jem-math/LexMathSwe.gf b/examples/jem-math/LexMathSwe.gf deleted file mode 100644 index 1c5d7d802..000000000 --- a/examples/jem-math/LexMathSwe.gf +++ /dev/null @@ -1,18 +0,0 @@ -instance LexMathSwe of LexMath = - open SyntaxSwe, ParadigmsSwe, (L = LexiconSwe) in { - -oper - zero_PN = mkPN "noll" neutrum ; - successor_N2 = mkN2 (mkN "efterföljare" "efterföljare") (mkPrep "till") ; - sum_N2 = mkN2 (mkN "summa") (mkPrep "av") ; - product_N2 = mkN2 (mkN "produkt" "produkter") (mkPrep "av") ; - even_A = mkA "jämn" ; - odd_A = mkA "udda" "udda" ; - prime_A = mkA "prim" ; - equal_A2 = mkA2 (mkA "lika" "lika") (mkPrep "med") ; - small_A = L.small_A ; - great_A = L.big_A ; - divisible_A2 = mkA2 (mkA "delbar") (mkPrep "med") ; - number_N = mkN "tal" "tal" ; - -} diff --git a/examples/jem-math/Math.gf b/examples/jem-math/Math.gf deleted file mode 100644 index b4e1cb2c2..000000000 --- a/examples/jem-math/Math.gf +++ /dev/null @@ -1,34 +0,0 @@ -abstract Math = { - -flags startcat = Prop ; - -cat - Prop ; Exp ; - -fun - And, Or, If : Prop -> Prop -> Prop ; - - Zero : Exp ; - - Successor : Exp -> Exp ; - - Sum, Product : Exp -> Exp -> Exp ; - - Even, Odd, Prime : Exp -> Prop ; - - Equal, Less, Greater, Divisible : Exp -> Exp -> Prop ; - -cat - Var ; - -fun - X, Y : Var ; - - EVar : Var -> Exp ; - - EInt : Int -> Exp ; - - ANumberVar : Var -> Exp ; - TheNumberVar : Var -> Exp ; - -} diff --git a/examples/jem-math/MathEng.gf b/examples/jem-math/MathEng.gf deleted file mode 100644 index ac29a504e..000000000 --- a/examples/jem-math/MathEng.gf +++ /dev/null @@ -1,42 +0,0 @@ -concrete MathEng of Math = { - -lincat - Prop, Exp = Str ; - -lin - And a b = a ++ "and" ++ b ; - Or a b = a ++ "or" ++ b ; - If a b = "if" ++ a ++ "then" ++ b ; - - Zero = "zero" ; - - X = "x" ; - Y = "y" ; - - Successor x = "the successor of" ++ x ; - - Sum x y = "the sum of" ++ x ++ "and" ++ y ; - Product x y = "the product of" ++ x ++ "and" ++ y ; - - Even x = x ++ "is even" ; - Odd x = x ++ "is odd" ; - Prime x = x ++ "is prime" ; - - Equal x y = x ++ "is equal to" ++ y ; - Less x y = x ++ "is less than" ++ y ; - Greater x y = x ++ "is greater than" ++ y ; - Divisible x y = x ++ "is divisible by" ++ y ; - -lincat - Var = Str ; -lin - X = "x" ; - Y = "y" ; - - EVar x = x ; - EInt i = i.s ; - - ANumberVar x = "a number" ++ x ; - TheNumberVar x = "the number" ++ x ; - -} diff --git a/examples/jem-math/MathFre.gf b/examples/jem-math/MathFre.gf deleted file mode 100644 index 3804142dc..000000000 --- a/examples/jem-math/MathFre.gf +++ /dev/null @@ -1,8 +0,0 @@ ---# -path=.:present - -concrete MathFre of Math = MathI with - (Syntax = SyntaxFre), - (Mathematical = MathematicalFre), - (LexMath = LexMathFre) ; - - diff --git a/examples/jem-math/MathI.gf b/examples/jem-math/MathI.gf deleted file mode 100644 index 848b583aa..000000000 --- a/examples/jem-math/MathI.gf +++ /dev/null @@ -1,51 +0,0 @@ -incomplete concrete MathI of Math = open - Syntax, - Mathematical, - LexMath, - Prelude in { - -lincat - Prop = S ; - Exp = NP ; - -lin - And = mkS and_Conj ; - Or = mkS or_Conj ; - If a = mkS (mkAdv if_Subj a) ; - - Zero = mkNP zero_PN ; - Successor = funct1 successor_N2 ; - - Sum = funct2 sum_N2 ; - Product = funct2 product_N2 ; - - Even = pred1 even_A ; - Odd = pred1 odd_A ; - Prime = pred1 prime_A ; - - Equal = pred2 equal_A2 ; - Less = predC small_A ; - Greater = predC great_A ; - Divisible = pred2 divisible_A2 ; - -oper - funct1 : N2 -> NP -> NP = \f,x -> mkNP the_Art (mkCN f x) ; - funct2 : N2 -> NP -> NP -> NP = \f,x,y -> mkNP the_Art (mkCN f (mkNP and_Conj x y)) ; - - pred1 : A -> NP -> S = \f,x -> mkS (mkCl x f) ; - pred2 : A2 -> NP -> NP -> S = \f,x,y -> mkS (mkCl x f y) ; - predC : A -> NP -> NP -> S = \f,x,y -> mkS (mkCl x f y) ; - -lincat - Var = Symb ; -lin - X = MkSymb (ss "x") ; - Y = MkSymb (ss "y") ; - - EVar x = mkNP (SymbPN x) ; - EInt i = mkNP (IntPN i) ; - - ANumberVar x = mkNP a_Art (mkCN (mkCN number_N) (mkNP (SymbPN x))) ; - TheNumberVar x = mkNP the_Art (mkCN (mkCN number_N) (mkNP (SymbPN x))) ; - -} diff --git a/examples/jem-math/MathIta.gf b/examples/jem-math/MathIta.gf deleted file mode 100644 index a4e406fe3..000000000 --- a/examples/jem-math/MathIta.gf +++ /dev/null @@ -1,40 +0,0 @@ -concrete MathIta of Math = { - -lincat - Prop, Exp = Str ; - -lin - And a b = a ++ "e" ++ b ; - Or a b = a ++ "o" ++ b ; - If a b = "si" ++ a ++ "allora" ++ b ; - - Zero = "zero" ; - - Successor x = "il successore di" ++ x ; - - Sum x y = "la somma di" ++ x ++ "e" ++ y ; - Product x y = "il prodotto di" ++ x ++ "e" ++ y ; - - Even x = x ++ "è pari" ; - Odd x = x ++ "è dispari" ; - Prime x = x ++ "è primo" ; - - Equal x y = x ++ "è uguale a" ++ y ; - Less x y = x ++ "è inferiore a" ++ y ; - Greater x y = x ++ "è superiore a" ++ y ; - Divisible x y = x ++ "è divisibile per" ++ y ; - -lincat - Var = Str ; -lin - X = "x" ; - Y = "y" ; - - EVar x = x ; - EInt i = i.s ; - - ANumberVar x = "un numero" ++ x ; - TheNumberVar x = "il numero" ++ x ; - - -} diff --git a/examples/jem-math/MathIta1.gf b/examples/jem-math/MathIta1.gf deleted file mode 100644 index 6606ce197..000000000 --- a/examples/jem-math/MathIta1.gf +++ /dev/null @@ -1,112 +0,0 @@ -concrete MathIta1 of Math = { - -param - Gender = Masc | Fem ; - Case = Nom | Gen | Dat ; - -lincat - Prop = Str ; - Exp = NounPhrase ; - -oper - NounPhrase : Type = {s : Case => Str ; g : Gender} ; - - exp : (n,g,d : Str) -> Gender -> NounPhrase = - \n,g,d,ge -> { - s = table { - Nom => n ; - Gen => g ; - Dat => d - } ; - g = ge - } ; - - const : Str -> Gender -> NounPhrase = \s,g -> - exp s ("di" ++ s) ("a" ++ s) g ; - - funct1 : Str -> Gender -> NounPhrase -> NounPhrase = \f,g,x -> { - s = \\c => defArt g c ++ f ++ x.s ! Gen ; - g = g - } ; - - funct2 : Str -> Gender -> NounPhrase -> NounPhrase -> NounPhrase = \f,g,x,y -> { - s = \\c => defArt g c ++ f ++ x.s ! Gen ++ y.s ! Gen ; - g = g - } ; - - defArt : Gender -> Case -> Str = \g,c -> case <g,c> of { - <Masc,Nom> => "il" ; - <Masc,Gen> => "del" ; - <Masc,Dat> => "al" ; - <Fem, Nom> => "la" ; - <Fem, Gen> => "della" ; - <Fem, Dat> => "alla" - } ; - - Adjective : Type = Gender -> Str ; - - pred1 : Str -> NounPhrase -> Str = \a,x -> - x.s ! Nom ++ "è" ++ adj a x.g ; - - pred2 : Str -> Str -> Case -> NounPhrase -> NounPhrase -> Str = \a,s,c,x,y -> - x.s ! Nom ++ "è" ++ adj a x.g ++ s ++ y.s ! c ; - - adj : Str -> Adjective = \s,g -> case g of { - Masc => s ; - Fem => case s of { - ner + "o" => ner + "a" ; - _ => s - } - } ; - -lin - And a b = a ++ "e" ++ b ; - Or a b = a ++ "o" ++ b ; - If a b = "si" ++ a ++ "allora" ++ b ; - - Zero = const "zero" Masc ; - - Successor = funct1 "successore" Masc ; - - Sum = funct2 "somma" Fem ; - Product = funct2 "prodotto" Masc ; - - Even = pred1 "pari" ; - Odd = pred1 "dispari" ; - Prime = pred1 "primo" ; - - Equal = pred2 "uguale" [] Dat ; - Less = pred2 "inferiore" [] Dat ; - Greater = pred2 "superiore" [] Dat ; - Divisible = pred2 "divisibile" "per" Nom ; - -lincat - Var = Str ; -lin - X = "x" ; - Y = "y" ; - - EVar x = const x Masc ; - EInt i = const i.s Masc ; - - ANumberVar x = const ("un numero" ++ x) Masc ; - TheNumberVar x = { - s = \\c => defArt Masc c ++ "numero" ++ x ; - g = Masc - } ; - - --- overloaded API -oper - funct = overload { - funct : Str -> Gender -> NounPhrase = const ; - funct : Str -> Gender -> NounPhrase -> NounPhrase = funct1 ; - funct : Str -> Gender -> NounPhrase -> NounPhrase -> NounPhrase = funct2 - } ; - - pred = overload { - pred : Str -> NounPhrase -> Str = pred1 ; - pred : Str -> Str -> Case -> NounPhrase -> NounPhrase -> Str = pred2 - } ; - -} diff --git a/examples/jem-math/MathSpa.gf b/examples/jem-math/MathSpa.gf deleted file mode 100644 index 961f8515b..000000000 --- a/examples/jem-math/MathSpa.gf +++ /dev/null @@ -1,8 +0,0 @@ ---# -path=.:present - -concrete MathSpa of Math = MathI with - (Syntax = SyntaxSpa), - (Mathematical = MathematicalSpa), - (LexMath = LexMathSpa) ; - - diff --git a/examples/jem-math/MathSwe.gf b/examples/jem-math/MathSwe.gf deleted file mode 100644 index 1011a8985..000000000 --- a/examples/jem-math/MathSwe.gf +++ /dev/null @@ -1,8 +0,0 @@ ---# -path=.:present - -concrete MathSwe of Math = MathI with - (Syntax = SyntaxSwe), - (Mathematical = MathematicalSwe), - (LexMath = LexMathSwe) ; - - |
