I have a problem with PySMT. I'm new in the field and I have no idea how to use arrays.
I've understood that:
1) It's possible to declare an array as:
a = Symbol("a", ArrayType(INT, INT))
2) Then, to store values in the array:
k = Store(a, Int(0), int(5))
3) Finally, to retrieve the value:
print(simplify(k).arg(2))
I don't know if there is a better way to do that, I will appreciate also some feedback about that.
Now, the real question is: Can I append values in the array inside a for loop? For example, is it possible to have something like :
for i in range(10):
Store(a, Int(i), Int(i*2))
The problem here is that to retrieve the saved values I need to save the "Store" operation inside a variable (like 'k' above). I am pretty sure that should exist some way to do that..but it's too hard to find examples online !