Ideas on how to transform a prolog program into a clp program
fybertas <[email protected]> Mon, 7 Apr 2014 17:38:45 -0700 (PDT)
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
I've been trying to transform a prolog program into a clp(constraint logic program): therefore, I need to add finite domain constraints to variables in the program; I also need to change the operators in the program to their equivalence in clp (for instance, change "<" into "#<"). But I am kind of stuck as to how to implement this using prolog, here are two possible ways IMO: (1) process the prolog file by term input/output, identify the terms and clauses(which is not very explicit), then perform the above two transformation. (2) read in the file using "consult", then process the clauses in the memory, use assert and retract to manipulate clauses. (3) Or maybe there are some library that can help me with this? Could someone shed some light on this? I have tried to find tutorials on advanced Prolog programming but couldn't find much. -- View this message in context: http://swi-prolog.996271.n3.nabble.com/Ideas-on-how-to-transform-a-prolog-program-into-a-clp-program-tp14746.html Sent from the SWI Prolog mailing list archive at Nabble.com.