<?xml version="1.0"?> 

<!--
	description:

		"Future Work"

	tool: "Gobo Eiffel Compiler"
	copyright: "Copyright (c) 2006-2025, Eric Bezault and others"
	license: "MIT License"
-->

<chapter xmlns="https://www.gobosoft.com/eiffel/gobo/documentation" id="gec/future">
<chapterinfo>
	<copyright>
		<year>2006-2025</year>
		<holder>Eric Bezault</holder>
	</copyright>
	<author>
		<firstname>Eric</firstname><surname>Bezault</surname>
	</author>
	<email>ericb@gobosoft.com</email>
	<date>31 August 2025</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>
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 (taking advantage of the
<ulink url="https://ziglang.org">Zig toolchain</ulink> caching mechanism).
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="https://github.com/distcc/distcc">distcc</ulink>. It seems to
<ulink url="http://se.inf.ethz.ch/old/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>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. Currently the code allows some incrementality if the subsequent
recompilations are performed within the same compiler execution. The data
needed for incrementality are lost as soon as the program exists.
</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="https://ecma-international.org/publications-and-standards/standards/ecma-367/">ECMA
Eiffel standard</ulink>. It would also be useful to have a test suite for
<ulink url="https://github.com/EiffelSoftware/FreeELKS">FreeELKS</ulink> kernel
library. This effort has already been started with <projectname>gecop</projectname>
and its validation test suite.
</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),
<ulink url="https://www.rust-lang.org/">Rust</ulink>,
<ulink url="https://ziglang.org">Zig</ulink>, 
<ulink url="https://webassembly.org">Wasm</ulink>, 
<ulink url="https://en.wikipedia.org/wiki/C--">C--</ulink>,
or even native code.
</para>
</section>

<section><title>IDE</title>
<para>
A graphical development environment for <projectname>gec</projectname> should
be provided. One solution could be to implement a plugin for VSCode.
</para>
</section>

</chapter>
