Description
EXPRESS information models contain rules and constraints that that applications can use to test data sets for correctness. This prevents the propagation of incorrect data from one application to another.
The STEP Conformance Checker can evaluate EXPRESS rules and constraints to verify databases defined by the STEP application protocols. It can examine every object in the database and determine whether it complies with the rules and constraints defined in the application protocol EXPRESS model.
Command Line
apconform [options] <data-file>
If no options are selected, the tool will perform all constraint checks. If options are provided, the tool will only perform the requested checks. The options accepted by apconform are:
- -help
- Print this list of options and exit.
- -all
- Verify everything. This is the default behavior.
- -bounds
- Check aggregate bounds.
- -unique
- Check uniqueness rules.
- -inverse
- Check inverse attributes.
- -atttypes
- Check attribute types.
- -aggruni
- Check aggregate uniqueness constraints.
- -arrnotopt
- Check for mandatory array elements.
- -strwidth
- Check string widths.
- -binwidth
- Check binary width.
- -quiet
- Report only constraints that fail. Without this option, the tool also reports constraints that are unknown.
- -realprec
- Check real number precision.
- -refdom
- Check attribute reference domain.
- -rules
- Evaluate all of the global rules.
- -rule <name>
- Evaluate the global rule called <name>.
- -required
- Check required attributes.
- -syntax
- Only check the syntax of the exchange file. Syntax checking is always done, but specifying this option turns off any other checks.
- -type <name>
- Check only entities of type <name>.
- -verbose
- Report the status of all constraints whether passed, failed or unknown. Without this option, the tool does not print messages for constraints that pass.
- -where
- Check entity where rules.
Windows Control Panel
The STEP Checker Windows control panel is shown in the figure below. Run this by selecting General AP Checker from the Start Menu. The following sections describe the fields and setting on this control panel and show how to perform various tasks with the checker.
How to Check STEP Files
Since this checker is based on an EXPRESS interpreter, the checking process may take some time, depending on file size and constraint complexity. If your data files are based on AP203, AP209, or AP214 the specialized checkers instead will do the job quicker and also check extra constraints, like STEPnet vendor agreements and recommended practices. See AP203, AP209 and AP214 Conformance Checkers for details.
Otherwise, the General STEP Conformance Checker is the most appropriate tool. The conformance checker needs the data dictionary files (<schema>.rose) and precompiled parse data files (<schema>_EXPX.rose) for your EXPRESS schema.
If these files are not present in the ST-Runtime support files, you must generate them. Use the EXPRESS compiler control panel or call the compiler on the command line:
% expfront -rose [options] <express_file_name>
See Generate Data Dictionary and Precompiled Schemas for more information. For best results, copy the dictionary and parse data files to the ST-Runtime schemas directory so that they are available to all applications. Now you can invoke the testing tool:
Checking File Syntax
The first time you process a file from a new exchange partner, you should start by just verifying the file syntax. This quickly identifies larger issues such as missing schemas or malformed records without trying to do more detailed analysis.
At the top of the General AP Checker control panel shown above is a text field for the STEP files that you would like to check. You can open the file dialog using Ctrl+O or the [...] button to the right. You can also drag and drop files from the Windows Explorer.
In the Behavior area, select the Syntax only check option in the and press the Check button to start. From the command line, call the checker with the -syntax option:
% apconform -syntax datafile.stp
Once you have made sure that the Part 21exchange file is free of any basic formatting errors, you can perform more detailed analysis of the contents.
Checking Data Sets in Detail
Once you are satisfied that your data is syntactically correct, you can start checking the EXPRESS rules and constraints. You can check everything at once, which may take some time, or you can select individual constraints to check.
From the command line, call the checker as shown below. If you specify some options, the tool will perform just those checks, otherwise it will perform all possible checks.
% apconform [options] datafile.stp
On the Windows control panel, select Syntax + options box in the Check menu, then select any combination of constraint checks in the area below.
The checker prints the status of constraints as they are checked. You can control this with the Report options. The Everything option prints the status of each constraint as it is checked. The Failed and unknown and Failed only options print messages only if the constraint evaluates to the desired value.
If you are testing the output from one of your own applications, you will probably be concerned with specific entity types or constraints. You can fine tune the constraints and types that the tool will examine with the following options.
The Required attributes option checks whether each attribute either has a value or has been declared optional by the schema. On the command line, this is controlled by the -required option.
The Unique rules option evaluates the local "unique" rules specified as part of entity definitions. On the command line, this is controlled by the -unique option.
The Where rules option evaluates the local "where" rules specified as part of entity definitions. On the command line, this is controlled by the -where option.
The Global rules option evaluates all of the global rules specified in the EXPRESS. On the command line, this is controlled by the -rules option. You can also use the Only this rule field to select an individual rule for checking. On the command line, you can specify the -rule option with a rule name.
The Aggregate bounds option checks the size of aggregates against the upper and lower limits specified in the EXPRESS. On the command line, this is controlled by the -bounds option.
The Aggregate uniqueness option checks that sets and any other aggregates declared to have unique elements do not contain any duplicates. On the command line, this is controlled by the -aggruni option.
The Array required option checks whether all arrays elements either have values or have been declared optional by the schema. On the command line, this is controlled by the -arrnotopt option.
The Inverse attributes option evaluates inverse attributes. On the command line, these are controlled by the -inverse options.
You can use the Only this type field to select an individual entity type for checking. On the command line, you can specify the -type option with a type name.
The String length option checks the values of string attributes against any length constraints specified in the EXPRESS. On the command line, this is controlled by the -strwidth option.
The Binary width option checks the values of binary attributes against any length constraints specified in the EXPRESS. On the command line, this is controlled by the -binwidth option.
The Number precision option checks the values of REAL attributes against any precision constraints specified in the EXPRESS. On the command line, this is controlled by the -realprec option.
The Attribute reference domain and Attribute types options rerun some syntax checks that are also performed when the data set is first read into the tool. On the command line, these are controlled by the -refdom and the -atttypes options.
The Show AND/ORs option prints a report listing the complex type found in the file. This can be useful when constructing a workingset file to generate C++ classes for application programming. On the command line, this is controlled by the -andors option.