<html>#2382: Piraha fails to allow generic boolean expressions in schedule.ccl ifstatement
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>major</td></tr>
<tr><td style='text-align:right'>Component:</td><td></td></tr>
</table>

<p>According to the user guide <a data-is-external-link="true" href="http://einsteintoolkit.org/usersguide/UsersGuidech12.html#x17-190000D2.4.3" rel="nofollow">http://einsteintoolkit.org/usersguide/UsersGuidech12.html#x17-190000D2.4.3</a> if statements in schedule.ccl are allowed to use arbitrary C expressions that evaluate to a truth value. </p>
<blockquote>
<p>if (&lt;conditional-expression&gt;) <br />
{ <br />
  [&lt;assignments&gt;] <br />
  [&lt;schedule blocks&gt;] <br />
}</p>
<p>�conditional-expression� can be any valid C construct evaluating to a truth value.</p>
</blockquote>
<p>However schedule.peg limit this the functions that can be used to only <code>CCTK_Equals</code>, <code>CCTK_IsThornActive</code>, and <code>CCTK_IsImplementationActive</code>:</p>
<p>‌</p>
<div class="codehilite"><pre><span></span>boolpar = \( {boolexpr} \)
eqfun = (?i:CCTK_Equals)
actfun = (?i:CCTK_IsThornActive)
actifun = (?i:CCTK_IsImplementationActive)
booleq  = {eqfun} \( {string} , {string} \)
boolact = ({actfun}|{actifun}) \( {string} \)
boolstar = \* {name}
boolneg = \! {boolexpr}
boolterm = (?i:{boolneg}
         | {boolpar}
         | {booleq}
         | {boolact}
         | {boolstar}
         | {name} )
</pre></div>


<p>which leaves out useful functions. In particular it leaves out <code>CCTK_IsFunctionAliased</code></p>
<p>‌</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2382/piraha-fails-to-allow-generic-boolean'>https://bitbucket.org/einsteintoolkit/tickets/issues/2382/piraha-fails-to-allow-generic-boolean</a></p>
</html>