Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing rule?: Variables cannot have true/false as value #308

Open
MichaelClerx opened this issue Apr 19, 2020 · 6 comments
Open

Missing rule?: Variables cannot have true/false as value #308

MichaelClerx opened this issue Apr 19, 2020 · 6 comments
Labels
normative Pertaining to the normative specification

Comments

@MichaelClerx
Copy link
Contributor

We're currently not ruling out x = true, as far as I can see, although I thought this had been our intention?

@MichaelClerx MichaelClerx added the normative Pertaining to the normative specification label Apr 19, 2020
@kerimoyle
Copy link
Collaborator

Nope, we decided to leave it. See #29

@MichaelClerx
Copy link
Contributor Author

That was about having the <true> and <false> constants from MathML in the language at all. I don't see anywhere in there where we decided x = true is okay

@kerimoyle
Copy link
Collaborator

So you could have a variable evaluate to a boolean value in the MathML, but you're just not allowed to assign it a boolean value yourself? See #29 (comment) ?

@MichaelClerx
Copy link
Contributor Author

MichaelClerx commented Apr 20, 2020

I'd say "x = true" shouldn't be allowed, nor should "x = (1 == 2)"

@nickerso
Copy link
Contributor

I'd be concerned about embarking down the path of defining what was allowed in the math. Currently we only say "these are the allowed elements from MathML2" and don't really care if people make bad models. This particular case could be something added to the libcellml checking for "bad math" that would help people develop more robust models, but I don't see a need to rule it out in the specification.

If we did open up this case, then you'd expect a whole slew of such rules that try to define what a good model is, or at least ruling out all the things we know are bad.

Its also maybe useful to remember that our models are all equalities, there is no assignment operator.

@MichaelClerx
Copy link
Contributor Author

We're already not allowing initial_value="true" though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
normative Pertaining to the normative specification
Projects
None yet
Development

No branches or pull requests

3 participants