It's an interesting question! You could write a script that parses each constraint and checks the number of separate comparisons in each one although I'm not sure if that is the best way to measure them.
A:
rmx
2010-08-18 11:02:20
I think this is trivial. I can write a dummy tool for my cases, but I think somebody did this before.
Laurențiu Dascălu
2010-08-18 11:05:53
The number of seperate comparisons won't get you the stronger/weaker link, will it? For example, his first example has the same number of comparisons in each case, but they aren't equally as strong.
Stephen
2010-08-18 11:09:10
Laurențiu Dascălu
2010-08-18 11:11:07
A:
Are you trying to decide if a constraint C1 subsumes C2 (meaning that it is not possible to find a set of values that satisfy C1 and not satisfy C2 -> C2 is true in all scenarios in which C1 is true but maybe not the other way around)?. When C1 subsumes C2 then C2 can be removed since it does not add any semantics to the problem.
If this is the case, I´d recommend you to use a CSP solver for that. It is easier than it seems. For instance, the Eclipse CSP solver (here Eclipse does not referes to the IDE platform, the solver has the same name) can be easily called from your java program through a well-defined API so you could just sent the problem to the solver and see which constraint is weaker
Jordi Cabot
2010-08-19 04:50:54
Thanks for your answer, I will try the Eclipse CSP solver and then I'll give you "question answered" ;-).
Laurențiu Dascălu
2010-08-20 13:25:01