Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cc doesn't work for many RGL languages #56

Open
odanoburu opened this issue Jun 5, 2020 · 1 comment
Open

cc doesn't work for many RGL languages #56

odanoburu opened this issue Jun 5, 2020 · 1 comment

Comments

@odanoburu
Copy link
Contributor

reproducing the issue reported by @heatherleaf on https://groups.google.com/forum/#!topic/gf-dev/zYJn2dpaKeQ:

I've stumbled upon a problem with the cc command, for some RGL languages (e.g., English, German, all Scandinavian and Romance languages). Apparently it doesn't recognise when we hide functions from imports:

> i -retain -no-pmcfg english/LangEng.gf
> cc UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN house_N)) (UseComp (CompAP (PositA big_A)))))
Warning: atomic term PPos
         conflict TenseX.PPos, GrammarEng.PPos
         given MarkHTMLX, CommonX, CatEng, MarkupEng, CommonX, CatEng,
               DocumentationEng, CommonX, CatEng, ConstructionEng, CommonX,
               CatEng, LexiconEng, CommonX, TenseX, CommonX, CatEng, IdiomEng,
               CommonX, CatEng, StructuralEng, CommonX, TextX, CommonX, CatEng,
               PhraseEng, CommonX, CatEng, ConjunctionEng, CommonX, CatEng,
               RelativeEng, CommonX, CatEng, QuestionEng, CommonX, CatEng,
               SentenceEng, CommonX, CatEng, NumeralEng, CommonX, CatEng,
               AdverbEng, CommonX, CatEng, AdjectiveEng, CommonX, CatEng, VerbEng,
               CommonX, CatEng, NounEng, GrammarEng, LangEng
missing record fields: p type of PPos
expected: {s : Str; p : ResEng.CPolarity}
inferred: {s : Str; lock_Pol : {}; p : ParamX.Polarity}

TenseX is imported in english/GrammarEng.gf, but PPos is hidden from the import. It seems like cc doesn't recognise that:

concrete GrammarEng of Grammar =
    (...),
    TenseX - [Pol,PPos,PNeg,SC,CAdv]
    ** open ResEng, Prelude in {
(...)
lin
  PPos = {s = [] ; p = CPos} ;
  PNeg = {s = [] ; p = CNeg True} ; -- contracted: don't
}

The same problem occurs for many languages, but not all. E.g., Finnish, Dutch, Afrikaans, Latin all work fine:

> i -retain -no-pmcfg finnish/LangFin.gf
> cc UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN house_N)) (UseComp (CompAP (PositA big_A)))))
{s = "talo" ++ "on" ++ "suuri"; lock_S = <>; lock_Utt = <>}

personally, I'd love to see this fixed too because some grammars take very long to compile (PGF) or link (GFO), so we can't iterate as fast, and testing is slow.

inariksit added a commit to inariksit/gf-core that referenced this issue Jun 6, 2020
@inariksit inariksit linked a pull request Jun 6, 2020 that will close this issue
inariksit added a commit that referenced this issue Jul 2, 2021
Hotfix for #56 (cc doesn't work for many RGL languages)
@inariksit
Copy link
Member

The immediate problem, when running cc for RGL languages, is fixed via #57. However, the underlying problem has something to do with recognising excluded functions, and is still an issue for non-RGL grammas.

Meowyam pushed a commit to Meowyam/gf-core that referenced this issue Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants