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

Cases where a single symbol can explicitly be declared as different things #1173

Open
TorkelE opened this issue Jan 14, 2025 · 2 comments
Open
Labels

Comments

@TorkelE
Copy link
Member

TorkelE commented Jan 14, 2025

rn = @reaction_network begin
    @species X(t)
    @variables X(t)
end

species(rn) # [X(t)]
nonspecies(rn) # []

When working on the inference update PR I figured it would make sense to have a couple of tests checking ensuring that this wasn't possible. Turns out it is...

I will sort this one out quite soon.

@TorkelE TorkelE added the bug label Jan 14, 2025
@TorkelE
Copy link
Member Author

TorkelE commented Jan 14, 2025

One question we have to decide. Should double declaration @species/@compounds be declared, e.g.

@reaction_network begin
        @species X(t) O(t)
        @compounds begin X(t) ~ 2O end
    end

There is no ambuguity what model this should generate. However, @compounds provide full declaration of metadata, defaults, etc. So if these are different it is not longer clear. It seems easier to not allow this kind of double declaration.

@isaacsas
Copy link
Member

I can't see why a double declaration would ever be intentional, so I'd think it should give an error.

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

No branches or pull requests

2 participants