home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftptest.leeds.ac.uk
/
2015.02.ftptest.leeds.ac.uk.tar
/
ftptest.leeds.ac.uk
/
bionet
/
CAE-GROUP
/
SCL-WIN3x
/
SCLTEST.EXE
/
README
< prev
next >
Wrap
Text File
|
1994-12-13
|
13KB
|
301 lines
STEP Class Library Test/Example Suite
Last Update: 9/1/94
This group of programs is designed to make nominal tests of the STEP
Class Library (SCL). To use these programs, you will need to build the
STEP Class libraries for the schema called 'example' ( Note: from here on,
all references to 'example' implies the name of a schema called example
( all lower case ) ); this can be done with the mkProbe script, and the
process is detailed in the top-level README.dp2 that comes with the Data
Probe (see below).
These programs are also intended as a set of examples for programming
with the SCL -- instantiating entities, manipulating data, using the
dictionary classes, etc. This file describes what these programs are and
how to get them running.
Please read this entire README before continuing.
Other Software
~~~~~~~~~~~~~~
You will need some other software to use this package to it's
fullest. First, you will need the Data Probe package (or, at the very
least, the utilities to compile EXPRESS to C++), which will allow you
to construct the STEP Class Libraries from EXPRESS schemas. Secondly,
to make full use of the scl2html program, you will need an HTML
browser such as NCSA Mosaic. Oh, and most importantly of all, you
need a C++ compiler that can build C++ 2.0 source.
These programs can be found at the following locations:
Data Probe: ftp://ftp.cme.nist.gov/pub/step/npttools/probe2.trz
NCSA Moasaic: ftp://ftp.ncsa.uiuc.edu/Mosaic (in this directory are
sources and binaries for many platforms)
This software has been tested with SPARCworks and GNU (2.5.8+)
compilers... the GNU compiler can be found at
prep.ai.mit.edu:/pub/gnu.
The Programs
~~~~~~~~~~~~
tstatic
A simple instantiation test. This creates some static
instances of entities from the 'example' schema, puts some data in them,
and prints them out. This also uses a simple iterator class to pass
over an array of pointers to STEPentities. The entities are printed
in STEP Exchange file format.
treg
This test uses the dictionary classes of the SCL, the
registry, to instantiate an object of each entity type, and give them
some data by analyzing the attribute types via the registry (and not
knowing what objects we have). Also, all instances are kept track of
with an instance manager, which, among other things, allows us to keep
an organized STEP file of the data without explicitly maintaining it.
The resulting objects are output in STEP Exchange File format both to
the screen and to an optional file.
NOTE:
The output file that treg produces will not necessarily be a valid
STEP Exchange file. While treg happily produces values for most entity
attributes, it will leave attributes of type SELECT, AGGREGATE,
or ENTITY blank. Since in many cases, these attributes will not be
optional, a subsequent STEPread of the file will fail to load any of
the data. There are ways of putting data values for these attributes,
I just haven't thought about it enough to automate it.
tio
Some simple tricks with STEPfiles and the instance manager. A
given STEP Exchange file is read in, those objects are instantiated,
and the resulting instances printed out. Then the same file is read
again, appending a duplicate set of objects to the ones already read.
Finally, the resulting list of instances is written to the screen and
an optional output file in STEP Exchange file format. As noted above,
tio may choke on some STEP files produced by treg... this is not tio's
fault, but treg's. Two sample STEP exchange files (testfile*.step) are
included.
scl2html
This program, when linked to a 'compiled' schema, will use the
registry information to create a suite of HTML documents describing
the structure of the schema. A 'page' is created for each entity,
describing its attributes, inheritance ancestry, and subtypes,
complete with hypertext links tying the pages together. While perhaps
not the most useful application as it is (the exp2html utility
produces more complete output, and doesn't require compiling the
schema and the program linked to it), it is plausible that forms and
such could be added to create a Web-accessible Data Probe. As it
stands, it demonstrates several methods for accessing the registry
information in a schema-independant manner.
scl2html requires a Web browser or live-hypertext HTML editor to be of
any use beyond reading the HTML result files. It has been tested
using NCSA Mosaic 2.4, and it is assumed that the output files are
compatible with other browsers such as Lynx, Chimera, etc. The output
doesn't do any unusually fancy HTML.
If you are interested in the capabilities of this software, but have
never used the World Wide Web before, check out the www directory and
the Web FAQ at rtfm.mit.edu:/pub/usenet-by-hierarchy/comp/infosystems.
I've tried to have scl2html put comments in the HTML source, but it
still helps to have some background knowledge.
treg, tio, and scl2html are schema-independant; while they link to
'example''s class library by default, they can be rebuilt to
access the class library of any schema. See below for details.
tstatic requires 'example''s class library to run.
Building and running the test programs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Before building the tests, you will need to have built the header
files and class library for 'example' packaged in the probe2.trz file.
This can be done with the mkProbe script that came with the DataProbe
package in probe2.trz. See the top-level README.dp2 from Data Probe for
instructions.
Next, you'll need to look at the file schema-loc, which is included by
all the Makefiles. This file defines the locations of the class
library and the appropriate make_rules file; it's almost exactly like
the other Makefiles for the Data Probe. If you built the library for the
schema, 'example', using the mkProbe script with the -i option, all you
should have to change is the PDES_ROOT variable... the schema location
should be correct then. Otherwise, you may need to change more; if you do
this, keep things defined in terms of $(SCHEMA_NAME), otherwise, you
will create problems for the other Makefiles.
To build all the programs, just say 'make' in the top test directory
(above tstatic/, etc, with the file tests.h). To build individual
tests, just type 'make' in their directory.
The script 'runtests' executes all the test programs, except for
scl2html. This is interesting for checking if everything runs OK.
For best results, execute as follows (this is in csh):
% runtests >&! tests.out
To run scl2html, it is recommended that you create an empty directory and
run it from there, as it creates several .html files as its output:
% cd scl2html
% mkdir tmp
% cd tmp
% ../scl2html
This can save you a lot of cleanup work if you change scl2html to use
a more complex schema than 'example'.
Using Alternate Schemas
~~~~~~~~~~~~~~~~~~~~~~~
All the programs except for tstatic can be built to use any schema
class library; tstatic _must_ use 'example'. Building any of the
programs to use an alternate schema is very easy to do.
First, as with 'example', build your class libraries. If you are again
using mkProbe with the -i option, schema-loc need not be altered.
Then, in the directory of the program you want to build, type:
% make SCHEMA_NAME=my_schema
where 'my_schema' is the name of the schema, e.g., 'example.'
Any of the other schema-loc variables can be set this way (at least
using GNU make), so if you want to keep your schema class libraries
somewhere totally other than where we thought was best, you can
specify the locations along with the SCHEMA_NAME on the command line
( this is all one line ):
% make SCHEMA_NAME=my_schema SCHEMA_DIR=~rms/schemas/my_schema
SCHEMA_LIB_DIR=~rms/probes/my_schema
Known Problems
~~~~~~~~~~~~~~
If you are using Gnu g++ ver. 2.5.8 with this program you might en-
counter a problem wherein 'makedepend' in the various makefiles of the
separate applications tries to insert a dependency for the nonexistent
file _IO_config.h ( this particular dependency was generated by makedepend
when it encountered the libio.h file of the g++ package. ) This may be
caused by makedepend being unable to follow C++ preprocessor conditionals
in header files.
Another version of makedepend ( unfortunately the exact version number
is unknown though maybe it's newer ) seems to have fixed the problem at
NIST. It is up to the individual user to find the makedepend version
that will work well with this package.
Reporting Problems and Suggestions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We would like feedback on all aspects of the software. Please send your
comments to:
dp2@cme.nist.gov
Questions about availability or accessing the software should be directed
to the SOLIS Administrator:
Gaylen Rinaudot: npt-info@cme.nist.gov or (301) 975-3386
Announcements of new releases or bug fixes will be sent to the mailing
list scl@cme.nist.gov. To be added to the scl mailing list, send a
request to majordomo@cme.nist.gov. Include in the body of the message:
subscribe scl
For additional help, include in the body of the message:
help
If you use a signature within your email, end your majordomo command
sequence with the word "end". For example,
subscribe scl
end
PROJECT FUNDING AND LICENSING RESTRICTIONS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This software was produced by the National Institute of Standards and
Technology (NIST), an agency of the U.S. government, and by statute
is not subject to copyright in the United States. Recipients of this
software assume all responsibility associated with its operation,
modification, maintenance, and subsequent redistribution.
The STEP Class Library (SCL) and the Data Probe software is under
development at the National PDES Testbed to support testing of the
Standard for the Exchange of Product Model Data (a.k.a STEP.) Funding
for the project has come from the Department of Commerce, and the
Department of Defense agencies including the Office of the Defense
CALS (Continuous Acquisition and Life-Cycle Support) Executive and the
Advanced Research Projects Agency.
These examples were developed by Ian Soboroff, ian@cme.nist.gov.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Factory Automation Systems Division/National PDES Testbed
National Institute of Standards and Technology
Building 220, Room A127
Gaithersburg, MD 20899
+++++++++++++++++++++++
!!!!!!!!!!!!!!!!!!!!!!!!!!!!DISCLAIMERS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
No approval or endorsement of any commercial product by the National
Institute of Standards and Technology is intended or implied.
There is no warranty for the NIST STEP Toolkit.
If the NIST STEP Toolkit is modified by someone else and passed on,
NIST wants the Toolkit's recipients to know that what they have is not
what NIST originally distributed.
Distribution Rights
1. Anyone may copy and distribute verbatim copies of the NIST STEP Toolkit
source code as received in any medium.
2. Anyone may modify their copy or copies of the NIST STEP Toolkit source
code or any portion of it, and copy and distribute such modifications
provided that all modifications are clearly associated with the entity
that performs the modifications.
NO WARRANTY
~~~~~~~~~~~
NIST PROVIDES ABSOLUTELY NO WARRANTY. THE NIST STEP TOOLKIT
IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS
WITH YOU. SHOULD ANY PORTION OF THE NIST STEP TOOLKIT PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT WILL NIST BE LIABLE FOR DAMAGES, INCLUDING ANY LOST PROFITS,
LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED
BY THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH PROGRAMS
NOT DISTRIBUTED BY NIST) THE PROGRAMS, EVEN IF YOU HAVE BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.