diff options
| author | aarne <aarne@chalmers.se> | 2010-11-22 12:55:37 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2010-11-22 12:55:37 +0000 |
| commit | 76ba03b545600054176612201de78dca16eb65e1 (patch) | |
| tree | 5615286b239bee637b32465e9cbf36807ab2c318 /book/examples/chapter8/LogicBEng.gf | |
| parent | 0bf41793694e8b3101d09e34858eba8ab2c8c5b6 (diff) | |
started a subdir for the book
Diffstat (limited to 'book/examples/chapter8/LogicBEng.gf')
| -rw-r--r-- | book/examples/chapter8/LogicBEng.gf | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/book/examples/chapter8/LogicBEng.gf b/book/examples/chapter8/LogicBEng.gf new file mode 100644 index 000000000..b950c6b39 --- /dev/null +++ b/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") ; +} |
