I am writing a program where I need to see if the lines match a specific pattern. Right now I have it implemented in Prolog, which usually matches Pattern (S), with over 20 different definitions.
I end up running all binary strings up to a certain length through the pattern validation predicate. The program is quite slow (as is often the case in Prolog), and since there are so many different definitions, I would ideally like to order them, so the most suitable ones are most ranked in the order and, thus, agreed first with Prolog, avoid backtracking like how I can.
I am using SWI Prolog right now, but I have access to SICStus, so I am ready to use it or any Prolog interpreter that I can get for free.
jmite source share