Hello, I'm a mac user and starting a new module in Prolog and wondering if there are any applications that can compile and run Prolog for mac? Sounds silly, but can use terminal?

Thanks :)

Recommended Answers

All 11 Replies

Check out GNU Prolog @ www.gprolog.org, which has an OS X package.

Thanks for your reply.. I downloaded and installed I then checked the user manual and then I ran the line (in terminal)


% gplc prog.pl

But just get an error:

-bash: fg: %: no such job

Any ideas? I'm really confused as to how to compile and test the file!

Thanks =)

Sorry, but my local Mac resource (my wife) is out of town for the week and I don't use them - Linux only. :-( My suggestion is to register with the user forums or email threads on the gprolog site and ask the question there.

haha no problem! One last question though ;)

Any way that I can maybe somehow create a simple interpreter of prolog in C++? Or.. Is that a bit too adventurous? :P

Well, prolog is a relatively old language. I was studying it in the 1980's. Clocksin and Mellish was my Prolog bible back "in the day", and it still holds a place of honor on my bookshelf in the AI section. So, I have to think there are C++ to Prolog (and vice-versa) cross-compilers available. I think that there are a lot of links to such tools on the gprolog.org web site. Anyway, remember that Google is your friend! :-)

Also, FWIW, I haven't used Prolog since the early 90's. I segued to Smalltalk around 1992.

Aha, thank you =) Does it have a place even in the modern day world? Like, I'm studying Computer Science and have a module on AI and our programming language is Prolog, but, personally, I would have found it so much easier to understand logic through say C++ etc.. Or am I missing the point? :P

I would use it (prolog) for natural language processing functions without another thought. One of my favorite books EVER was Terry Winograd's "Language as a Cognitive Process - Syntax" that used Prolog exclusively for language processing. Published by Addison-Wesley in 1983. Winograd was a major force at Stanford University in AI studies back then. At that time, I was working as a software engineer and consultant for Stanford, Ford Aerospace, NASA Ames Research Center, and other companies in the Silicon Valley.

FWIW, in the 1990's up to about 2005, I used C++ exclusively for similar work, though you have to do a LOT of preliminary class development in order to get the same efficiencies as Prolog provides "out-of-the-box". I have a patent for adaptive systems that allows you to declaratively define new classes, or extensions to these or existing compiled C++ classes, and determine their behavior with a set of rules, without compiling any of the new classes or behaviors, yet these can be integrated with existing compiled C++ programs without compiling. You store the class and rule definitions in a database (flat file or relation database such as Oracle), and tell the system to load the new information and behaviors. This technology is used to customize very complex manufacturing execution systems for most of the semiconductor, disc drive, and flat panel display manufacturers in the world today.

If it wasn't for the fact that the MES in question was written in C++, I may have chosen Prolog for the task.

I happened to Google around for graphics and Prolog recently and got jealous of Mac people as XGP seems to only support Cocoa interface.

I myself learned Prolog with Shapiro's book and consider it quite a respectable job.

I myself learned Prolog with Shapiro's book and consider it quite a respectable job.

That looks like a great book (although rather co$tly). If I were to get back into serious Prolog work again, I would definitely consider it for the library. Thanks for pointing it out! :-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.