Enforce use of relation TS when specified#520
Conversation
This could avoid potential issues caused by object slicing.
CyanoKobalamyne
left a comment
There was a problem hiding this comment.
I agree with the pseudo init fixes and changes, but what is the use case for the use-rel option? I don't think we have exposed the functional-relational distinction through the CLI until now. Also, I think we might eventually want to merge the two implementations and just leave the internal flag that indicates whether the system is functional...
I added it because I came across an interesting case where it can help improve performance when combined with the transformation introduced in #521. That said, I haven’t evaluated it on a larger benchmark set, so I’m not certain of its overall impact. |
Co-authored-by: Áron Ricardo Perez-Lopez <arpl@cs.stanford.edu>
This PR introduces the following changes:
--use-rel-tspseudo_init_and_prop()accept only relation TSThe latter two are important to avoid issues arising from casting based on
ts.is_functional().In the original implementation (b19eafb),
pseudo_init_and_prop()may "convert" a functional TS to a relational one.However, since we are assigning the returned
RelationalTransitionSystemback to aTransitionSystem&inpono.cpp, object slicing could cause issues in subsequent casting.For example, if we modify
pono.cppas follows:A
std::bad_castwill be encountered (suppose--pseudo-init-prop is enabled).