Added doc for 21.11

git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2328 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
eifops
2021-11-24 16:23:28 +00:00
parent eb272d7a9e
commit 2839895650
2954 changed files with 63217 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
[[Property:title|Clean compile]]
[[Property:weight|8]]
[[Property:uuid|095a89c1-6043-3184-bedc-a42e10ee183d]]
Doing a '''clean compile''', sometimes called a '''compile from scratch''', is occasionally necessary as you develop systems. For example, if you change certain project settings or add, remove, or change a precompiled library, you will have to do a clean compile.
The process first involves cleaning, that is, removing any of the previously generated intermediate compile information (the EIFGENs folder). Cleaning is followed by a fresh compile which regenerates the EIFGENs anew.
You can only do a clean compile by closing EiffelStudio on your project, then restarting it and requesting the clean compile when EiffelStudio reopens.
So, for example, if you need to change precompiled libraries, you would open project settings, remove the old precompiled library, and add the new one. Then you would quit EiffelStudio and restart it. When the EiffelStudio dialog appears, select your project and '''Action: Compile''' and check the '''Clean''' box, as shown in the figure below. When you click '''Open''' EiffelStudio will do a clean compile of your project.
[[Image:clean compile dialog]]

View File

@@ -0,0 +1,15 @@
[[Property:title|Enabling the profiler]]
[[Property:weight|4]]
[[Property:uuid|62732b12-c41f-c87e-f798-8839664dc118]]
To profile an executable, the profiler must first be enabled. To enable the profiler:
* Open the [[General Target Options|Project Settings]] dialog.
* In the '''Target''' section, enable '''Profile'''.
* Click '''OK'''.
* You must [[Generating executables|recompile]] your project for the changes to take effect.
{{seealso|<br/>
[[Profiler wizard]] }}

View File

@@ -0,0 +1,27 @@
[[Property:title|Generating executables]]
[[Property:weight|0]]
[[Property:uuid|d089f44a-9d01-41cf-9ba5-a58570ca5365]]
There are several ways to compile an executable with EiffelStudio.
The most essential compilation modes are: '''melting''', '''freezing''', and '''finalizing'''. To learn more about the compilation semantics in EiffelStudio, see the documentation of [[Melting Ice Technology|Eiffel's compilation technology]].
There is a command for each compilation mode in the '''Project''' menu, under the entries '''Compile''', '''Freeze''' and '''Finalize'''.
The "drop-down" option of the Compile button ([[Image:compile-button]]) on the '''Project''' toolbar also offers these choices as shown in the image below.
[[Image:compile-button-dropdown]]
If you need the compilation options even handier than this, you can customize the '''Project''' toolbar by adding icons for each of the options: [[Image:project-melt-icon]] , [[Image:project-freeze-icon]] , [[Image:project-finalize-icon]] . [[Toolbar customization|Here's how]]. Or you can use the keyboard shortcuts that are shown in the Compile button's drop-down menu.
To help resolve the errors that occur during the Eiffel compilation, use the [[Error wizard|compilation error wizard]]. For errors occurring during the C compilation, check that the installation is not corrupted and refer to your C compiler documentation for more information.
{{seealso|<br/>
[[Command line|Command line options]] <br/>
[[Compiler|Compiler]] }}

View File

@@ -0,0 +1,33 @@
[[Property:title|Generating libraries]]
[[Property:weight|1]]
[[Property:uuid|a2862dd7-1702-50b6-2505-74f9e1ac4b70]]
There are two main types of libraries in Eiffel: precompiled Eiffel libraries and C libraries. Both kinds of libraries can be created via EiffelStudio. The former can only be used in Eiffel projects, C libraries can be used either in Eiffel programs, or in standard C programs.
To generate an Eiffel precompiled library:
* Select the '''Precompilation Wizard''' in the '''Tools''' menu and follow the instructions,
or
* Launch a new EiffelStudio session,
* Select your project
* Change the action to '''Precompile''',
* Click '''Open'''
To generate a dynamically linked C library using Eiffel code:
* Generate a definition file for this library, via the [[Dynamic library builder|Dynamic library Builder]] ,
* Open the [[Advanced Options|Project Settings]] dialog,
* In the '''Advanced''' section, set the '''Shared Library Definition''',
* Enter the name of the definition you created in the first step(including the path if necessary),
* Compile the current project.
The generated C library should be located in the EIFGENs|target_name|W_code directory in the directory of your project.
To generate a C library from a C compiler, please refer to the documentation of your C compiler.
{{seealso|<br/>
[[Using libraries|Using libraries]] <br/>
[[CECIL|CECIL library: calling Eiffel routines from C programs]] <br/>
[[Command line|Command line options]] }}

View File

@@ -0,0 +1,5 @@
[[Property:title|Compiling]]
[[Property:weight|3]]
[[Property:uuid|30b06b72-4988-48a0-2dae-fcf7c2e5c838]]

View File

@@ -0,0 +1,15 @@
[[Property:title|Setting the assertion level]]
[[Property:weight|2]]
[[Property:uuid|af3a030c-2970-2e07-7bd4-9e9333a8a8c3]]
To modify the assertion level in a generated binary (executable or library),
* Open the [[Assertion Options|Project Settings]] dialog.
* In the '''Target --> Assertions''' section, set a value of "True" for the assertion types you want to have checked at runtime (among require, ensure, check, loop and class invariant).
* Click '''OK'''.
* You must [[Generating executables|recompile]] your project for the changes to take effect.
{{seealso|<br/>
[[ET: Design by Contract (tm), Assertions and Exceptions|Assertions in Eiffel]] }}

View File

@@ -0,0 +1,37 @@
[[Property:title|Setting the syntax variant]]
[[Property:weight|3]]
[[Property:uuid|e265de3f-ea49-3062-ff0c-f1c296748d3e]]
The specification of the Eiffel programming language has remained largely static over its life, arguably due to its sound initial design. Still, on occasion there will be significant value in evolving Eiffel and adapting it to new challenges. To accommodate this evolution, the Eiffel Software compiler provides a set of compilation variants which offer a balance of syntax support. This starts with compatibility with previously valid syntax, moves through the latest standard, and forward to language features which are currently supported but not yet etched into the standard.
EiffelStudio project settings supports four of these syntax compilation variants:
# '''Obsolete syntax'''
# '''Transitional syntax'''
# '''Standard syntax'''
# '''Provisional syntax'''
Because the language, and by necessity the compilation technology too, may at times be a moving target, it is difficult to give precise definitions of what these variants mean at any given time. Today's valid identifier is tomorrow's keyword and vice versa.
{{Recommended|It's always a good idea to check the [[EiffelStudio release notes]] and [[Differences between standard ECMA-367 and Eiffel Software implementation]] when you install a new version to see if new language elements are supported or existing ones have been made obsolete. <br/><br/>Additionally, you can see more detail on how these variants effect certain words in a particular version by checking the [[Syntax level variant settings by version|syntax level variant settings by version.]]}}
Even so, we can use an example from a particular point in time to show the basic idea. At one time, the word '''indexing''' was a keyword, and the word '''note''' was available for use as a valid identifier. But there came a time that due to a consensus of opinion within the Eiffel standards committee, the role of the keyword <code>indexing</code> was replaced by a new keyword <code>note</code>. This meant two things. First that if you had used the keyword <code>indexing</code> in your classes (and who hadn't?), then at some point you would want to change those occurrences to <code>note</code>. Second, if you had used the word '''note''' as an identifier, then at some point you would have to change your code to use a different identifier it its place.
The Eiffel compiler is savvy enough in some cases to delay the necessity of these changes by considering code in its current context. For example, if a particular keyword is not appropriate in a certain context, then it is only reasonable that when the word is used in that context, it is used as an identifier. But sometimes ambiguities arise that the compiler cannot resolve by analyzing context. It is in these cases that the syntax variants are useful.
So, considering the transition from '''indexing''' to '''note''', here are the effects of the first three variants:
:If '''Obsolete syntax''' is selected, then '''indexing''' is used as a keyword. '''note''' is allowed as an identifier, but with the warning that it will become a keyword in the future.
:If '''Transitional syntax''' is selected, both '''indexing''' and '''note''' are recognized as keywords, and a warning is issued that '''indexing''' is an obsolete keyword and should be replaced with '''note'''.
:If '''Standard syntax''' is selected, then '''indexing''' is free to be used as an identifier, and '''note''' is recognized as a keyword.
When '''Provisional syntax''' is selected, it allows the use of certain language constructs which, although supported by the Eiffel Software compiler, may not yet be stamped into the standard (or at least approved for the standard by a consensus of the standard committee). For example, version 6.6 of EiffelStudio includes support for the [[ET: Instructions#A closer look at the iteration form|iteration form]] of the Eiffel loop construct, which at the time of the release is not yet approved for inclusion in the ISO/ECMA standard ... although it is expected, with reasonable confidence, to become standard in the future. Of course, there is always the risk that, once standardized, the syntax may change some, so selecting '''Provisional syntax''' is an acknowledgment of this risk when non-standard language elements are being used.
To set the syntax variant, open [[General Target Options|Project Settings]]. Then find the general setting '''Syntax''' for the target or group of interest. The value field for '''Syntax''' will give you a choice of the available variants when clicked. Select the appropriate variant, then, click '''OK'''.

View File

@@ -0,0 +1,25 @@
[[Property:title|Tuning a program]]
[[Property:weight|6]]
[[Property:uuid|74d7c168-c9c1-2d43-fb76-4854cf4b69c7]]
The best way to speed up a program is of course to improve the algorithms and data structures you are using. Spotting the functions that slow down the execution and improving can change a lot in a program. [[Profiling|Profiling]] can be used for this.
Try to keep the number of classes and objects in your system as low as possible to ensure maximum efficiency. This should never hinder the design of the system, though.
You can also use the functionality provided by the [[ref:libraries/base/reference/memory_chart|MEMORY]] class to tweak the garbage collector behavior according to your needs. However, be careful with this, since providing erroneous parameters might lead to memory leaks, huge memory consumption, or on the contrary a dramatic slow down of the application. If you are not entirely sure what a parameter is for, avoid changing it. The default values should fit for most standard applications.
On top of that, EiffelStudio provides powerful optimizations, some being done automatically, others being configurable. To obtain a maximum efficiency, it is recommended to [[Generating executables|Finalize]] your program from scratch and without using precompiled libraries.
In the [[Advanced Options|Project Settings dialog advanced section]] , try experimenting with the '''Inlining''' option, and setting the maximum size of features that should be inlined. Only Eiffel features are inlined by this option, to see how to inline the C functions you may be using in your program, please refer to your C compiler documentation.
In the [[Advanced Options|Project Settings dialog advanced section]] , enabling the '''Dead code removal''' will help produce smaller executables.
Removing the '''Execution Trace''' will optimize the executable in size and speed, but in case of crash no information will be available.
All these options are located in the [[Advanced Options|Project Settings]] dialog, in the '''Advanced''' section. They are only effective during finalizations.
{{seealso|<br/>
[[Profiler wizard]] }}

View File

@@ -0,0 +1,27 @@
[[Property:title|Using libraries]]
[[Property:weight|5]]
[[Property:uuid|443320fa-8e5c-fd13-ed20-66e49094f3d5]]
There are two kinds of libraries in Eiffel: precompiled Eiffel libraries and C libraries.
To use an Eiffel precompiled library:
* Open the [[Group Options|Project Settings]] dialog.
* Add a new precompile group to your target.
* You must [[Generating executables|recompile]] your project from scratch for the changes to take effect.
{{note|You can only use one precompiled library at a time in a project. To use more than one, you should precompile all the libraries you want to use together in a single precompiled library. }}
To use a C library:
* Open the [[Externals Options|Project Settings]] dialog.
* Add an include external for the directory where the header files needed to use the library are.
* Add an object external for each object file needed to use the library. These files can be either library files (.lib, .a, etc) or object files (.obj, .o, etc)
* Click '''OK'''.
* You must [[Generating executables|recompile]] your project for the changes to take effect.
{{seealso|<br/>
[[Generating libraries|Creating libraries]] <br/>
[[Adding a cluster|Adding classes and clusters from Eiffel libraries without precompiling the library]] <br/>
[[C externals|Making C calls in Eiffel]] }}

View File

@@ -0,0 +1,19 @@
[[Property:title|Using threads]]
[[Property:weight|7]]
[[Property:uuid|9f53d641-093a-38cb-50bb-568aaadfeb34]]
Eiffel supports multithreaded programs. The [[EiffelThreads|EiffelThread]] Library provides ways to handle threads safely inside an Eiffel program. Make sure you [[Adding a library|add]] it to your project if you want to use threads.
To create a multithreaded program or library:
* Open the [[Advanced Options|Project Settings]] dialog.
* In the '''Advanced''' section, enable '''Multithreaded''' option.
* Click '''OK'''.
* You must [[Generating executables|recompile]] your project for the changes to take effect.
{{warning|Make sure the external and precompiled libraries you use have also been compiled with support for threads. }}
{{seealso|<br/>
[[Generating libraries|Creating libraries]] }}