summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile
AgeCommit message (Collapse)Author
2012-12-18partial evaluator bug fixhallgren
Int was missing from the list of predefined canonical constants.
2012-12-14The first prototype for exhaustive generation in the C runtime. The trees ↵kr.angelov
are always listed in decreasing probability order. There is also an API for generation from Python
2012-12-14Add language extension for ghc<7.4hallgren
FlexibleInstances does not imply TypeSynonymInstances, apparently.
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-12-10Compute.ConcreteNew: add missing case for variant functionshallgren
Also adding a test case in the test suite for this.
2012-12-06Compute.ConcreteNew: bug fix for indirectly defined pattern macroshallgren
More changes are probably needed to make pattern macros first class values. Also includes minor changes related to variants and error messages.
2012-12-02produce error message instead of failure of irrefutable pattern Ok ty_C in ↵aarne
GrammarToPGF, to help find compilation errors; the ones I've found are because an inherited abstract excludes something that the inherited concrete does not exclude.
2012-11-16new-comp: rewrite f (x|y) into (f x|f y)hallgren
With this change, all languages in molto/mgl/mixture except German and Polish can be compiled.
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-11-08Eliminate warnings about deprecated use of catch and tryhallgren
This is also needed for compatibility with GHC 7.6.
2012-10-24Compute.ConcreteNew: support variantshallgren
Also add a missing check for Predef values in apply.
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-19Refactor compileSourceModulehallgren
There was 55 lines of rather repetitive code with calls to 6 compiler passes. They have been replaced with 19 lines that call the 6 compiler passes plus 26 lines of helper functions.
2012-10-19Consistenly use SourceGrammar instead of [SourceModule] when calling ↵hallgren
compiler passes
2012-10-18Use NOINLINE for build info and darcs version infohallgren
... to avoid unnecessary recompilation of other modules.
2012-09-18catch all case in GenerateBC.genFunkr.angelov
2012-09-06Add type info to "Warning: ignoring lock fields in resolving..."hallgren
2012-08-30another fix for teyjuskr.angelov
2012-08-29Use nub' instead of nub in some places, remove some unused nub importspeter.ljunglof
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-08-29Emacs only recognizes utf-8, not UTF-8, in file headerspeter.ljunglof
2012-08-29A basic infrastructure for generating Teyjus bytecode from the GF abstract ↵kr.angelov
syntax
2012-08-01the first draft of GF.Compile.Instructionskr.angelov
2012-07-02Minor changes in Python exportpeter.ljunglof
2012-06-28Fixed minor bug in prolog exportpeter.ljunglof
2012-06-27major changes to the prolog exportpeter.ljunglof
2012-06-27cleanup in the python exportpeter.ljunglof
2012-06-26Experiment with parallel grammar checkshallgren
Introduced the function parallelCheck :: [Check a] -> Check [a] that runs independent checks in parallel, potentially allowing faster grammar compilation on multi-core computers, if you run gf with +RTS -N. However, on my dual core laptop, this seems to slow down compilation somewhat even though CPU utilization goes up as high as 170% at times. (This is with GF compiled with GHC 7.0.4.)
2012-06-26Report many type errors instead of stopping after the first onehallgren
In GF.Compile.CheckGrammar, use a new topological sorting function that groups independent judgements, allowing them all to be checked before continuing or reporting errors.
2012-06-25GF.Compile.Rename: report many errors instead of stopping after the first onehallgren
Using accumulated errors in the Check monad. TODO: some errors are still not accumulated, but thanks to checkMapRecover at least one error per judgement is reported.
2012-06-25Check monad: support for accumulated errorshallgren
In addition to warnings, the Check monad in GF.Infra.CheckM can now accumulate errors. There are two new functions checkAccumError: Message -> Check () accumulateError :: (a -> Check a) -> a -> Check a The former (with the same type as checkWarn) is used to report an accumulated (nonfatal) error. The latter converts fatal errors into accumulated errors. Accumulated errors are reported as regular errors by runCheck. Also, the Check monad type has been made abstract.
2012-06-25Export PGF in Python formatpeter.ljunglof
2012-06-25checkMapRecover: find undefined idents in all jments in Renameaarne
2012-05-15missing case in partial evaluation of + fixedaarne
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-28bug fix in AppPredefined: don't compare values that contain variables. this ↵aarne
should be checked even more generally.
2012-02-28buf fix in the compiler for HOASkr.angelov
2012-02-24the Predef function eqVal to compare equality of parameter valuesaarne
2012-01-14sorted the list of funs and cats in GrammatToPGF to get the predef ↵aarne
categories in proper place and get gr, ai, gt work properly
2011-12-02The typechecker is still unfinished but at least it can typecheck the ↵kr.angelov
English resource grammar
2011-11-30Hopefully complete Value type and a little bit more on computations.kr.angelov
2011-11-30more stuff in the new type checkerkr.angelov
2011-11-29Sketch of the new type checker for the concrete syntax. Enabled only with ↵kr.angelov
-new-comp
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-17rebuildModule should do location globalization tookr.angelov
2011-11-17bugfix in the overload resolution. It was accidentally introduced as part of ↵kr.angelov
the per module PMCFG generation
2011-11-15fix in the versioning of the .gfo fileskr.angelov
2011-11-15now we store version number in every .gfo file. If the file is compiled with ↵kr.angelov
different compiler then we simply recompile it.