<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.1.1. ASM Term</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_ASMTerms.html" title="5.1. ASM Terms: An Overview"><link rel="prev" href="sec_ASMTerms.html" title="5.1. ASM Terms: An Overview"><link rel="next" href="sec_ASMLogicalTerms.html" title="5.2. Logical Terms"></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">5.1.1. ASM Term</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_ASMTerms.html">Prev</a> </td><th align="center" width="60%">5.1. ASM Terms: An Overview</th><td align="right" width="20%"> <a accesskey="n" href="sec_ASMLogicalTerms.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_Term"></a>5.1.1. ASM Term</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_Term_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p> | |
ASM terms are untyped expressions constructed from ASM constants, variables and | |
functions using traditional operators. | |
</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_Term_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><p> | |
ASM expressions are constructed in the traditional way from constants, | |
variables and ASM functions. Currently, only constants have types (string, | |
boolean, integer, double or model element) that are evaluated at | |
compile-time, while the type of variables and ASM functions are determined | |
dynamically at run-time. | |
</p><p> | |
Operators for different types are defined as follows: | |
</p><div class="itemizedlist"><ul type="disc"><li><p>String operators: <code class="computeroutput">+, ==, !=</code> | |
</p></li><li><p>Integer and float operators: <code class="computeroutput"><, >, +, -, ==, !=, *, /, %, <=, >=</code> | |
</p></li><li><p>Boolean operators: <code class="computeroutput">||, &&, xor, !, ==, !=</code> | |
</p></li><li><p>Multiplicity operators: <code class="computeroutput">==, != </code> | |
</p></li><li><p>Name operators <code class="computeroutput">==, != </code> | |
</p></li></ul></div><p> | |
An ASM expression, i.e. a <span class="strong"><strong>term</strong></span> is either a <a href="def_LogicalTerm.html" title="5.2.1. Logical Term">logical term</a> | |
or an <a href="def_ArithmeticTerm.html" title="5.3.1. Arithmetic Term">arithmetic term</a>. | |
</p></td></tr></table></div><div class="highlights"><a name="def_Term_Remark"></a><p><b>Remark. </b> | |
If an expression is evaluated to a type where a used operator is not supported | |
(e.g. "str1" <code class="computeroutput"> || </code> "str2" is invalid), a run-time exception is | |
thrown. | |
</p></div><div class="highlights"><a name="def_Term_UsedBy"></a><p><b>Used By: </b> | |
<a href="def_ActualParameter.html" title="5.8.3. Actual Parameters">actual parameter</a>, | |
<a href="def_CheckCondition.html" title="2.1.8. Check Condition">check condition</a>, | |
<a href="def_AsmFunctionLocation.html" title="5.5.3. ASM Function Location">location</a>, | |
<a href="def_UpdateRule.html" title="4.2.5. Update Rule">update rule</a>, | |
<a href="def_PrintRule.html" title="4.2.6. Print Rule">print rule</a>, <a href="def_LogRule.html" title="4.2.7. Log Rule">log rule</a>, | |
<a href="def_LetRule.html" title="4.3.5. Let Rule">let rule</a>, | |
<a href="def_ChooseRule.html" title="4.3.6. Choose Rule">choose rule</a>, <a href="def_ForallRule.html" title="4.3.7. Forall Rule">forall rule</a>, | |
<a href="def_IfRule.html" title="4.3.9. If Rule">if rule</a>, | |
<a href="def_CreateRule.html" title="4.4.2. Create Rule">create rule</a>, <a href="def_DeleteRule.html" title="4.4.3. Delete Rule">delete rule</a>, | |
<a href="def_CopyRule.html" title="4.4.4. Copy Rule">copy rule</a>, <a href="def_MoveRule.html" title="4.4.5. Move Rule">move rule</a>, | |
<a href="def_ElementUpdateRule.html" title="4.4.6. Element Update Rule">element update 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="sec_ASMTerms.html">Prev</a> </td><td align="center" width="20%"><a accesskey="u" href="sec_ASMTerms.html">Up</a></td><td align="right" width="40%"> <a accesskey="n" href="sec_ASMLogicalTerms.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.1. ASM Terms: An Overview </td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%"> 5.2. Logical Terms</td></tr></table></div></body></html> |