summaryrefslogtreecommitdiff
path: root/transfer/examples/aggregation
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-06-26 21:05:01 +0000
committeraarne <aarne@cs.chalmers.se>2008-06-26 21:05:01 +0000
commitfb1d9b7d2c3c8261fc5a2ce3698e6749458b207a (patch)
tree466adc81f2c6ac803d20804863927c076e2b243a /transfer/examples/aggregation
parent33eb6d899fef48f2d38a92bc0fab66ff585be553 (diff)
removed transfer from gf3
Diffstat (limited to 'transfer/examples/aggregation')
-rw-r--r--transfer/examples/aggregation/Abstract.gf24
-rw-r--r--transfer/examples/aggregation/English.gf41
-rw-r--r--transfer/examples/aggregation/aggregate.tra56
-rw-r--r--transfer/examples/aggregation/tree.tra23
4 files changed, 0 insertions, 144 deletions
diff --git a/transfer/examples/aggregation/Abstract.gf b/transfer/examples/aggregation/Abstract.gf
deleted file mode 100644
index 9d8b31d0d..000000000
--- a/transfer/examples/aggregation/Abstract.gf
+++ /dev/null
@@ -1,24 +0,0 @@
--- testing transfer: aggregation by def definitions. AR 12/4/2003 -- 9/10
-
--- p "Mary runs or John runs and John walks" | l -transfer=Aggregation
--- Mary runs or John runs and walks
--- Mary or John runs and John walks
-
--- The two results are due to ambiguity in parsing. Thus it is not spurious!
-
-abstract Abstract = {
-
-cat
- S ; NP ; VP ; Conj ;
-
-fun
- Pred : NP -> VP -> S ;
- ConjS : Conj -> S -> S -> S ;
- ConjVP : Conj -> VP -> VP -> VP ;
- ConjNP : Conj -> NP -> NP -> NP ;
-
- John, Mary, Bill : NP ;
- Walk, Run, Swim : VP ;
- And, Or : Conj ;
-
-}
diff --git a/transfer/examples/aggregation/English.gf b/transfer/examples/aggregation/English.gf
deleted file mode 100644
index 53199787b..000000000
--- a/transfer/examples/aggregation/English.gf
+++ /dev/null
@@ -1,41 +0,0 @@
-concrete English of Abstract = {
-
-lincat
- VP = {s : Num => Str} ;
- NP, Conj = {s : Str ; n : Num} ;
-
-lin
- Pred np vp = ss (np.s ++ vp.s ! np.n) ;
- ConjS c A B = ss (A.s ++ c.s ++ B.s) ;
- ConjVP c A B = {s = \\n => A.s ! n ++ c.s ++ B.s ! n} ;
- ConjNP c A B = {s = A.s ++ c.s ++ B.s ; n = c.n} ;
-
- John = pn "John" ;
- Mary = pn "Mary" ;
- Bill = pn "Bill" ;
- Walk = vp "walk" ;
- Run = vp "run" ;
- Swim = vp "swim" ;
-
- And = {s = "and" ; n = Pl} ;
- Or = pn "or" ;
-
-param
- Num = Sg | Pl ;
-
-oper
- vp : Str -> {s : Num => Str} = \run -> {
- s = table {
- Sg => run + "s" ;
- Pl => run
- }
- } ;
-
- pn : Str -> {s : Str ; n : Num} = \bob -> {
- s = bob ;
- n = Sg
- } ;
-
- ss : Str -> {s : Str} = \s -> {s = s} ;
-
-}
diff --git a/transfer/examples/aggregation/aggregate.tra b/transfer/examples/aggregation/aggregate.tra
deleted file mode 100644
index b71ccfef2..000000000
--- a/transfer/examples/aggregation/aggregate.tra
+++ /dev/null
@@ -1,56 +0,0 @@
-import prelude
-import tree
-
-
--- aggreg specialized for Tree S
-aggregS : Tree S -> Tree S
-aggregS = aggreg S
-
--- For now, here's what we have to do:
-aggreg : (A : Type) -> Tree A -> Tree A
-aggreg _ t =
- case t of
- ConjS c s1 s2 ->
- case (aggreg ? s1, aggreg ? s2) of
- (Pred np1 vp1, Pred np2 vp2) | eq NP (eq_Tree NP) np1 np2 ->
- Pred np1 (ConjVP c vp1 vp2)
- (Pred np1 vp1, Pred np2 vp2) | eq VP (eq_Tree VP) vp1 vp2 ->
- Pred (ConjNP c np1 np2) vp1
- (s1',s2') -> ConjS c s1' s2'
- _ -> composOp ? ? compos_Tree ? aggreg t
-
-
-
-
-
-{-
--- When the Transfer compiler gets meta variable inference,
--- we can write this:
-aggreg : (A : Type) -> Tree A -> Tree A
-aggreg _ t =
- case t of
- ConjS c s1 s2 ->
- case (aggreg ? s1, aggreg ? s2) of
- (Pred np1 vp1, Pred np2 vp2) | np1 == np2 ->
- Pred np1 (ConjVP c vp1 vp2)
- (Pred np1 vp1, Pred np2 vp2) | vp1 == vp2 ->
- Pred (ConjNP c np1 np2) vp1
- (s1',s2') -> ConjS c s1' s2'
- _ -> composOp ? ? ? ? aggreg t
--}
-
-
-{-
--- If we added idden arguments, we could write something like this:
-aggreg : (A : Type) => Tree A -> Tree A
-aggreg t =
- case t of
- ConjS c s1 s2 ->
- case (aggreg s1, aggreg s2) of
- (Pred np1 vp1, Pred np2 vp2) | np1 == np2 ->
- Pred np1 (ConjVP c vp1 vp2)
- (Pred np1 vp1, Pred np2 vp2) | vp1 == vp2 ->
- Pred (ConjNP c np1 np2) vp1
- (s1',s2') -> ConjS c s1' s2'
- _ -> composOp aggreg t
--}
diff --git a/transfer/examples/aggregation/tree.tra b/transfer/examples/aggregation/tree.tra
deleted file mode 100644
index 5515efa21..000000000
--- a/transfer/examples/aggregation/tree.tra
+++ /dev/null
@@ -1,23 +0,0 @@
-import prelude ;
-data Cat : Type where {
- Conj : Cat ;
- NP : Cat ;
- S : Cat ;
- VP : Cat
-} ;
-data Tree : Cat -> Type where {
- And : Tree Conj ;
- Bill : Tree NP ;
- ConjNP : Tree Conj -> Tree NP -> Tree NP -> Tree NP ;
- ConjS : Tree Conj -> Tree S -> Tree S -> Tree S ;
- ConjVP : Tree Conj -> Tree VP -> Tree VP -> Tree VP ;
- John : Tree NP ;
- Mary : Tree NP ;
- Or : Tree Conj ;
- Pred : Tree NP -> Tree VP -> Tree S ;
- Run : Tree VP ;
- Swim : Tree VP ;
- Walk : Tree VP
-} ;
-derive Eq Tree ;
-derive Compos Tree ;