Search code examples
javaprologswi-prologtuprolog

how to shift from swiprolog to tuprolog


I got a .pl file through an eclipse plugin called JTransformer.The problem is that the .pl file I got is based on swiprolog and now I need to do query based on prolog in a java file which is easy to achieving using tuprolog. But I can't consult the .pl using tuprolog, since it was writen in swiprolog and there were some marks that only supported by swiprolog. What can I do to change it from swiprolog to tuprolog. The .pl file is in my google drive https://drive.google.com/folderview?id=0B4KCEwRVmr_yWjQwOEp3LWpYdk0&usp=sharing .


Solution

  • At first glance, that file has very little specific to SWI. You could try to remove altogether any directive: those lines beginning with :-. Then build you theory - I think that's tuProlog way to modules and see if you're ready to go.

    Those directives, for instance :- dynamic factbase_export_time_stamp/2., eventually should be changed to :- dynamic(factbase_export_time_stamp/2)., instead of being deleted, depending on your use case. The same holds for :- multifile ones.