A list for the developers of CellML tools

Text archives Help


Re: [[cellml-dev] ] libCellML handling of non-valid CellML - discussion request


Chronological Thread 
  • From: David Nickerson <david.nickerson AT gmail.com>
  • To: cellml-tools-developers AT lists.cellml.org
  • Cc: A list for the developers of CellML tools <cellml-tools-developers AT cellml.org>
  • Subject: Re: [[cellml-dev] ] libCellML handling of non-valid CellML - discussion request
  • Date: Fri, 16 Jan 2015 11:48:18 +1300

Hi Alan,

Just to address part of your email. In my view, the libCellML API
should only expose objects and methods that are of use to application
developers for working with CellML models and not be restricted to the
current XML serialisation. In this instance, a connection element is
just the serialisation of the relationship between variables in two
components. I don't see a need for a special object in the API that
represents this as such information is just a property of the
respective variables.

In my view an API that simply exposes the primary data in a CellML
model - components, variables, units, and math - provides a much
cleaner, more intuitive, and flexible interface for application
developers than one similar to the current CellML API which simply
exposes a DOM-based view of the XML serialisation format. Obviously,
this is why discussion on the proposed object model and API for
libCellML would have been more valuable to have prior to getting into
these implementation details.


Cheers,
Andre.


On Fri, Jan 16, 2015 at 11:25 AM, Alan Garny
<alan.garny AT inria.fr>
wrote:
> Hi Randall,
>
> I am not sure I fully understand the issue at hand. What do you mean exactly
> by non-valid CellML models? Using libCellML, I would expect to be able to
> create a model with a component C. Within that component, I would expect to
> be able to create a variable V with units U, and stop here if I want. The
> model would clearly be incomplete, yet I would still expect to be able to
> save it and load it back without any problem. However, if if I was then to
> ask libCellML to validate the model, then I would expect libCellML to tell
> me that the unit U hasn't been defined, as well as probably tell me that
> there is no equation that uses the variable V. More generally, when it comes
> to validation, I would expect libCellML to implement all the rules that are
> in the CellML specification, as well as Jonathan Cooper's algorithm for
> checking units consistency.
>
> About connections, I imagine I am once again missing something. Why would
> you hide them? What if, for some reason or another, a CellML-capable
> software needs to know about the connections? As an API, I would expect
> libCellML to give me access to everything that is part of the CellML
> language.
>
> Regarding your options:
> 1) I am clearly missing something. In other words, I don't see the need for
> this.
> 2) Independent of whether a model is valid or not, I would in any case have
> a "connection" class and make it accessible to libCellML users.
> 3) 80/20 rule?
>
> Otherwise, "pa" (in "still under consruction, pa")?
>
> Alan
>
> ________________________________
>
> From: "Randall Britten"
> <r.britten AT auckland.ac.nz>
> To:
> cellml-tools-developers AT cellml.org
> Sent: Thursday, 15 January, 2015 9:46:47 PM
> Subject: [[cellml-dev] ] libCellML handling of non-valid CellML - discussion
> request
>
> Hi all
>
> Firstly, Happy New Year, hope you have a great 2015!
>
> I had some conversations yesterday around the ABI about how libCellML should
> handle non-valid CellML models. We are especially envisaging model-editing
> software that uses libCellML, progressively building and modifying models,
> meaning that as the model is worked on step-by-step, there will often be
> steps that are part of a group of steps, and only once the group of steps is
> complete is the model in a valid state. Another likely scenario is using
> software that uses libCellML to load models that were created independently
> of libCellML, and it would be necessary to handle the case where the loaded
> model might be invalid (e.g. still under construction, or pa).
>
> Within reason, we’d like libCellML to support the corresponding use cases,
> although it might make sense to defer them till later.
>
> An example that has arisen is how connections are represented. While the
> XML has a “connection” element that is a child of the “model” element, the
> design that I’ve followed so far aimed to hide that, treating it as an
> implementation detail, so that variables would simply allow for a query
> regarding which other variables they are connected to.
>
> Some options considered so far:
> 1) Phantom Variables (and similarly for other situations, e.g. Phantom
> Units), which serve as place-holders.
> 2) Reinstate “connection” class in the object model to handle the case where
> the connection is not valid (e.g. refers to variables or components that
> don’t exist in the model).
> 3) Defer consideration of partially defined and invalid models (80/20 rule).
>
> Please provide feedback on this. I’ll be responding to feedback received
> today and next week on the same day it is received (within reason).
>
> Thanks in advance.
>
> Regards,
> Randall
>
>



--


David Nickerson
about.me/david.nickerson



Archive powered by MHonArc 2.6.18.

Top of page