0

I have to understand an existing code in prolog which is written for win-prolog 4.800, and then build my work on that. The problem is the ide supplied along with win-prolog is very clumsy. I searched internet, but did not find better substitue for that. So i want someway (ide or something) that lets me

  1. Understand (trace through) the code. Atleast, something like ctags will be helpful.
  2. Have proper syntax color highlighting facility.
  3. Have some sort of debugger if possible.
  4. Have some interface where i can readily fire predicates and see output.

Note:- I can use Vim, if it is configurable for Win-prolog. Please let me know if using the default ide supplied along with win-prolog is the only best available way and you too could not discover better way.

1 Answers1

1

Unless the existing code is very simple, it's quite likely that it will contain e.g. calls to WinProlog proprietary predicates and use WinProlog proprietary control constructs, not to mention syntax differences between WinProlog and de facto and official Prolog standards. Thus, it's unlikely that you will be able to use a Prolog implementation other than WinProlog to debug and trace through the code.

For syntax highlight, you have plenty of choices besides Vim. Several other text editors either include support for Prolog syntax highlighting or some plug-in is available that provide that service. See the Prolog FAQ for more information.

Likely only after porting the code or making it portable to other Prolog implementations you will be able to use IDEs written for those Prolog implementations. If that's not your goal, you're likely restricted to IDE provided by WinProlog.

Paulo Moura
  • 18,373
  • 3
  • 23
  • 33
  • To port codes, do we have to convert manually those proprietary calls of win-prolog to make them compatible to the new prolog implementation we want to port to; or is the process simpler? – user2118622 Mar 27 '14 at 06:32
  • 1
    It's mostly a manual process. Trying to compile the original code with a different Prolog compiler will likely result in some warnings and errors and you can use those as a guide for which syntax and calls to change. You can also use the Logtalk compiler (which is more strict than most Prolog compilers) as a help tool to identify the problematic bits in your original code (e.g. proprietary WinProlog built-in predicates, missing predicate directives, syntax that requires proprietary WinProlog built-in operators, etc). – Paulo Moura Mar 27 '14 at 08:37