I have propositional and temporal logic expressions like:
"phi1 => phi2";
"phi1 U phi2";
"X phi1".
I would like to represent them using prefix notation, i.e, "phi1 U phi2" would be represented as "U phi1 phi2". Any ideas on which data type to use to represent "U phi1 phi2"? I'm using python and I know I can represent it as a string, but I was wondering if there something more efficient because I need to acess each term of the expression individually. Also tried to represent it as ("U","phi1","phi2")
which works fine, but for more complex formula it becomes heavy on "()".
Thanks in advance