
A gentle introduction to Prolog (2013) - mihau
https://bernardopires.com/2013/10/try-logic-programming-a-gentle-introduction-to-prolog/
======
feral
I studied Prolog in college (3rd CS year course, 2003).

I concluded it didn't deliver on its promise.

The promise was that, as in the article, you 'Say what you want, not how you
want it done.'

In practice, once you start writing non-trivial programs, you run into
situations where they take ages to run, as Prolog does its search in the
background.

So, you have to start using all these languages features to control and
optimize the search, such as:
[https://en.wikipedia.org/wiki/Cut_(logic_programming)](https://en.wikipedia.org/wiki/Cut_\(logic_programming\))

And you end up spending a lot of time reasoning about the _how_ that it said
you didn't have to care about.

I concluded that, as a result of performance issues, the core Prolog
abstraction 'leaks' too frequently for it to be worthwhile.
([https://en.wikipedia.org/wiki/Leaky_abstraction](https://en.wikipedia.org/wiki/Leaky_abstraction))

Its a great promise, if a smarter language or implementation could achieve it,
but overall I concluded that if I was going to have to spend all this time
reasoning about the _how_ anyway, I might as well just deal with that up-
front, rather than after-the-fact.

I'd love to hear a contrasting opinion (I got pretty good at it, but only over
months, not years, of use). But I suspect this is the reason why Prolog didn't
make it. It looks good at the start, but it doesn't deliver.

~~~
gavanwoolery
In my opinion, Prolog is a horrible programming language. BUT... The idea of
logical programming has much promise. Not for programming, but for running
queries on a knowledge base. In fact, unification / lambda calculus is
arguably the only way you can make complex logical deductions without a brute
force approach (you could also use machine learning, but that would not scale
for queries with many variables).

The only problem is, the domain in which this is useful is fairly small, and
requires an explicitly defined knowledge base, whereas things like machine
learning are very flexible and cover a broad variety of domains pretty well.
One area I think it holds promise for is in games - imagine characters being
able to make deductions about the world around them, and react appropriately -
beyond things like behavior trees (which also do not scale once you have many
complex rules interacting).

So...in my opinion it is a little bit like SQL. You would not use SQL to write
an application (I hope!).

~~~
qohen
_The idea of logical programming has much promise. Not for programming, but
for running queries on a knowledge base._

You might want to take a look at Datalog [0]:

 _Datalog is a declarative logic programming language that syntactically is a
subset of Prolog. It is often used as a query language for deductive
databases. In recent years, Datalog has found new application in data
integration, information extraction, networking, program analysis, security,
and cloud computing._

An example of this in real-world use would be in Rich Hickey's Datomic [1]:

 _Datomic is a distributed database and implementation of Datalog on Clojure.
It has ACID transactions, joins, a logical query language—Datalog._

[0]
[https://en.wikipedia.org/wiki/Datalog](https://en.wikipedia.org/wiki/Datalog)
[1]
[https://en.wikipedia.org/wiki/Datomic](https://en.wikipedia.org/wiki/Datomic)

~~~
e12e
I've tried to get started with datablog a few times, but haven't yet been able
to find a useful, Free/open software system that seems practical _and_ has a
good practical/hands-on tutorial?

I'm thinking there ought to be something with usefulness comparable to sqlite
or at the very least Berkley DB? But I've yet to find it.

------
resynthesize
At last, I have something to add to a HN thread.

I used prolog professionally quite a bit back in the early 2000s. IBM had a
product, Tivoli Enterprise Console, that was used to filter, aggregate, and
correlate events from their monitoring toolset at the time. All of the rules
for event routing and filtering were written in an extended version of prolog.

The system was quite powerful at the time, and I found rule writing to be
really intuitive once I wrapped my head around the concepts.

IBM eventually sunsetted TEC in favor of a similar product they acquired when
they bought Netcool, but I'll bet there are still a few organizations out
there still using it.

~~~
david-given
I had a Prolog course at university; it was interesting, but... very weird.
(There's a joke that writing a compiler in Prolog is trivially easy; but
writing a compiler in Prolog that does anything other than say 'No.' when
given an invalid program is infeasibly hard.)

I generally found that while getting Prolog to do cool things was fairly
straightforward, getting Prolog to do cool things _quickly_ involved knowing
precisely where to put cut operators, and that was basically black magic. But
it's been a while.

BTW, our Prolog lecturer wrote a theorem prover in it. That's pretty
straightforward; we all wrote theorem provers in it as an exercise; but _his_
theorem prover had a polished MacOS GUI, and _that_ was also written in
Prolog. He was writing low-level MacOS stuff in raw Prolog. To this day I
still have no idea how.

~~~
tom_mellior
> There's a joke that writing a compiler in Prolog is trivially easy; but
> writing a compiler in Prolog that does anything other than say 'No.' when
> given an invalid program is infeasibly hard.

I realize you said this was a joke, but still... A compiler in Prolog might
look like this:

    
    
      compile(Input, Output) :-
          parse(Input, AST),
          process(AST, Output).
    

and this does, indeed, just answer "no" or "false" when it fails. But you can
improve it by just doing something like this:

    
    
      compile(Input, Output) :-
          (   parse(Input, AST)          % if parsing succeeds...
          ->  process(AST, Output)       % ... then process the AST...
          ;   writeln('syntax error')    % ... otherwise report an error
          ).
    

Or you can just use exceptions, which also exist in Prolog. Of course you'd
need to collect data (line, column, expected next construct) during parsing in
order to make the error message nicer.

> I generally found that while getting Prolog to do cool things was fairly
> straightforward, getting Prolog to do cool things quickly involved knowing
> precisely where to put cut operators, and that was basically black magic.

The cut is indeed complex, and for historical reasons it's taught too early
and emphasized too much by almost all Prolog classes and books. For example,
most resources would tell you to write the example above as:

    
    
      compile(Input, Output) :-
          parse(Input, AST),
          !,    % commit to this choice if parsing succeeded
          process(AST, Output).
      compile(_Input, _Output) :-
          % we get here by funky implicit control flow if parsing failed
          writeln('syntax error').
    

It's not that hard to understand the cut once you have a good understanding of
normal Prolog execution, but yes, that has to come first. And once you
understand how it works, you can often find better solutions that do not use
the cut.

As for writing "low-level" code like GUIs, you just use your Prolog system's
foreign function interface....

~~~
david-given
As I say, it's been years. I don't recall -> and ; at all. (Was there ever a
time when they weren't in the language?) They look much nicer than cut and the
implicit control flow.

I am, actually, right now struggling with priority-and-constraint-based
register allocation and instruction selection for a compiler backend. It is
_so_ the right kind of problem for Prolog.

~~~
talideon
There's nothing funny about ';': it's just 'or'. Combined with '->', which
means 'then', it essentially comes to behave like an 'else'.

';' has been in the language since the beginning, and I'm pretty sure '->' was
too, but can't say for sure.

~~~
tom_mellior
I think -> is newer, but it's in ISO Prolog, which came out in 1995. So it's
rather likely that the OP learned Prolog at a time when -> existed but
teaching resources had not caught up. Not sure if that's the case even now.

~~~
talideon
I learned Prolog back in 1997, so it may have existed in the implementations I
used back then. Must see if I can find an implementation of HU Prolog from
back then. I also used SWI Prolog from back then, and I'd expect that was more
up to date.

Edit: mention SWI Prolog.

------
Falkon1313
I've seen multiple examples of prolog over the years. From looking at them,
one gets the idea that you must hardcode all your data into your program and
the only UI is a somewhat odd shell, with no way to actually send input in or
get output out. It gives the impression of a neat idea that is a cool academic
toy but not a practical language for real-world use. I think that it would be
helpful if more prolog intros had a simple example that read a CSV file or
JSON object or something, processed it using the defined rules, and output the
results to text or HTML file. That's a minor thing, but I think that it would
give a better impression and get more people interested and trying it.

Of course intros to other languages may gloss over I/O as well, but with
mainstream imperative languages (that aren't oriented to defining and querying
data), it's more well known or assumed that the standard I/O patterns apply.

~~~
YeGoblynQueenne
>> I think that it would be helpful if more prolog intros had a simple example
that read a CSV file or JSON object or something, processed it using the
defined rules, and output the results to text or HTML file.

You're right about that and I don't think it's a minor thing. One reason is
that most tutorials have a hard enough time going through everything you need
to know before you can start parsing json and writing out to file, without
getting stuck in infinite recursion etc. so the nitty-gritty of day-to-day
programming work is often left as an exercise for the reader.

On the other hand, I have the feeling that many people check out Prolog to see
how it's different then go looking for the way to do the usual things in it.
This may be the wrong approach. Prolog has some advanced features and those
are "the whole point" about the language. If all you'll ever need to do is
process some csv, there's probably no point in going through all the hard work
to learn Prolog- you can do it in another language rather more easily.

That said, the Swi-Prolog homepage has a link to a good tutorial on creating
web applications with it that I recommend to anyone interested in that sort of
thing:

[http://www.swi-prolog.org/](http://www.swi-prolog.org/)

It's under the "Tutorials" header. Unfortunately my phone's ISP is blocking it
so I can't link directly to it. Harumph.

~~~
zmonx
Here's the link ("Prolog Web Applications"):

[https://www.metalevel.at/prolog/web.html](https://www.metalevel.at/prolog/web.html)

~~~
tom_mellior
That's just a short collection of resources, not a tutorial. The actual
tutorial linked from [http://www.swi-prolog.org/](http://www.swi-prolog.org/)
-> _Tutorials_ -> _Web applications_ is
[http://www.pathwayslms.com/swipltuts/html/index.html](http://www.pathwayslms.com/swipltuts/html/index.html)

~~~
zmonx
This appears to be limited to explaining the server side, which is only a tiny
fraction of actual web applications. In practice, the client side is often
equally important, or even more so than the server side.

------
kriro
I'll add my default recommendation that I provide in every intro to Prolog
thread: The best book to learn is "Prolog Programming for Artificial
Intelligence". The intro part is great and the AI parts are also excellent. I
think "Art of Prolog" and "Craft of Prolog" should be next in that order.

I fully support the choice of SWI-Prolog by the author of the post. SWI also
has good interfaces to other programming languages, I've only used the Java-
bridge though but I think Prolog mostly shines if you mix it with another
language. I tihnk a good next step would be researching definite clause
grammars and constraint programming as those are the (imo) best use cases for
Prolog. If you're mostly interested in constraint solvers I recommend eclipse
(not the IDE, very unfortunate naming):
[http://www.eclipseclp.org/](http://www.eclipseclp.org/)

I think Prolog is a great language to train your brain if that makes any
sense. It's quite nice to write a Soduku solver and the like in it even though
you can get better performance in other languages. Whenever I write Prolog it
takes a bit for my brain to readjust which I feel is a pretty good sign as it
means you're working in a different paradigm.

~~~
YeGoblynQueenne
For those interested in AI I would add "AI algorithms, Data structres, and
idioms in Prolog, Lisp and Java":

[http://wps.aw.com/wps/media/objects/5771/5909832/PDF/Luger_0...](http://wps.aw.com/wps/media/objects/5771/5909832/PDF/Luger_0136070477_1.pdf)

In fact I'd recommend that to anyone, regardless of interest in AI- it's a
great programming textbook all around and accessible to anyone who knows at
least one of the three languages (coughjavacough).

------
moyix
A little known fact is that Microsoft actually used an embedded Prolog
interpreter for network configuration in Windows NT:

[http://web.archive.org/web/20040603192757/research.microsoft...](http://web.archive.org/web/20040603192757/research.microsoft.com/research/dtg/davidhov/pap.htm)

~~~
nickpsecurity
And its first version was developed on a Macintosh, too! Thanks for the link.
Been some good history lessons on Microsoft recently that keep tripping me
out.

------
gavanwoolery
Personally, Prolog was the biggest "woah" moment for me in learning
programming languages.

If anybody wants a challenging and enlightening programming exercise, I
recommend writing your own prolog[esque] interpreter.

Surprisingly it still has not been used much in games (well, actually not that
surprising given how time consuming and risky it is). I made a stab at [1] but
ended up taking more time than I had budget for. One thing I suspect may be
using it is the game 1935 [2], although they are vague on the details.

[1]
[https://www.youtube.com/watch?v=2EHKDP2_ky0](https://www.youtube.com/watch?v=2EHKDP2_ky0)
[2]
[https://mollyrocket.com/news_0023.html](https://mollyrocket.com/news_0023.html)

------
exDM69
I learned Prolog in some university courses but I'm gutted that I haven't had
a single chance to use it in my professional life. I've given some thought to
what kind of projects would it be suitable for.

The other day I was playing Sid Meier's Civilization and realized that the
rule engine for games like that would be a very good fit for a Prolog-like
logic programming language (using an embedded interpreter). Prolog would allow
adding new rules without touching the old ones, e.g. add a new rule for, say,
defensive bonus would be just a single new line in the code base.

~~~
jaggederest
Prolog is very useful for decision and optimization problems. There are a ton
of those available in the world. For example a lot of scheduling problems are
relatively tractable with logic programming and a total bear in imperative/oo

~~~
mianos
On the other hand, I have first had experience of two companies who used C to
solve these problems due to performance and maintenance of the logic. One in
classroom scheduling, the other in hospital staff scheduling. Both of these
are some of the examples most cited as useful. I still have The Art of
Promoting on the shelf next to me. Fun but useless.

------
agumonkey
Unification + backtracking is really, really, really really cute. Makes you
think very abstractly, so much that it made me feel that haskell was verbose
(not trying to be hyperbolic here).

A nice book I've read recently is Ivan Bratko's
[https://ailab.si/ivan/novice.php](https://ailab.si/ivan/novice.php)

Try to grab a 2nd hand one or a library with it on shelves (probably stacking
dust). The basics are covered, then graph search, state space, tricks like
diff-list (pretty unforeseen use of prolog semantics tbh), a bit of nlp.

Very* cool

~~~
catnaroek
And the scary thing is that one can do even better:
[https://billwadge.wordpress.com/2016/01/18/extensional-
highe...](https://billwadge.wordpress.com/2016/01/18/extensional-higher-order-
prolog/) [https://github.com/acharal/hopes](https://github.com/acharal/hopes)

~~~
nickpsecurity
Neat tools. Have you seen any attempts to model HOL in FOL for verification in
FOL? There's a FOL down to assembly verified prover and stack. It's ACL2-like.
I also found a paper doing HOL-to-FOL conversion with that tool modeled and
proven in HOL. Doing HOL in FOL or HOL-to-FOL converter in FOL seems like a
short-cut to verified, proof stack.

If the shortcut is doable at all. The HOL-to-FOL gave me some excitement about
this. It just wasn't done entirely in FOL itself.

~~~
catnaroek
Haven't seen it, but I'll check it out. Thanks for the pointer.

~~~
nickpsecurity
Forgot to add the link so you can see what such a process might look like.
Here's slides and a paper on one that merged HOL and ACL2. But it verified
that in HOL4, not ACL2.

[https://www.cs.utexas.edu/~hunt/FMCAD/FMCAD06/presentations/...](https://www.cs.utexas.edu/~hunt/FMCAD/FMCAD06/presentations/FMCAD-2006-Wednesday/Session2-Hunt.pdf)

[http://www.ccs.neu.edu/home/pete/acl206/papers/gordon.pdf](http://www.ccs.neu.edu/home/pete/acl206/papers/gordon.pdf)

------
kensai
I am always puzzled why Curry which is Haskell + Prolog in one unified packet
has never taken off. Combining the advantages of functional and logic
programming paradigms seems to have so many interesting applications.

Admittedly, Curry is an academic language, not 100% production ready.

[http://curry-language.org/](http://curry-language.org/)

~~~
doublec
Mercury is another programming language that combines Prolog plus functional
programming that probably doesn't get as much attention as it deserves
[https://mercurylang.org/](https://mercurylang.org/)

~~~
dmpk2k
With a build system like that, it gets exactly as much attention as it
deserves... D:

Do a ./configure --help, and try to figure out what the best "grade"(s) to
build is/are.

I've been meaning to try Mercury for years, but after this, there's no chance
I'm going to try writing anything in it. What other crufty unusable insanity
have they built in there?

~~~
doublec
It is a bit obscure. I let it build the ones it wants to build by default.
This gives me the flexibility of deciding later when building Mercury programs
what I want as a backend.

This blog post describes some of them:
[https://adventuresinmercury.blogspot.co.nz/2011/11/making-
gr...](https://adventuresinmercury.blogspot.co.nz/2011/11/making-grade.html)

------
adamnemecek
I feel like people are somewhat aware of prolog but it's cousin datalog that's
a db query language is much less widely known. I don't have too much
experience with it but it seems like one of the technologies of the past
that's superior to current alternatives but for some reason didn't take off.

~~~
dunkelheit
The ideas of datalog are making a slow comeback. For example, datalog is a
query language for Datomic DB.

~~~
mossmoth
Datalog is also quite actively used in ontology based data access where
Datalog rules are used as mappings between databases and ontologies (see e.g.
[1]). Variants and extensions of Datalog is also research actively in the
field of answer set programming[2], with many usable implementations.

[1] - [http://ontop.inf.unibz.it/](http://ontop.inf.unibz.it/) [2] -
[https://en.m.wikipedia.org/wiki/Answer_set_programming](https://en.m.wikipedia.org/wiki/Answer_set_programming)

------
pbowyer
Is Prolog good for assignment problems (assigning guests to rooms or people to
beds) when there are soft constraints?

I asked twice on StackOverflow [0][1] and had the question declined each time.

[0]: [http://stackoverflow.com/questions/36148764/weak-rules-in-
pr...](http://stackoverflow.com/questions/36148764/weak-rules-in-prolog) [1]:
[http://stackoverflow.com/questions/37610341/assigning-
people...](http://stackoverflow.com/questions/37610341/assigning-people-to-
beds-approaches-to-automate)

~~~
sesqu
Prolog normally finds a solution, and if you decline it, a new solution, and
so on until it can't find any more solutions. If you pay careful attention to
your program, you can make it so that it finds ones that satisfy soft
constraints first, and then solutions that don't satisfy them.

This is what the replies in [0] suggested. Prolog isn't exactly intended for
preferring some solutions over others, but it has predictable solution
generation that can be used to prescribe priority.

That's a lot of mental work, but the code is succinct. If you want to get by
without flow diagrams, your best bet is to generate and optimize a cost
function, and that can be done in any language.

------
acjohnson55
I'm always happy to see Prolog get some love. Learning it in a university
course really expanded my mind, similar to when I first tried FP with ML in
another course.

I went to a talk about MicroKanran, another logic programming language, which
is embeddable in host languages. I think it shows a lot of promise for
implementing decision engines. The biggest downside is that it can be tough to
reason about the runtime characteristics of nontrivial programs, right about
at the point where the paradigm starts to be really useful for modeling
complex problems. It takes some experience to know how to write it
efficiently.

------
collyw
Prolog looks really useful for solving real world problems. Why doesn't it get
used more?

And can you interface to it using Python or some more mainstream languages?

~~~
doublec
It's popular to embed a prolog in Lisp languages. For example Picolisp and
Shen. I wrote a post comparing Shen's Prolog support to SWI Prolog recently:
[https://bluishcoder.co.nz/2016/08/30/kicking-the-tires-of-
sh...](https://bluishcoder.co.nz/2016/08/30/kicking-the-tires-of-shen-
prolog.html)

~~~
throwaway7645
Is the license for Shen still that you own a copy of Tarver's book?

~~~
doublec
There's a BSD licensed open source version, all linked from
[http://shenlanguage.org/download_form.html](http://shenlanguage.org/download_form.html)

That's what I used for my post. There's "Shen Professional" which is a closed
source subscription based product getting rapid development
[http://shenlanguage.org/professional.html](http://shenlanguage.org/professional.html)

I have not used "Shen Professional" though.

~~~
throwaway7645
That's good news...curious if he has any customers for the professional
version. I'm sure it's a great product, I'm just not aware of too many people
who would depend on something that niche' for production work. Maybe niche
production work :)

------
thinkmoore
How many prolog programmers does it take to change a lightbulb?

No.

~~~
vram22
How many Lisp programmers does it take to change a lightbulb?

Ans. 1. (1)

Ans 2. I'll tell you after I've debugged and can run a macro I'm writing for
this.

Ans 3. nil

------
onetwo12
Prolog is only appropriate for certain kinds of programs, long time ago I
programmed in prolog and it was a very difficult task when the problem was not
about matching and unification.

For me Lisp was much more appropiate and easy to program. Forward chaining and
unification is not enough for certain class of algorithms, sometime you need
backward chaining, probabilistic inference and many other ideas that are not
easily translated in prolog. I remember some discussion about the semantic of
clauses. For example misil(ready), is this about the misil is already ready,
or that you are going to prepare the misil, etc. I find that concurrency and
paralelism in prolog are not easy. In the book "on Lisp" by P. Grahan there is
a prolog interpreter in Lisp, this can be interesting for somebody wishing to
learn prolog.

Edit,Added, erlang was inspired by prolog, so learning prolog will help you
learn erlang, but if you are a ruby type elixir is your best option.

------
doublec
A system written using SWI Prolog is apparently used in a large number of NZ
stock exchange trades
[https://dtai.cs.kuleuven.be/CHR/files/Elston_SecuritEase.pdf](https://dtai.cs.kuleuven.be/CHR/files/Elston_SecuritEase.pdf)

------
sriku
If you're interested in logic programming, Mozart/oz offers a better deal than
raw prolog for practical problems. The reason is that you can express various
search strategies using the concept of "computation spaces" in Mozart.

------
partycoder
Instead of learning one language every year, learn new programming paradigms.
The logic programming paradigm is not implemented by many languages, so, might
be interesting to learn.

------
qwertyuiop924
This helped explain a lot about how and why Prolog works. The coolest thing?
That's only a tiny percent of the language, but it's already enough to start
solving problems.

For those of you looking for prolog out in the real world, a surprising number
of languages contain embedded interpreters for it. Mostly Lisps.

Perhaps most famously, picolisp uses a tiny, lisp-syntax prolog called pilog
as a query languages for its built in database. Yes, it has a built in
database. Picolisp is weird.

~~~
qohen
_a surprising number of languages contain embedded interpreters for it. Mostly
Lisps._

Also, Smalltalks (seriously).

~~~
jhbadger
Yes, my first exposure to Prolog was the toy version included with Smalltalk/V
in the late 1980s.

------
YeGoblynQueenne
I've been using Prolog since 2008 ish, on and off, with more time spent using
it in the last couple of years. I've written my degree and Masters
dissertations in Prolog, using different Prologs for each. I code all my
personnal stuff in Prolog.

If I could condense the experience of those last few years with Prolog in one
sentence it would be this one: "Prolog is not your friend".

It's not an "easy" language to learn- it's not javascript but with first-order
abstractions, it's not Java with a different VM. You need to grok a fair few
things about both the theory behind it -in other words, first-order logic- and
the implementation decisions taken to make it efficient. For instance- clause
selection order or, yep, the cut. You need to understand how this works and,
ahem, cut yourself too many times until you get the message. Well, I had to,
anyway.

There's a bunch of stuff you (or at least, I) never have to think about in
day-to-day programming work, such as depth-first search and how it can go
infinite. Then you need to get some experience with your chosen Prolog
interpreter and learn its idiosyncracies [1].

There are rewards. [plug] My Masters dissertation [2] is a novel algorithm
that learns a grammar from unannotated text. Because it produces a grammar in
Prolog's Definite Clause Grammars notation, and because Prolog can interpret
DCGs as first-order logic theories, these grammars are also logic programs
that model the algorithm's input. I process some text, spit out a grammar and
then _without needing a separate compiler_ I run this grammar backwards to
generate new strings, or the normal way to parse them. [/plug]

There's a point in the Prolog learning curve where you risk baldness from
pulling out your own hair. Once past that point... it keeps hurting you, but
the things you can do with it, it's bit like magic. Or maybe it's Stockholm
syndrome :)

I've seen many criticisms of Prolog (some that are repeated in this thread).
Eight years in I haven't seen one single line of criticism that still makes
sense after you've used the language for a few years.

So to me the real problem with Prolog is that it hurts you so much that most
people give up before they really figure it out.

Oh and- should you pick Prolog up never forget this: The dynamic database is
_evil_.

[1] [http://www.swi-prolog.org/pldoc/man?section=jitindex](http://www.swi-
prolog.org/pldoc/man?section=jitindex)

Just a few days ago I was working on something I thought was best tackled
using dynamic predicates (written to the database) rather than an in-memory
list. My program took _hours_ to process some data, until I noticed I was
querying a compound term for its _second_ argument. Just switching arguments
brought the processing time down to five minutes on the same data. Did I
mention the dynamic db is evil?

[2] [https://github.com/stassa/THELEMA](https://github.com/stassa/THELEMA)

------
tmaly
Prolog was part of a course I took at RIT back in the late 90s.

I ended up using it a few times since then in a professional setting to handle
filling out extremely complex forms.

I even build a module on CPAN to handle creating Prolog facts from Perl data
structures.

------
orionblastar
I remember Borland Turbo Prolog. But it was so long ago that I lost the disk
it was on.

~~~
RandomOpinion
Its descendant, "Visual Prolog"[0], appears to have a free edition for
personal use[1].

[0]
[https://en.wikipedia.org/wiki/Visual_Prolog](https://en.wikipedia.org/wiki/Visual_Prolog)
" _Visual Prolog, also formerly known as PDC Prolog and Turbo Prolog, is a
strongly typed object-oriented extension of Prolog. As Turbo Prolog it was
marketed by Borland, but it is now developed and marketed by the Danish firm
Prolog Development Center (PDC) that originally developed it._ "

[1] [http://www.visual-prolog.com/vip/download/default.htm](http://www.visual-
prolog.com/vip/download/default.htm)

------
problems
A good post but (2013)

