

{"id":310,"date":"2012-12-20T14:12:03","date_gmt":"2012-12-20T13:12:03","guid":{"rendered":"https:\/\/project.inria.fr\/plasma-lab\/?page_id=310"},"modified":"2015-03-13T11:55:47","modified_gmt":"2015-03-13T10:55:47","slug":"model-languages","status":"publish","type":"page","link":"https:\/\/project.inria.fr\/plasma-lab\/documentation\/languages\/model-languages\/","title":{"rendered":"Adaptive Reactive Module Language"},"content":{"rendered":"<p>We have extended RML with structures that model adaptive systems. We detail below the modifications and new syntax added to RML.<\/p>\n<h6>Modules<\/h6>\n<p>Modules can now be parameterized using the following construction:<br \/>\n<code>module <em>name<\/em> ( <em>parameter1<\/em>, <em>parameter2<\/em>, <em>parameter3<\/em>, ...)<br \/>\n...<br \/>\nendmodule<br \/>\n<\/code><\/p>\n<p>The parameters syntax is <code><em>parameter<\/em> ::= <em>type name<\/em><\/code> and they can be of the following types:<\/p>\n<ul>\n<li><em>const int, const double, const bool<\/em> for constant parameters respectively integers, double and Boolean.<\/li>\n<li><em>int, double, bool<\/em> for variable parameters respectively integers, double and Boolean. Variable parameters are alsolocal variables. Note that therefore they must be renamed by the renaming operation.<\/li>\n<\/ul>\n<p>Parameterized modules define templates that can be instantiated using the following command:<br \/>\n<code><br \/>\nmodule <em>new_name<\/em> = <em>name<\/em> ( <em>expression1<\/em>, <em>expression2<\/em>, <em>expression3<\/em>, ...) endmodule<br \/>\n<\/code><\/p>\n<p style=\"text-align: justify;\">This creates a new module <em>new_name<\/em> that instantiate a parameterized module <em>name<\/em> such that each parameter is instantiated by the value of the corresponding expression. In case a parameter is variable, this instantiation corresponds to fixing the initial value of the variable. The new module is a copy of the parameterized module such that all the variables (and parameters) in the new module are renamed, their new name being their old name prefixed by <em>new_name.<\/em>. Note that parameterized modules can also be renamed using the classic renaming command from RML. This operation creates a new parameterized module.<\/p>\n<h6 style=\"text-align: justify;\">Systems<\/h6>\n<p style=\"text-align: justify;\">The system construction from RML is extended in Adaptive RML. Several systems can now be designed. Each of them defines a different configuration of the adaptive system. A system can also be parameterized.<br \/>\n<code>system <em>name<\/em> ( <em>parameter1<\/em>, <em>parameter2<\/em>, <em>parameter3<\/em>, ...)<br \/>\n...<br \/>\n<em>declarations<\/em><br \/>\n...<br \/>\nendsystem<br \/>\n<\/code><br \/>\nThe syntax of the parameters is the same as for modules. However, only constant parameters can be used. The declarations in a system consist in a set of module instantiations. Each of them uses the syntax previously presented. Contrary to RML in which the system always consists in all the modules of the model, in Adaptive RML each system may contain a different set of modules. Note that non parameterized modules are also added to a system using the same syntax, only in that case the expressions list is empty. Additionally, a declaration in a system can be a formula or a label, i.e. an expressions over the variables of the system, using the same declaration command from RML.<\/p>\n<h6 style=\"text-align: justify;\">Adaptive Systems<\/h6>\n<p>Finally, the adaptive system is declared as a set of adaptive command, i.e. meta-transition from one system to another. The syntax is the following:<br \/>\n<code>adaptive<br \/>\ninit at <em>start_system<\/em>;<br \/>\n...<br \/>\n<em>adaptive_commands<\/em><br \/>\n...<br \/>\nendsystem<br \/>\n<\/code><br \/>\n<em>start_system<\/em> is a system instantiation: it consists in a system name and a list of expressions to instantiate the parameters of the system.<br \/>\nAdaptive commands are written in the following syntax:<br \/>\n<code>{ <em>system<\/em> ( | <em> guard <\/em> )? } -&gt; ( <em>probability<\/em> : {<em>new_system<\/em>} )+;<br \/>\n<\/code><br \/>\n<em>system<\/em> specifies the current system in which the command is enabled. Additionally a <em>guard<\/em> can be specified, that is an expression over the variables of the system. Then comes a list of actions, each of them composed by a probability and the definition of the new system. The probabilities are expressions over the variables of the current system. The sum of the values of the probabilities must be lower than one. <em>new_system<\/em> is a system instantiation that defines the next configuration reached by the adaptive system.<\/p>","protected":false},"excerpt":{"rendered":"<p>We have extended RML with structures that model adaptive systems. We detail below the modifications and new syntax added to RML. Modules Modules can now be parameterized using the following construction: module name ( parameter1, parameter2, parameter3, &#8230;) &#8230; endmodule The parameters syntax is parameter ::= type name and they\u2026<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/project.inria.fr\/plasma-lab\/documentation\/languages\/model-languages\/\"><span>Continue reading<\/span><i class=\"crycon-right-dir\"><\/i><\/a> <\/p>\n","protected":false},"author":234,"featured_media":0,"parent":234,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-310","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/project.inria.fr\/plasma-lab\/wp-json\/wp\/v2\/pages\/310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/project.inria.fr\/plasma-lab\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/project.inria.fr\/plasma-lab\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/project.inria.fr\/plasma-lab\/wp-json\/wp\/v2\/users\/234"}],"replies":[{"embeddable":true,"href":"https:\/\/project.inria.fr\/plasma-lab\/wp-json\/wp\/v2\/comments?post=310"}],"version-history":[{"count":21,"href":"https:\/\/project.inria.fr\/plasma-lab\/wp-json\/wp\/v2\/pages\/310\/revisions"}],"predecessor-version":[{"id":315,"href":"https:\/\/project.inria.fr\/plasma-lab\/wp-json\/wp\/v2\/pages\/310\/revisions\/315"}],"up":[{"embeddable":true,"href":"https:\/\/project.inria.fr\/plasma-lab\/wp-json\/wp\/v2\/pages\/234"}],"wp:attachment":[{"href":"https:\/\/project.inria.fr\/plasma-lab\/wp-json\/wp\/v2\/media?parent=310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}