I am coding an algorithm that counts the number of solutions for a constraint system. The constraints in this case are predicates, such as "a <b" or "a = 3 + b or = 6 + b," which I will receive as input strings. I need to ask if any given choice of values for variables is the right combination, and I would prefer not to create a parser for this.
Is there a quick C ++ library that evaluates strings as mathematical expressions? I think I have a simple way to convert "a <b" to "5 <6", I just need a way to evaluate this.
source
share