I am working on prolog and faced this scenario - In my query, I pass something like this:
?- query( 2*X + 3*Y >= 3*Z )
Now, what I would like to do is have the prolog program capture the inequality expression so that I can have the above inequality in variables like below:
variable 'Lhs' will have 2*X + 3*Y
variable 'Rhs' will have 3*Z
Now I want the inequality involved to be also assigned somewhere (in a variable called Opr??), so that saying something like Lhs Opr Rhs would mean exactly like saying "2*X + 3*Y >= 3*Z"..
This is a general form of the scenario that I am working on. I somehow want the "inequality" involved to be identified, so that I can use it later in my code.
I am working on Eclipse-CLP with IC library.