krangelov
f7bf18d101
fix value2term for predefined functions
2021-12-13 09:44:28 +01:00
krangelov
ad4c5029a3
fix the implementation for Predef.tk & Predef.dp
2021-12-10 12:05:01 +01:00
krangelov
0069946f42
linearization for HOAS expressions
2021-12-09 08:45:53 +01:00
krangelov
d274f4856e
compile lindef & linref rules
2021-12-06 15:47:57 +01:00
krangelov
655576c291
the variable labeling should start with 0.
2021-12-03 15:00:04 +01:00
krangelov
4a68ea93b3
generate and store the ranges for all linearization rules
2021-11-26 14:05:03 +01:00
krangelov
38d189f8ef
bugfix for predefined operations
2021-10-21 08:55:22 +02:00
krangelov
b6047463a9
we can finally compile the English RGL
2021-10-20 19:39:02 +02:00
krangelov
5ee960ed7c
fix the evaluation for Prod
2021-10-14 10:24:20 +02:00
krangelov
27f0ff14a3
VT should preserve its environment
2021-10-13 19:43:01 +02:00
krangelov
c3eb6973f4
working PMCFG generation
2021-10-13 19:14:56 +02:00
krangelov
8c721e063c
partial support for runtime parameters
2021-10-12 12:06:59 +02:00
krangelov
62d5ed5b42
small progress on PMCFG
2021-10-08 19:25:21 +02:00
krangelov
98f42051b1
first steps towards PMCFG generation
2021-10-08 11:53:07 +02:00
krangelov
e33d881ce8
finished the partial evaluator
2021-10-07 11:47:51 +02:00
krangelov
fd6cd382c5
added VGlue to cover the case where we can't precompute the glue
2021-10-05 19:39:24 +02:00
krangelov
2a2d7269cf
remove the Term(Error) constructor. Better propagation of errors.
2021-10-05 19:31:12 +02:00
krangelov
dc59d9f3f9
trivial implementation for EPatt & EPattType
2021-10-05 15:45:16 +02:00
krangelov
3c4e7dd20c
partial evaluation for (+)
2021-10-05 15:37:42 +02:00
krangelov
93c2f47752
missed VStr -> string2value
2021-10-05 13:38:00 +02:00
krangelov
557cdb82a7
strings computed from a predefined operation should be tokenized
2021-10-05 11:50:59 +02:00
krangelov
26be741dea
most primitives in Predef.gf are now implemented
2021-10-05 11:31:39 +02:00
krangelov
0229329d7c
implemented pattern macros
2021-09-29 17:38:53 +02:00
krangelov
6efb878c43
pattern matching for "x"*
2021-09-29 14:57:18 +02:00
krangelov
edd7081dea
implement measured patterns
2021-09-29 13:26:06 +02:00
krangelov
2137324f81
safe pattern matching in the presence of a variable
2021-09-29 09:32:09 +02:00
krangelov
86326d282f
pattern matching on strings
2021-09-29 09:18:52 +02:00
krangelov
fee186feca
fix table selection with meta variables and lambda variables
2021-09-28 13:49:35 +02:00
krangelov
28dd0eda22
evaluation for Prod
2021-09-28 11:47:31 +02:00
krangelov
f82f19ba68
better error handling
2021-09-24 19:54:29 +02:00
krangelov
f83ea160da
more patterns in the partial evaluator
2021-09-24 19:14:48 +02:00
krangelov
c5b6432016
implemented tables and parameters
2021-09-24 17:20:25 +02:00
krangelov
ac304ccd7c
more low-handing fruits in the partial evaluator
2021-09-24 15:14:52 +02:00
krangelov
3dc2af61a6
done with partial evaluation for records and variants
2021-09-24 15:00:34 +02:00
krangelov
a2102b43bd
got started with the new partial evaluation
2021-09-22 18:17:50 +02:00
Andreas Källberg
7faf8c9dad
Clean up redundant case expressions
2021-07-12 16:38:29 +08:00
Andreas Källberg
b3881570c7
Remove last traces of the Either in value2term
2021-07-12 15:53:49 +08:00
Andreas Källberg
bd270b05ff
Remove the Either Int from value2term
...
This prevents HUGE space leak and makes compiling a PGF a LOT faster
For example, an application grammar moved from taking over 50GB
of ram and taking 5 minutes (most of which is spent on garbage colelction)
to taking 1.2 seconds and using 42mb of memory
The price we pay is that the "variable #n is out of scope" error is now
lazy and will happen when we try to evaluate the term instead of
happening when the function returns and allowing the caller to chose how
to handle the error.
I don't think this should matter in practice, since it's very rare;
at least Inari has never encountered it.
2021-07-12 15:50:43 +08:00
John J. Camilleri
71d99b9ecb
Rename GF.Compile.Compute.ConcreteNew to GF.Compile.Compute.Concrete
2021-07-01 14:21:29 +02:00
hallgren
7d1c011389
Commment code and options relating to the old partial evaluator
...
This means that the -old-comp and -new-comp flags are not recognized anymore.
The only functional difference is that printnames were still normalized with
the old partial evaluator. Now that is done with the new partial evaluator.
2013-11-29 16:26:49 +00:00
hallgren
f8665c7213
Remove configuration flag cclazy
2011-11-01 13:45:12 +00:00
hallgren
875df01dc6
Add lazy version of GF.Compile.Compute.Concrete
...
This patch adds GF.Compile.Compute.ConcreteLazy, which replaces the Err monad
with the Identity monad. While the Err monad makes the interpreter
(hyper)strict, the Identity monad let's the interpreter inherit Haskell's
laziness. This can give big speedups: from 50s to 1s in one example,
from ~4 minutes to ~2 minutes for the RGL.
This is still experimental and might be buggy, so it is off by default.
You can turn it on by configuring with the -fcclazy flag, e.g.
cabal configure -fcclazy
Let me know if anything breaks.
2011-09-01 16:39:41 +00:00
aarne
6757ab2b41
reload command in shell
2011-08-25 15:58:38 +00:00
aarne
3afefb0ac9
commented Compute/Concrete with explanations
2011-08-22 17:08:07 +00:00
aarne
445a3aafeb
Predef.error surfaces as error message in compilation and cc command
2011-02-25 17:01:10 +00:00
aarne
9b5223a06b
fixed the failure to partial-evaluate pre in right-associative context
2010-12-11 16:27:35 +00:00
krasimir
e0231cbf5b
reorganize the modules in GF.Compile.*
2010-07-01 14:19:32 +00:00