1

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 .

manlio
  • 18,345
  • 14
  • 76
  • 126
York
  • 503
  • 3
  • 23

1 Answers1

0

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.

CapelliC
  • 59,646
  • 5
  • 47
  • 90
  • Thanks. I did what you said,but then there came another error at line 12220.I thought it was because of the +, so I change it to '+' .Then it said there was an error at/before line -1. This is what I do not understand.I don't know what to do next. – York Jun 01 '13 at 15:57
  • I have upload a new .pl file called demo_new.pl which is I got following your words.The address is the same. Thanks. – York Jun 01 '13 at 16:18
  • problem has been solved.This link is about how to deal with an error at/before line -1 http://stackoverflow.com/questions/17885518/a-tuprolog-syntax-error-syntax-error-at-before-line-1 . – York Jul 31 '13 at 07:57