Monday, June 23, 2014

Weekly Log: June 16 - June 22

The C++ SBML library, libsbml, is quite extensive in terms of validation, and it would be infeasible to validate everything libsbml does in the time frame I have. So my focus is only the arrays package.

This week I started coding for the arrays package validation. In the validation section of the arrays specification, there are categories of validation. For instance, there are lists of rules that are applied to extended SBase objects, dimension objects, index objects, and math, among others.  I tried to be as consistent as possible to the validator in libsbml. The validator I am implementing works as follows: there is a validator for each validation category (sbase, dimension, index...), and each validator checks a set of constraints, where each constraint checks for a certain validation rule (e.g. dimension size should point to a valid parameter with a non-negative integer value and that is both scalar and constant). If a constraint is violated, then an error is reported. The error tells what is wrong with the given document that is being checked. Each validator returns a list of errors. The arrays validator calls the validator for each validation category.

So far, these are the things being validated:
  • Only certain SBase objects can have a listOfDimensions;
  • For listOfDimensions and listOfIndices, array dimension for the objects in the list should be unique;
  • For listOfDimensions and listOfIndices, having an object with array dimension n implies that there is objects with array dimension 0..n-1;
  • Dimension size should point to a parameter. This parameter should be a scalar with a constant non-negative integer value;
  • The first argument of a selector function should point to a vector or an array object.
  • Vectors should be regular, and not rigged.
There are still some validation left to do and this will keep me busy for some time.

No comments:

Post a Comment