summaryrefslogtreecommitdiff
path: root/gf-book/examples/chapter8/LogicBEng.gf
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2011-01-11 15:46:43 +0000
committeraarne <aarne@chalmers.se>2011-01-11 15:46:43 +0000
commite7439d65b0e153434d3acc07df6e2a0972ee79ca (patch)
tree36716eec18256eeb600b4a552d9cc80f8ad7f16f /gf-book/examples/chapter8/LogicBEng.gf
parent276327f7f264e770478a6d8c6e683266505b0a55 (diff)
gf-book web page index and toc
Diffstat (limited to 'gf-book/examples/chapter8/LogicBEng.gf')
-rw-r--r--gf-book/examples/chapter8/LogicBEng.gf38
1 files changed, 38 insertions, 0 deletions
diff --git a/gf-book/examples/chapter8/LogicBEng.gf b/gf-book/examples/chapter8/LogicBEng.gf
new file mode 100644
index 000000000..b950c6b39
--- /dev/null
+++ b/gf-book/examples/chapter8/LogicBEng.gf
@@ -0,0 +1,38 @@
+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") ;
+}