summaryrefslogtreecommitdiff
path: root/doc/gf2.2-highlights.html
blob: e73bc0675d85d9417e9e0498a2acacda1ab581cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<html>

<body bgcolor="#FFFFFF" text="#000000">

<center>

<h1>Grammatical Framework Version 2.2</h1>

Highlights of GF version 2.2.

<p>

9/5/2005

<p>

<a href="http://www.cs.chalmers.se/~aarne">Aarne Ranta</a>

</center>


<h2>Summary of novelties in Version 2.2 in comparison to 2.1</h2>

<li> New optimizations to reduce the size of GFC files
<li> Improved parsing algorithms
<li> Lots of bug fixes
<li> Separate <tt>reuse</tt> modules no longer needed
<li> Several new command options
<li> New documentation: 
  <ul>
  <li> <a href="gf-modules.html">module system document</tt>
  <li> <a href="tutorial/gf-tutorial2.html">new tutorial</a>, based on the module system (unfinished)
  </ul>
<li> New resource libraries
<li> Visualization of module dependency graph
<li> In the editor GUI, text corresponding to subtrees with constraints marked with red colour
<li> Hierarchic modules used in the source code
<li> <a href="http://www.haskell.org/haddock">haddock</a> documentation available for source code


<h3>Compiler optimizations</h3>

The sometimes exploding size of generated <tt>gfc</tt> and
<tt>gfr</tt> files has made it urgent to find optimizations
that reduce the size of the code. There are five
combinations optimizations that can be chosen, as the value of the
<tt>optimize</tt> flag:
<ul>
<li> <tt>share</tt>: group tables so that common branch values are shared
by the use of disjunctive patterns.
<li> <tt>parametrize</tt>: if table branches differ at most at the
occurrence of the pattern, replace the expanded table by a one-branch
table with a variable. If this fails, perform <tt>share</tt>.
<li> <tt>values</tt>: only show the values of table branches, not the
patterns.
<li> <tt>all</tt>: try <tt>parametrize</tt>; if this fails, do <tt>values</tt>.
<li> <tt>none</tt>: don't do any optimizations
</ul>
The <tt>share</tt> and <tt>parametrize</tt> optimizations are always
just good, whereas the <tt>values</tt> optimization may slow down the
use of the table. However, it is very good for grammars mostly consisting
of the inflection tables of lexical items: it can reduce the file size
by the factor of 4.

<p>

An optimization can be selected individually for each
<tt>resource</tt> and <tt>concrete</tt> module by including
the judgement  
<pre>
  flags optimize=(share|parametrize|values|all|none) ;
</pre>
in the module body. These flags can be overridden by a flag given
in the <tt>i</tt> command, e.g.
<pre>
  i -src -optimize=none Foo.gf
</pre>
Notice that the option <tt>-src</tt> is needed if there already are
generated files created with other optimization flags.




</body>
</html>