Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » libsbml-development » No defaults in SBML L3
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
Sarah Keating


Posts: 417
Registered:
May 2004
No defaults in SBML L3 15 Sep '09 02:28 Go to previous message

Hi libSBML-users

NOTE: Feedback requested :-)

For anyone interested the current svn trunk for libSBML now contains
code that sets any new attributes (with the exception of sbml:units and
the required attribute for packages) and writes out SBML L3.

We will release this as a beta but we have one outstanding issue that we
would appreciate your feedback on:

================

The SBML Level 3 specification removes default values. Thus it will be
the responsibility of the user to set values for any required
attributes. For example the following code

Unit * u = new Unit(3,1);
u->setKind("mole")

would create a unit that would have the following values:

<unit kind="mole" exponent="NaN" scale="2147483647" multiplier="NaN"/>

This would be the internal representation of the unit.

Using the function getMultiplier() will return NaN etc.

Writing out this unit would produce the text above; since the attributes
are now required libSBML will write them out with their current value -
which have obviously not been set.

This leaves libSBML in a slight dilemma regarding boolean attributes.
There is no such thing as "Not-A-Boolean". Thus any boolean attribute
must be internally initialised with a boolean value. So for example

Species * s = new Species(3,1);

would produce a species

<species id="" compartment="" hasOnlySubstanceUnits="false"
boundaryCondition="false" constant="false"/>

where the boolean attributes have values (the default L2 values) even
though the user has not explicitly set them.

So using the function getBoundaryCondition() will return "false".

Obviously we can use internal flags to track whether an attribute has
been explicitly set and the function isSetBoundaryCondition() would
return "false"; but can we rely on the user to check :-) ?

We have a thought on this, but appreciate it is not the neatest of
solutions:

The getBooleanFoo() functions could check whether the attribute has been
set and throw an exception if it has not.

The write process could also check and produce something like

<species id="" compartment="" hasOnlySubstanceUnits="Not Set"
boundaryCondition="Not Set" constant="Not Set"/>

Our reasoning is that this will avoid a user receiving bad information
regarding a model.

We would appreciate your thoughts on this.

Please keep in mind that whilst the above discussion uses attributes we
are already all familiar with - L3 + packages may well introduce other
boolean attributes where there is no obvious default value!!

Thanks

Sarah




____________________________________________________________
To manage your libsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/libsbml-development

For a web interface to the libsbml-development mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the libsbml-development list,
contact sbml-team@caltech.edu

      

SubjectPosterDate
Read Message   No defaults in SBML L3  Sarah Keating15 Sep '09 02:28
Read Message   Re: No defaults in SBML L3 Frank Bergmann15 Sep '09 09:00
Read Message   Re: No defaults in SBML L3 Lucian Smith18 Sep '09 17:03
Read Message   Re: No defaults in SBML L3 myers18 Sep '09 19:33
Read Message   Re: No defaults in SBML L3 Sarah Keating21 Sep '09 01:02
Read Message   Re: No defaults in SBML L3 myers21 Sep '09 08:57
Read Message   Re: No defaults in SBML L3 Stefan.Hoops21 Sep '09 10:17
Read Message   Re: No defaults in SBML L3 myers21 Sep '09 10:39
Read Message   Re: No defaults in SBML L3 curoli21 Sep '09 11:00
Read Message   Re: No defaults in SBML L3 Stefan.Hoops21 Sep '09 12:19
Read Message   Re: No defaults in SBML L3 Lucian Smith21 Sep '09 12:56
Read Message   Re: No defaults in SBML L3 Lucian Smith21 Sep '09 12:42
Read Message   Re: No defaults in SBML L3 Mike Hucka21 Sep '09 22:03
Read Message   Re: No defaults in SBML L3 Stefan.Hoops22 Sep '09 06:37
Read Message   Re: No defaults in SBML L3 curoli22 Sep '09 12:21
Read Message   Re: No defaults in SBML L3 Stefan.Hoops22 Sep '09 13:40
Read Message   Re: No defaults in SBML L3 curoli22 Sep '09 14:42
Read Message   Re: No defaults in SBML L3 Stefan.Hoops22 Sep '09 15:03
Read Message   Re: No defaults in SBML L3 curoli22 Sep '09 18:39
Read Message   Re: No defaults in SBML L3 Sarah Keating23 Sep '09 01:29
Read Message   Re: No defaults in SBML L3 curoli23 Sep '09 05:40
Read Message   Re: No defaults in SBML L3 Sarah Keating23 Sep '09 07:08
Read Message   Re: No defaults in SBML L3 myers23 Sep '09 08:47
Read Message   Re: No defaults in SBML L3 Lucian Smith23 Sep '09 11:58
Read Message   Re: No defaults in SBML L3 ajouraku24 Sep '09 01:57
Read Message   Re: No defaults in SBML L3 myers23 Sep '09 08:16
Read Message   Re: No defaults in SBML L3 Lucian Smith22 Sep '09 15:42
Read Message   Re: No defaults in SBML L3 Sarah Keating23 Sep '09 03:11
Previous Topic:Updating libsbml installation instructions
Next Topic:Unit consistency check in libsbml 3.3.2
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.