You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.
Currently on development (and master), if you create a workspace variable with the = operator, and then reassign it as a constant DAG node, the behavior of the variable is as if it was still a workspace variable.
For example:
> a = 1
> str(a)
_variable = x
_RevType = Natural
_value = 1
_dagType = Constant DAG node
_children = [ ]
> a <- 1
> b := exp(a)
> a <- 2
> a
2
> b
2.718282
> c <-1
> d := exp(c)
> c <- 2
> d
7.389056
Note:
a is represented as a "Constant DAG node", with no indication that it is a workspace var.
applying the <- operator changes the value, but when it binds to a deterministic node (b) it acts like it was workspace variable.
this means that reading a variable has side effects such that the results of scripts can vary depending on the order that they are executed.
Solution:
probably should report something in the str to indicate the status is a workspace variable
Either:
* throw an error when reassigning type to a var (e.g. error on the a <- 1)
* actually change the status of the node when reassigned.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently on development (and master), if you create a workspace variable with the = operator, and then reassign it as a constant DAG node, the behavior of the variable is as if it was still a workspace variable.
For example:
Note:
a
is represented as a "Constant DAG node", with no indication that it is a workspace var.<-
operator changes the value, but when it binds to a deterministic node (b
) it acts like it was workspace variable.Solution:
str
to indicate the status is a workspace variable* throw an error when reassigning type to a var (e.g. error on the
a <- 1
)* actually change the status of the node when reassigned.
The text was updated successfully, but these errors were encountered: