Commit Graph

9654 Commits

Author SHA1 Message Date
hallgren 224d3a43f7 Add OS X Installed package to the GF 3.6 download page 2014-08-29 11:48:53 +00:00
hallgren 9b8b2d5f03 bin/build-binary-dist.sh: just a small fix 2014-08-29 11:48:10 +00:00
kr.angelov 9bc507f1d6 added evaluator.h which I had forgoten 2014-08-29 08:36:53 +00:00
hallgren d25014f24c You can now use 'make pkg' to build OS X Installer packages for GF
The script bin/build-binary-dist.sh has been updated to build either a plain
.tar.gz package or OS X Installer package (.pkg).

Note that bin/build-binary-dist.sh is designed to build and include the
C run-time system in the binary package.  If the C run-time system fails to
build, no binary package will be created.
2014-08-28 13:30:22 +00:00
hallgren cc61d7edd8 gf.cabal ghc-options: don't force -j, -auto-all has been renamed to -fprof-auto 2014-08-25 23:30:22 +00:00
aarne fecda3e64b implemented some_Quant in Dictionary for many languages where it was missing. Also added some_Det, which has a different meaning: compare "some man" (existential, Quant) to "some tea" (mass term similar to "a little tea", Det) 2014-08-25 19:02:01 +00:00
aarne 51e53559b8 in TranslateEng, variant "third-largest" to "third largest" in OrdNumeralSuperl 2014-08-25 19:01:06 +00:00
aarne c93e2780d3 type error in ExtensionsChi fixed 2014-08-25 19:00:45 +00:00
hallgren 20d5a89664 Fix GHC 7.4 compatibility issue caused by previous patch 2014-08-25 11:26:58 +00:00
hallgren 238652c6f9 Setup.hs: disable parallel RGL build support for now, since it is incompatible with Cabal<1.20 2014-08-25 11:22:20 +00:00
hallgren c0eb79b403 Experimental: parallel batch compilation of grammars
On my laptop these changes speed up the full build of the RGL and example
grammars with 'cabal build' from ~95s to ~43s and the zero build from ~18s
to ~5s.

The main change is the introduction of the module GF.CompileInParallel that
replaces GF.Compile and the function GF.Compile.ReadFiles.getAllFiles. At
present, it is activated with the new -j flag, and it is only used when
combined with --make or --batch. In addition, to get parallel computations,
you need to add GHC run-time flags, e.g., +RTS -N -A20M -RTS, to the command
line.

The Setup.hs script has been modified to pass the appropriate flags to GF
for parallel compilation when compiling the RGL and example grammars, but you
need a recent version of Cabal for this to work (probably >=1.20).

Some additonal refactoring were made during this work. A new monad is used to
avoid warnings/error messages from different modules to be intertwined when
compiling in parallel, so some functios that were hardiwred to the IO or IOE
monads have been lifted to work in arbitrary monads that are instances in
the appropriate classes.
2014-08-25 09:56:00 +00:00
aarne 59e71e5cfd corrected own_V2 in DictionarySpa 2014-08-24 20:30:24 +00:00
aarne e9d83e1f9d added the constructor Noun.NumeralSuperlOrd for phrases like "third largest", which have special linearizations in many languages e.g. German (drittgrösste) and Finnish (kolmanneksi suurin). Implemented for Chi (to check), Dut, Eng, Fin, Ger, Romance, Scand so far 2014-08-24 14:32:44 +00:00
aarne 67fefa20a5 made the "how old" construction in Chinese more efficient by moving variants to the top level; the resulting rule is the same. This kind of inefficiencies are best found if you compile with the -v option and check for constructors creating unexpectedly many PGF rules. 2014-08-24 14:28:48 +00:00
kr.angelov 4d4bfbe5ec fix the paradigms for copper_N and honey_N in Bulgarian 2014-08-24 09:06:13 +00:00
kr.angelov ad60ce2941 more changes in DictionaryBul 2014-08-23 17:36:44 +00:00
kr.angelov c1eb76747c fixes in DictionaryBul 2014-08-23 17:33:45 +00:00
kr.angelov 14101a6fd7 bugfix in the android app 2014-08-22 12:33:35 +00:00
hallgren 5f9e6b1220 src/www/robots.txt: robot exclusion file for the GF cloud service.
To reduce potential server load caused by search bots.
2014-08-22 12:13:04 +00:00
hallgren 11105f81cd Command line flag -s/-q now silences all warnings
These flags now do what the say.
2014-08-22 00:30:33 +00:00
hallgren e1644ef319 Add lifted directory operations in GF.System.Directory to eliminate the need for liftIO in various places 2014-08-20 17:47:08 +00:00
hallgren ff960a27b8 GF.CompileOne: refactoring to reduce code duplication and improve readability
I prefer small functions with descriptive names over large monilithic chunks
of code, so I grouped the compiler passes called from compileSourceModule
into funcitons named frontend, middle and backend. This also makes decisions
about which passes to run clearly visible up front.

Also made some small changes in GF.Compile.
2014-08-20 17:04:15 +00:00
hallgren be301d8a5e Convert many RGL modules from Latin-1 to UTF-8 to speed up compilation
Also add flags coding=utf8 to silence warnings.
2014-08-19 19:42:05 +00:00
hallgren efcec8e7e9 Convert BeschCat.gf & BeschSpa.gf to UTF-8 to speed up compilation
Big patch!
2014-08-19 19:39:35 +00:00
hallgren 2f0e6c788b Convert lib/src/spanish/IrregSpa.gf to UTF-8 to speed up compilation
Huge patch!
2014-08-19 19:32:49 +00:00
hallgren d2e326b182 GF.Compile.ReadFiles: a simpler & faster way to convert from Latin1 to UTF-8 2014-08-19 14:27:15 +00:00
hallgren 7dee933802 Adjust the -path flags in 112 RGL modules
The -path flags in the RGL modules compiled during 'cabal build' now refer 
directly to the needed source directories. References 'alltenses' and 'present'
(and the nonexistent directory 'mathematical') have been removed.

This allows the files to be compiled in any order (e.g. in parallel). In
addition, you can do things like

	gf -retain lib/src/api/TrySwe.gf

without compiling/installing any other RGL modules first, and without 
setting any other path flags or environment variables.
2014-08-18 22:26:29 +00:00
kr.angelov b53c9b1038 fixes in DictionaryBul.gf 2014-08-18 14:34:42 +00:00
hallgren 7b42582682 Fix compliation error with GHC 7.4 caused by previous patch 2014-08-13 22:21:54 +00:00
hallgren 1cfdffd5e9 Fix warnings in 16 modules, mostly forward compatibility warnings from GHC 7.8 2014-08-13 22:16:18 +00:00
hallgren 6215fc941f Refactoring in GF.Compile and GF.ReadFiles with an eye to parallel compilation
In particular, the function compileOne has been moved to the new module
GF.CompileOne and its type has been changed from

    compileOne :: ... -> CompileEnv -> FilePath -> IOE CompileEnv

to

    compileOne :: ... -> SourceGrammar -> FilePath -> IOE OneCompiledModule

making it more suitable for use in a parallel compiler.
2014-08-13 16:46:11 +00:00
hallgren 70051a375b Setup.hs: reduce zero build time by a couple of seconds
The RGL is now compile with only three calls to GF (prelude, present,
alltenses). This also makes even more parallelism available to GF for speeding
up full builds of the RGL.
2014-08-13 16:25:03 +00:00
hallgren 147af96983 GF.Compile: remove the Int from CompileEnv
It has been unused since the refresh pass was removed.
This eliminates one obstacle to parallel module compilation.
2014-08-11 16:30:11 +00:00
kr.angelov 912225a5dd pattern matching in def rules is now supported 2014-08-11 15:53:41 +00:00
kr.angelov a18c1709f3 revert an accidental change that I pushed together with the last patch 2014-08-11 11:44:49 +00:00
kr.angelov 03b067782c a partial support for def rules in the C runtime
The def rules are now compiled to byte code by the compiler and then to
native code by the JIT compiler in the runtime. Not all constructions
are implemented yet. The partial implementation is now in the repository
but it is not activated by default since this requires changes in the
PGF format. I will enable it only after it is complete.
2014-08-11 10:59:10 +00:00
hallgren 1ce3569c82 Setup.hs: don't build example grammars when the rgl-none argument is specified 2014-08-08 17:02:36 +00:00
kr.angelov bf0b487a4c fix marquess_N, marquis_N in Eng,Bul,Fre 2014-08-07 19:09:02 +00:00
hallgren daee08f360 Setup.hs: comment out debugging code 2014-07-28 15:35:22 +00:00
hallgren 067c360ec5 Setup.hs: reduce zero build time by ~30% (from 26 to 18 seconds on my laptop)
This speedup is obtained by instead of generating 211 shell commands to compile the RGL one file at a time, generate 7 shell commands, passing a number of
related files to GF in one go.

In addition to cutting down the zero build time, this opens up for speeding up
full builds of the RGL, by adding more parallelism in GF's grammar compilation
machinery.

(Note: gf.cabal already takes advantage of GHC's parallel build option to
speed up the compilation of GF itself, if GHC>=7.8 is used.)
2014-07-28 15:11:58 +00:00
hallgren cbe5e8ab18 Convert from Text.PrettyPrint to GF.Text.Pretty
All compiler modules now use GF.Text.Pretty instead of Text.PrettyPrint
2014-07-28 11:58:00 +00:00
hallgren 1374c311d7 Adding GF.Infra.Location and GF.Text.Pretty (forgot to 'darcs add' them before) 2014-07-27 22:13:13 +00:00
hallgren f27d509075 Introducing GF.Text.Pretty for more concise pretty printers and GF.Infra.Location for modularity
GF.Text.Pretty provides the class Pretty and overloaded versions of the pretty
printing combinators in Text.PrettyPrint, allowing pretty printable values to
be used directly instead of first having to convert them to Doc with functions
like text, int, char and ppIdent. Some modules have been converted to use
GF.Text.Pretty, but not all. Precedences could be added to simplify the pretty
printers for terms and patterns.

GF.Infra.Location contains the types Location and L, factored out from
GF.Grammar.Grammar, and the class HasSourcePath. This allowed the import
of GF.Grammar.Grammar to be removed from GF.Infra.CheckM, making it more
like a pure library module.
2014-07-27 22:06:23 +00:00
Sergei Trofimovich b154361e24 gf.cabal: fix depend in --flags=-custom-binary case
Detected when building today:

Building gf-3.6...
Preprocessing library gf-3.6...

src/runtime/haskell/PGF/Internal.hs:17:8:
    Could not find module ‘Data.Binary.IEEE754’
    It is a member of the hidden package ‘data-binary-ieee754-0.4.4’.
    Perhaps you need to add ‘data-binary-ieee754’ to the build-depends in your .cabal file.
2014-07-25 14:41:11 +00:00
hallgren ea6aa6dc02 PGF service: expire PGFs from the cache when they have been unused for 24 hours
...to keep memory use down on the server.
2014-07-21 15:53:38 +00:00
hallgren 9ded33829a WebSetup.hs: include Chinese when building the Phrasebook 2014-07-21 15:48:49 +00:00
aarne b51e88810e DictionaryEng: removed some uses of the token "IRREG" but then stopped and added a comment; don't know what it is supposed to mean. Also changed who_N from "who" to "WHO" but again, don't know what who_N is supposed to mean. But it now creates hilarious translations of "who's who", treated as a statement about WHO... 2014-07-20 08:26:33 +00:00
aarne c6ca698101 contracted questions in TranslateEng: who's as a variant of who is etc. 2014-07-20 08:25:54 +00:00
aarne 78bd8f98a8 fixed a bug in PhonoIta.elision, which caused gluing of articles with nouns beginning with a vowel also when there was no apostrophe 2014-07-20 08:06:45 +00:00
aarne 423fa50994 Qiao's corrections in PhrasebookChi. This replaces the old, partial and low-quality version and is hence the first Chinese phrasebook version that can claim high quality. 2014-07-16 21:07:34 +00:00