<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.3. Parallel Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMCompoundRules.html" title="4.3. Compound ASM Rules"><link rel="prev" href="def_SequentialRule.html" title="4.3.2. Sequential Rule"><link rel="next" href="def_RandomRule.html" title="4.3.4. Random Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.3.3. Parallel Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_SequentialRule.html">Prev</a> </td><th align="center" width="60%">4.3. Compound ASM Rules</th><td align="right" width="20%"> <a accesskey="n" href="def_RandomRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ParallelRule"></a>4.3.3. Parallel Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ParallelRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p> | |
The <span class="strong"><strong>parallel rule</strong></span><a name="N115CB" class="indexterm"></a> is a rule-container | |
that defines the parallel execution of the nested rules. | |
</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ParallelRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting"> | |
ParallelRuleAST ::= <span class="token">parallel</span> <span class="token">{</span> <a href="def_AsmRuleInvoc.html" title="4.1.2. ASM Rule Invocation">AsmRulesAST</a> <span class="token">}</span> OptSemicolonAST | |
</pre><p> | |
A <span class="strong"><strong>parallel rule</strong></span> contains an arbitrary number of other | |
<a href="def_AsmRuleInvoc.html" title="4.1.2. ASM Rule Invocation">ASM rules</a>. | |
</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_ParallelRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p> | |
The <span class="strong"><strong>parallel rule</strong></span> executes <span class="emphasis"><em>all</em></span> rules listed inside in an | |
<span class="emphasis"><em>arbitrary</em></span> order in multiple threads. If parallel processing is supported on the host | |
machine rules are executed simultaneously. | |
</p><p> | |
The <span class="strong"><strong>parallel rule</strong></span> fails if at least one of the contained rules fails. | |
The previous state of local variables are not restored after failure. | |
</p><p> | |
The <span class="strong"><strong>parallel rule</strong></span> uses read and write locks when manipulating the | |
model space to avoid concurrency problems. However, no protection is provided for | |
preventing the parallel access of ASM machines, which may result in exceptions reporting concurrent access. | |
</p></td></tr></table></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning: Warning"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left"><a name="def_ParallelRule_Semantics"></a>Warning</th></tr><tr><td valign="top" align="left"><p> | |
The implementation of the <span class="strong"><strong>parallel rule</strong></span> is experimental. | |
There is some chance that not all conflicting assignments (carried out in different threads) are | |
detected. | |
</p></td></tr></table></div><div class="highlights"><a name="def_ParallelRule_DefinedIn"></a><p><b>Defined In: </b> | |
<a href="def_CompoundRule.html" title="4.3.1. Compound Rule">compound rule</a> | |
</p></div><div class="highlights"><a name="def_ParallelRule_SeeAlso"></a><p><b>See Also: </b> | |
<a href="def_SequentialRule.html" title="4.3.2. Sequential Rule">sequential rule</a>, <a href="def_RandomRule.html" title="4.3.4. Random Rule">random rule</a> | |
</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_SequentialRule.html">Prev</a> </td><td align="center" width="20%"><a accesskey="u" href="sec_ASMCompoundRules.html">Up</a></td><td align="right" width="40%"> <a accesskey="n" href="def_RandomRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.3.2. Sequential Rule </td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%"> 4.3.4. Random Rule</td></tr></table></div></body></html> |