#2382: Piraha fails to allow generic boolean expressions in schedule.ccl ifstatement
Reporter:Roland Haas
Status:new
Milestone:
Version:
Type:bug
Priority:major
Component:

Changes (by Roland Haas):

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

‌

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2382/piraha-fails-to-allow-generic-boolean