From 27e675910a88fec3d7f0cc0ac6020d86f1089fe7 Mon Sep 17 00:00:00 2001 From: hallgren Date: Tue, 13 Nov 2012 14:09:15 +0000 Subject: Adding a new experimental partial evalutator 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 --- gf.cabal | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'gf.cabal') diff --git a/gf.cabal b/gf.cabal index 82ec7bdfe..52e785430 100644 --- a/gf.cabal +++ b/gf.cabal @@ -1,5 +1,5 @@ name: gf -version: 3.3.3-darcs +version: 3.3.10-darcs cabal-version: >= 1.8 build-type: Custom @@ -10,7 +10,7 @@ synopsis: Grammatical Framework description: GF, Grammatical Framework, is a programming language for multilingual grammar applications homepage: http://www.grammaticalframework.org/ bug-reports: http://code.google.com/p/grammatical-framework/issues/list -tested-with: GHC==6.12.3, GHC==7.0.4 +tested-with: GHC==6.12.3, GHC==7.0.4, GHC==7.4.2 data-dir: src data-files: www/*.html @@ -45,6 +45,10 @@ flag server Description: Include --server mode Default: True +flag new-comp + Description: Make -new-comp the default + Default: False + library build-depends: base >= 4.2 && <5, array, @@ -117,6 +121,9 @@ executable gf other-modules: GFServer hs-source-dirs: src/server src/server/transfer src/example-based + if flag(new-comp) + cpp-options: -DNEW_COMP + build-tools: happy --, alex>=2 && <3 -- tricky to install in Ubuntu 12.04 if os(windows) @@ -177,10 +184,15 @@ executable gf GF.Compile.ToAPI GF.Compile.TypeCheck.Abstract GF.Compile.TypeCheck.Concrete + GF.Compile.TypeCheck.ConcreteNew GF.Compile.TypeCheck.TC GF.Compile.Compute.Abstract GF.Compile.Compute.Concrete + GF.Compile.Compute.ConcreteNew1 + GF.Compile.Compute.ConcreteNew GF.Compile.Compute.AppPredefined + GF.Compile.Compute.Value + GF.Compile.Compute.Predef GF.Compile.Optimize GF.Compile.SubExOpt GF.Compile.GetGrammar -- cgit v1.2.3