CellML Discussion List

Text archives Help


[cellml-discussion] model errors


Chronological Thread 
  • From: ak.miller at auckland.ac.nz (Andrew Miller)
  • Subject: [cellml-discussion] model errors
  • Date: Tue, 17 Oct 2006 13:36:17 +1300

David Nickerson wrote:
> Hi Andrew,
>
> Just been going through trying to find some errors in my current model
> that caused an exception to be thrown by the CCGS
> (cg->generateCode(mod)) but with no error message. The two problems I
> eventually found were that a component_ref in an import had a value
> that didn't match any component in the model being imported (I had
> name and component_ref attributes swapped around) and that a
> variable_? attribute on a map_variables referred to a variable that
> didn't exist in the component (a bit to ambitious with a copy and paste).
>
> While I know these kinds of errors fall into the model validation
> category and that such validation isn't really a part of the API
> itself, I just thought I'd point these two out in case there was a
> quick and easy way to add in a useful error message for when the
> exception gets thrown.
The reason that there is no such system at the moment is because this
error comes from within the core CellML API, not the CCGS (the CCGS has
error messages for all, or at least most conditions that it detects, but
it will just pass exceptions from the CellML API straight through).
There is currently no method for signalling the content of error
messages in the core CellML API (we can't put this information in
exceptions, because then we can't expose the whole API to XPCOM). We
could add a non-threadsafe method similar to that on the CCGS and CIS,
i.e. a "get last error" function, although this wouldn't work well if
there was more than one concurrent user of the same model.
>
> The alternative is a proper validation tool for CellML 1.1 models.
I think this is the best solution, and something that we need.
> Do you know of any options for such a tool?
There isn't yet, although one could probably be built on top of Jonathan
Cooper's work.
> or plans to make one?
Peter Hunter has expressed an interest in having such functionality
embedded into PCEnv. To get this to work, it would likely be based off
Jonathan Cooper's algorithms, but moved to be an extension module of the
CellML API (i.e. similar in status and implementation to the CIS and
CCGS). Presumably, some validation would have to be done before anything
is loaded into the CellML API, at the XML level (e.g. against a CellML
1.1 conformant XML or RELAX-NG schema), but once this basic validation
is complete, most of the validation could be done through the CellML
API. Steve McKeever has noted that he thinks this would make a good MSc
project or DTC team project for one of his students. However, I am not
aware of any more developed plans for this.

Best regards,
Andrew




  • [cellml-discussion] model errors, Andrew Miller, 10/17/2006

Archive powered by MHonArc 2.6.18.

Top of page