Parsed symbols evaluate prematurely
Symbolic parsing seems to evaluate sometimes but not always. It should always be keeping the full expression.
import finesse
model = finesse.script.parse("""
l l1 P=1
l l2 P=2*l1.P-3
""")
model.l2.P
>>> <l2.P=-1.0 @ 0x15d6a1e40>
Whereas the correct behaviour
model = finesse.script.parse("""
l l1 P=1
l l2 P=2*l1.P
""")
model.l2.P
>>> <l2.P=(2*l1.P) @ 0x15d6a25c0>
If you make this expression from the Python API it works as expected. So my best guess is the parser is somehow evaluating at the final step when building the expression?
2*model.l1.P.ref-1
>>> <Symbolic='((2*l1.P)-1)' @ 0x15d744a90>
I also can't remember if we decided to evaluate simple numerics too, I thought we wanted to preserve user intent?
model = finesse.script.parse("""
l l1 P=1
l l2 P=2*2/2
""")
model.l2.P
<l2.P=2.0 @ 0x15d503b80>