Code Monkey home page Code Monkey logo

Comments (7)

fbergmann avatar fbergmann commented on July 19, 2024

@FFroehlich if a variable in SBML is called 'INF' or 'NaN' (which is a moronic idea and of no use at all), then that is just on identifier for the variable. And it is not to be confused with the MathML construct. In mathML it can be easily differentiated by the fact, that there will be a NaN , so an identifier called NaN rather than '' ...

so i think the test is still valid, and since it falls into the allowable subset of strings that represent a valid SId, i think it is ok to keep.

from sbml-test-suite.

FFroehlich avatar FFroehlich commented on July 19, 2024

@FFroehlich if a variable in SBML is called 'INF' or 'NaN' (which is a moronic idea and of no use at all),

I agree !

then that is just on identifier for the variable. And it is not to be confused with the MathML construct. In mathML it can be easily differentiated by the fact, that there will be a NaN , so an identifier called NaN rather than '' ...

But that information is lost after processing with libsbml.formulaToL3String, correct? http://sbml.org/Software/libSBML/5.18.0/docs/python-api/namespacelibsbml.html#a5aee8f98b5db063cadbae96c5e000cb3

so i think the test is still valid, and since it falls into the allowable subset of strings that represent a valid SId, i think it is ok to keep.

I am arguing that there actually should be a test! I just wasn't sure whether it is technically possible to pass it, but it sounds like it is.

from sbml-test-suite.

fbergmann avatar fbergmann commented on July 19, 2024

indeed, that information won't be there when converting the ASTNode to infix. So what would need to happen, is that before running the tests, all oddly named Species / Parameters / Compartments / Reactions would have to be renamed:

  • true, false, nan, inf, time, avogadro, pi

prior to running the simulation. I'm quite sure there were tests for variables named time at least.

And i thought there would test for that ... maybe @luciansmith can provide some insight here. Since all the tests in the 'semantic' branch, are supposed to be simulatable and numerically comparable, maybe there was an issue with comparing inf / nan values?

from sbml-test-suite.

FFroehlich avatar FFroehlich commented on July 19, 2024

indeed, that information won't be there when converting the ASTNode to infix. So what would need to happen, is that before running the tests, all oddly named Species / Parameters / Compartments / Reactions would have to be renamed:

  • true, false, nan, inf, time, avogadro, pi

prior to running the simulation. I'm quite sure there were tests for variables named time at least.

There are tests for time/avogadro but those are csymbols, so they can be correctly parsed by libsbml.formulaToL3StringWithSettings with avocsymbol set to True (this seems to generally affect all csymbols, including time). I don't think there are any tests for pi/true/false/inf/nan

And i thought there would test for that ... maybe @luciansmith can provide some insight here. Since all the tests in the 'semantic' branch, are supposed to be simulatable and numerically comparable, maybe there was an issue with comparing inf / nan values?

from sbml-test-suite.

luciansmith avatar luciansmith commented on July 19, 2024

Yup, these would be good tests to add. As you say, they would be clear in the XML, and not clear at all in the infix!

from sbml-test-suite.

luciansmith avatar luciansmith commented on July 19, 2024

OK, added these tests to the 'develop' branch: c6b515a

The last two crash the SBML Test Runner, but I'd love to hear back from you if you get these to work on your own system.

from sbml-test-suite.

luciansmith avatar luciansmith commented on July 19, 2024

These tests are now in the 3.4.0 release.

from sbml-test-suite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.