eliminated one parameter from Fre, resulting in twice as fast compilation

This commit is contained in:
aarne
2014-11-30 12:53:50 +00:00
parent 12cd4ea245
commit 76abd1e66f
12 changed files with 260 additions and 110 deletions

View File

@@ -2,7 +2,8 @@
instance DiffFre of DiffRomance - [
imperClit,
invertedClause
invertedClause,
verbHyphen
]
= open CommonRomance, PhonoFre, Prelude in {
@@ -11,9 +12,10 @@ instance DiffFre of DiffRomance - [
param
Prepos = P_de | P_a | PNul ;
VType = VTyp VAux Bool ; -- True means that -t- is required as in va-t-il, alla-t-il
VType = VTyp VAux VBool ; -- True means that -t- is required as in va-t-il, alla-t-il
VAux = VHabere | VEsse | VRefl ;
VBool = VFalse ;
oper VTrue = VFalse ;
oper
dative : Case = CPrep P_a ;
genitive : Case = CPrep P_de ;
@@ -228,33 +230,33 @@ instance DiffFre of DiffRomance - [
<_,Pl,P3> => cases3 "les" "leur" "eux"
} ;
vRefl : VType -> VType = \t -> VTyp VRefl (getVTypT t) ;
vRefl : VType -> VType = \t -> VTyp VRefl VFalse ; ---- (getVTypT t) ;
isVRefl : VType -> Bool = \ty -> case ty of {
VTyp VRefl _ => True ;
_ => False
} ;
getVTypT : VType -> Bool = \t -> case t of {VTyp _ b => b} ; -- only in Fre
getVTypT : VType -> VBool = \t -> case t of {VTyp _ b => b} ; -- only in Fre
auxPassive : Verb = copula ;
copula : Verb = {s = table VF ["être";"être";"suis";"es";"est";"sommes";"êtes";"sont";"sois";"sois"
copula : Verb = {s = table VF ["être";bindHyphen;"suis";"es";"est";"sommes";"êtes";"sont";"sois";"sois"
;"soit";"soyons";"soyez";"soient";
"étais";"étais";"était";"étions";"étiez";"étaient";--# notpresent
"fusse";"fusses";"fût";"fussions";"fussiez";"fussent";--# notpresent
"fus";"fus";"fut";"fûmes";"fûtes";"furent";--# notpresent
"serai";"seras";"sera";"serons";"serez";"seront";--# notpresent
"serais";"serais";"serait";"serions";"seriez";"seraient";--# notpresent
"sois";"soyons";"soyez";"été";"étés";"étée";"étées";"étant";"étant"]; vtyp=VTyp VHabere False ; p = []} ;
"sois";"soyons";"soyez";"été";"étés";"étée";"étées";"étant";"étant"]; vtyp=VTyp VHabere VFalse ; p = []} ;
avoir_V : Verb = {s=table VF ["avoir";"avoir";"ai";"as";"a";"avons";"avez";"ont";"aie";"aies";"ait"
avoir_V : Verb = {s=table VF ["avoir";bindHyphensT;"ai";"as";"a";"avons";"avez";"ont";"aie";"aies";"ait"
;"ayons";"ayez";"aient";
"avais";"avais";"avait";"avions";"aviez";"avaient"; --# notpresent
"eusse";"eusses";"eût";"eussions";"eussiez";"eussent";--# notpresent
"eus";"eus";"eut";"eûmes";"eûtes";"eurent";--# notpresent
"aurai";"auras";"aura";"aurons";"aurez";"auront";--# notpresent
"aurais";"aurais";"aurait";"aurions";"auriez";"auraient";--# notpresent
"aie";"ayons";"ayez";"eu";"eus";"eue";"eues";"ayant";"ayant"];vtyp=VTyp VHabere True ; p = []} ; ---- a-t-il eut-il
"aie";"ayons";"ayez";"eu";"eus";"eue";"eues";"ayant";"ayant"];vtyp=VTyp VHabere VTrue ; p = []} ; ---- a-t-il eut-il
datClit = "y" ;
genClit = "en" ;
@@ -273,22 +275,22 @@ instance DiffFre of DiffRomance - [
polNegDirSubj = RNeg True ;
invertedClause :
VType -> (RTense * Anteriority * Number * Person) -> Bool -> (Str * Str) -> (clit,fin,inf,compl,subj,ext : Str) -> Str =
\vtyp,vform,hasClit,neg,clit,fin,inf,compl,subj,ext -> case <vtyp,vform,hasClit> of {
VType -> (RTense * Anteriority * Number * Person) -> Bool -> (Str * Str) -> Str -> (clit,fin,inf,compl,subj,ext : Str) -> Str =
\vtyp,vform,hasClit,neg,bindHyph,clit,fin,inf,compl,subj,ext -> case <vtyp,vform,hasClit> of {
-- parle-t-il
<VTyp _ True, <RPres,Simul,Sg,P3>, True> =>
neg.p1 ++ clit ++ fin ++ bindHyphensT ++ subj ++ neg.p2 ++ inf ++ compl ++ ext ;
-- parle-t-il - some verbs
<VTyp _ VTrue, <RPres,Simul,Sg,P3>, True> =>
neg.p1 ++ clit ++ fin ++ bindHyph ++ subj ++ neg.p2 ++ inf ++ compl ++ ext ;
-- parla-t-il
<VTyp _ True, <RPasse,Simul,Sg,P3>, True> => --# notpresent
neg.p1 ++ clit ++ fin ++ bindHyphensT ++ subj ++ neg.p2 ++ inf ++ compl ++ ext ; --# notpresent
-- parla-t-il - some verbs
<VTyp _ VTrue, <RPasse,Simul,Sg,P3>, True> => --# notpresent
neg.p1 ++ clit ++ fin ++ bindHyph ++ subj ++ neg.p2 ++ inf ++ compl ++ ext ; --# notpresent
-- fera-t-il, sera-t-il venu
-- fera-t-il, sera-t-il venu - all verbss
<_, <RFut,_,Sg,P3>, True> => --# notpresent
neg.p1 ++ clit ++ fin ++ bindHyphensT ++ subj ++ neg.p2 ++ inf ++ compl ++ ext ; --# notpresent
-- a-t-il fait
-- a-t-il fait - all "avoir" verbs
<VTyp VHabere _,<RPres,Anter,Sg,P3>, True> => --# notpresent
neg.p1 ++ clit ++ fin ++ bindHyphensT ++ subj ++ neg.p2 ++ inf ++ compl ++ ext ; --# notpresent
@@ -302,4 +304,6 @@ instance DiffFre of DiffRomance - [
bindHyphensT : Str = bindHyphen ++ "t" ++ bindHyphen ;
verbHyphen : Verb -> Str = \v -> v.s ! (VInfin True) ; --- kluge: use this field to store - or -t-
}

View File

@@ -24,8 +24,8 @@ lin
adjoindre_V2 = v_besch58 "adjoindre" ** {vtyp = vHabere ; p = [] ; lock_V2 = <> ; c2 = complAcc} ;
admettre_V2 = v_besch56 "admettre" ** {vtyp = vHabere ; p = [] ; lock_V2 = <> ; c2 = complAcc} ;
advenir_V = v_besch23 "advenir" ** {vtyp = vEsse ; p = [] ; lock_V = <>} ;
aller_V = v_besch22 "aller" ** {vtyp = VTyp VEsse True ; p = [] ; lock_V = <>} ;
apercevoir_V2 = v_besch38 "apercevoir" ** {vtyp = VTyp VRefl False ; p = [] ; lock_V2 = <> ; c2 = complGen} ;
aller_V = v_besch22 "aller" ** {vtyp = VTyp VEsse VTrue ; p = [] ; lock_V = <>} ;
apercevoir_V2 = v_besch38 "apercevoir" ** {vtyp = VTyp VRefl VFalse ; p = [] ; lock_V2 = <> ; c2 = complGen} ;
apparaître_V = v_besch64 "apparaître" ** {vtyp = vHabere ; p = [] ; lock_V = <>} ;
appartenir_V2 = v_besch23 "appartenir" ** {vtyp = vHabere ; p = [] ; lock_V2 = <> ; c2 = complDat} ;
appendre_V2 = v_besch53 "appendre" ** {vtyp = vHabere ; p = [] ; lock_V2 = <> ; c2 = complAcc} ;
@@ -35,7 +35,7 @@ lin
astreindre_V2 = v_besch57 "astreindre" ** {vtyp = vHabere ; p = [] ; lock_V2 = <> ; c2 = complAcc} ;
atteindre_V2 = v_besch57 "atteindre" ** {vtyp = vHabere ; p = [] ; lock_V2 = <> ; c2 = complAcc} ;
attendre_V2 = v_besch53 "attendre" ** {vtyp = vHabere ; p = [] ; lock_V2 = <> ; c2 = complAcc} ; --- Dat?
avoir_V2 = v_besch1 "avoir" ** {vtyp = VTyp VHabere True ; p = [] ; lock_V2 = <> ; c2 = complAcc} ;
avoir_V2 = v_besch1 "avoir" ** {vtyp = VTyp VHabere VTrue ; p = [] ; lock_V2 = <> ; c2 = complAcc} ;
battre_V2 = v_besch55 "battre" ** {vtyp = vHabere ; p = [] ; lock_V2 = <> ; c2 = complAcc} ;
boire_V2 = v_besch69 "boire" ** {vtyp = vHabere ; p = [] ; lock_V2 = <> ; c2 = complAcc} ;
bouillir_V2 = v_besch31 "bouillir" ** {vtyp = vHabere ; p = [] ; lock_V2 = <> ; c2 = complAcc} ;
@@ -394,6 +394,6 @@ lin
vouloir_V2 = v_besch48 "vouloir" ** {vtyp = vHabere ; p = [] ; lock_V2 = <> ; c2 = complAcc} ;
oper
vHabere = VTyp VHabere False ;
vEsse = VTyp VEsse False ;
vHabere = VTyp VHabere VFalse ;
vEsse = VTyp VEsse VFalse ;
}

View File

@@ -234,7 +234,11 @@ param
oper
vvf : (VForm => Str) -> (VF => Str) = \aller -> table {
VInfin _ => aller ! Inf ;
VInfin True => case last (aller ! Indi Presn Sg P3) of { --- terrible hack to store the binding here... 30/11/2014
"a" | "e" => bindHyphensT ; -- parle-t-il, va-t-il
_ => bindHyphen -- prend-il
} ;
VInfin False => aller ! Inf ;
VFin (VPres Indic) n p => aller ! Indi Presn n p ;
VFin (VPres Subjunct) n p => aller ! Subjo SPres n p ;
VFin (VImperf Indic) n p => aller ! Indi Imparf n p ; --# notpresent

View File

@@ -515,9 +515,9 @@ oper
dirV3 : V -> Prep -> V3 ; -- donner,_,à
dirdirV3 : V -> V3 ; -- donner,_,_
getVerbT : (VF => Str) -> Bool = \v -> case last (v ! (VFin (VPres Indic) Sg P3)) of {
"a" | "e" => True ; -- parle-t-il, va-t-il
_ => False -- prend-il
getVerbT : (VF => Str) -> VBool = \v -> case last (v ! (VFin (VPres Indic) Sg P3)) of {
"a" | "e" => VTrue ; -- parle-t-il, va-t-il
_ => VFalse -- prend-il
} ;