[aadl]: Best way to parse an AADL model to extract property values?

Pierre Dissaux pierre.dissaux at ellidiss.com
Sat Apr 8 05:37:52 EDT 2017


Hello Roger,

We use LMP (Logic Model Processing) to do this kind of thing (with AADL or any other language: UML profiles, DSML, source code)

The principle is to convert the model into a set of prolog predicates.
For AADL, the predicates represent the declarative model, and we have developed a library to produce the instance model facts base too.
Then, you can process it, idealy with the power of the prolog language to create a new plugin in the tool  (what we do), or parse the prolog facts on your own.

You can experiment it with the trial version of AADL Inspector I announced on this channel yesterday (http://www.ellidiss.com/downloads/).
Here’s what I got after copy-pasting your example and clicking on the “AADL Declarative Model” button of the “LMP” tab:



The full corresponding facts base is:

isVersion('AADL-2.2','aadlrev2.10','(c)Ellidiss Technologies','11Mar2017').
isPropertySet('ARINC429_mod',1).
isPropertyDefinition('ARINC429_mod','MessageType','ENUMERATION(ils_frequency,ils_glide_slope_deviation,ils_localizer_deviation,runway_heading)','NIL','PORT,DATA','NIL','LIST OF',8).
isPropertyDefinitionComment('ARINC429_mod','MessageType','enumeration of message types to bind to ports',8).
isPropertySetEnd('ARINC429_mod','ARINC429_mod',9).
isPackage('ILS','PUBLIC',12).
isImportDeclaration('ILS','PUBLIC','ARINC429_mod',13).
isComponentType('ILS','PUBLIC','ils','SYSTEM','NIL',16).
isFeature('PORT','ILS','ils','a429_in_1','IN','DATA','NIL','NIL','NIL',18).
isComponentTypeEnd('ILS','PUBLIC','ils','ils',19).
isComponentImplementation('ILS','PUBLIC','ils','impl_basic','SYSTEM','NIL','NIL',22).
isPropertyReference('ILS','NIL','ARINC429_mod','MessageType',24).
isPropertyReference('ILS','NIL','NIL','ils_frequency',24).
isPropertyReference('ILS','NIL','NIL','unway_heading',24).
isProperty('NIL','APPLIES TO','ILS','ils','impl_basic','a429_in_1','ARINC429_mod::MessageType','(ils_frequency,unway_heading)',24).
isPropertyOpt('NIL','APPLIES TO','ILS','ils','impl_basic','A429_IN_1','ARINC429_MOD::MESSAGETYPE','(ILS_FREQUENCY,UNWAY_HEADING)',24).
isComponentImplementationEnd('ILS','PUBLIC','ils','impl_basic','ils','impl_basic',25).
isPackageEnd('ILS','ILS',26).

The prolog facts for AADL are documented and we can help you to create the processing plugin if you wish

Best regards

Pierre Dissaux
Ellidiss Technologies


From: Champagne, Roger 
Sent: Saturday, April 8, 2017 12:10 AM
To: AADL modeling list ; AADL users list 
Subject: [aadl]: Best way to parse an AADL model to extract property values?

Hi all,

Not sure which is the best list to post this question, sorry for cross-posting.

We are trying to capture properties in an AADL model, and were hoping to extract these properties by parsing the XML instance model to transform them to HTML tables (we are working on avionics ICDs, and our users LOVE tables).

There is a lot of indirection in the instance model, which does not contain the actual property values, but a path to a file and indexed elements in that file. For instance, here is a property set:

================================================
property set ARINC429_mod is
    -- enumeration of message types to bind to ports
MessageType: list of enumeration (
ils_frequency,
ils_glide_slope_deviation,
ils_localizer_deviation,
runway_heading)
applies to (port, data);
end ARINC429_mod;
================================================

Here is the usage of some of those properties in the AADL model:

================================================
package ILS
public
with ARINC429_mod;

system ils
features
a429_in_1: in data port;
end ils;

system implementation ils.impl_basic
properties
ARINC429_mod::MessageType => (ils_frequency, unway_heading) applies to a429_in_1;
end ils.impl_basic;
end ILS;
================================================

Here is what the instance model holds as information for the feature instance (port):

================================================
<?xml version="1.0" encoding="ASCII"?>
<instance:SystemInstance xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aadl2="http://aadl.info/AADL/2.0" xmlns:instance="http://aadl.info/AADL/2.0/instance" name="ils_impl_basic_Instance" category="system">
  <featureInstance name="a429_in_1">
    <ownedPropertyAssociation xsi:type="instance:PropertyAssociationInstance">
      <property href="../packages/ARINC429_mod.aadl#ARINC429_mod.MessageType"/>
      <ownedValue>
        <ownedValue xsi:type="aadl2:ListValue">
          <ownedListElement xsi:type="aadl2:NamedValue">
            <namedValue xsi:type="aadl2:EnumerationLiteral" href="../packages/ARINC429_mod.aadl#/0/@ownedProperty.0/@ownedPropertyType/@ownedElementType/@ownedLiteral.0"/>
================================================

The last line above is the important one. A bit far from the actual values in the model.

There are most probably valid reasons why things are so. Our question is: what is the best way to parse either the AADL source or the instance model to recover the actual property values, say in an HTML report?

If anyone has advice to share, we would be garteful. A great week-end to all!

Sincerely,

Roger

--------------------------------------------------------------
Roger Champagne, P.Eng., Ph. D.
Professeur agrégé, Département de génie logiciel et des TI
Associate Professor, Department of Software and IT Engineering

École de technologie supérieure
1100, rue Notre-Dame Ouest, Montréal, Québec, H3C 1K3, Canada
Bureau / Office : A-4499
Téléphone / Phone : +1 514 396 8825 -- Télécopieur / Fax : +1 514 396 8405
Web: http://etsmtl.ca/Professeurs/rchampagne
-------------- next part --------------
HTML attachment scrubbed and removed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image[2].png
Type: image/png
Size: 142958 bytes
Desc: not available
URL: <http://lists.sei.cmu.edu/pipermail/sae-aadl-users/attachments/20170408/1b3a7c0a/attachment-0001.png>


More information about the sae-aadl-users mailing list