= AADL printer = 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, or a dedicated pragma. The predicates (facts base) must comply with the definition of thoses generated by the [wiki:aadlparser AADL parser] (aadlrev.exe). The rules are generated from a HOOD design built with Stood and using the Stood prolog generator. == pragmas == The AADL code generation can be controlled by pragmas that must be included into the fact base as AADL properties: The following properties control the output filenames {{{ isProperty('','',Item,'NIL','NIL','NIL','LMP::Unparser_Output_Filename',Filename,''). with Item = 'NIL' | Package name and Filename: aadlstring }}} When Item is set to 'NIL' the overall AADL model is serialized in a single file; When Item is set to the name of a Package the corresponding statements are serialized in the specified file; For Property Sets, a property constant definition must be used: {{{ isPropertyConstant(Item,'LMP_Unparser_Output_Filename','AADLSTRING',Filename,'NIL',''). with Item = Property Set name and Filename: aadlstring }}} When no Output_Filename pragma is defined the overall model is serialized in the file specified by the REPORTFILE environment variable; When no output filename is defined the overall model is serialized on the standard output stream. The following properties control the case of AADL Keywords (default='Upper') and Identifiers (default='Lower'). When '!AsIs' is specified, the unparser keeps the given string without case change. {{{ isProperty('','','','','','','LMP::Unparser_KW_Case',Case,''). isProperty('','','','','','','LMP::Unparser_ID_Case',Case,''). with Case = 'AsIs' | 'Lower' | 'Upper' }}} The following property controls the insertion of a default header showing information contained by the isVersion/4 fact. {{{ isProperty('','','','','','','LMP::Unparser_Insert_Header',Flag,''). with Flag = 'Yes' | 'No' default value is 'No'. }}} As an example, when the unparser is connected to the parser, the generated header looks like: {{{ --------------------------------------------------- -- AADL2.2 -- aadlrev2.10 -- (c)Ellidiss Technologies -- 11March2017 --------------------------------------------------- }}}