6/10 (AR) New commands dc = define_command and dt = define_tree to define macros in a GF session. See help for details and examples.
5/10 (AR) Printing missing linearization rules: pm -printer=missing. Command g = grep, which works in a way similar to Unix grep.
5/10 (PL) Printing graphs with function and category dependencies: pg -printer=functiongraph, pg -printer=typegraph.
20/9 (AR) Added optimization by common subexpression elimination.
It works on GFC modules and creates oper definitions for
subterms that occur more than once in lin definitions. These
oper definitions are automatically reinlined in functionalities
that don't support opers in GFC. This conversion is done by
module and the opers are not inherited. Moreover, the subterms
can contain free variables which means that the opers are not
always well typed. However, since all variables in GFC are type-specific
(and local variables are lin-specific), this does not destroy
subject reduction or cause illegal captures.
The optimization is triggered by the flag optimize=OPT_subs,
where OPT is any of the other optimizations (see h -optimize).
The most aggressive value of the flag is all_subs. In experiments,
the size of a GFC module can shrink by 85% compared to plain all.
18/9 (AR) Removed superfluous spaces from GFC printing. This shrinks the GFC size by 5-10%.
15/9 (AR) Fixed some bugs in dependent-type type checking of abstract modules at compile time. The type checker is more severe now, which means that some old grammars may fail to compile - but this is usually the right result. However, the type checker of def judgements still needs work.
14/9 (AR) Added printing of grammars to a format without parameters, in the spirit of Peanos "Latino sine flexione". The command pg -unpar does the trick, and the result can be saved in a gfcm file. The generated concrete syntax modules get the prefix UP_. The translation is briefly:
(P => T)* = T* (t ! p)* = t* (table {p => t ; ...})* = t*In order for this to be maximally useful, the grammar should be written in such a way that the first value of every parameter type is the desired one. For instance, in Peano's case it would be the ablative for noun cases, the singular for numbers, and the 2nd person singular imperative for verb forms.
14/9 (BB) Added finite state approximation of grammars. Internally the conversion is done cfg -> regular -> fa -> slf, so the different printers can be used to check the output of each stage. The new options are:
4/9 (AR) Added the option pg -printer=stat to show statistics of gfc compilation result. To be extended with new information. The most important stats now are the top-40 sized definitions.
1/7 Release of GF 2.3.
1/7 (AR) Added the flag -o to the vt command to just write the .dot file without going to .ps (cf. 20/6).
29/6 (AR) The printer used by Embedded Java GF Interpreter (pm -header) now produces working code from all optimized grammars - hence you need not select a weaker optimization just to use the interpreter. However, the optimization -optimize=share usually produces smaller object grammars because the "unoptimizer" just undoes all optimizations. (This is to be considered a temporary solution until the interpreter knows how to handle stronger optimizations.)
27/6 (AR) The flag flags optimize=noexpand placed in a resource module prevents the optimization phase of the compiler when the .gfr file is created. This can prevent serious code explosion, but it will also make the processing of modules using the resource slowwer. A favourable example is lib/resource/finnish/ParadigmsFin.
23/6 (HD,AR) The new editor GUI gfeditor by Hans-Joachim Daniels can now be used. It is based on Janna Khegai's jgf. New functionality include HTML display (gfeditor -h) and programmable refinement tooltips.
23/6 (AR) The flag unlexer=finnish can be used to bind Finnish suffixes (e.g. possessives) to preceding words. The GF source notation is e.g. "isä" ++ "&*" ++ "nsa" ++ "&*" ++ "ko", which unlexes to "isänsäkö". There is no corresponding lexer support yet.
22/6 (PL,AR) The MCFG parser (p -mcfg) now works on all optimized grammars - hence you need not select a weaker optimization to use this parser. The same concerns the CFGM printer (pm -printer=cfgm).
20/6 (AR) Added the command visualize_tree = vt, to display syntax trees graphically. Like vg, this command uses GraphViz and Ghostview. The foremost use is to pipe the parser to this command.
17/6 (BB) There is now support for lists in GF abstract syntax. A list category is declared as:
cat [C]or
cat [C]{n}where C is a category and n is a non-negative integer. cat [C] is equivalent to cat [C]{0}. List category syntax can be used whereever categories are used.
cat [C]{n} is equivalent to the declarations:
cat ListC fun BaseC : C^n -> ListC fun ConsC : C -> ListC -> ListCwhere C^0 -> X means X, and C^m (where m > 0) means C -> C^(m-1).
A lincat declaration on the form:
lincat [C] = Tis equivalent to
lincat ListC = TThe linearizations of the list constructors are written just like they would be if the function declarations above had been made manually, e.g.:
lin BaseC x_1 ... x_n = t lin ConsC x xs = t'
10/6 (AR) Preprocessor of .gfe files can now be performed as part of any grammar compilation. The flag -ex causes GF to look for the .gfe files and preprocess those that are younger than the corresponding .gf files. The files are first sorted and grouped by the resource, so that each resource only need be compiled once.
10/6 (AR) Editor GUI can now be alternatively invoked by the shell command gf -edit (equivalent to jgf).
10/6 (AR) Editor GUI command pc Int to pop Int items from the clip board.
4/6 (AR) Sequence of commands in the Java editor GUI now possible. The commands are separated by ;; (notice the space on both sides of the two semicolons). Such a sequence can be sent from the "GF Command" pop-up field, but is mostly intended for external processes that communicate with GF.
3/6 (AR) The format .gfe defined to support grammar writing by examples. Files of this format are first converted to .gf files by the command
gf -examples File.gfeSee ../lib/resource/doc/examples/QuestionsI.gfe for an example.
31/5 (AR) Default of p -rawtrees=k changed to 999999.
31/5 (AR) Support for restricted inheritance. Syntax:
M -- inherit everything from M, as before M [a,b,c] -- only inherit constants a,b,c M-[a,b,c] -- inherit everything except a,b,cCaution: there is no check yet for completeness and consistency, but restricted inheritance can create run-time failures.
29/5 (AR) Parser support for reading GFC files line per line. The category Line in GFC.cf can be used as entrypoint instead of Grammar to achieve this.
28/5 (AR) Environment variables and path wild cards.
26/5/2005 (BB) Notation for list categories.