Open MarcoLm993 opened 1 month ago
Hi Marco,
great!
I think that it is debatable whether pi should be the same as 3.14.... I currently would argue that as an expression, it should be a function wihtout arguments (a symbol, that is) and only upon evaluating it, it should be interpreted with an approximation. @tquatmann @volkm
It would be good if you could add some small tests, i.e., a small programme with sin/cos and pi/e and show that this gets properly parsed.
We probably do not handle model building for jani models with these constructs. Thus, I guess that the Jani Builders should get methods that check whether these ingredients are in the jani model and refuse working with them. One approach here would be to use the model features of Jani. If trig is not added as a model feature, the parser should complain (or at least during a 'finalize' call) and the model builders should check whether this model feature is present. Let us know if you have any questions about this!
Best, Sebastian
Hi Sebastian,
thanks for the very quick feedback!
Best, Marco
Hello @sjunges and @tquatmann ,
I just pushed the last changes related to this PR. Now it should be good to go, if you do not spot anything else to change. :)
Looking forward to your inputs.
Best, Marco
This PR introduces support to the
sin
andcos
operators, and to the PI and Euler number constants.In particular, for the sin and cos operators I introduced a new expression type called
trigonometric
, that can be used later on in case other trigonometric operators will be integrated in storm.Please let me know if I missed any additional place where the aforementioned operators need to be defined.