from daredare import *

# variables declarations and injection into workspace

res = set_variables(["a"])
assert(str(res) == "[a]")
assert(str(a) == "a")
assert(str(variables) == "[a]")

res = set_variables(["a","b"])
assert(str(res) == "[a, b]")
res = set_variables("a")
assert(str(res) == "[a]")
res = set_variables("a b")
assert(str(res) == "[a, b]")

res = set_exovariables("a b")
assert(str(res) == "[a, b]")
assert(str(exovariables) == "[a, b]")

res = set_parameters("a b")
assert(str(parameters) == "[a, b]")


# forward variables and backward variables

x = Variable('x')

x1 = x(+1)
x_1 = x(-1)
z = x_1(+2)
assert(x1 == z)

# x and y denote the same formal variables but are in two different instances
y = Variable('x')
assert(y == x)

