This module defines a simplified user-level interface for CiaoPP. It complements the more expert-oriented interface defined in The CiaoPP low-level programming interface. This is also the interface called by the shortcuts available in menus and toolbars in the emacs mode.
The idea of this interface is to make it easy to perform some fundamental, prepackaged tasks, such as checking assertions in programs (i.e., types, modes, determinacy, non-failure, cost, etc.), performing several types of analysis of the program, and performing optimizations such as specialization and parallelization. The results can be observed as new or transformed assertions and predicates in a new version of the program.
In order to use CiaoPP, the user must provide two kinds of information: first, a number of preprocessing options must be set if necessary in order to configure the system; and then, the action that has to be done must be selected (analysis, assertion checking, optimization). Those options are controlled by a set of so-called flags. By default, all flags are initialized to the appropriate values in most of the cases. If the value of any of the flags has to be changed by the user, the flag must be changed before performing the corresponding action. There are two ways to change the flag values. The usual way consists in calling customize_and_preprocess/1 from the CiaoPP top-level shell with the file name as argument. In the emacs environment this can be done easily by clicking on the options button in the toolbar or in the CiaoPP menus. It will prompt (with help) for the value of the different options and flags.
The second way to change flag values consist in executing in the CiaoPP top-level shell a number of calls to set_menu_flag/3 with the right values, and then calling one of the following predicates:
In the emacs environment these actions can be performed by clicking on the corresponding button in the toolbar or in the CiaoPP menus.
The customization menus can be configured to show more or less detailed options, depending on the level of expertise of the user. This can be configured in menu changing the Menu Level flag (naive or expert).
Analyze the module F with the current analysis options (use customize(analyze) to change these options).
Optimize file F with the current options (use customize(optimize) to change these options).
Check the assertions in file F, with the current options, giving errors if assertions are violated (use customize(check_assertions) to change these options).
Same as auto_analyze/1 but the output file will be OFile.
Same as auto_optimize/1 but the output file will be OFile.
Same as auto_check_assrt/1 but the output file will be OFile.
Enter an interactive menu to select the preprocessing action (analysis / assertion checking / transformation / optimization / ...) to be performed by deafult and the different options (i.e., setting the preprocessor flags).
Customize is used for changing the values of the flags used during preprocesing. These flags are grouped into three main classes of actions: analyzing, checking assertions, or optimizing programs. X should be instantiated to one of: analyze, check_assertions, optimize, or all (which allows choosing among the previous three).
Same as customize(Option), but menu flags will not be modified.
Performs the last actions done by customize_and_preprocess/1, on the last file previously analyzed, checked, or optimized
Deletes any auxiliary file regarding File or its related files (e.g., imported modules in a modular program).
Customize is used for change the values of a set of flags in case of java analysis. So far, the value of X is only 'all'.
It is like doing customize_java(all), and then calling with File as argument.
Customize is used for changing the values of a set of flags for xc analysis. So far, the value of X is only 'all'.
It is like doing customize_xc(all), and then calling with File as argument.
Performs the last actions done by customize_and_preprocess_xc/1, on the last file previously processed.
Save the current flags configuration under the Name key.
Show all stored configurations.