I need to start learning Prolog for my job.
I haven't used Prolog before and my company needs to build a program that will use Prolog.
So the program will be used commercially.
So some questions:
1) Does Prolog use a compiler to compile the programs. Like gcc does for c?
2) Is there commercial standard of Prolog? I have only heard of SWI Prolog.
3) I have been using GNU Emacs with Linux for many years. I am thinking of using the Prolog.el package? Any comments on that?
Many thanks for any answers,
The PDT is a Prolog IDE provided as a plug-in for the Eclipse Platform. All PDT features are implemented for SWI-Prolog, most also for Logtalk). All native SWI-Prolog development tools (graphical tracer / debugger, profiler, ...) can be used within the PDT.
SWI-Prolog runs on Unix, Windows, Macintosh and Linux platforms.
Double-click the Prolog program icon. Use the File menu of the resulting window to create a new file and give it a name, with the extension . pl, making sure you save it at the root level of your M drive. . Enter the text of your file in the file window.
To create an SWI-Prolog terminal within Visual Studio Code, the process is the same as starting an SWI-Prolog terminal from a DOS prompt but you just start by creating an initial terminal in VSC. click on + and then at the command prompt > enter swipl . Your terminal selector will now have an added swipl option.
The most elaborate Prolog IDE I'm familiar with is the Eclipse-based IDE for Amzi! Prolog. This is a commercial product, but the IDE can be downloaded and used for free in the Student Edition. It might be ideal for a beginning Prolog programmer. Disclaimer: I may be biased because I supply a lot of free advice at Amzi!'s support forum. I think there's an open source Eclipse plugin that supports some of the open source Prolog implementations as well. Update (May, 2016) Amzi! Prolog v. 10 has now become open source using an MIT-like license.
Although SWI-Prolog is open source (GPL), it is possible to develop commercial applications with it, as with several other open source Prolog implementations like GNU Prolog and YAP. Besides Amzi! Prolog there are several other commercial products. Visual Prolog is different enough from the ISO standard for Prolog that most Prolog programmers do not consider it "real prolog". SICStus Prolog is an ISO compliant commercial Prolog implementation. There are some others that are Prolog-like but with substantial extensions, such as ECLiPSe (not to be confused with the IDE) and Mercury. A number of commercial implementations of Prolog have become obsolete over the years, as when IF Prolog was superseded by MINERVA. Here's a list of implementations from 2006.
I know many programmers who speak highly of the Prolog mode for GNU EMACS. However I'd think a beginner would benefit from an integrated debugger/editor such as Amzi! Prolog offers. SWI-Prolog has a graphical IDE under construction based on XPCE, which is the graphical interface library SWI-Prolog has chosen for cross-platform development. Almost all programmer editors will supply syntax highlighting for Prolog, with the right definitions file installed.
SICStus Prolog has an IDE based on Eclipse. The SICStus IDE has many advanced features not found in competing products, free or commercial. Among other things it detects syntax errors and other common mistakes as you type, which can be especially valuable for a beginner.
SICStus also has an Emacs mode but it does not offer all of the functionality of the Eclipse-based IDE.
You can download an evaluation of SICStus Prolog from the home page.
I am biased, I am one of the SICStus Prolog developers and the developer of the SICStus Prolog IDE.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With