Author:admin

Date:2008-09-17T13:53:28.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@3 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
jfiat
2008-09-17 13:53:28 +00:00
parent 4fee9356ea
commit 2ee31ab9c7
763 changed files with 36576 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
[[Property:title|Batch compilation]]
[[Property:weight|2]]
In order to launch a compilation without user intervention you need to specify the `-batch' switch in the '''ec''' command line, otherwise the Eiffel compilation will be blocked. We will present below a typical example of batch processing on both Unix and Windows platforms where we want to compile a project in both frozen and finalized mode, then to launch the C compilations. At the same time we want to save the output of '''ec''' and the C compilations.
===Unix===
In a file called `launch_ec' you can have the following:
<code>
#!/bin/sh
output_file="/output_path/OUTPUT"
cd /your_project_path
#Launch Eiffel compilation
ec -batch -config config.ecf -finalize -c_compile 2> $output_file
#Since only C compilation for finalized code is done
#Launch C compilation for frozen code
cd EIFGENs/target_name/W_code
finish_freezing > $output_file</code>
It will go the directory where your project is located and compile your Eiffel code using the `config.ecf' file located in your project directory and compile automatically the C code. All outputs will be stored in the file `/output_path/OUTPUT'.
'''Note:''' All output from '''ec''' are going to the error output, so do not forget to redirect the error output when you want to see the result.
===Windows===
In a file called `launched_ec.bat' you can have the following:
<code>
rem Launch Eiffel compilation
ec -batch -config config.ecf -finalize -c_compile > c:\output_path\OUTPUT
rem Since only C compilation for finalized code is done
rem Launch C compilation for frozen code
cd EIFGENs\target_name\W_code
finish_freezing > c:\output_path\OUTPUT</code>
It will go the directory where your project is located and compile your Eiffel code using the `config.ecf' file located in your project directory and compile automatically the C code. All outputs will be stored in the file `c:\output_path/OUTPUT'.
{{seealso| '''See Also''' <br/>
[[EiffelStudio: Command line options|Command line compiler options]] }}

View File

@@ -0,0 +1,70 @@
[[Property:title|Class menu]]
[[Property:weight|2]]
The Class command (c or C) in the main menu will only work if the system has been successfully compiled, and will give you information based on the result of the last successful compilation. It produces the following menu:
<code>
(A) Ancestors : show the ancestors of a class.
(B) Attributes : show the attributes of a class.
(C) Clients : show the clients of a class.
(E) Deferred : show the deferred features of a class.
(D) Descendants : show the descendants of a class.
(V) Edit : edit the text of a class.
(P) Exported : show the exported features of a class.
(X) Externals : show the external features of a class.
(F) Flat : show the flat form of a class.
(I) Flatshort : show the flat-short form of a class.
(O) Once : show the once & constant features of a class.
(R) Routines : show the routines of a class.
(S) Short : show the short form of a class.
(U) Suppliers : show the suppliers of a class.
(T) Text : show the text of a class.
(H) Help : show list of commands.
(M) Main : go back to main menu.
(Q) Quit : terminate session.
(Y) Yank : yank (save) output of last command to a file.
</code>
Each command will prompt you for the name of a class and a filter to use; you can also include the class name and the filter name after the command, separated by a space, as in:
<code>Command => a linked_list ascii</code>
to obtain the ancestors of the <eiffel>LINKED_LIST</eiffel> class:
<code>
-- Automatic generation produced by ISE Eiffel --
LINKED_LIST [G]
DYNAMIC_LIST [G]
LIST [G]
CHAIN [G]
CURSOR_STRUCTURE [G]
ACTIVE [G]
BAG [G]
COLLECTION [G]
CONTAINER [G]
ANY
INDEXABLE [G, H -> INTEGER]
TABLE [G, H]
BAG [G]...
SEQUENCE [G]
ACTIVE [G]...
BILINEAR [G]
LINEAR [G]
TRAVERSABLE [G]
CONTAINER [G]...
LINEAR [G]...
FINITE [G]
BOX [G]
CONTAINER [G]...
SEQUENCE [G]...
DYNAMIC_CHAIN [G]
CHAIN [G]...
UNBOUNDED [G]
FINITE [G]...
DYNAMIC_CHAIN [G]...
-- Generated by ISE Eiffel --
-- For more details: http://www.eiffel.com --
Command =></code>

View File

@@ -0,0 +1,28 @@
[[Property:title|Compile (and run) menu]]
[[Property:weight|1]]
The Compile command (i or I) in the main menu yields the following item menu:
<code>
(A) Arguments : set the arguments.
(C) F-compile : (re)compile the C code generated by finalize.
(Z) Finalize : finalize the system (discard assertions by default).
(F) Freeze : freeze the system.
(L) Melt : melt the system.
(K) Quick melt : quick melt the system.
(R) Run : execute the system.
(W) W-compile : (re)compile the C code generated by freeze.
(H) Help : show list of commands.
(M) Main : go back to main menu.
(Q) Quit : terminate session.
(Y) Yank : yank (save) output of last command to a file.
</code>
The most common compiling option is L (Melt): recompile the system, melting recent changes. The other compilation possibilities are F (Freeze) and Z (Finalize). After a Freeze you will need to C-compile the result using the W (W-compile) command; similarly, you can C-compile the result of a Finalize using C (F-compile).
{{warning| '''Caution''': You cannot select a different project from within ec loop; also, you cannot select a different configuration file from within the command, although you may of course change the contents of the configuration file (for example by using an editor in an other window). }}
The R option (Run) runs the application. You will be prompted for the arguments if the application needs any.

View File

@@ -0,0 +1,20 @@
[[Property:title|Documentation menu]]
[[Property:weight|7]]
The Documentation Menu enables you to generate documentation about the classes of your system:
<code>
(I) Documentation (Flat/Short): Generate flat/short form of all classes in system.
(S) Documentation (Short): Generate short form of all classes in system.
(F) Documentation (Flat): Generate flat form of all classes in system.
(T) Documentation (Text): Generate text form of all classes in system.
(H) Help : show list of commands.
(M) Main : go back to main menu.
(Q) Quit : terminate session.
(Y) Yank : yank (save) output of last command to a file.
</code>
The four documentation commands will trigger the creation of documentation files corresponding to requested information using the specified filter. These files will then be located in the Documentation subdirectory of your project directory.

View File

@@ -0,0 +1,44 @@
[[Property:title|Feature menu]]
[[Property:weight|3]]
The Feature Menu enables you to find properties of a feature:
<code>
(A) Ancestors : show the ancestor versions of a feature.
(C) Callers : show the callers of a feature.
(D) Descendants : show the descendant versions of a feature.
(F) Flat : show the flat form of a feature.
(O) Homonyms : shown the homonyms of a feature.
(I) Implementers : show the classes implementing a feature.
(T) Text : show the text of a feature.
(H) Help : show list of commands.
(M) Main : go back to main menu.
(Q) Quit : terminate session.
(Y) Yank : yank (save) output of last command to a file.
</code>
Each command will prompt you for the name of a class, the name of a feature in that class and a filter name; you can specify these names (or just the class name) after the command.
{|
|-
| <center>'''Command'''</center>
| <center>'''Description'''</center>
|-
| <code>Ancestors</code>
| All the versions of a feature that appeared in ancestors.
|-
| <!Unavailable:vertical_alignment!><code>Callers</code>
| The list of classes which contains calls to the feature. Modifiers:
* <code>All senders</code> - include all callers rather than only those in the specified class
* <code>Only assigners</code> - restrict callers to those that use given feature only as a target of an assignment instruction
* <code>Only creators</code> - restrict callers to those that use given feature only as a target of a creation instruction
|-
| <code>Descendants</code>
| All the versionsof a feature that appeared in descendants.
|-
| <code>Implementers</code>
| The list of classes where the feature is redeclared.
|}

View File

@@ -0,0 +1,13 @@
[[Property:title|Command line interactive mode]]
[[Property:weight|3]]
* [[Interactive command line: Introduction|Introduction]]
* [[Compile (and run) menu|The Compile (and Run) menu]]
* [[Class menu|The Class menu]]
* [[Feature menu|The Feature menu]]
* [[System menu|The System menu]]
* [[Profile menu|The Profile menu]]
* [[Documentation menu|The Documentation menu]]

View File

@@ -0,0 +1,155 @@
[[Property:title|Profile menu]]
[[Property:weight|6]]
An execution of an instrumented system will generate a file that contains profiling information. This file (named profinfo) is located in the same directory as your compiled system. You must process it through a profile converter to produce the Execution Profile.
The profile menu will enable you to produce the Execution profile and to extract information from it.
The menu (obtained by selecting (P) Profile in the main menu) looks like this:
<code>
(S) Switches : show the output switches
#Call-E Name-E Total-D
Self-D Desc-D %Time-D.
(U) Query : manipulate subqueries.
(I) Input : specify input file (filename or last_output)
[*.pfi].
(L) Language : specify language (eiffel, c, cycles)
[eiffel].
(R) Run : run the query.
(G) Generate : generate profile information for latest run.
(E) Defaults : reset all values to their defaults.
(H) Help : show list of commands.
(M) Main : go back to main menu.
(Q) Quit : terminate session.
(Y) Yank : yank (save) output of last command to a file.</code>
==Switches submenu==
The (S) Switches submenu enables you to set global options. It leads you to the following set of choices:
<code>
(N) Calls : disable output of number of calls to a feature [enabled].
(F) Feature name : disable output of feature names [enabled].
(T) Total : enable output of time spent in both the function and its descendants [disabled].
(S) Self : enable output of time spent in a function itself [disabled].
(D) Descendants : enable output of time spent in descendants of a function [disabled].
(P) Percentage : enable output of percentage of time spent in a feature [disabled].
(H) Help : show list of commands.
(M) Main : go back to main menu.
(U) Parent menu : go back to parent menu.
(Q) Quit : terminate session.
(Y) Yank : yank (save) output of last command to a file.</code>
Each one of these commands switches on or off the corresponding column output. The default is set on for the first two, off for the others. To enable or disable a column, type the name with a toggle effect.
==Query submenu==
The (U) Query submenu enables you to define a set of queries. The result will be a Total Query; by default it is the boolean and all the queries you have entered individually, but you may deactivate some of these and choose other boolean operators.
<code>
(A) Add : add a sub query.
(I) Inactivate : inactivate sub query.
(R) Reactivate : reactivate sub query.
(C) Operator : change the boolean operator.
(S) Show : show the list of queries.
(H) Help : show list of commands.
(M) Main : go back to main menu.
(U) Parent menu : go back to parent menu.
(Q) Quit : terminate session.
(Y) Yank : yank (save) output of last command to a file.</code>
To get useful information, you should add the appropriate queries through (A) Add. Each individual query has the following form: attribute operator value, where attribute is one of:
* feature name
* calls
* total
* self
* descendants
* percentage
operator is one of: <, >, <=, >=, =, /=, in
and value is one of:
* An integer (for calls)
* A string (for feature name). The string may contain wild card characters: ?, standing for arbitrary characters, and *,standing for arbitrary substrings.
* A real value (for other attributes)
* An interval, of the form a-b for two values a and b.
* max
* min
* avg
The (S) Show command will display the current queries, each with an associated number. The output includes the total query, explained next.
To inactivate a query, use (I) Inactivate. You will be prompted for a query index, which you may retrieve from (S) Show. This is useful if you make a change about a query, or want to set it aside for future use.
To reactivate a query, use (R) Reactivate. Again you will have to provide a query index.
The Total Query resulting from a succession of (A) Add commands, possibly with some (I) Inactivate and (R) Reactivate commands, is a boolean query resulting by default from adding all the currently active queries. For example after the following set of commands(note that commands output help lines, which have been skipped here):
<code>
Command => a
--> Subquery: featurename = put*
Command => a
--> Subquery: calls = 3
-- Here we change our mind and deactivate the second query
-- to replace it by calls = 3:
Command => s
[1] featurename = put* is active
[2] calls = 3 is active
The total active query:
featurename = put* and
calls >
Command => i
--> Subquery index: 2
Command =&gt; a
--> Subquery: calls > 5</code>
<br/>
The (S) Show command will show the following result:
<code>
Command => s
All subqueries:
[1] featurename = put* is active
[2] calls = 3 is inactive
[3] calls > 5 is active
The total active query:
featurename = put* and
calls > 5</code>
To change the boolean operator to 'or' rather than 'and', use the (C) Operator command. It will prompt you for the index of the operator and the new value:
<code>
Command => c
--> Operator index followed by operator ('and' or 'or'): 1 or
Command => s
All subqueries:
[1] featurename = put* is active
[2] calls = 3 is inactive
[3] calls > 5 is active
The total active query:
featurename = put* or
calls > 5</code>
==Input command==
The (I) Input command serves to load Execution Profiles. It is initially set to *.pfi meaning that it will load all files with extension pfi. By calling the command repeatedly with new arguments, you are able to load more Execution Profiles. If you use the command without any argument, and the set of input files contained just one file, then the queries will use the last generated output. This avoids explicitly loading a file.
==Language command==
The (L) Language command enables you to specify the languages to which profiling should be applied. You can specify Eiffel only, C only, or both. If you specify only one language, the query results will not contain any information about routines written in the other language.
The default is Eiffel only. To switch to both Eiffel and C, use Command => L eiffel and c
To return to just Eiffel, simply type L.
==Run Command==
To run the current total query, use (R) Run.
==Generate command==
To run the profile converter under the command-line interface, use the (G) Generate command. This will generate an Execution Profile, stored in a file with the extension .pfi.
When running the Generate command with no arguments, you will be prompted for the following information:
* Name of file to be converted (default: profinfo).
* Compilation mode: workbench or finalized (default: workbench).
* Name of profiler tool (default: eiffel).
You can also type in the arguments directly without waiting to be prompted, as in command => g profinfo finalize eiffel <br/>
{{seealso| '''See Also''' <br/>
[[Profiler Wizard|Profiler wizard]] }}

View File

@@ -0,0 +1,23 @@
[[Property:title|System menu]]
[[Property:weight|4]]
The System Menu gives general information about the system:
<code>
(A) Config : show the config file.
(L) Classes : show the classes in alphabetic order.
(S) Cluster hierarchy: display the cluster hierarchy of the system.
(C) Clusters : show the system's classes, cluster by cluster.
(V) Edit : edit the config file.
(I) Indexing : show indexing clauses of classes.
(O) Modifications: show classes modified since last compilation.
(T) Statistics : show system statistics.
(H) Help : show list of commands.
(M) Main : go back to main menu.
(Q) Quit : terminate session.
(Y) Yank : yank (save) output of last command to a file.</code>
The A (Config) command shows the configuration file; the E (Edit) command enables you to edit the configuration file; the C (Clusters) command is useful to display the entire list of classes, cluster by cluster.

View File

@@ -0,0 +1,186 @@
[[Property:title|EiffelStudio: Command line options]]
[[Property:link_title|Using command line options]]
[[Property:weight|1]]
You may start ec through a command of the following form:
<code>'''ec''' ''option'' ... [''class_name''][''feature_name'']</code>
''class_name'', if present, must be the name of a class of the system to which '''ec''' is applied. This system is identified by its configuration file; by default this is the file called Ace.ecf in the working directory, but you can select any other one through the -config ''file_name'' option. Similarly, the default project directory is the working directory, but you can select another through the -project_path ''directory_name'' option.
''feature_name'', if present, must be the final name of a feature of the class called ''class_name''. <br/>
The table below lists the available options, the arguments they require, and their effect:
{|
|-
| '''OPTION'''
| '''ARGUMENTS'''
| '''EFFECT'''
|-
| ''Operation options''
|-
| -melt
|
| Normal compilation, except on an incremental recompilation where added/removed classes (of classes not in system) will be detected.
|-
| -freeze
|
| Freeze system.
|-
| -finalize
|
| Produce a finalized system. See below.
|-
| -precompile
|
| Precompile a system, treating it as a library.
|-
| ''Browsing operations''
|-
| -ancestors
| class_name
| Print the ancestors of the class.
|-
| -aversions
| class_name, feature_name
| Print the ancestor versions of the feature.
|-
| -callers
| class_name, feature_name
| Print all the routines that call the feature.
|-
| -clients
| class_name
| Print the clients of the class
|-
| -descendants
| class_name
| Print the descendants of the class.
|-
| -dversions
| class_name, feature_name
| Print all the versions of the feature in the descendant versions of the class.
|-
| -flat
| class_name
| Print the flat view of the class.
|-
| -flatshort
| class_name
| Print the Flat Contract view (previously called flat-short form) of the class.
|-
| -implementers
| class_name, feature_name
| Print all the classes that declare or redeclare the feature.
|-
| -short
| class_name
| Print the Contract view (previously called short form) of the class.
|-
| -suppliers
| class_name, feature_name
| Print all the suppliers of the class.
|-
| ''Other options''
|-
| -batch
|
| Launch the compilation without user request.
|-
| -clean
|
| Delete project if already compiled and compile project as if it was the first time.
|-
| -config
| file_name
| Use the file as configuration.
|-
| -c_compile
|
| Launch C compilation, if needed, after Eiffel compilation.
|-
| -file
| file_name
| Save the output to the file.
|-
| -filter
| filter_file_name
| Print text as processed by the filter.
|-
| -help
|
| Print the help.
|-
| -keep
|
| Keep assertions in final mode. Useful with -finalize only.
|-
| -loop
|
| Enter interactive mode. See below.
|-
| -metadata_cache_path
| directory_name
| Specify location of Metadata Cache used for .NET compilation. This overrides any settings from your configuration file.
|-
| -no_library
|
| When converting an old configuration file format, do not convert clusters into libraries.
|-
| -project_path
| directory_name
| Use this directory as compilation directory. (Default: current directory.)
|-
| -stop
|
| Stop on errors. (Default: no.)
|-
| -use_settings
|
| Use the project global settings to retrieve the project location for the last compilation of this project.
|-
| -version
|
| Print compiler version number.
|}
'''Note''': In the third column, to print means to produce the requested information on the default output of the '''ec''' command. <br/>
Some options can have modifiers that can affect their results. The modifiers are listed in the table below:
{|
|-
| <center>'''Option'''</center>
| <center>'''Modifier'''</center>
| <center>'''Effect'''</center>
|-
| -callers
|-
|
| -show_all
| Include all callers rather than only those in the specified class.
|-
|
| -assigners
| Restrict callers to those that use given feature only as a target of an assignment instruction.
|-
|
| -creators
| Restrict callers to those that use given feature only as a target of a creation instruction.
|}
==Finalization==
To produce a finalized system, you may use the command '''ec''' -finalize. The effect is the same as when you press the Finalize button in the graphical environment, except for two differences:
# All assertion checking will by default be turned off in the resulting finalized system. In the graphical environment, an interactive panel asks you whether you want to keep or discard assertions. Command '''ec''', however, was designed to be callable automatically from shell scripts or programs, and for that reason never asks for interactive user input (except under the loop option). To retain the assertion checking options specified in the configuration file, use the option -keep in connection with -finalize (the order of the two options is arbitrary).
# At the end of the Eiffel part of the compilation you are presented with the message:
<code>System recompiled.
You must now run "finish_freezing" in:
''your_project_path''|EIFGENs|''target_name''|F_code</code>
with | replaced by \ if your platform is Windows, / if it is Unix. To execute the C compilation and linking part of the finalization, change directory to ''your_project_path''|EIFGENs|''target_name''|F_code as indicated and execute '''finish_freezing'''.
{{seealso| '''See Also''' <br/>
[[Batch compilation|Batch compilation]] }}

View File

@@ -0,0 +1,10 @@
[[Property:title|Command line]]
[[Property:weight|-13]]
* [[Command line: Introduction|Introduction]]
* [[EiffelStudio: Command line options|Command line options]]
* [[Batch compilation|Batch compilation]]
* [[Command line interactive mode|Command line interactive mode]]