A list for the developers of CellML tools

Text archives Help


[cellml-dev] [Fwd: Re: [cellmlteam] FW: r2098 - in CellML_DOM_API/trunk: MaLaES/sources VACSS/sources VACSS/tests]


Chronological Thread 
  • From: r.britten at auckland.ac.nz (Randall Britten)
  • Subject: [cellml-dev] [Fwd: Re: [cellmlteam] FW: r2098 - in CellML_DOM_API/trunk: MaLaES/sources VACSS/sources VACSS/tests]
  • Date: Fri, 15 Feb 2008 12:23:09 +1300

Thanks Andrew. My SVN client shows the corrected log statement.
Interestingly, Trac does not show it (or at least, not yet):
http://trac.bioeng5.bioeng.auckland.ac.nz/physiomesynctrac/changeset/2098


> -----Original Message-----
> From: cellml-tools-developers-bounces at cellml.org [mailto:cellml-tools-
> developers-bounces at cellml.org] On Behalf Of Andrew Miller
> Sent: Friday, 15 February 2008 11:36 a.m.
> To: A list for the developers of CellML tools
> Subject: [cellml-dev] [Fwd: Re: [cellmlteam] FW: r2098 - in
> CellML_DOM_API/trunk: MaLaES/sources VACSS/sources VACSS/tests]
>
> This is probably a better list to send this to - sorry for those who
> get
> it twice.
>
> -------- Original Message --------
> Subject: Re: [cellmlteam] FW: r2098 - in CellML_DOM_API/trunk:
> MaLaES/sources VACSS/sources VACSS/tests
> Date: Fri, 15 Feb 2008 11:31:29 +1300
> From: Andrew Miller <ak.miller at auckland.ac.nz>
> Reply-To: team at cellml.org
> To: team at cellml.org
> References:
> <013501c86f57$c8a9aca0$59fd05e0$@britten at auckland.ac.nz>
>
>
>
> Randall Britten wrote:
> > Hi
> >
> > The log comment does not mention the validation code (a few new
> methods).
> > Could perhaps make an additional "dummy" check-in with the log
> comment for
> > that, or perhaps there is a better way of retrospectively putting a
> log
> > comment on it?
> >
> Hi Randall,
>
> Thanks for catching this, those changes were not supposed to have been
> committed yet (a good reminder of why one should always do svn diff
> before committing even for minor changes!).
>
> I don't think it is worth backing this out - it passes the tests
> (mainly
> because there aren't any that check the semantics validation is working,
> which isn't yet the case) and at some stage I would have had to commit
> it so Justin can continue work on the validation service.
>
> Making empty checkins is not particularly helpful in the history - it
> usually just confuses things more. I have instead edited the svn:log
> revprop on revision 2098 to mention the validation changes.
>
> Best regards,
> Andrew
>
> > Regards,
> > Randall
> >
> >
> >> -----Original Message-----
> >> From: automated-notifications-bounces at cellml.org [mailto:automated-
> >> notifications-bounces at cellml.org] On Behalf Of CellML Automated
> >> Notifications
> >> Sent: Thursday, 14 February 2008 4:43 p.m.
> >> To: automated-notifications at cellml.org
> >> Subject: r2098 - in CellML_DOM_API/trunk: MaLaES/sources
> VACSS/sources
> >> VACSS/tests
> >>
> >> Author: amil082
> >> Date: 2008-02-14 16:43:05 +1300 (Thu, 14 Feb 2008)
> >> New Revision: 2098
> >>
> >> Modified:
> >> CellML_DOM_API/trunk/MaLaES/sources/MaLaESImpl.cpp
> >> CellML_DOM_API/trunk/VACSS/sources/VACSSImpl.cpp
> >> CellML_DOM_API/trunk/VACSS/sources/VACSSImpl.hpp
> >> CellML_DOM_API/trunk/VACSS/tests/ValidateCellML.cpp
> >> Log:
> >> Default degree for root should be 2. There might be a need to make
> the
> >> degree context-sensitive if we are ever going to use degree from
> diff,
> >> where it does default to 1, but we don't use this at present anyway.
> >>
> >> Modified: CellML_DOM_API/trunk/MaLaES/sources/MaLaESImpl.cpp
> >> ===================================================================
> >> --- CellML_DOM_API/trunk/MaLaES/sources/MaLaESImpl.cpp 2008-02-14
> >> 01:08:40 UTC (rev 2097)
> >> +++ CellML_DOM_API/trunk/MaLaES/sources/MaLaESImpl.cpp 2008-02-14
> >> 03:43:05 UTC (rev 2098)
> >> @@ -539,7 +539,7 @@
> >> )
> >> {
> >> if (degree == NULL)
> >> - mActive += L"1";
> >> + mActive += L"2";
> >> else
> >> mTransform->RunTransformOnOperator(this, degree);
> >> }
> >>
> >> Modified: CellML_DOM_API/trunk/VACSS/sources/VACSSImpl.cpp
> >> ===================================================================
> >> --- CellML_DOM_API/trunk/VACSS/sources/VACSSImpl.cpp 2008-02-14
> >> 01:08:40 UTC (rev 2097)
> >> +++ CellML_DOM_API/trunk/VACSS/sources/VACSSImpl.cpp 2008-02-14
> >> 03:43:05 UTC (rev 2098)
> >> @@ -1,6 +1,7 @@
> >> #include "VACSSImpl.hpp"
> >> #include "VACSSBootstrap.hpp"
> >> #include <string>
> >> +#include <set>
> >>
> >> /* The code special cases this to match the CellML namespace
> >> * corresponding to the appropriate CellML version...
> >> @@ -1697,8 +1698,156 @@
> >> }
> >>
> >> void
> >> +ModelValidation::validateNameUniqueness(iface::cellml_api::Model*
> >> aModel)
> >> +{
> >> + // Firstly, we will validate the uniqueness of component names...
> >> + RETURN_INTO_OBJREF(mc, iface::cellml_api::CellMLComponentSet,
> >> + aModel->modelComponents());
> >> + RETURN_INTO_OBJREF(cci,
> iface::cellml_api::CellMLComponentIterator,
> >> + mc->iterateComponents());
> >> +
> >> + std::set<std::wstring> allNames;
> >> +
> >> + while (true)
> >> + {
> >> + RETURN_INTO_OBJREF(comp, iface::cellml_api::CellMLComponent,
> >> + cci->nextComponent());
> >> + if (comp == NULL)
> >> + break;
> >> +
> >> + RETURN_INTO_WSTRING(n, comp->name());
> >> +
> >> + if (allNames.count(n) != 0)
> >> + {
> >> + SEMANTIC_ERROR(L"More than one component in the model named "
> +
> >> n, comp);
> >> + }
> >> + allNames.insert(n);
> >> + }
> >> +
> >> + allNames.clear();
> >> +
> >> + // Next, the uniqueness of all units names...
> >> + RETURN_INTO_OBJREF(mu, iface::cellml_api::UnitsSet,
> >> + aModel->modelUnits());
> >> + RETURN_INTO_OBJREF(cui, iface::cellml_api::UnitsIterator,
> >> + mu->iterateUnits());
> >> +
> >> + while (true)
> >> + {
> >> + RETURN_INTO_OBJREF(u, iface::cellml_api::Units,
> >> + cui->nextUnits());
> >> + if (u == NULL)
> >> + break;
> >> +
> >> + RETURN_INTO_WSTRING(n, u->name());
> >> +
> >> + if (allNames.count(n) != 0)
> >> + {
> >> + SEMANTIC_ERROR(L"More than one component in the model named "
> +
> >> n, u);
> >> + }
> >> + allNames.insert(n);
> >> + }
> >> +}
> >> +
> >> +void
> >> +ModelValidation::validatePerModel(iface::cellml_api::Model* aModel)
> >> +{
> >> + validateNameUniqueness(aModel);
> >> + // validateComponentRefs(aModel);
> >> + // validateUnitsRefs(aModel);
> >> +
> >> + RETURN_INTO_OBJREF(cis, iface::cellml_api::CellMLImportSet,
> aModel-
> >>
> >>> imports());
> >>>
> >> + RETURN_INTO_OBJREF(cii, iface::cellml_api::CellMLImportIterator,
> >> cis->iterateImports());
> >> + while (true)
> >> + {
> >> + RETURN_INTO_OBJREF(ci, iface::cellml_api::CellMLImport, cii-
> >>
> >>> nextImport());
> >>>
> >> + if (ci == NULL)
> >> + break;
> >> +
> >> + validatePerImport(ci);
> >> +
> >> + RETURN_INTO_OBJREF(m, iface::cellml_api::Model, ci-
> >>
> >>> importedModel());
> >>>
> >> + if (m != NULL)
> >> + validatePerModel(m);
> >> + }
> >> +}
> >> +
> >> +void
> >> +ModelValidation::validatePerImport(iface::cellml_api::CellMLImport*
> >> aImport)
> >> +{
> >> + validateComponentRefs(aImport);
> >> + validateUnitsRefs(aImport);
> >> +}
> >> +
> >> +void
> >>
> +ModelValidation::validateComponentRefs(iface::cellml_api::CellMLImport
> >> * aImport)
> >> +{
> >> + RETURN_INTO_OBJREF(ics, iface::cellml_api::ImportComponentSet,
> >> + aImport->components());
> >> + RETURN_INTO_OBJREF(ici,
> iface::cellml_api::ImportComponentIterator,
> >> + ics->iterateImportComponents());
> >> + RETURN_INTO_OBJREF(m, iface::cellml_api::Model, aImport-
> >>
> >>> importedModel());
> >>>
> >> + if (m == NULL)
> >> + return;
> >> +
> >> + RETURN_INTO_OBJREF(ccs, iface::cellml_api::CellMLComponentSet,
> >> + m->modelComponents());
> >> +
> >> + while (true)
> >> + {
> >> + RETURN_INTO_OBJREF(ic, iface::cellml_api::ImportComponent,
> >> + ici->nextImportComponent());
> >> + if (ic == NULL)
> >> + return;
> >> +
> >> + RETURN_INTO_WSTRING(cr, ic->componentRef());
> >> + RETURN_INTO_OBJREF(rc, iface::cellml_api::CellMLComponent,
> >> + ccs->getComponent(cr.c_str()));
> >> + if (rc == NULL)
> >> + {
> >> + SEMANTIC_ERROR(L"component_ref " + cr + "refers to component
> >> which "
> >> + L"doesn't exist", ic);
> >> + }
> >> + }
> >> +}
> >> +
> >> +void
> >> +ModelValidation::validateUnitsRefs(iface::cellml_api::CellMLImport*
> >> aImport)
> >> +{
> >> + RETURN_INTO_OBJREF(ius, iface::cellml_api::ImportUnitsSet,
> >> + aImport->units());
> >> + RETURN_INTO_OBJREF(iui, iface::cellml_api::ImportUnitsIterator,
> >> + ius->iterateImportUnits());
> >> + RETURN_INTO_OBJREF(m, iface::cellml_api::Model, aImport-
> >>
> >>> importedModel());
> >>>
> >> + if (m == NULL)
> >> + return;
> >> +
> >> + RETURN_INTO_OBJREF(cus, iface::cellml_api::UnitsSet,
> >> + m->modelUnits());
> >> +
> >> + while (true)
> >> + {
> >> + RETURN_INTO_OBJREF(iu, iface::cellml_api::ImportUnits,
> >> + iui->nextImportUnits());
> >> + if (iu == NULL)
> >> + return;
> >> +
> >> + RETURN_INTO_WSTRING(ur, iu->unitsRef());
> >> + RETURN_INTO_OBJREF(ru, iface::cellml_api::Units,
> >> + cus->getUnits(ur.c_str()));
> >> + if (ru == NULL)
> >> + {
> >> + SEMANTIC_ERROR(L"units_ref " + ur + "refers to units which "
> >> + L"don't exist", iu);
> >> + }
> >> + }
> >> +}
> >> +
> >> +void
> >> ModelValidation::validateSemantics()
> >> {
> >> + // Firstly do things that are done per import...
> >> + validatePerModel(mModel);
> >> }
> >>
> >> iface::cellml_services::CellMLValidityErrorSet*
> >>
> >> Modified: CellML_DOM_API/trunk/VACSS/sources/VACSSImpl.hpp
> >> ===================================================================
> >> --- CellML_DOM_API/trunk/VACSS/sources/VACSSImpl.hpp 2008-02-14
> >> 01:08:40 UTC (rev 2097)
> >> +++ CellML_DOM_API/trunk/VACSS/sources/VACSSImpl.hpp 2008-02-14
> >> 03:43:05 UTC (rev 2098)
> >> @@ -199,6 +199,11 @@
> >>
> >> void validateRepresentation(iface::dom::Element* aTop);
> >> void validateSemantics();
> >> + void validatePerModel(iface::cellml_api::Model* aModel);
> >> + void validatePerImport(iface::cellml_api::CellMLImport* aImport);
> >> + void validateNameUniqueness(iface::cellml_api::Model* aModel);
> >> + void validateComponentRefs(iface::cellml_api::CellMLImport*
> aImport);
> >> + void validateUnitsRefs(iface::cellml_api::CellMLImport* aImport);
> >>
> >> struct ReprValidationAttribute;
> >> struct ReprValidationElement
> >>
> >> Modified: CellML_DOM_API/trunk/VACSS/tests/ValidateCellML.cpp
> >> ===================================================================
> >> --- CellML_DOM_API/trunk/VACSS/tests/ValidateCellML.cpp 2008-02-14
> >> 01:08:40 UTC (rev 2097)
> >> +++ CellML_DOM_API/trunk/VACSS/tests/ValidateCellML.cpp 2008-02-14
> >> 03:43:05 UTC (rev 2098)
> >> @@ -43,7 +43,16 @@
> >> iface::cellml_services::CellMLSemanticValidityError* csve
> >> )
> >> {
> >> - return L"";
> >> + RETURN_INTO_OBJREF(ee, iface::cellml_api::CellMLElement, csve-
> >>
> >>> errorElement());
> >>>
> >> + DECLARE_QUERY_INTERFACE_OBJREF(eede, ee,
> >> cellml_api::CellMLDOMElement);
> >> + RETURN_INTO_OBJREF(de, iface::dom::Element, eede->domElement());
> >> +
> >> + uint32_t col;
> >> + uint32_t row = vacss->getPositionInXML(de, 0, &col);
> >> + wchar_t buf[40];
> >> + swprintf(buf, 40, L"line %u, column %u", row, col);
> >> +
> >> + return buf;
> >> }
> >>
> >> void
> >> @@ -71,6 +80,8 @@
> >>
> >> if (csve != NULL)
> >> location = ConvertSemanticValidityError(vacss, model, csve);
> >> + else
> >> + location = L"*unknown - can't QI to
> >> CellMLSemanticValidityError*";
> >> }
> >>
> >> printf("%S%S at %S\n",
> >>
> >> _______________________________________________
> >> automated-notifications mailing list
> >> automated-notifications at cellml.org
> >> http://www.cellml.org/mailman/listinfo/automated-notifications
> >>
> >
> >
>
> _______________________________________________
> team mailing list
> team at cellml.org
> http://www.cellml.org/mailman/listinfo/team
>
> _______________________________________________
> cellml-tools-developers mailing list
> cellml-tools-developers at cellml.org
> http://www.cellml.org/mailman/listinfo/cellml-tools-developers





Archive powered by MHonArc 2.6.18.

Top of page