| 1 | = AADL printer = |
| 2 | |
| 3 | The AADL unparser (aadlgen.sbp) takes a lists of prolog predicates and generates the corresponding textual AADL specification in a file whose name is given by the environment variable REPORTFILE. |
| 4 | |
| 5 | The predicates (facts base) must comply with the definition of thoses generated by the [wiki:aadlparser AADL parser] (aadlrev.exe). |
| 6 | The rules are generated from a HOOD design built with Stood and using the Stood prolog generator. |
| 7 | |
| 8 | == pragmas == |
| 9 | |
| 10 | The AADL code generation can be controlled by pragmas that must be included into the fact base as AADL properties: |
| 11 | |
| 12 | The following properties control the case of AADL Keywords (default='Upper') and Identifiers (default='Lower'). |
| 13 | When '!AsIs' is specified, the unparser keeps the given string without case change. |
| 14 | {{{ |
| 15 | isProperty('','','','','','','LMP::Unparser_KW_Case',Case,''). |
| 16 | isProperty('','','','','','','LMP::Unparser_ID_Case',Case,''). |
| 17 | with Case = 'AsIs' | 'Lower' | 'Upper' |
| 18 | }}} |
| 19 | |
| 20 | The following property controls the insertion of a default header showing information contained by the isVersion/4 fact. |
| 21 | {{{ |
| 22 | isProperty('','','','','','','LMP::Unparser_Insert_Header',Flag,''). |
| 23 | with Flag = 'Yes' | 'No' default value is 'No'. |
| 24 | }}} |
| 25 | |
| 26 | As an example, when the unparser is connected to the parser, the generated header looks like: |
| 27 | {{{ |
| 28 | --------------------------------------------------- |
| 29 | -- AADL2.2 |
| 30 | -- aadlrev2.10 |
| 31 | -- (c)Ellidiss Technologies |
| 32 | -- 11March2017 |
| 33 | --------------------------------------------------- |
| 34 | }}} |