The following command summaries describe the integration of the SPARK tools in the GNATbench/Eclipse environment. These summaries are not intended to replace the SPARK documentation. For details of using the tools, especially the various switches supported, see the SPARK tool documentation.
Note that the SPARK menu commands are not visible if the SPARK executables themselves are not on your path, or if the SPARK feature has been manually disabled within Eclipse. See the SPARK tools' documentation for installing and setting up the SPARK tools themselves.
The SPARK commands are provided under the SPARK entry of the contextual menus of editors and of the GNAT Project Explorer. For example, the following figure shows the SPARK sub-menu in the contextual menu entry for the GNAT Project Explorer.
Note that the sub-menu entries are enabled or disabled depending on the context, i.e., whether a specific file or the entire project is involved. For example, the following figure shows the SPARK entries enabled for a specific file in an editor's contextual menu.
This command is enabled if a SPARK project or its project file is
selected. It invokes the SPARKmake tool, using the current file as the
'root'. The tool scans the current directory tree (unless specified
otherwise under Project Properties) and attempts to produce an index
file and metafile for the analysis of the current package and all
packages (including bodies) that it depends upon. Project Properties
settings can be used to modify the switches. If the SPARK switch
-ou has not been set, SPARKmake will create the files in
the project's output directory. Note that this command can also be
invoked by right-clicking anywhere in a SPARK project file in the
editing window and selecting SPARK->SPARKmake. See the
SPARKMake User Manual for more details.
This command is enabled if a metafile, a SPARK
project, or its project file is selected. It will invoke the Examiner on
the metafile (which is equivalent to supplying the metafile on the
command line). Note that this command can also be invoked by
right-clicking anywhere in a metafile or in a project file in the
editing window and selecting SPARK->Examine Metafile. An
error message will be displayed if no metafile can be found or if the
selected project file is not associated with a project.
This command runs the SPARK Examiner to analyze the file currently
selected in the editing window. The results of the analysis are
displayed in the SPARK Output window. If the Examiner reports any errors
or warnings these will appear in the Markers/Problems windows. Clicking
on an error or warning in the Problems window will cause the editor
to jump to the source code line associated with that error or
warning. Note that this command can also be invoked by right-clicking
anywhere in a SPARK source file in the editing window and selecting
SPARK->Examine File or via the CTRL+SHIFT+F8
keys.
This command is enabled if a SPARK project or corresponding project file is selected. It will search under the project directory for all VCG files that require simplification and invoke the SPARK Simplifier on each. This is done using the SPARKSimp tool, with any switches supplied under the SPARKSimp tab in Project Properties. Output is displayed in the SPARKSimp Output window.
This command is enabled if a .VCG file is selected. It will invoke the SPARK Simplifier on the VCG file, using any switches set under Project Properties. Output is sent to the Simplifier Output window.
This command is enabled if a SPARK project or its project file is
selected. The command invokes POGS, the Proof ObliGation Summariser.
POGs will scan for proof files and report the current proof status of
your project. The summary output file is displayed in the editing
window. From this summary file, hyperlinks are provided to the related
VCG or SIV file. A CTRL+Click on a VC in the summary file will redirect
to the concerned VC. A CTRL+Click on a procedure will redirect to the
procedure and a CTRL+Click on the file name will redirect to the
concerned VCG or SIV file. By default POGS will be invoked at the common
folder of all the source folders. This behavior can be changed by
modifying the switches under the POGS tab in project properties. The
summary file name and location can be specified via the POGS switches in
the project properties. If not specified, the file will be in the
project's output folder and will be named using the project name and the
.sum extension. POGS can also be invoked via the
CTRL+SHIFT+F11 key. Please note that the switches
-d and -o, intended to respectively specify
the target directory and the output file path/name, are only available
since the 7.6.3 version of POGS.
This command is enabled if a SPARK source file is selected. It will
reformat the file in-place with SPARKFormat, using any switches set
under Project Properties. Note that this command can also be invoked by
right-clicking anywhere in a SPARK source file in the editing window and
selecting SPARK->SPARKFormat File. The command can also be
invoked via the CTRL+SHIFT+F12 key.