#268 No validation rule for indirectly recursive functions


The specification forbids indirectly-recursive function definitions, but there is no validation rule that test this (and indeed, libsbml claims that the attached model is valid).

If https://sourceforge.net/p/sbml/sbml-specifications/260/ is accepted, we still need a validation rule for L2v5, and if it's accepted but with the requirement that an attribute be used, we need the validation rule to check that attribute.

1 Attachments


  • Lucian Smith

    Lucian Smith - 2014-06-26
    • Group: Accept-conformance-implications --> Reported-Proposed
  • Lucian Smith

    Lucian Smith - 2014-06-26

    Since this seems to be a clear omission, I have taken the liberty of fixing the issue in SVN, though the editors still need to vote here. If a different solution is proposed, the SVN can be reverted and changed again.

    If accepted, this change will be incorporated into both L2v5 and L3v2, upon the release of those specifications.

  • Michael Hucka

    Michael Hucka - 2014-06-27

    I agree with the proposed changes description in Lucian's 2nd paragraph.

  • Frank Bergmann

    Frank Bergmann - 2014-06-28

    I agree this validation rule should be added. But preferably no recursive function definitions are added.

  • Nicolas Le Novère

    I agree with the proposed changes

  • Lucian Smith

    Lucian Smith - 2014-07-07

    This has now been added to the list of known errata for both specifications, but still needs one more vote (Brett, Sven, and/or Dagmar) before being officially accepted.

  • Brett Olivier

    Brett Olivier - 2014-07-08

    I agree the validation rule should be added.

    This does not imply that I necessarily agree with the inclusion of recursive function definitions.

  • Lucian Smith

    Lucian Smith - 2014-07-08
    • status: open --> closed
    • Group: Reported-Proposed --> Accept-conformance-implications
  • Lucian Smith

    Lucian Smith - 2014-07-08

    And, that's a wrap! Thanks; the validation rule will be added to the upcoming L2v5 and L3v1 specifications.

  • Sarah Keating

    Sarah Keating - 2016-02-15
    • status: closed --> open
  • Sarah Keating

    Sarah Keating - 2016-02-15

    Sorry to reopen this but I found an anomaly in the validation rules.

    The fix for l2v5 was to add 'or mutually recursive' to rule 20303 that said SBML functions are not permitted to be recursive.

    But L3V2 has a whole new rule (20308) that says they may not be mutually recursive. I think this is unecssaery and we should go with the L2V5 solution of explicilty mentioning it in rule 20303.

  • Lucian Smith

    Lucian Smith - 2016-02-17

    I found a discussion on this in the libsbml-team archives:

    Sarah: "My current stance is that it should be an addition to rule 20303 NOT a new rule at all. I don't remember ever arguing the opposite but if I did then when I came to implement it I changed my mind !

    Basically in implementing the rule if it were a separate rule I would have to pick out and quash any reports of just a single level recursion that is covered by 20303. So it seemed to me that it is not a separate thing at all - merely a bug in our writing and implementation of the rule in the first place :-)"

    Mike: "Looking at 20303 and 20308, I agree with you.

    Here's my attempt at revising 20303:

    Inside the \token{lambda} of a \FunctionDefinition, the identifier of that \FunctionDefinition cannot appear as the value of a \token{ci} element. SBML functions are not permitted to be recursive \changed{or mutually recursive}. (References: L2V2 Section~3.5.3 and~4.3.2; L2V3 Sections~3.4.3 and~4.3.2; L2V4 Sections~3.4.3 and~4.3.2\changed{; L2V5 Sections~\ref{sec:ci-token} and~\ref{sec:functiondefinition}}.)

    Here's what 20308 previously said, before I removed it from the latest copy of the spec:

    Inside the \token{lambda} MathML element within a \FunctionDefinition object, mutually recursive functions are not allowed. \FunctionDefinition \token{id} attributes may not appear as identifiers in \token{lambda} MathML elements if that appearance would cause a self-referential loop of function definitions. (References: SBML L2V5 Section~\ref{sec:functiondefinition}.)

    Does the change look like it covers 20308?"

    Sarah: "Fine by me :-)"

  • Lucian Smith

    Lucian Smith - 2016-02-17

    I think it's clear that the editors voted "This situation should be covered by the validation rules," so however we do that is fine. I'll make the change to the L3v2 spec.

  • Lucian Smith

    Lucian Smith - 2016-02-17
    • status: open --> pending
  • Lucian Smith

    Lucian Smith - 2016-02-17

    (Also, checked in the new version into SVN--the change will be part of the forthcoming L3v2 specification.)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks