summaryrefslogtreecommitdiff
path: root/examples/mathtext/LogicI.gf
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2009-12-18 11:08:39 +0000
committeraarne <aarne@chalmers.se>2009-12-18 11:08:39 +0000
commitc0de7a0627c9c20267a3312055ea7da683632d20 (patch)
treeda4ce4cf7f1f1fd8c83254a82a20778bdeef360a /examples/mathtext/LogicI.gf
parenta4eb1800a4913121297eb83970718cd3895aa43f (diff)
mathtext examples from Bonn
Diffstat (limited to 'examples/mathtext/LogicI.gf')
-rw-r--r--examples/mathtext/LogicI.gf48
1 files changed, 48 insertions, 0 deletions
diff --git a/examples/mathtext/LogicI.gf b/examples/mathtext/LogicI.gf
new file mode 100644
index 000000000..e84861550
--- /dev/null
+++ b/examples/mathtext/LogicI.gf
@@ -0,0 +1,48 @@
+incomplete concrete LogicI of Logic = SymbolsX ** open
+ LexLogic,
+ Syntax,
+ Symbolic,
+ (Lang = Lang), -- for SSubjS
+ Prelude in {
+lincat
+ Prop = S ;
+ Atom = Cl ;
+ Ind = NP ;
+ Dom = N ;
+ Var = NP ;
+ [Prop] = [S] ;
+ [Var] = NP * Bool ;
+lin
+ And = mkS and_Conj ;
+ Or = mkS or_Conj ;
+ If A B = mkS (mkAdv if_Subj A) B ;
+ Iff A B = Lang.SSubjS A iff_Subj B ;
+ Not A =
+ Lang.SSubjS
+ (mkS negativePol (mkCl
+ (mkVP (mkNP the_Quant case_N)))) that_Subj A ;
+ All xs A B = mkS (mkAdv for_Prep (mkNP all_Predet
+ (mkNP all_Det (mkCN A xs.p1)))) B ;
+ Exist xs A B = mkS (mkCl (indef xs.p2
+ (mkCN (mkCN A xs.p1) (mkAP (mkAP such_A) B)))) ;
+ PAtom = mkS ;
+ NAtom = mkS negativePol ;
+ MkVar s = symb (dollar s.s) ;
+ BaseProp = mkListS ;
+ ConsProp = mkListS ;
+ BaseVar x = <x,False> ;
+ ConsVar x xs = <mkNP and_Conj (mkListNP x xs.p1), True> ;
+
+ PExp e = symb (mkSymb (dollar e.s)) ;
+ IExp e = symb (dollar e.s) ;
+
+lincat
+ Pred1 = VP ;
+ Pred2 = VPSlash ;
+lin
+ PredPred1 f x = mkCl x f ;
+ PredPred2 f x y = mkCl x (mkVP f y) ;
+
+oper
+ dollar : Str -> Str = \s -> "$" ++ s ++ "$" ;
+}