Piraha fails to allow generic boolean expressions in schedule.ccl ifstatement

Issue #2382 resolved
Roland Haas created an issue

According to the user guide http://einsteintoolkit.org/usersguide/UsersGuidech12.html#x17-190000D2.4.3 if statements in schedule.ccl are allowed to use arbitrary C expressions that evaluate to a truth value.

if (<conditional-expression>)
{
  [<assignments>]
  [<schedule blocks>]
}

�conditional-expression� can be any valid C construct evaluating to a truth value.

However schedule.peg limits the functions that can be used to only CCTK_Equals, CCTK_IsThornActive, and CCTK_IsImplementationActive:

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} )

which leaves out useful functions. In particular it leaves out CCTK_IsFunctionAliased

Comments (3)

  1. Log in to comment