summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/GeneratePMCFG.hs
AgeCommit message (Collapse)Author
2012-12-14More work on the new partial evaluatorhallgren
The work done by the partial evaluator is now divied in two stages: - A static "term traversal" stage that happens only once per term and uses only statically known information. In particular, the values of lambda bound variables are unknown during this stage. Some tables are transformed to reduce the cost of pattern matching. - A dynamic "function application" stage, where function bodies can be evaluated repeatedly with different arguments, without the term traversal overhead and without recomputing statically known information. Also the treatment of predefined functions has been reworked to take advantage of the staging and better handle partial applications.
2012-12-11partial evaluator workhallgren
* Evaluate operators once, not every time they are looked up * Remember the list of parameter values instead of recomputing it from the pattern type every time a table selection is made. * Quick fix for partial application of some predefined functions.
2012-11-13Adding a new experimental partial evalutatorhallgren
GF.Compile.Compute.ConcreteNew + two new modules contain a new partial evaluator intended to solve some performance problems with the old partial evalutator in GF.Compile.Compute.ConcreteLazy. It has been around for a while, but is now complete enough to compile the RGL and the Phrasebook. The old partial evaluator is still used by default. The new one can be activated in two ways: - by using the command line option -new-comp when invoking GF. - by using cabal configure -fnew-comp to make -new-comp the default. In this case you can also use the command line option -old-comp to revert to the old partial evaluator. In the GF shell, the cc command uses the old evaluator regardless of -new-comp for now, but you can use "cc -new ..." to invoke the new evaluator. With -new-comp, computations happen in GF.Compile.GeneratePMCFG instead of GF.Compile.Optimize. This is implemented by testing the flag optNewComp in both modules, to omit calls to the old partial evaluator from GF.Compile.Optimize and add calls to the new partial evaluator in GF.Compile.GeneratePMCFG. This also means that -new-comp effectively implies -noexpand. In GF.Compile.CheckGrammar, there is a check that restricted inheritance is used correctly. However, when -noexpand is used, this check causes unexpected errors, so it has been converted to generate warnings, for now. -new-comp no longer enables the new type checker in GF.Compile.Typeckeck.ConcreteNew. The GF version number has been bumped to 3.3.10-darcs
2012-10-24GeneratePMCFG: prefix messages about "impossible" errors with 'Internal error:'hallgren
Just to make them easier to spot when wading through thousands of lines of warnings...
2012-10-19Consistenly use SourceGrammar instead of [SourceModule] when calling ↵hallgren
compiler passes
2012-08-29Added an O(n log n) version of nubpeter.ljunglof
The new nub is called nub', and it replaces the old sortNub which was not lazy and did not retain the order between the elements.
2012-03-26Workaround for bug in ghc-7.2.2hallgren
An apparent bug in ghc-7.2.2 causes the type Value to be exported from PGF.Data. Workaround: restrict the imports from PGF.Data in GF.Command.Abstract and GF.Compile.GeneratePMCFG to avoid the clash with locally defined type Value. (ghc-7.0.4 and ghc-7.4.1 appear to be free from this bug.)
2012-02-28buf fix in the compiler for HOASkr.angelov
2011-11-24now if some module is compiled with -no-pmcfg then the PMCFG code is ↵kr.angelov
generated at the end during the linking phase. Now the default compilation of the libraries with cabal is with -no-pmcfg.
2011-11-22make addSequencesB(V) strict. Otherwise we get stack overflow when compiling ↵kr.angelov
LangFre
2011-11-10Now PMCFG is compiled per module and at the end we only link it. The new ↵kr.angelov
compilation schema is few times faster.
2011-11-02merge GF.Infra.Modules and GF.Grammar.Grammar. This is a preparation for the ↵kr.angelov
separate PGF building
2010-12-17bugfix: GeneratePMCFG should initialize the lexicon to emptykrasimir
2010-10-25fixed typo in GeneratePMCFG.hs. fidFloat -> fidVarkrasimir
2010-08-30added missing case for GF.Compile.GeneratePMCFG.evalTermkrasimir
2010-08-09native representation for HOAS in PMCFG and incremental type checking of the ↵krasimir
parse forest
2010-07-01redesign the open-literals APIkrasimir
2010-06-30rename isLiteralFCat -> isPredefFId, fcat(String|Int|Float) -> ↵krasimir
fid(String|Int|Float)
2010-06-22fix the compilation of literal categories in GeneratePMCFG.hskrasimir
2010-06-20addFCoercion -> addCoercion in GeneratePMCFGkrasimir
2010-06-20getFCats -> getFIds in GeneratePMCFGkrasimir
2010-06-20removed debugging code in GeneratePMCFG.hskrasimir
2010-06-18Yay!! Direct generation of PMCFG from GF grammarkrasimir
2010-05-26since now we don't do common subexpression elimination for PGF we could ↵krasimir
simplify the PMCFG generation
2010-02-06in verbose mode print the rule names when compiling PMCFGkrasimir
2010-01-27cleanup the code of the PGF interpreter and polish the binary serialization ↵krasimir
to match the preliminary specification
2010-01-17PGF is now real synchronous PMCFGkrasimir
2010-01-17now the linearization is completely based on PMCFGkrasimir
2010-01-16small code cleanup in GeneratePMCFG.hskrasimir
2010-01-12move the definitions of _B and _V to PGF.Macroskrasimir
2010-01-05store the label names in PMCFGkrasimir
2009-12-14remove the old parsing code and the -erasing=on flagkrasimir
2009-12-13reorganize the directories under src, and rescue the JavaScript interpreter ↵krasimir
from deprecated