If you need to use ec to execute a number of successive operations on a system, you do not need to restart the command each time; instead you may use the -loop option, which will interactively prompt you for successive operations. If you launch ec with this option, you will get the interactive version's Main Menu:
==== ISE EiffelStudio - Interactive Batch Version (v5.5.0926 Enterprise Edition) === (C) Class : class formats and information. (I) Compile : compile or run the system. (F) Feature : feature formats and information. (S) System : Config and cluster details. (P) Profile : information about a profiled run. (D) Documentation: create documents from the system. (H) Help : show list of commands. (Q) Quit : terminate session. (Y) Yank : yank (save) output of last command to a file. Command =>
By typing one of the letters shown in the Main Menu's first group, you can go to one of the Item Menus: Class, Compile, Feature, System, Profile, and Documentation. Compile enables you to compile a system and execute the result; the next three enable you to obtain information about your project. Profile will enable you to exploit profiling information. Finally, Documentation will enable you to generate HTML documentation about your project.
The Compile command (i or I) in the main menu yields the following item menu:
(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.
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).
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.
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:
(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.
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:
Command => a linked_list asciiLINKED_LIST class:
-- 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: <a href="http://www.eiffel.com" class="external free" title="http://www.eiffel.com">http://www.eiffel.com</a> -- Command =>
The Feature Menu enables you to find properties of a feature:
(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.
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.
| | |
Ancestors
| All the versions of a feature that appeared in ancestors. |
Callers
| The list of classes which contains calls to the feature. Modifiers:
|
Descendants
| All the versions of a feature that appeared in descendants. |
Implementers
| The list of classes where the feature is redeclared. |
The System Menu gives general information about the system:
(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.
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.
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:
(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.Contents
|
The (S) Switches submenu enables you to set global options. It leads you to the following set of choices:
(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.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.
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.
(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.
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:
operator is one of:
and value is one of:
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):
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 => a --> Subquery: calls > 5
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
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:
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 > 5The (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.
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 .
To run the current total query, use (R) Run.
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:
You can also type in the arguments directly without waiting to be prompted, as in
Command => g profinfo finalize eiffel
See Also:
Profiler wizard
The Documentation Menu enables you to generate documentation about the classes of your system:
(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.
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.