1 / 14

expressik: an open source EXPRESS parser and application development kit

expressik: an open source EXPRESS parser and application development kit. Andy Carpenter Andy.Carpenter@manchester.ac.uk. EXPRESS Interface Kit (expressik). Funded by ESTEC TEC-MCV, ESA Focus unlicensed software for thermal analysis data As general as possible within timescales of project

dana
Download Presentation

expressik: an open source EXPRESS parser and application development kit

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. expressik: an open source EXPRESS parser and application development kit Andy Carpenter Andy.Carpenter@manchester.ac.uk expressik

  2. EXPRESS Interface Kit (expressik) • Funded by ESTEC TEC-MCV, ESA • Focus unlicensed software for thermal analysis data • As general as possible within timescales of project • test cases include AP203, AP209, AP214, AP233 • Separate model analysis from SDAI generation • Maximise application independent analysis • Language bindings: • C++ (early bound), C (p24), • Python (pyEXPRESS), Fortran • Preserve existing TASVerter and its API • Part 21 (2002) import and export (class 1 and 2) expressik

  3. Model Analysis • Process 10303-11 (1994) and some 10303-11 (2004) • Single or multi-schema • Always has a viewpoint schema • Almost no semantic checking • Reference resolution (can be multiple resolutions) • Importation defined by model followed, includes • identifying dependent and independent objects • Data type(s) of objects determined • Possible CEDTs can be determined (sometimes) • API in Java is read-only • Source location transferred to API expressik

  4. Parser Architecture expressik

  5. Parser Passes 1 • Make the scope tables • Resolve schema references (in USE and REFERENCE FROM clauses) • Import the objects specified by the USE and REFERENCE clauses • Import any enumeration ids that are visible • Resolve subtype/supertype references • Inherit attributes from supertypes down into subtypes (unless there are id clashes) expressik

  6. Parser Passes 2 7 Resolve all references apart from where they are part of an attribute qualification; i.e. work out the starting bits of expressions, etc 8 Then using the viewpoint schema do Annex C • Apply the Section 11 rules for importation • Prune the supertype graph (i.e. alter supertype expressions) to remove non-imported entities • Apply Annex B • Load the API • Depth first walk of AST • Fixup qualifications within expressions, etc expressik

  7. API – Model Element public final class Model extends ExpressObject { public Schema[] getSchemas(); public Schema getViewpointSchema(); public ModelSpecificConstant[] getConstants(); public DefinedDatatype[] getDefinedDatatypes(); public EntityDatatype[] getEntityDatatypes(); public ModelSpecificFunction[] getFunctions(); public ModelSpecificProcedure[] getProcedures(); public Rule[] getRules(); public …[] getComplexEntityDatatypes(); public void visitorAccept(…); } // Model expressik

  8. API – Entity Datatype Element public final class EntityDatatype extends … { public Identifier getModelIdentifier(); public Identifier getOriginalIdentifier(); public Identification[] getIdentifications(); public EntityDatatype[] getImmediateSupertypes() public DomainRule[] getDomainRules(); public UniqueRule[] getUniqueRules(); public void visitorAccept(…); … expressik

  9. API – Entity Datatype Element (Attributes) … public Attribute[] getAllAttributes(); public …[] getExplicitAttributes(); public …[] getDerivedAttributes(); public …[] getInverseAttributes(); public …[] getAllAttributeRedeclarations(); public …[] getAttributeExplicitRedeclarations() public …[] getAttributeDerivedRedeclarations(); public …[] getAttributeInverseRedeclarations() } // EntityDatatype expressik

  10. API – Complex Entity Datatype public final class ComplexEntityDatatype extends ComplexDatatype { public …[] getComponentEntityDatatypes() public EntityDatatype getLeaf () public Attribute[] getAllAttributes() public …[] getAllExplicitAttributes() public AttributeRedeclaration[] getEffectiveRedeclarations (… attribute) public boolean isDependent() public boolean isNonSchema() public void visitorAccept(…); } // ComplexEntityDatatype expressik

  11. C++ (Early Bound) SDAI Binding • Generated in, almost, single pass over API • Uses templates to implement early bound aggregates • Template functions deal with GENERIC and AGGREGATE parameters • Implements EXPRESS assignment/copy semantics • copy unless entity; need entity reference concept • Substantial use of overloaded operators • C++ parser determines correct implementation • User deals with EDTs not CEDTs • Not early bound when EXPRESS is not • Implemented in Java expressik

  12. A (ABS) 1 B C C++ Binding and Entity Instances • C++ ‘believes’ that can make copies of instances • Introduced entity reference object • one for each EDT • Need to preserve inheritance in reference and referenced objects A (ref) A B (ref) B C (ref) C AB AC expressik

  13. A (ABS) 1 B C EXPRESS is not Always Early Bound … LOCAL a1, a2 : A; b1, b2 : B; END_LOCAL; … a1 := A(…) || B(…); a2 := A(…) || C(…); b1 := a1; b2 := a2; … expressik

  14. Current State • Multiple internal project releases done • parser and C++ binding generator • parser needs to support reading CEDTs used • C++: soon all functional code and verification • Python binding soon • License allowing public access on-going • based on NASA Open Source Agreement • Documentation of C++ binding out-of-date • All to be sorted in the short-term expressik

More Related