<?xml version="1.0"?> 

<!--
	description:

		"Future Work"

	tool: "Gobo Eiffel Compiler"
	copyright: "Copyright (c) 2006, Eric Bezault and others"
	license: "MIT License"
	date: "$Date: 2007-01-26 10:55:25 -0800 (Fri, 26 Jan 2007) $"
	revision: "$Revision: 5877 $"
-->

<chapter xmlns="http://www.gobosoft.com/eiffel/gobo/documentation" id="gec/future">
<chapterinfo>
	<copyright>
		<year>2006</year>
		<holder>Eric Bezault</holder>
	</copyright>
	<author>
		<firstname>Eric</firstname><surname>Bezault</surname>
	</author>
	<email>ericb@gobosoft.com</email>
	<date>18 March 2006</date>
</chapterinfo>

<title>Future Work</title>

<para>
The <projectname>Gobo Eiffel Compiler</projectname> can be extended in many ways.
Here is a non-exhaustive list of possible enhancements and future developments.
</para>

<section><title>Improve C code generation</title>
<para>
Currently <projectname>gec</projectname> generates one big C file. Some effort
should be spent on allowing several smaller C files to be generated, hence
allowing possible incrementality of the C compilation and not putting
C compilers too much at stress.
</para>
<para>
The names of the generated C functions should not depend on type
and feature ids in order to make it possible to play with DLLs and other
shared libraries. It will also make the incrementality of C compilation easier
to implement. The class <classname>ET_C_GENERATOR</classname> has been
written in such a way that it should not be that difficult to change the
naming convention. You can have a look at the callers of feature
<featurename>short_names</featurename> as a starting point.
</para>
<para>
One way to improve C compilation time could be to try to use
<ulink url="http://distcc.samba.org/">distcc</ulink>. It seems to
<ulink url="http://se.inf.ethz.ch/people/leitner/distcc/">work well</ulink>
when applied to the C code generated by ISE.
</para>
<para>
Note that no effort has been made yet to optimize the generated C code.
</para>
</section>

<section><title>Garbage Collection</title>
<para>
One solution is to plug the
<ulink url="http://www.hpl.hp.com/personal/Hans_Boehm/gc/">Boehm GC</ulink>
to the C code generated by <projectname>gec</projectname>.
</para>
</section>

<section><title>Multithreading</title>
<para>
We need to identify what C functions used by the Eiffel kernel are not thread-safe.
We also need to make some special treatment with the once-functions, which are
currently implemented using global variables.
</para>
</section>

<section><title>Debugger</title>
<para>
Add debugging facilities.
</para>
</section>

<section><title>Profiling</title>
<para>
Add profiling facilities.
</para>
</section>

<section><title>Incrementality</title>
<para>
Some effort should be spent on finding ways to make the Eiffel to C compilation
incremental.
</para>
</section>

<section><title>Validation Test Suite</title>
<para>
Several kinds of validation test suite are needed. One to test interoperability
with ISE Eiffel. Another one to test compliance with the <ulink
url="http://www.ecma-international.org/publications/standards/Ecma-367.htm">ECMA
Eiffel standard</ulink>. It would also be useful to have a test suite for
<ulink url="https://sourceforge.net/projects/freeelks">FreeELKS</ulink> kernel
library.
</para>
</section>

<section><title>Intermediate Languages</title>
<para>
<projectname>gec</projectname> currently generates C code. This is done through
the class <classname>ET_C_GENERATOR</classname>. <projectname>gec</projectname>
could be extended to generate Java Virtual Machine (JVM) code, Microsoft .NET
code (MSIL), or even native code. We could also have a look at
<ulink url="http://www.cminusminus.org/">C--</ulink>.
</para>
</section>

</chapter>
