The command to process a unit is:
proc [unit-term] |
If the argument is not a syntactically valid unit term, or some unit identifier in the term fails to resolve as explained in the Section called SWPATH-Based Unit Identifier, an error is signaled by Specware.
Otherwise Specware parses and elaborates the unit term that results from resolution. Parsing and elaboration carry out the computations to construct the unit; they are Specware's "core" functionality. Parsing and elaboration implement the semantics of the Metaslang language.
In this process, Specware performs further checks on the requirements as stated in the language manual, such as non-ambiguity of names. If any errors are found, they are signaled
If the unit term references other units, Specware recursively resolves the unit identifiers and parses and elaborates their unit terms.
Finally, if all went well, Specware typechecks the unit resulting from the elaboration process, if applicable, and signals any errors detected.
The elaboration of some unit terms may have side effects: code generation; prover invocation. This is only done if no error was encountered. Code can also be generated directly from the Specware Shell using the gen-Language commands. For proving properties in specs, see Chapter 6.
Without argument, the proc command re-processes the last unit term given. It is an error if no unit term was given before.
It is also possible to process a multiple-unit file all at once:
proc multi-unit-identifier |
The command proc may be abbreviated to p.
The values of processed units are kept in the unit cache. To clear the unit cache, as mentioned before, use:
cinit |