Questions about stepmod development with JSDAI

stepmod is the development environment for STEP resources, modules, and application protocols. It is hosted here http://sourceforge.net/projects/stepmod/. When using JSDAI for the stepmod development you should always have an Eclipse CVS project that contains all of stepmod. Best you call this Eclipse project "stepmod".

  1. How to compile the Express files of stepmod?
  2. How to create express-XML and Express-G diagrams?
  3. How to compile Express long forms, generate XML and pretty print them?

1. How to compile the Express files of stepmod?

As you can see here http://jsdai.cvs.sourceforge.net/jsdai/ there are 2 special Express projects for the compilation of almost the complete content of stepmod, one for the Application Reference Model (ARM) jsdai_eclipse_arm, and one for the Modular Integrated Model (MIM) and referenced Integrated Resources (IR) jsdai_eclipse_mim. You will have to create Eclipse CVS projects to get them into your Eclipse workspace using the Host jsdai.cvs.sourceforge.net. Once you have these projects on your PC you can compile them by selecting the jsdai_eclipse_arm.exl respectively jsdai_eclipse_mim.exl file and choosing from the context Menu "Compiling Express schemas according the list". Note that .exl stands for Express List. These are simple text files that you can modify for your needs. As a result of the compilation a new jsdai_eclipse_arm.exd respectively jsdai_eclipse_mim.exd file will be created. "exd" stands for Express Dictionary, a special binary SDAI file that contains all of the meta data of Express.

2. How to create express-XML and Express-G diagrams?

In the JSDAI Express projects for stepmod you will also find the files jsdai_eclipse_arm.exg and jsdai_eclipse_mim.exg . EXG files are binary SDAI files that contain Express Dictionary data (.exd) in addition to Express-G diagrams.

After compilation of stepmod express you first have to update the EXG files for the new EXD content. For this you open one of the EXG files in the Express-G editor by double clicking on them. Then you go to File/Import/"JSDAI Express dictionary data (*.exd)", select the corresponding EXD file and start the updating process. You process is not reversible. E.g. if the exd file does not contain some of the previously available Express schemas the corresponding Express-G diagrams will be lost. So you better kepp an update of the files.

After updating the EXG file for the new EXD content you can start creating a new Express-G diagram or updating an

existing one. A new one is created by selecting the schema in the Outline view and selecting from the context menu "New Diagram / Complete Short". See the tutorial on how to work with the Express-G editor. But note that it is currently not possible to copy a single Express-G diagram from one EXG file to another one. Because of this only one person at a time can modify the main stepmod EXG files. Please coordinate with Lothar Klein if you want to get modified or new Express-G diagrams into the main stepmod EXG files.

Having the diagrams it is easy to generate the needed gif and xml files for stepmod. Have the diagram open in the Express-G editor and invoke Export/"E-G diagrams and stepmod XML". This will create the following files:

  • for a modular ARM diagram: arm.xml, armexpgN.gif, armexpgN.xml
  • for a modular MIM diagram: mim.xml, mimexpgN.gif, mimexpgN.xml
  • for a resource schema xxx: xxx.xml, expgN.gif, expgN.xml
with N = 1, 2, 3... dependent on the number to E-G pages. Note that this number is the sum of schema level and entity level pages.

3. How to compile Express long forms, generate XML and pretty print them?

JSDAI has no capability to generate Express long forms. This is because JSDAI is able to directly work with Express short forms which have many advantages compared to the long forms. But because Express long forms are required for the STEP AP modules we show here how they can be process, even if JSDAI has no special support for them. But you must initially generate the long forms with some tool other than JSDAI and only then come back to JSDAI to process them further.

Note: There is a very draft long form generator also available for JSDAI, but this tool is not generating valid output. Some two man-months of work or so would be needed to complete the work and run the needed validation process.

Here the steps to compile Express long forms, pretty print them and also to generate the corresponding XML files for stepmod.

Set-up and compilation:

  • Create a new Express project in Eclipse (File -> New -> Express Project) and give and name to it, e.g. "TestExpressProject"
  • Copy both, the arm_lf.exp and mim_lf.exp under the "Express files" folder that is created under the TestExpressProject folder.
  • Select TestExpressProject in the Eclipse navigator and then start "Compile Express" from the context menu (or from the toolbar).If all is OK a new file TestExpressProject.exd with all the dictionary data is created in the TestExpressProject folder. Possible compilation errors are visible in the Problem view and also in the Console view. Such errors have to be fixed before you can proceed.

Create pretty print Express files:

  • Select the TestExpressProject.exd file and start the context menu "Export ... / Express pretty print". You can specify a "Generated xpress directory". After OK you will find in this directory the ARM and MIM LF .exp files. The file name are identical to the schema name. When you open the files you see that all comments are removed expects those inside expressions, functions and procedures. All constructs are sorted alphabetically by type in the sequence constants, types, entities, functions, procedures, and global rules. Subtype constraints would show up at the very end, but Express long forms don't have these.
  • You will have to rename the files to arm_lf.exp and mim_lf.exp, copy them into your AP module folder, and update the main header comment.
  • Note: In the case you have opened the Express-G editor before you will need to close it and re-start Eclipse.

Create XML files:

  • Select the TestExpressProject.exd file and start the context menu "Open With / Express-G Editor". The Express-G editor is opening for the exd file. We don't need to draw any Express-G diagram, but we need this tool to get the xml created.
  • Open the Outline view. You will see the arm and mim long form schemas under the top node "SdaiRepository: ExpressCompilerRepo".
  • For each of the two created diagrams do the following.
  • Click on the diagram node and start from the context menu "New Diagram / Complete Short". Select the created but empty diagram under the schema name. This will open the Express-G editor and display an empty page.
  • Select from the menu "Export / E-G diagrams and stepmod XML". Have "export only active schema" and Add stepmod_specific subdirectories "modules and/or "resources".
  • Because the schemas are not names "xxx_mim" or "xxx_arm"  but named "xxx_mim_lf" and "xxx_arm_lf" they are not recognised as module and consequently are placed in the stepmod "data/resources" directory. So you will find two new "resource" schema directories there, one for the arm_lf and one for mim_lf. Rename the "xxx_arm_lf.xml" and "xxx_mim_lf.xml" files to "arm_lf.xml" respectively "mim_lf.xml" and copy them into your AP modules directory. Delete everything else of these dummy resources.