

{"id":317,"date":"2013-04-17T18:33:12","date_gmt":"2013-04-17T16:33:12","guid":{"rendered":"https:\/\/project.inria.fr\/pyecdar\/?page_id=317"},"modified":"2013-09-11T16:15:18","modified_gmt":"2013-09-11T14:15:18","slug":"models","status":"publish","type":"page","link":"https:\/\/project.inria.fr\/pyecdar\/models\/","title":{"rendered":"Models"},"content":{"rendered":"<p><\/p>\n<p style=\"text-align: justify;\">Models are uploaded to PyECDAR via an XML files. This file can be edited with the graphical user interface of <a href=\"http:\/\/www.uppaal.org\/\">Uppaal<\/a> or <a href=\"http:\/\/people.cs.aau.dk\/~adavid\/ecdar\/\">Ecdar<\/a>. The models used by PyECDAR must be valid in Uppaal or Ecdar (these tools provide syntactic checks). PyECDAR supports the main syntactic elements proposed by these tools. We explain below which restrictions to apply.<\/p>\n<p>System declarations and queries from the Uppaal or Ecdar verifier are ignored by PyECDAR.<\/p>\n<p><em>Identifiers<\/em> follow the same regular expression as in Uppaal: <code>[a-zA-Z_]([a-zA-Z0-9_])*<\/code><\/p>\n<h3>Project declarations<\/h3>\n<p>As in ECDAR, only broadcast channels are supported. They are declared by:<br \/>\n<code>broadcast chan <em>identifier<\/em>;<\/code> or<br \/>\n<code>broadcast chan <em>list_identifier<\/em>;<\/code><\/p>\n<p>Constants are either integers or Boolean values. They are declared in the following manner:<br \/>\n<code>const int <em>identifier<\/em> = <em>expr<\/em>;<\/code> or<br \/>\n<code>const bool\u00a0<em>identifier<\/em> = <em>expr<\/em>;<\/code><\/p>\n<p><em>expr<\/em> is an expression with constants, integer values or Boolean values, that can be evaluated to either an integer or a Boolean.<\/p>\n<p>As in Ecdar, the model cannot have global clocks or global variables.<\/p>\n<h3>Templates declarations<\/h3>\n<p>Template parameters are not supported.<\/p>\n<p>Template constants can be used. As previously they are either integers or Boolean values. They are declared in the following manner:<br \/>\n<code>const int <em>identifier<\/em> = <em>expr<\/em>;<\/code> or<br \/>\n<code>const bool\u00a0<em>identifier<\/em> = <em>expr<\/em>;<\/code><\/p>\n<p>Clocks are declared in the following manner:<br \/>\n<code>clock <em>identifier;<\/em><\/code> or<br \/>\n<code>clock <code><em>list_identifier<\/em><\/code>;<\/code><\/p>\n<p>Local variables may be used. The only types allowed are fixed range integers and Boolean. They may or may not be initialized. If not a default value is assume:<\/p>\n<ul>\n<li>Fixed range integers are declared by:<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\"><code>int[<em>min_expr<\/em>,<em>max_expr<\/em>]\u00a0<em>identifier<\/em> = <em>init_expr<\/em>;<\/code> or<br \/>\n<code>int[<em>min_expr<\/em>,<em>max_expr<\/em>]\u00a0<em>identifier<\/em>;<\/code><br \/>\n<em>min_expr,<\/em> <em>max_expr <\/em>and <em>init_expr<\/em> are expressions with constants, integer values or Boolean values, that can be evaluated to an integer value. <em>min_expr<\/em> and <em>max_expr<\/em> describe the range of the integer. If <em>init_expr<\/em> is not defined the initial value is set to the value of <em>min_expr<\/em>.<\/p>\n<ul>\n<li>Boolean variable are declared by:<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\"><code>bool <em>identifier<\/em> = <em>init_expr<\/em>;<\/code> or<br \/>\n<code>bool <em>identifier<\/em>;<\/code><br \/>\nThen, <em>init_expr<\/em> is an expression with constants, integer values or Boolean values, that can be evaluated to a Boolean value. If <em>init_expr<\/em> is not defined the initial value is set to <em>false<\/em>.<\/p>\n<p>Features variables are declared as Boolean variables at the end of the template&#8217;s declarations. They must be introduce by specific comments lines:<\/p>\n<p style=\"padding-left: 30px;\"><code>\/\/ system features<\/code><\/p>\n<ul>\n<li>Starts the declaration of non-adaptive system features. Each feature is declared in the following manner:<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\"><code>bool <em>identifier<\/em>;<\/code><\/p>\n<p style=\"padding-left: 30px;\"><code>\/\/ adaptive features<\/code><\/p>\n<ul>\n<li>Starts the declaration of adaptive system features. Each feature must be declared with two identifiers: the first is the feature variable, the second is the new value of the feature after firing a transition:<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\"><code>bool <em>identifier<\/em>,<em>new_identifier<\/em>;<\/code><\/p>\n<p style=\"padding-left: 30px;\"><code>\/\/ environment features<\/code><\/p>\n<ul>\n<li>Starts the declaration of environment features. All these features are adaptive, which means that they are declared, as previously, with two identifiers.<\/li>\n<\/ul>\n<h3>Templates locations<\/h3>\n<p>Locations can be <em>urgent. Committed<\/em> locations are not supported.<\/p>\n<p>Locations invariants are conjunctions of expressions separated by <code>&amp;&amp;<\/code> or <code>and<\/code>. Each expression is either:<\/p>\n<ul>\n<li>A clock guard with only upper bound constraint. The coefficient <em>expr <\/em>is an expression with constants and integers that can be evaluated to an integer value:<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\"><code><em>identifier<\/em> [&lt;= | &lt;] <em>expr<\/em><\/code> or <code><em>expr<\/em> [&gt;= | &gt;] <em>identifier<\/em><\/code><\/p>\n<ul>\n<li>A feature expression with only feature variables and Boolean operators.<\/li>\n<li>A variable expression with local variables, constants, integer or Boolean values.<\/li>\n<\/ul>\n<h3>Templates transitions<\/h3>\n<p>Transitions must all be synchronized.<\/p>\n<p>The <em>select<\/em> field <em><\/em> is not supported.<\/p>\n<p>As for invariants, transitions guards are conjunctions of expressions separated by <code>&amp;&amp;<\/code> or <code>and<\/code>. Each expression is either:<\/p>\n<ul>\n<li>A clock guard, that can be a lower bound, an upper bound or a clock difference. The coefficient <em>expr <\/em>is an expression with constants and integers that can be evaluated to an integer value:<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\"><code><em>identifier sign e<\/em><em>xpr<\/em><\/code> or <code><em>expr sign<\/em> <em>identifier<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">or <code><em>identifier-<code><em>identifier sign<\/em><\/code><\/em> <em>expr<\/em><\/code> or <code><em>expr sign\u00a0<\/em><em>identifier-identifier<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Where <code><em>sign<\/em> := [&lt;= | &lt; | == | &gt; | &gt;=]<\/code><\/p>\n<ul>\n<li>A feature expression with only feature variables and Boolean operators.<\/li>\n<\/ul>\n<ul>\n<li>A variable expression with local variables, constants, integer or Boolean values.<\/li>\n<\/ul>\n<p>Transitions update are list of updates separated by a comma. Each update is either:<\/p>\n<ul>\n<li>A clock reset:<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\"><code><em>identifier = 0<\/em><\/code><\/p>\n<ul>\n<li>A feature update:<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\"><code><em>identifier = expr<br \/>\n<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">where <em>identifier<\/em> is a new feature variable and <em>expr<\/em> is an Boolean expression with feature variables.<\/p>\n<ul>\n<li>A variable increment or decrement:<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\"><code><em>identifier += expr<\/em><\/code> or <code><em>identifier++<\/em><\/code> or<\/p>\n<p style=\"padding-left: 30px;\"><code><em><code><em>identifier -= expr<\/em><\/code><\/em><\/code> or\u00a0<code><em><code><em>identifier--<\/em><\/code><\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">where <em>identifier <\/em>is a variable and <em>expr<\/em> is a variable expression with local variables, constants, integer or Boolean values.<\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Models are uploaded to PyECDAR via an XML files. This file can be edited with the graphical user interface of Uppaal or Ecdar. The models used by PyECDAR must be valid in Uppaal or Ecdar (these tools provide syntactic checks). PyECDAR supports the main syntactic elements proposed by these tools. We explain below which restrictions &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/project.inria.fr\/pyecdar\/models\/\">Continue reading<\/a><\/p>\n","protected":false},"author":235,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-317","page","type-page","status-publish","hentry","nodate","item-wrap"],"_links":{"self":[{"href":"https:\/\/project.inria.fr\/pyecdar\/wp-json\/wp\/v2\/pages\/317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/project.inria.fr\/pyecdar\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/project.inria.fr\/pyecdar\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/project.inria.fr\/pyecdar\/wp-json\/wp\/v2\/users\/235"}],"replies":[{"embeddable":true,"href":"https:\/\/project.inria.fr\/pyecdar\/wp-json\/wp\/v2\/comments?post=317"}],"version-history":[{"count":20,"href":"https:\/\/project.inria.fr\/pyecdar\/wp-json\/wp\/v2\/pages\/317\/revisions"}],"predecessor-version":[{"id":446,"href":"https:\/\/project.inria.fr\/pyecdar\/wp-json\/wp\/v2\/pages\/317\/revisions\/446"}],"wp:attachment":[{"href":"https:\/\/project.inria.fr\/pyecdar\/wp-json\/wp\/v2\/media?parent=317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}