Difference between revisions of "Liberty Eiffel Programming Environment FAQ"
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Is there a SmartEiffel '''mailing list'''?== |
== Is there a SmartEiffel '''mailing list'''?== |
||
+ | |||
− | |||
Yes! SmartEiffel users and developers can share their experiences |
Yes! SmartEiffel users and developers can share their experiences |
||
and ideas by subscribing to the |
and ideas by subscribing to the |
||
[http://SmartEiffel.loria.fr/support/mailing-list.html SmartEiffel official mailing list]. |
[http://SmartEiffel.loria.fr/support/mailing-list.html SmartEiffel official mailing list]. |
||
+ | |||
+ | Please, note that this list is not moderated. |
||
+ | Please, stay correct on that list. |
||
==Is it possible to have the complete '''Eiffel source code of SmartEiffel'''?== |
==Is it possible to have the complete '''Eiffel source code of SmartEiffel'''?== |
||
+ | |||
− | |||
Since it is the GNU Eiffel Compiler, the complete source |
Since it is the GNU Eiffel Compiler, the complete source |
||
code of SmartEiffel is of course in the distribution. |
code of SmartEiffel is of course in the distribution. |
||
− | The source code for additional libraries is also provided. |
+ | The source code for additional libraries is also provided. |
+ | See also this [[#FAQ-commercial-apps|FAQ question]] which is related to licensing. |
||
+ | <div id="FAQ-commercial-apps"> |
||
== Is it possible to use SmartEiffel for '''large/commercial applications'''?== |
== Is it possible to use SmartEiffel for '''large/commercial applications'''?== |
||
+ | </div> |
||
− | |||
+ | |||
It is indeed possible to use SmartEiffel for a large application. |
It is indeed possible to use SmartEiffel for a large application. |
||
An Eiffel compiler is a really big project and SmartEiffel itself is fully |
An Eiffel compiler is a really big project and SmartEiffel itself is fully |
||
Line 23: | Line 29: | ||
Also note that <B>only classes which are closely related to the |
Also note that <B>only classes which are closely related to the |
||
compiler itself are under GPL</B> (actually, only the classes of directory |
compiler itself are under GPL</B> (actually, only the classes of directory |
||
− | <TT>SmartEiffel/tools |
+ | <TT>SmartEiffel/tools</TT> are under GPL). |
The other classes are <EM>not</EM> under GPL in order to let people completely |
The other classes are <EM>not</EM> under GPL in order to let people completely |
||
free (i.e. all classes of <TT>SmartEiffel/lib</TT>). |
free (i.e. all classes of <TT>SmartEiffel/lib</TT>). |
||
Line 86: | Line 92: | ||
==How do I '''keep informed''' about SmartEiffel?== |
==How do I '''keep informed''' about SmartEiffel?== |
||
− | The best way is to keep an |
+ | The best way is to keep an eeye on our web pages, |
more especially on the [http://SmartEiffel.loria.fr/general/whatsnew.html What's New?] page |
more especially on the [http://SmartEiffel.loria.fr/general/whatsnew.html What's New?] page |
||
and the [http://SmartEiffel.loria.fr/misc/HISTORY.html History of Changes]. |
and the [http://SmartEiffel.loria.fr/misc/HISTORY.html History of Changes]. |
||
Line 95: | Line 101: | ||
== What <B>documentation</B> is provided with SmartEiffel?== |
== What <B>documentation</B> is provided with SmartEiffel?== |
||
− | + | The documentation provided with SmartEiffel is a transcript of what |
|
you can find on the original SmartEiffel Web site, at |
you can find on the original SmartEiffel Web site, at |
||
− | + | http://SmartEiffel.loria.fr. |
|
It is related only to the use and internals of SmartEiffel (yes, |
It is related only to the use and internals of SmartEiffel (yes, |
||
we know we still have to improve it ;) ). |
we know we still have to improve it ;) ). |
||
+ | |||
− | <BR> |
||
For information and documentation about the Eiffel language, check |
For information and documentation about the Eiffel language, check |
||
the links on our |
the links on our |
||
− | + | [http://SmartEiffel.loria.fr/general/resources.html Internet resources page]. |
|
Note that we are not aware of any complete Eiffel language manual |
Note that we are not aware of any complete Eiffel language manual |
||
freely available on the Web (yet?). |
freely available on the Web (yet?). |
||
+ | |||
− | |||
==Why don't you <B>post more messages</B> in newsgroups and/or mailing lists?== |
==Why don't you <B>post more messages</B> in newsgroups and/or mailing lists?== |
||
− | + | First, because we strongly believe that too much information kills information. |
|
− | Scientists call this "cognitive overload". :) |
+ | Scientists call this "cognitive overload". :) |
+ | |||
Second, because we don't have the time. It takes an awful amount of time to follow |
Second, because we don't have the time. It takes an awful amount of time to follow |
||
discussions, whatever their quality. We try to do that. But it's even more |
discussions, whatever their quality. We try to do that. But it's even more |
||
Line 116: | Line 123: | ||
posting/mailing, and working directly on SmartEiffel. Since our mailboxes tend |
posting/mailing, and working directly on SmartEiffel. Since our mailboxes tend |
||
to overflood, we generally choose the latter :) |
to overflood, we generally choose the latter :) |
||
+ | |||
− | |||
== Is it possible to do <B>incremental compilation</B> with SmartEiffel?== |
== Is it possible to do <B>incremental compilation</B> with SmartEiffel?== |
||
Line 122: | Line 129: | ||
SmartEiffel always produces all needed C files from scratch. As old C files |
SmartEiffel always produces all needed C files from scratch. As old C files |
||
are automatically saved, only modified C files are recompiled. |
are automatically saved, only modified C files are recompiled. |
||
− | See <TT> |
+ | See <TT>[http://SmartEiffel.loria.fr/man/compile.html man/compile]</TT> for details. |
+ | |||
− | |||
− | |||
== Is there a mechanism to <B>pre-compile</B> libraries?== |
== Is there a mechanism to <B>pre-compile</B> libraries?== |
||
− | + | No, there is no such mechanism in SmartEiffel. But if you're concerned |
|
about compilation speed, don't worry, pre-computed libraries are not the only way to be fast ! |
about compilation speed, don't worry, pre-computed libraries are not the only way to be fast ! |
||
Just try SmartEiffel, and you'll see :) |
Just try SmartEiffel, and you'll see :) |
||
+ | |||
− | |||
== What is the semantics (meaning) of a <B>manifest string</B>?== |
== What is the semantics (meaning) of a <B>manifest string</B>?== |
||
Line 200: | Line 206: | ||
</TR> |
</TR> |
||
− | == Is it possible to use the <B>Boehm-Demers-Weiser garbage collector</B> with |
+ | == Is it possible to use the <B>Boehm-Demers-Weiser garbage collector</B> with SmartEiffel?== |
− | + | Yes. |
|
<BR>You just have to disable the generation of the GC by SmartEiffel |
<BR>You just have to disable the generation of the GC by SmartEiffel |
||
− | (option < |
+ | (option <I>-no_gc</I>) and replace it by the BDW library. |
Note that the BDW GC |
Note that the BDW GC |
||
can be easily added because SmartEiffel only uses malloc/realloc/calloc. |
can be easily added because SmartEiffel only uses malloc/realloc/calloc. |
||
Line 209: | Line 215: | ||
<DL COMPACT> |
<DL COMPACT> |
||
<DD> |
<DD> |
||
− | + | http://www.hpl.hp.com/personal/Hans_Boehm/gc/</DD> |
|
</DL> |
</DL> |
||
How to integrate the Boehm-Demers-Weiser garbage collector |
How to integrate the Boehm-Demers-Weiser garbage collector |
Revision as of 12:40, 9 June 2005
Is there a SmartEiffel mailing list?
Yes! SmartEiffel users and developers can share their experiences and ideas by subscribing to the SmartEiffel official mailing list.
Please, note that this list is not moderated. Please, stay correct on that list.
Is it possible to have the complete Eiffel source code of SmartEiffel?
Since it is the GNU Eiffel Compiler, the complete source code of SmartEiffel is of course in the distribution. The source code for additional libraries is also provided. See also this FAQ question which is related to licensing.
Is it possible to use SmartEiffel for large/commercial applications?
It is indeed possible to use SmartEiffel for a large application. An Eiffel compiler is a really big project and SmartEiffel itself is fully written in Eiffel. SmartEiffel is completely free and any private company can use SmartEiffel freely, and distribute (or sell) freely the products made with it. They do not have to pay royalties.
Also note that only classes which are closely related to the compiler itself are under GPL (actually, only the classes of directory SmartEiffel/tools are under GPL). The other classes are not under GPL in order to let people completely free (i.e. all classes of SmartEiffel/lib).
Always keep in mind that SmartEiffel doesn't come with any warranty (please read the COPYING file in the distribution). As explained in the header of non-GPL files, the only important thing is to kept the header unaltered when the corresponding source file is provided in your product. For extended support, donations as well as consulting, see here.
What is SmallEiffel compared to SmartEiffel?
SmallEiffel is the former name of the SmartEiffel project. We changed because we thought the compiler had become smart enough ;)
For a list of changes between the last version of SmallEiffel and the first one of SmartEiffel, have a look there.
How can I help?
The best way to help SmartEiffel and its users is probably to pick up some area you're interested in, and develop with SmartEiffel your own library, application, tool, extension, etc., releasing it to other users.
To avoid duplicate efforts, we suggest you have a look to what other people are already doing around SmartEiffel and help them if something that's of interest to you is already under work. There are actually very good things in there, some we were not even aware of, when they were under development ! :)
You may have a look to the future plans and have a look into the bugs database (access via the bug report page.
Finally, you may also consider funding the development of particular features you would like to have.
Another very good way to help us is to follow the bug report guidelines when you find some problem with SmartEiffel.
Why don't you change this and add that?! It would be much better/cooler/whatever!
People must understand that we can't always do everything. We simply can't. Because we don't have the time. Whether we like it or not, we also have other things to do than provide free stuff, modify our compiler and/or libraries to please everybody. We do as much as we can, but we don't do miracles, sorry.
Since SmartEiffel is free of charge and open-source, people who do need things we don't provide can always implement them and have them benefit everybody. A good way to do this is to start working on it, and ask other people (i.e. not the SmartEiffel team ;) ) to join and help. See the How can I help? question.
Alternatively, someone or some company who does need us to implement something may always consider funding a bit the development of SmartEiffel... After all, we've even heard that some people were selling software and making a bit of money with it... ;)))
How do I keep informed about SmartEiffel?
The best way is to keep an eeye on our web pages, more especially on the What's New? page and the History of Changes.
People who want detailed information may also decide to stay tuned to the SmartEiffel mailing-list or even look at the bug-tracking system.
What documentation is provided with SmartEiffel?
The documentation provided with SmartEiffel is a transcript of what you can find on the original SmartEiffel Web site, at http://SmartEiffel.loria.fr. It is related only to the use and internals of SmartEiffel (yes, we know we still have to improve it ;) ).
For information and documentation about the Eiffel language, check the links on our Internet resources page. Note that we are not aware of any complete Eiffel language manual freely available on the Web (yet?).
Why don't you post more messages in newsgroups and/or mailing lists?
First, because we strongly believe that too much information kills information. Scientists call this "cognitive overload". :)
Second, because we don't have the time. It takes an awful amount of time to follow discussions, whatever their quality. We try to do that. But it's even more time-consuming to be part of them. So, we often have to choose between posting/mailing, and working directly on SmartEiffel. Since our mailboxes tend to overflood, we generally choose the latter :)
Is it possible to do incremental compilation with SmartEiffel?
Because of the SmartEiffel type inference mechanism, SmartEiffel always produces all needed C files from scratch. As old C files are automatically saved, only modified C files are recompiled. See man/compile for details.
Is there a mechanism to pre-compile libraries?
No, there is no such mechanism in SmartEiffel. But if you're concerned about compilation speed, don't worry, pre-computed libraries are not the only way to be fast ! Just try SmartEiffel, and you'll see :)
What is the semantics (meaning) of a manifest string?
Bertrand Meyer clearly explains the semantics of manifest strings in
section 18.5 on page 653 (and previous sections for background) of
Object-Oriented Software Construction (Second Edition). A manifest string
expression (in declaration) is not a constant but a reference to a shared
object. A variable initialised with a manifest string is equivalent to a
once function, so the string may change! For example:
Message: STRING is "abc"
is equivalent to
Message: STRING is
once
!!Result.make (3)
Result.append_character ('a')
Result.append_character ('b')
Result.append_character ('c')
end
SmartEiffel implements manifest strings in this way.
Be aware that manifest string expression may be written in two ways:
str := "abc"
This is the standard manifest string expression.
str := once "abc"
This is the once manifest string expression.
In the first case, new string is allocated each time the line is
executed. In the second case you've got a once result like in declaration
described above, so the string may have changed.
See <A HREF="../man/compile_to_c.html">man/compile_to_c</A> for the flag
-manifest_string_trace which help finding memory leaks from non-once manifest
strings.
How should I read a file?
In order to read a file, read a character and then use
last_character ONLY if if end_of_input has not been reached
while reading the character.
Before each read (except the very first), you have to test
end_of_input, because all read_* procedures require not
end_of_input. But why? This require means that if some
previous read failed because end of input has been reached,
then it is not valid to try to read again.
Example:
file: TEXT_FILE_READ
file.connect_to(file_name)
if file.is_connected then
from
file.read_character
until
file.end_of_input
loop
io.put_character(file.last_character)
file.read_character
end
file.disconnect
end
Is it possible to use the Boehm-Demers-Weiser garbage collector with SmartEiffel?
Yes.
You just have to disable the generation of the GC by SmartEiffel
(option -no_gc) and replace it by the BDW library.
Note that the BDW GC
can be easily added because SmartEiffel only uses malloc/realloc/calloc.
You can download the BDW library from :
How to integrate the Boehm-Demers-Weiser garbage collector with SmartEiffel (from a message of Dietmar Wolz) :
- Make the gc.a file from the BDW package. Then move this gc.a file to /usr/lib/libgc.a.
- Move gc.h the to working directory and add the following lines:
- instead of calling
#define malloc(n) GC_malloc(n)
#define calloc(m,n) GC_malloc((m)*(n))
#define realloc(p,n) GC_realloc((p),(n))
#define free(p) GC_free(p)
"compile -o executable -boost -O root"
now call
"compile -o executable -boost -O root -no_gc -lgc -include gc.h"
How to customise the Garbage Collector for a new architecture?
If your architecture need special handling to get the GC working
(because the stack is not contiguous, because some registers are not
written on the stack on `setjmp'...) then you need to implement function
`mark_stack_and_registers' for your system in the file
SmartEiffel/sys/runtime/c/gc_lib.c.
If you get some message telling you that the stack direction is wrong, then
you should change macro definition to use the other generic code
(there is one generic code for each stack order).
In order to check the GC, you should be able to run all files of the SmartEiffel/misc/benchmarks/gc directory.
How is SmartEiffel compiled?
With Eiffel optimisation options -boost and -no_gc. The garbage collector is indeed useless on the SmartEiffel commands: since SmartEiffel did not include a GC in its first versions, we were very careful about memory when we developed it.
With C compilation optimisations turned on (it depends on the C compiler used; we generally use gcc). The resulting executables are stripped.
Can you explain again the difference between conformance and covariance?
Our paper " Conformance of agents in the Eiffel language has a note p.137 that looks surprising.
Note that the previous rules define conformance rules, this has nothing to do with covariance or contravariance.
The concepts are distinct, even though there is a relation between them.
Covariance is defined in terms of conformance. But assignment is also defined in terms of conformance.
That's exactly, and only, what our paper defines: assignment rules. Those rules were not defined anywhere before. It's important: it's not that we disagreed with any earlier position. We just filled a hole in the specification.
Also note that, even if the agent types notation uses square brackets, it's totally unrelated to the generic classes type notation; therefore generic classes rules cannot apply (except if proved otherwise). An agent type is not a generic type, anymore than a tuple type is a generic type. Those are distinct concepts, only with a similar notation.
Conformance is fundamental in any typed language; on the other hand covariance is "just" an Eiffel extra. Important, sure, but not as fundamental as conformance. Our paper never speaks of covariance, except in the note quoted above, and explained further here. Maybe the paper should have explained the subtlety in so many words.
Is it difficult to switch from some commercial Eiffel compiler to SmartEiffel?
If your original Eiffel software only uses simple types like INTEGER, STRING, ARRAY, BOOLEAN, CHARACTER and DOUBLE, it is usually very simple to modify your code in order to use SmartEiffel.
It is a little bit difficult for simple input/output (used with predefined io) because some features have different names. If your original software heavily relies for example on the EiffelBase library, it may be very difficult. For example, one must keep in mind that SmartEiffel.ARRAY inherit SmartEiffel.COLLECTION and that ISE library also have a class COLLECTION. By the way, subclasses of ISE.COLLECTION cannot be used. The ISE.LINKED_LIST can be used in conjunction with SmartEiffel.ARRAY because ISE.LINKED_LIST do not inherit ISE.COLLECTION (no clash).