I'm doing some work on a Complex Event Processing system. It supports filtering of sets of records based on members of those records, using a query language. The language supports logical, arithmetic and user-defined operators over arbitrary members.
Here's an example of a supported query:
( MemberA > MemberB ) &&
( @in MemberC { "str1", "str2" } ) &&
( com.foo.Bar.myPred( MemberD, MemberE ) )
My problem is that I want to combine queries into one super query, and then I want to optimize that super query to eliminate redundancies, tautologies and contradictions. e.g. I want to take
A > 0
and combine it with
A > 1
which is quite easy:
A > 0 || A > 1
but then I want to optimize it so that it reduces to
A > 0
If there are any URLs or books that discuss this general topic, I'd appreciate knowing about them.