blob: a16754011c89a43e86282e0202a237ebe7ef5476 [file] [log] [blame]
<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.2.2.&nbsp;Call 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_ASMSimpleRules.html" title="4.2.&nbsp;Simple ASM Rules"><link rel="prev" href="def_SimpleRule.html" title="4.2.1.&nbsp;Simple Rule"><link rel="next" href="def_SkipRule.html" title="4.2.3.&nbsp;Skip 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.2.2.&nbsp;Call Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_SimpleRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.2.&nbsp;Simple ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_SkipRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_CallRule"></a>4.2.2.&nbsp;Call 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_CallRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>
A user-defined ASM rule can be invoked by a <span class="strong"><strong>call rule</strong></span><a name="N11255" class="indexterm"></a>.
</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_CallRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">
CallRuleAST ::= <span class="token">call</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">QualifiedTypeNameAST</a> <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">ActualParameterDefAST</a> <span class="token">;</span>
</pre><p>
In the <span class="strong"><strong>call rule</strong></span>, the <span class="emphasis"><em>name of the invoked rule</em></span> and the list of the
<span class="emphasis"><em>actual parameters</em></span> (corresponding to the formal parameters of the invoked rule) have to be
specified.
</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_CallRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>
It calls the specified ASM rule by the given list of actual parameters.
Constraints of actual parameters are defined in <a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">Section&nbsp;5.8.1, &ldquo;Formal Parameters&rdquo;</a>.
</p><p>
If the called ASM rule fails, failure is propagated to the caller.
</p></td></tr></table></div><div class="highlights"><a name="def_CallRule_Remark"></a><p><b>Remark.&nbsp;</b>
In order to facilitate modular transformation design, rules are allowed to
call rules located in other machines. In such a case, the called rules can be
referred to by their fully qualified names composed of the location of its
machine container and the name of the ASM rule.
</p></div><div class="highlights"><a name="def_CallRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>
<a href="def_SimpleRule.html" title="4.2.1.&nbsp;Simple Rule">simple rule</a>
</p></div><div class="highlights"><a name="def_CallRule_SeeAlso"></a><p><b>See also:&nbsp;</b>
<a href="def_DirectedFormalParameter.html" title="5.8.2.&nbsp;Directed Formal Parameters">formal parameter definition</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_SimpleRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMSimpleRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_SkipRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.2.1.&nbsp;Simple Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.2.3.&nbsp;Skip Rule</td></tr></table></div></body></html>