This is a complex question (at least for me) and I hope there's a book/website/blog someone can point me to to help give me a start. Can someone tell me where I can find info to write a script in python where it reads a bunch of logic statements and applies that logic to a bunch of data being read in? I can do this in a non-declarative manner but that means any time there's a new logic statement, I'd need to write new code to handle it. If I can write some generic script that can interpret the logic statement, then I won't need to keep writing code to keep up with new logic statements.
What I'm trying to do is I have 3 files my script will read. Two files of equal length contain values for two metrics. The third is a file with logic statements. I want the script to read in the logic statements and apply those statements to the numbers and write messages if it fulfills those statements.
For example, file 1 will contain:
1
2
3
4
5
6
file 2 will contain:
2
4
6
8
10
3
file 3, will contain:
m1 >=3 && (m1 + m2) >= 11
If I run my script, I want it to output something that says
m1 = 4 and m2 = 8 fulfills condition m1 >= 3 && (m1 + m2) >= 11
m1 = 5 and m2 = 10 fulfills condition m1 >= 3 && (m1 + m2) >= 11