This module defines the high-level interface for CiaoPP, which makes it easy to perform some analysis and transformation tasks, such as checking program assertions (i.e., types, modes, determinacy, non-failure, cost, etc.), and performing optimizations such as specialization and parallelization. The results can be observed both as CiaoPP messages and as a transformed annotated program.
In the emacs environment these actions can be performed by clicking on the corresponding button in the toolbar or in the CiaoPP menus. The high-level interface allows calling these actions as predicates from a CiaoPP top-level shell:
The actions above can be controlled by a set of preprocessor flags. Note that, depending on some of these flags, processing can be of one module or also all the related modules. The default values of the CiaoPP flags can be changed with the following predicates:
The emacs environment offers a graphical version of these menus.
These 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 the menu changing the Menu Level flag to naive or expert. The following predicates provide handy shortcuts to perform customization and preprocessing actions:
Usage:auto_analyze(F)
Analyze the module F with the current analysis options (use customize(analyze) to change these options).
Usage:auto_optimize(F)
Optimize file F with the current options (use customize(optimize) to change these options).
Usage:auto_check_assert(F)
Check the assertions in file F, with the current options, giving errors if assertions are violated (use customize(check_assertions) to change these options).
Usage:
Enter an interactive menu to select the preprocessing action (analysis / assertion checking / transformation / optimization / ...) to be performed by default and the different options (i.e., setting the preprocessor flags).
Usage:customize(X)
Customize is used for changing the values of the flags used during preprocessing. 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).
Usage:
Select options using customize/0, and then call auto_analyze/1, auto_optimize/1, or auto_check_assert/1 (as determined by the selected options) on the default file. If no default file is defined, prompt for the name of to be processed, which becomes from now on the default file.
Usage:customize_and_preprocess(File)
Select options using customize/0, and then call auto_analyze/1, auto_optimize/1, or auto_check_assert/1 (as determined by the selected options) with File as argument. File is from now on the default file.
Usage:customize_but_dont_save(Option)
Same as customize(Option), but menu flags will not be modified.
Usage:
Performs the last actions done by customize_and_preprocess/1, on the last file previously analyzed, checked, or optimized
Usage:save_menu_config(Name)
Save the current flags configuration under the Name key.
Usage:remove_menu_config(Name)
Remove the configuration stored with the Name key (the same provided in save_menu_config/1).
Usage:restore_menu_config(Name)
Restore the configuration saved with the Name key (the same provided in save_menu_config/1).
Usage:
Show all stored configurations.
Usage:show_menu_config(C)
Show specific configuration values pointed by C key (the same provided in save_menu_config/1).