Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Real World Applications

269 views
Skip to first unread message

John North

unread,
Oct 16, 2009, 10:16:44 AM10/16/09
to
I am trying to research the use of Prolog now, outside of Academia and
am struggling. I was hoping somebody could point me to some real-
world applications. Especially outside the field of NLP or speech
processing would be really apreciated.

Thanks

Jan Wielemaker

unread,
Oct 16, 2009, 11:05:36 AM10/16/09
to

Check out the CULP: http://www.cs.kuleuven.be/~toms/CULP2009/ Another
source is the websites of the commercial systems.

Its an interesting topic, but hard to get hard evidence. Quite a few
commercial users do not admit they use Prolog openly. These users are
likely to have good reasons for that, but for the LP community this is
an unfortunate situation.

Cheers --- Jan

contingencyplan

unread,
Oct 21, 2009, 11:49:37 PM10/21/09
to
On Oct 16, 10:05 am, Jan Wielemaker <j...@nospam.ct.xs4all.nl> wrote:

I've heard that before: that many companies using Prolog commercially
want to hide (or at least not openly state) that they use the
language. This puzzles me - do they believe they are keeping a trade
secret or competitive advantage or something like that?

Tom Schrijvers

unread,
Oct 22, 2009, 5:26:02 AM10/22/09
to
> Check out the CULP:http://www.cs.kuleuven.be/~toms/CULP2009/Another
> source is the websites of the commercial systems.

There's now a Google group for CULP with the slides and abstracts of
this year's CULP workshop:

http://groups.google.com/group/cu-lp

Feel free to join the group!

Tom

Thorsten

unread,
Oct 22, 2009, 5:50:41 AM10/22/09
to

It's probably because the language a program is written in is
incidental
to the user of the program, and of interest only to a technically
minded
audience. For instance, I'm in the middle of moving a commercial
application to CLP, but few of our customers would be interested in
the
details. They care about things like that it will in the future be
easier (= cheaper) to write custom constraints. So you won't find the
info anywhere that the application uses a solver that's written in a
variant of Prolog.

Cheers,
Thorsten

contingencyplan

unread,
Oct 26, 2009, 8:49:22 PM10/26/09
to

My overall thinking is that Prolog should (and needs to) have more
"market presence" than it currently possesses -- my sense is that it
possess next to none. I have no hard evidence to reach this
conclusion; it is simply a general sense / gut feeling from looking at
projects on the Internet (e.g., SourceForge and Freshmeat) and talking
with friends who are industry programmers, so certainly not a
sufficiently wide sampling.

So I'm curious whether my assessment is correct -- how much is Prolog
being used for programming outside of academia? I also like the
restrictions that Mr. North put on this question; NLP is a natural
strength for Prolog, but as a result, we cannot use NLP as a basis for
estimating the use of Prolog in other programming areas.

If we assume that I'm wrong, and that Prolog has a more than
negligible presence, then it would be useful to understand why the
perception is to the contrary. I can understand that the underlying
programming system is of little importance to the end-users -- that
could certainly be part of it. However, by the same token, the end-
user has the same level of non-interest if the system is implemented
in Python / Ruby / Perl or the C family, and yet most industry
programmers (dare I say "almost all"?) will have used at least one of
those languages in their work and will have heard of several others.
So I would (respectfully, of course) disagree that end-user
indifference is a major reason for Prolog having a notable market
presence without having a similar level of notoriety.

So I am still left with my questions. Does anybody have any hard[er]
evidence for the use of LP in commercial settings, such as surveys and
demographics?

On Oct 22, 4:26 am, Tom Schrijvers <tomenanne...@gmail.com> wrote:
> > Check out the CULP:http://www.cs.kuleuven.be/~toms/CULP2009/Another
> > source is the websites of the commercial systems.
>

> There's now a Google group for CULP with the slides and abstracts of
> this year's CULP workshop:
>
> http://groups.google.com/group/cu-lp
>
> Feel free to join the group!
>
> Tom

Applied, thanks! Is this group also going to engage in discussions on
general commercial use of LP, or is it simply an organizational group
for the CULP workshops?

rupert...@googlemail.com

unread,
Oct 27, 2009, 6:31:53 AM10/27/09
to
On Oct 27, 12:49 am, contingencyplan <contingencyp...@gmail.com>
wrote:

> My overall thinking is that Prolog should (and needs to) have more
> "market presence" than it currently possesses.

I suppose the proponents of any language that is not 'mainstream'
could argue the same thing about the language that they favour. The
fact is that there is an eco-system of languages out there, some
sharing similar genetic make up, and others more fringe mutations. The
world of commercial IT acts as a fitness function on this language
evolution and has for multiple reasons given imperative OO the centre
ground. This is not because imperative OO is the absolute best way to
work. The reasons are many; things just turned out that way, thats
where the skill base is and companies need employees already skilled
up, the pace of evolution cannot be too fast, real world systems must
have good GUI libraries and interfaces to relation databases and to
each other, speed used to be a major factor less so nowadays but that
coloured the evolutionary process earlier on, programming used to be
done at a lower level and is gradually evolving to higher levels but
languages derived from C built on the low level ancestry more directly
than languages that did not, code re-use, modularity, and many more
reasons that I have not thought of.

You're not wrong but consider what other fringe languages should have
greater commercial presence? How about OCaml, Haskell, Mercury, Erlang
to name some of the more obvious ones. Working in Prolog I do
sometimes miss what functional languages have to offer.

I use LP in a commercial setting, though not as the runtime system. I
use it as a modeling language for 'model driven engineering', as I
have found logic to be the most natural language for describing the
models in. No business that I have encountered so far would accept a
switch to running their systems entirely on Prolog, but are quite
happy to accept generated Java code on the basis that it looks like
idiomatic Java and can be created faster than by hand.

I have not shared what I have created so far, partly because I do not
want to give my advantage away and using LP in this way is an
advantage for me. The real reason is that my ideas are still half
baked and I am not yet ready to have them scrutinized by others; if
great ideas should be shared perhaps mediocre ones should be held back
and worked on to increase their chances of greatness.

There are some real advantages to Prolog and they are not being taken
advantage of partly due to ignorance. I think most universities do not
teach Prolog as part of Computer Science any more.

I enjoyed looking at the CULP papers on the link posted. Particularly
the financial trading system developed in New Zealand/Australia.

Rupert

A.L.

unread,
Oct 27, 2009, 8:40:58 PM10/27/09
to
On Mon, 26 Oct 2009 17:49:22 -0700 (PDT), contingencyplan
<conting...@gmail.com> wrote:

>
>So I am still left with my questions. Does anybody have any hard[er]
>evidence for the use of LP in commercial settings, such as surveys and
>demographics?

If you consider this "hard evidence": I am using Prolog for commercial
applications, and I am using Prolog this way since year 1999. It is
being used for programming kernels of quite serious applications.
Overall, we have about 200K lines of Prolog.

If you ask "why", then the answer is simple: we are using CLP(FD), and
doing CLP(FD) in Java or C++, although possible, has little sense.
Prolog is the best platform.

If you ask about problems:

1. Having One More Language within the company is pain in the butt

2. Prolog is small part of larger system(s) written in Java, therefore
there is a problem with going across the boundary between these two
worlds. This cost time and performance as well as requires extra work,

3. Software engineering aspects of Prolog locate it in more or less 30
years ago. Using vi or emacs is like living in stone age. Situation is
improving a bit, but majority of Prologs are lacking modern IDE,
profilers and other stuff making life easy

4. I don't know ANY single college/university in the USA where Prolog
is the subject of separate, semester long course. What is even worse,
on majority of universities there is nothing like course in
mathematical logic. What is even more worse, there is general
perception that mathematics is not longer needed for computer
scientists/engineers. Read few last issues of the Communications of
the ACM. In terms of mathematics. logic and formal methods, fresh
graduates are totally dumb.

5. Result of the above is that there are no Prolog programmers. I feel
like a dinozaur.

A.L.

P.S. Regarding item 4: This doesn't mean that such universities don't
exist. However, during last 10 years of interviewing poeple I was able
to dectect only one guy who knew the word "Prolog". He was from Egypt

Wit Jakuczun

unread,
Oct 28, 2009, 5:56:08 AM10/28/09
to
On 28 Paź, 01:40, A.L. <alewa...@aol.com> wrote:

> 3. Software engineering aspects of Prolog locate it in more or less 30
> years ago. Using vi or emacs is like living in stone age. Situation is
> improving a bit, but majority of Prologs are lacking modern IDE,
> profilers and other stuff making life easy
>

ECLiPSe has some profilers and debuggers. Although much better than
what Sicstus offers but
still far from tools for Java or C# languages.
Any news about Sicstus' IDE? They claim they are working on it. Also
ECLiPSe is working
on some IDE (Saros).

Best regards,
Wit Jakuczun, http://wlogsolutions.com

jfmcjf

unread,
Oct 28, 2009, 7:26:22 AM10/28/09
to

To my point of view, there are also big problems in the language
itself, not only the IDE. It is good to write small pieces of code for
constraint programming, etc. But it is not easy to use methodologies
from software engineering to write large programs. Even worse, once
programs are written they tend to look more obfuscated than in other
languages.

Prolog should widen its field, the language should be revamped with
new features that make programs easier to write. But I do not believe
that it can be done in the current way. Most of the best Prolog (or
logic) programmers are developers of their own implementation, and the
economical support and development comes from the academy: research
projects and papers. That divides the community and isolate language
improvements on separate implementations. That does not encourage
people to learn a language that, as a general purpose language, is
artifically kept alive.

I spent my last years programming compilers in Prolog and I often find
that algorithms that are a child's play to write in other languages,
become incredibly complicated in Prolog. Reusing code is a pain if
compared with O.O. languages. There has been a great effort in
improving the small details of the language (such as performance, or
expressive power), but little to build and support large programs in
its whole lifetime. I believe that there is often a misconception that
separates software engineering from declarative programming.

Haskell seems a more mature language in those aspects. There is a
strong implementation with a large number of contributors, optional
experimental features, the language has a nice semantics, and they
care about real world applications. For example, they use monads as
abtractions to write typically imperative programs declaratively
(indeed, they integrate imperative and declarative worlds). But they
do not lose the pure nature of their language. That widens the
application area of the language, and that keeps it alive: more
programmers become interested in it. Also, I do not think that the
language is hard to learn (you can even teach a high-school student to
write usable code).

The problem I see is that, even if there are people with great ideas,
there is not a strong effort (mainly, the economical push) to improve
the language. I have seen many good programmers and researchers moving
away from Prolog development (programming, implementation, analysis)
to more productive fields (paying your mortgage is sometimes more
important...).

A.L.

unread,
Oct 28, 2009, 9:07:09 AM10/28/09
to
On Wed, 28 Oct 2009 04:26:22 -0700 (PDT), jfmcjf <jfm...@gmail.com>
wrote:

>On Oct 28, 11:56�am, Wit Jakuczun <wit.jakuc...@gmail.com> wrote:

>> On 28 Pa?, 01:40, A.L. <alewa...@aol.com> wrote:
>>
>> > 3. Software engineering aspects of Prolog locate it in more or less 30
>> > years ago. Using vi or emacs is like living in stone age. Situation is
>> > improving a bit, but majority of Prologs are lacking modern IDE,
>> > profilers and other stuff making life easy
>>
>> ECLiPSe has some profilers and debuggers. Although much better than
>> what Sicstus offers but
>> still far from tools for Java or C# languages.
>> Any news about Sicstus' IDE? They claim they are working on it. Also
>> ECLiPSe is working
>> on some IDE (Saros).
>>
>> Best regards,
>> � �Wit Jakuczun,http://wlogsolutions.com
>
>To my point of view, there are also big problems in the language
>itself, not only the IDE. It is good to write small pieces of code for
>constraint programming, etc. But it is not easy to use methodologies
>from software engineering to write large programs. Even worse, once
>programs are written they tend to look more obfuscated than in other
>languages.

Prolog is good within its own applicability area. It is good where it
is good. I don't see any reason to write large programs that could be
written in other languages more easily.

A.L.

Wit Jakuczun

unread,
Oct 28, 2009, 9:26:45 AM10/28/09
to
On 28 Paź, 12:26, jfmcjf <jfm...@gmail.com> wrote:
> On Oct 28, 11:56 am, Wit Jakuczun <wit.jakuc...@gmail.com> wrote:
>
>
>
> > On 28 Paź, 01:40, A.L. <alewa...@aol.com> wrote:
>
> > > 3. Software engineering aspects of Prolog locate it in more or less 30
> > > years ago. Using vi or emacs is like living in stone age. Situation is
> > > improving a bit, but majority of Prologs are lacking modern IDE,
> > > profilers and other stuff making life easy
>
> > ECLiPSe has some profilers and debuggers. Although much better than
> > what Sicstus offers but
> > still far from tools for Java or C# languages.
> > Any news about Sicstus' IDE? They claim they are working on it. Also
> > ECLiPSe is working
> > on some IDE (Saros).
>
> > Best regards,
> >    Wit Jakuczun,http://wlogsolutions.com
>
> To my point of view, there are also big problems in the language
> itself, not only the IDE. It is good to write small pieces of code for
> constraint programming, etc. But it is not easy to use methodologies
> from software engineering to write large programs. Even worse, once
> programs are written they tend to look more obfuscated than in other
> languages.
>
Exactly, I use Prolog to write computational kernels (mainy CLP(FD)
based solvers). Such kernel is not large (say few thousand LOC)
comparing to Java/C# parts of the application. Using modules, Sicstus
objects (or Logtalk) helps me in developing Prolog's code. Having good
IDE would make me more productive.

Mats Carlsson

unread,
Oct 28, 2009, 9:55:31 AM10/28/09
to
On Oct 28, 10:56 am, Wit Jakuczun <wit.jakuc...@gmail.com> wrote:

> ECLiPSe has some profilers and debuggers. Although much better than what Sicstus offers

Good point. What in particular are we lacking here?

> Any news about Sicstus' IDE? They claim they are working on it.

It has kept us busy indeed. The SICStus Prolog 4.1 beta release is
scheduled for 1 November. It will feature an Eclipse-based IDE with
working name SPIDER. Some members of our development team, die-hard
Emacs users throughout their carreers, have switched to SPIDER.

A.L.

unread,
Oct 28, 2009, 10:04:10 AM10/28/09
to
On Wed, 28 Oct 2009 06:55:31 -0700 (PDT), Mats Carlsson
<ma...@sics.se> wrote:

>On Oct 28, 10:56 am, Wit Jakuczun <wit.jakuc...@gmail.com> wrote:
>
>> ECLiPSe has some profilers and debuggers. Although much better than what Sicstus offers
>
>Good point. What in particular are we lacking here?

SICStus debuggers are fine. This what is missing is high resolution
time profiling. But I am not sure that ECLiPSE has one...

A.L.

Jan Wielemaker

unread,
Oct 28, 2009, 10:00:23 AM10/28/09
to
On 2009-10-28, A.L <alew...@aol.com> wrote:
> On Wed, 28 Oct 2009 04:26:22 -0700 (PDT), jfmcjf <jfm...@gmail.com>
> wrote:

>>To my point of view, there are also big problems in the language
>>itself, not only the IDE. It is good to write small pieces of code for
>>constraint programming, etc. But it is not easy to use methodologies
>>from software engineering to write large programs. Even worse, once
>>programs are written they tend to look more obfuscated than in other
>>languages.

For Prolog `in the wild', that may be true, I see a lot of really ugly
Prolog around, using poor layout, poor naming conventions and weird
control-structures. That is mostly a matter of education, in particular
learning design patterns. As long as people follow shared design
patterns, the code remains accessible for others. If they follow their
own creativity you end up with lots of hard-to-understand
control-structures. That is not new and not unique to Prolog. Therefore,
I don't think that is a real issue with the language. There is a need
for good teaching material in these areas. The Craft of Prolog is a
`must-read', but it would be much nicer if it was more up-to-date.

In my view, the most serious missing piece is good support for
refactoring. Notably adding/deleting arguments and changing
datastructures can be a nightmare. Good IDEs have tools for such
operations, but I'm not aware of any that supoorts Prolog. Some
languages have type-support, which at least helps finding the problems.
Prolog has none of these, although quite many implementations can warn
about inconsistent arity (by means of undefined or discontiguous
predicates or as Ciao does by complaining about reusing the same name
with different arity in general).

Tom (and Mycroft/O'Keefe, Mercury, Visual Prolog, ...) has already
proposed a type-system that might be of some help here.

> Prolog is good within its own applicability area. It is good where it
> is good. I don't see any reason to write large programs that could be
> written in other languages more easily.

One reason has been mentioned here before: adding another language comes
at a (big) price. So, a dedicated language has to offer something very
special before people are convinced they need to take it on board. If
they can get away with a half-as-good solution with twice the efford in
the language they use for their daily work, they will (rightfully)
ignore the dedicated language. I think the 1/2 and 2 are conservative
estimates.

So, in my view, to be a language of choice you have to offer a
comprehensive environment in which you can program solutions.

There is also a bright side to all of this: those that take the trouble
to master the language can use it as a secret weapon :-)

Cheers --- Jan


Jan Wielemaker

unread,
Oct 28, 2009, 10:18:26 AM10/28/09
to
On 2009-10-28, A.L <alew...@aol.com> wrote:

It depends on the platform whether or not you can do that and on the
amount of effort you are willing to spend getting the best option for
your platform. I guess Prolog falls behind in the sense that its
developers have less resources to look into the non-portable tricks of
each platform to get the best results. Some platforms only offer a good
API for profiling native code. Prolog isn't the only victim here.

Roughly, you have two options: statistical profiling and actual
measurement. Both have their pros and cons, but in my experience
statistical profiling gives very acceptable results on modern OSes
(often with higher frequencies for ITIMER_PROF) if your program runs at
least few seconds.

Surely, a profiler is a must-have tool. If it is lacking, don't blame
the language. There are enough implementations that offer one.

Cheers --- Jan

Paulo Moura

unread,
Oct 28, 2009, 11:05:35 AM10/28/09
to Paulo Moura
On Oct 28, 11:26 am, jfmcjf <jfm...@gmail.com> wrote:
>
> I spent my last years programming compilers in Prolog and I often find
> that algorithms that are a child's play to write in other languages,
> become incredibly complicated in Prolog.

The reverse is also true. Is easy to find algorithms that are trivial
in Prolog and cumbersome in other languages. Hard for a programming
language to cover all bases without loosing itself.

> Reusing code is a pain if
> compared with O.O. languages.

That pain can be greatly relieved if you take advantage of Logtalk
instead of using plain Prolog. Moreover when Logtalk provides you with
code encapsulation and code reuse features that go beyond your average
OOP language (and without changing any of the fundamentals of logic
programming). But, as already discussed in this thread, you also need
tools to go along with the language. E.g. cross-referencers tools,
refactoring tools, documenting tools, profilers, and debuggers.

> There has been a great effort in
> improving the small details of the language (such as performance, or
> expressive power), but little to build and support large programs in
> its whole lifetime.

True but things are improving. A number of recent implementations,
both open source and commercial, are investing in better tools and
IDEs.

> I believe that there is often a misconception that
> separates software engineering from declarative programming.

Fully agree. Software engineering and declarative programming are a
perfect fit. Logtalk/Prolog code is often high-level and can be read
as executable specifications. Is also compact compared with code
written in other programming languages, helping minimizing the
distance between the problem domain and the solution domain.

Cheers,

Paulo

fodor

unread,
Oct 28, 2009, 11:06:20 AM10/28/09
to
> 4. I don't know ANY single college/university in the USA where Prolog
> is the subject of separate, semester long course. What is even worse,
> on majority of universities there is nothing like course in
> mathematical logic. What is even more worse, there is general
> perception that mathematics is not longer needed for computer
> scientists/engineers.

There are universities in US that offer both undergraduate and
graduate courses in logic and logic programming (including Prolog). I
can only give you examples from my university.

Undergraduate level courses:
Artificial Intellicence course (50% of the course describes logic and
resolution): http://www.cs.sunysb.edu/~cse352/
Logic course: http://www.cs.sunysb.edu/~cse371/
Principles of Programming Languages (includes logic languages and
Prolog homeworks; every couple of years the course is taught by Dr
Warren and the project for the semester was to implement WAM):
http://www.cs.sunysb.edu/~cse307

Graduate level courses:
Computing with Logic course (Prolog, the hw was to implement
interpreters in Prolog for stable and well-founded models; offered
every year either in spring or fall): http://www.cs.sunysb.edu/~cse505
Logic in Computer Science course: http://www.cs.sunysb.edu/~cse541
Advanced Logic in Computer Science (a semester long course on
implementation of WAM and tabling; last time it was offered in the
spring of 2009): http://www.cs.sunysb.edu/~ces641
Seminar in languages (most papers are based on logic programing):
http://www.cs.sunysb.edu/~cse645/
Theory of Database Systems (also describes Datalog): http://www.cs.sunysb.edu/~cse532

A.L.

unread,
Oct 28, 2009, 11:16:38 AM10/28/09
to
On 28 Oct 2009 14:00:23 GMT, Jan Wielemaker <ja...@hppc323.few.vu.nl>
wrote:

>On 2009-10-28, A.L <alew...@aol.com> wrote:
>> On Wed, 28 Oct 2009 04:26:22 -0700 (PDT), jfmcjf <jfm...@gmail.com>
>> wrote:
>
>>>To my point of view, there are also big problems in the language
>>>itself, not only the IDE. It is good to write small pieces of code for
>>>constraint programming, etc. But it is not easy to use methodologies
>>>from software engineering to write large programs. Even worse, once
>>>programs are written they tend to look more obfuscated than in other
>>>languages.
>

You are responding to my post, but commenting jfmcjf post :)

> There is a need
>for good teaching material in these areas. The Craft of Prolog is a
>`must-read', but it would be much nicer if it was more up-to-date.
>

Craft of Prolog is pretty old and actually not that good as giude for
good, large scale programming. And is out of print for years.

>In my view, the most serious missing piece is good support for
>refactoring. Notably adding/deleting arguments and changing
>datastructures can be a nightmare. Good IDEs have tools for such
>operations, but I'm not aware of any that supoorts Prolog. Some
>languages have type-support, which at least helps finding the problems.
>Prolog has none of these, although quite many implementations can warn
>about inconsistent arity (by means of undefined or discontiguous
>predicates or as Ciao does by complaining about reusing the same name
>with different arity in general).
>

Yes, lack of good IDE is THE problem. I have one Prolog application
that con sits of over 100 Prolog files. Making changes is really hard.
I am using PowerGrep and EditPadPro from JGSoftware to do development,
and this is far from being fun. Doing the same with Java application
consisting of almost 1000 files with Eclipse is no problem. Especially
using "refractor" option and such.

Cannot wait for Eclipse for SICStus :)


>Tom (and Mycroft/O'Keefe, Mercury, Visual Prolog, ...) has already
>proposed a type-system that might be of some help here.
>
>> Prolog is good within its own applicability area. It is good where it
>> is good. I don't see any reason to write large programs that could be
>> written in other languages more easily.
>
>One reason has been mentioned here before: adding another language comes
>at a (big) price. So, a dedicated language has to offer something very
>special before people are convinced they need to take it on board. If
>they can get away with a half-as-good solution with twice the efford in
>the language they use for their daily work, they will (rightfully)
>ignore the dedicated language. I think the 1/2 and 2 are conservative
>estimates.
>

Actually, factor is MUCH bigger. Before using Prolog CLP(FD), we made
attempt to use some expensive commercial constraint libraries in C++.
This project was abandoned after about a year, because it was obvious
that it would be never completed on time and within budged. Comparing
the results of this unfinished C++ project and (successful) Prolog
project it was estimated that development time was reduced by factor
between 20 to 50.

The same regards computing time. I am constantly evaluating available
Java constraint solvers. They are extremely slow. In last attempt,
some Java solver needed more time to create domain variables only than
Prolog needed to solve the complete problem

At this moment, I don't see any other platform than Prolog that could
be used efficiently for large scale real time constraint programming

>So, in my view, to be a language of choice you have to offer a
>comprehensive environment in which you can program solutions.

Yes - but as I stated above: advantages of Prolog are such that I will
be using it even with "stone age" development environment. No question
that it would be good to have something better than emacs - but there
is always the possibility to create the environment using available
tools (PowerGrep and EditPadPro in my case)

A.L.

Wit Jakuczun

unread,
Oct 28, 2009, 11:16:54 AM10/28/09
to
ECLiPSe has a profiler that gives you information about time spent in
a particular predicate.
In Sicstus you can only get information about times a predicate has
been called.
I can not say much about resolution in ECLiPSe. It was good enough for
me to detect bottlenecks.

Wit Jakuczun

unread,
Oct 28, 2009, 11:22:36 AM10/28/09
to
On 28 Paź, 15:04, A.L. <alewa...@aol.com> wrote:
> On Wed, 28 Oct 2009 06:55:31 -0700 (PDT), Mats Carlsson
>
> <ma...@sics.se> wrote:
> >On Oct 28, 10:56 am, Wit Jakuczun <wit.jakuc...@gmail.com> wrote:
>
> >> ECLiPSe has some profilers and debuggers. Although much better than what Sicstus offers
>
> >Good point.  What in particular are we lacking here?
>
> SICStus debuggers are fine.
>
ECLiPSe provides its user with GUI for debugging. It is quite useful.
In Sicstus there is only console-based debugger.
Nevertheless, both Prologs do not provide out of box tools for
debugging CLP(FD) codes. There is debugger for clpfd in Sicstus (fdbg
module) but I mean something like CLPGUI (but integrated with for
example IDE).

A.L.

unread,
Oct 28, 2009, 11:22:57 AM10/28/09
to
On 28 Oct 2009 14:18:26 GMT, Jan Wielemaker <ja...@hppc323.few.vu.nl>
wrote:

>On 2009-10-28, A.L <alew...@aol.com> wrote:


>> On Wed, 28 Oct 2009 06:55:31 -0700 (PDT), Mats Carlsson
>><ma...@sics.se> wrote:
>>
>>>On Oct 28, 10:56 am, Wit Jakuczun <wit.jakuc...@gmail.com> wrote:
>>>
>>>> ECLiPSe has some profilers and debuggers. Although much better than what Sicstus offers
>>>
>>>Good point. What in particular are we lacking here?
>>
>> SICStus debuggers are fine. This what is missing is high resolution
>> time profiling. But I am not sure that ECLiPSE has one...
>
>It depends on the platform whether or not you can do that and on the
>amount of effort you are willing to spend getting the best option for
>your platform. I guess Prolog falls behind in the sense that its
>developers have less resources to look into the non-portable tricks of
>each platform to get the best results. Some platforms only offer a good
>API for profiling native code. Prolog isn't the only victim here.
>
>Roughly, you have two options: statistical profiling and actual
>measurement. Both have their pros and cons, but in my experience
>statistical profiling gives very acceptable results on modern OSes
>(often with higher frequencies for ITIMER_PROF) if your program runs at
>least few seconds.
>

I am using third option: I am doing profiling on Java side. However,
this is "profiling in the large". I would like to have "magnifying
glass" and check time within Prolog.

In principle, Java offers nanosecond resolution - with restriction
that the platform makes it possible, However, I believe that most
platforms offers millisecond resolution

>Surely, a profiler is a must-have tool. If it is lacking, don't blame
>the language. There are enough implementations that offer one.
>

When I asy "Prolog", usually I have in mind specific implementation
and environment - unless I say otherwise :)

A.L.

A.L.

unread,
Oct 28, 2009, 11:35:59 AM10/28/09
to
On Wed, 28 Oct 2009 08:06:20 -0700 (PDT), fodor <fodor...@gmail.com>
wrote:

>> 4. I don't know ANY single college/university in the USA where Prolog
>> is the subject of separate, semester long course. What is even worse,
>> on majority of universities there is nothing like course in
>> mathematical logic. What is even more worse, there is general
>> perception that mathematics is not longer needed for computer
>> scientists/engineers.
>
>There are universities in US that offer both undergraduate and
>graduate courses in logic and logic programming (including Prolog). I
>can only give you examples from my university.

Good to know. However, as I said, during last 10 years I was unable
to detect candidate who would know what "Prolog" means.

If these courses are not mandatory, how many students will select
them?

Once I was teaching Real Time Programming using Ada. Students
collected all job ads from "Classified" section of local newspaper
(this was in large city with a lot of industry) and when semester
completed, wrote complain to the Dean about my course. They attached
all Classified newspaper section and asked the Dean to find one single
job opening that required Ada.

Obviously, he ignored the complain, but later had long and friendly
discussion with me. After this discussion I found myself working all
summer converting course from Ada to C.

I am afraid that the same paradigm works with regard of Prolog. Once
again, read CACM discussion about "Java Schools"

A.L.

jfmcjf

unread,
Oct 28, 2009, 1:46:43 PM10/28/09
to
On Oct 28, 3:00 pm, Jan Wielemaker <j...@hppc323.few.vu.nl> wrote:
> On 2009-10-28, A.L <alewa...@aol.com> wrote:
>
> [...]

> control-structures. That is not new and not unique to Prolog. Therefore,
> I don't think that is a real issue with the language. There is a need
> for good teaching material in these areas. The Craft of Prolog is a
> `must-read', but it would be much nicer if it was more up-to-date.

I still believe that there is a real issue with the language... I do
not understand why a language as powerful a Prolog does not include by
default user-defined functions, loops, object-orientation, declarative
IO, type systems, analysis, etc. I know that all those things have
been around in papers for a long time, with different proposals, but
none is widely accepted.

> In my view, the most serious missing piece is good support for
> refactoring. Notably adding/deleting arguments and changing
> datastructures can be a nightmare. Good IDEs have tools for such
> operations, but I'm not aware of any that supoorts Prolog. Some
> languages have type-support, which at least helps finding the problems.
> Prolog has none of these, although quite many implementations can warn
> about inconsistent arity (by means of undefined or discontiguous
> predicates or as Ciao does by complaining about reusing the same name
> with different arity in general).

Refactoring is hard because the language makes it hard. I can add
and remove arguments and change data structures in C with minor pains,
even in emacs :)

> > Prolog is good within its own applicability area. It is good where it
> > is good. I don't see any reason to write large programs that could be
> > written in other languages more easily.

I disagree here. Prolog is a general purpose language. Do Haskell
programmers think the same about their language?

Tom Schrijvers

unread,
Oct 28, 2009, 2:26:10 PM10/28/09
to
On Oct 28, 6:46 pm, jfmcjf <jfm...@gmail.com> wrote:

> > > Prolog is good within its own applicability area. It is good where it
> > > is good. I don't see any reason to write large programs that could be
> > > written in other languages more easily.
>
> I disagree here. Prolog is a general purpose language. Do Haskell
> programmers think the same about their language?

Haskell programmers consider their language to be general purpose.
That does
not mean that Prolog programmers should think that. There are many
special
purpose languages that are much better at what they do than general
purpose
languages. For instance, Haskell programmers sometimes find a need for
Prolog.
They then use a library that provides Prolog as an embedded Domain
Specific
Language within Haskell. So while they don't turn to a Prolog system
for their
Prolog needs, but they're using Prolog nevertheless.

jfmcjf

unread,
Oct 28, 2009, 2:45:56 PM10/28/09
to

So you propose to discontinue all efforts to do general purpose
programming in Prolog, and instead focus on search, constraint
solving, etc.? In such a case, most efforts should go into embedding
Prolog, as a library, into other languages (e.g. as happens with SQL).

That may make sense, but that is not the focus that many developers
have (or had) in mind (I can tell since I contribute to the
development of Ciao Prolog).

A.L.

unread,
Oct 28, 2009, 2:52:48 PM10/28/09
to
On Wed, 28 Oct 2009 10:46:43 -0700 (PDT), jfmcjf <jfm...@gmail.com>
wrote:

>On Oct 28, 3:00�pm, Jan Wielemaker <j...@hppc323.few.vu.nl> wrote:


>> On 2009-10-28, A.L <alewa...@aol.com> wrote:
>>
>> [...]
>> control-structures. That is not new and not unique to Prolog. Therefore,
>> I don't think that is a real issue with the language. There is a need
>> for good teaching material in these areas. The Craft of Prolog is a
>> `must-read', but it would be much nicer if it was more up-to-date.
>
>I still believe that there is a real issue with the language... I do
>not understand why a language as powerful a Prolog does not include by
>default user-defined functions, loops, object-orientation, declarative
>IO, type systems, analysis, etc. I know that all those things have
>been around in papers for a long time, with different proposals, but
>none is widely accepted.

Because if you do all this, such language will be not longer Prolog.

I call this process "perlification" - see what happened to Perl - once
small and cute scripting languages. Now Perl is The Language That Has
Everything monster and is totally not useable.

The same happened to Python.

Stay away from Prolog if you don't like it. Or, maybe, try to
understand why Prolog is such as it is.

A.L.

A.L.

unread,
Oct 28, 2009, 2:55:00 PM10/28/09
to
On Wed, 28 Oct 2009 11:45:56 -0700 (PDT), jfmcjf <jfm...@gmail.com>
wrote:

>On Oct 28, 7:26�pm, Tom Schrijvers <tomenanne...@gmail.com> wrote:


>> On Oct 28, 6:46�pm, jfmcjf <jfm...@gmail.com> wrote:
>>
>> > > > Prolog is good within its own applicability area. It is good where it
>> > > > is good. I don't see any reason to write large programs that could be
>> > > > written in other languages more easily.
>>
>> > I disagree here. Prolog is a general purpose language. Do Haskell
>> > programmers think the same about their language?
>>
>> Haskell programmers consider their language to be general purpose.
>> That does
>> not mean that Prolog programmers should think that. There are many
>> special
>> purpose languages that are much better at what they do than general
>> purpose
>> languages. For instance, Haskell programmers sometimes find a need for
>> Prolog.
>> They then use a library that provides Prolog as an embedded Domain
>> Specific
>> Language within Haskell. So while they don't turn to a Prolog system
>> for their
>> Prolog needs, but they're using Prolog nevertheless.
>
>So you propose to discontinue all efforts to do general purpose
>programming in Prolog, and instead focus on search, constraint
>solving, etc.? In such a case, most efforts should go into embedding
>Prolog, as a library, into other languages (e.g. as happens with SQL).

I do. Do in Prolog what is hard to do in Java and is easy in Prolog
and do all other things in Java or whatever

A.L.

Alan Baljeu

unread,
Oct 28, 2009, 2:56:19 PM10/28/09
to
> I still believe that there is a real issue with the language... I do
> not understand why a language as powerful a Prolog does not include by
> default user-defined functions, loops, object-orientation, declarative
> IO, type systems, analysis, etc. I know that all those things have
> been around in papers for a long time, with different proposals, but
> none is widely accepted.

It seems to me this is a valid point. All of the above things are
easy to achieve [I mean no groundbreaking R&D is required; I'm sure
it's a lot of work] with current Prolog technology. They wouldn't be
achieved in the same fashion as Haskell, but in a style more suitable
to dynamic languages. Aren't these facilities worthwhile to develop?

Alan Baljeu

unread,
Oct 28, 2009, 2:58:55 PM10/28/09
to
> I still believe that there is a real issue with the language... I do
> not understand why a language as powerful a Prolog does not include by
> default user-defined functions, loops, object-orientation, declarative
> IO, type systems, analysis, etc. I know that all those things have
> been around in papers for a long time, with different proposals, but
> none is widely accepted.

It seems to me this is a valid point. All of the above things are

fodor

unread,
Oct 28, 2009, 3:23:19 PM10/28/09
to
On Oct 28, 11:35 am, A.L. <alewa...@aol.com> wrote:
> If these courses are not mandatory, how many students will select
> them?

> 1. Artificial Intellicence course (50% of the course describes logic and resolution): http://www.cs.sunysb.edu/~cse352/
> 2. Logic course: http://www.cs.sunysb.edu/~cse371/
> 3. Principles of Programming Languages: http://www.cs.sunysb.edu/~cse307

Two of these undergraduate level courses are mandatory (2 and 3
above), so, I think, every of these students has experience with
Prolog.

> Once I was teaching Real Time Programming using Ada. Students
> collected all job ads from "Classified" section of local newspaper
> (this was in large city with a lot of industry) and when semester
> completed, wrote complain to the Dean about my course. They attached
> all Classified newspaper section and asked the Dean to find one single
> job opening that required Ada.
> Obviously, he ignored the complain, but later had long and friendly
> discussion with me. After this discussion I found myself working all
> summer converting course from Ada to C.
> I am afraid that the same paradigm works with regard of Prolog. Once
> again, read CACM discussion about "Java Schools"

I think it's just a matter to finding where to look for people knowing
a particular subject. Stony Brook has a long tradition of logic
programming (~25 years). However, I must agree with you that Prolog is
not as popular as, for instance, Lisp and functional languages OR
imperative programming languages in many US universities.

Paul.

jfmcjf

unread,
Oct 28, 2009, 3:35:08 PM10/28/09
to
On Oct 28, 7:52 pm, A.L. <alewa...@aol.com> wrote:
> On Wed, 28 Oct 2009 10:46:43 -0700 (PDT), jfmcjf <jfm...@gmail.com>
> wrote:
>
> >On Oct 28, 3:00 pm, Jan Wielemaker <j...@hppc323.few.vu.nl> wrote:
> >> On 2009-10-28, A.L <alewa...@aol.com> wrote:
>
> >> [...]
> >> control-structures. That is not new and not unique to Prolog. Therefore,
> >> I don't think that is a real issue with the language. There is a need
> >> for good teaching material in these areas. The Craft of Prolog is a
> >> `must-read', but it would be much nicer if it was more up-to-date.
>
> >I still believe that there is a real issue with the language... I do
> >not understand why a language as powerful a Prolog does not include by
> >default user-defined functions, loops, object-orientation, declarative
> >IO, type systems, analysis, etc. I know that all those things have
> >been around in papers for a long time, with different proposals, but
> >none is widely accepted.
>
> Because if you do all this, such language will be not longer Prolog.

That is nonsense. First-order logic _can_ model declarative IO
(Mercury does it). Supporting that in the language will not kill
Prolog. Functions and loops can be added just as syntactical features.
That will not kill Prolog either. Most Prolog implementations support
high-order calls, and the equivalent of functional maps, etc.

> I call this process "perlification" - see what happened to Perl - once
> small and cute scripting languages. Now Perl is The Language That Has
> Everything monster and is totally not useable.
>
> The same happened to Python.

But Python have a lot of users. Even Google financially supports it. I
wish the same could happen to Prolog (or logic programming) some day.

Mick Krippendorf

unread,
Oct 28, 2009, 3:50:39 PM10/28/09
to
A.L. schrieb:

> I call this process "perlification" - see what happened to Perl - once
> small and cute scripting languages. Now Perl is The Language That Has
> Everything monster and is totally not useable.
>
> The same happened to Python.

No, it hasn't.

Regards,
Mick.

A.L.

unread,
Oct 28, 2009, 3:58:13 PM10/28/09
to
On Wed, 28 Oct 2009 20:50:39 +0100, Mick Krippendorf <mad....@gmx.de>
wrote:

Has't - what?.... Compare early versions of Python with current crap

A.L.

A.L.

unread,
Oct 28, 2009, 4:03:28 PM10/28/09
to
On Wed, 28 Oct 2009 12:35:08 -0700 (PDT), jfmcjf <jfm...@gmail.com>
wrote:

>O
>


>That is nonsense. First-order logic _can_ model declarative IO
>(Mercury does it). Supporting that in the language will not kill
>Prolog. Functions and loops can be added just as syntactical features.
>That will not kill Prolog either. Most Prolog implementations support
>high-order calls, and the equivalent of functional maps, etc.
>

Object orientation can be done using Prolog itself - see SIStus
Objects. Loops can be done using Prolog itself - see Prolog Loops.

As I said: not everything in Prolog is right, and Standarization
Committee is working on these problems. But don't try to develop new
language and call it Prolog. Prolog is good enough.

If you want language that does EVERYTHING - take, for example,
Mozart-OZ

>> I call this process "perlification" - see what happened to Perl - once
>> small and cute scripting languages. Now Perl is The Language That Has
>> Everything monster and is totally not useable.
>>
>> The same happened to Python.
>
>But Python have a lot of users. Even Google financially supports it. I
>wish the same could happen to Prolog (or logic programming) some day.

Do you know a joke about 30 million flies that cannot make a
mistake?... This is the same arguments. Please provide technical
arguments not marketing/political ones

A.L.

Mick Krippendorf

unread,
Oct 28, 2009, 4:16:32 PM10/28/09
to
A.L. wrote:

> Mick Krippendorf wrote:
>> No, it hasn't.
>
> Has't - what?.... Compare early versions of Python with current crap

I cannot see many crappy things in current Python. What is it that you
think is crappy?

Regards,
Mick.

A.L.

unread,
Oct 28, 2009, 4:42:20 PM10/28/09
to
On Wed, 28 Oct 2009 21:16:32 +0100, Mick Krippendorf <mad....@gmx.de>
wrote:

>A.L. wrote:

This is starting language war, what is always stupid. Moreover, this
group is about Prolog not Python. Therefore, I will not comment any
further on "Python is good or not" or "Prolog could be converted into
other language or not".

I am leaving this topic for kindergarten kids.

Once again, if somebody doesn't like Prolog, there are enough
languages to make everybody happy.

A.L.


Mick Krippendorf

unread,
Oct 28, 2009, 5:00:29 PM10/28/09
to
A.L. schrieb:

> This is starting language war, what is always stupid.
Language wars are stupid. It was not my intention to get involved in
one. No, I only wanted to know what's so crappy about Python.

> Moreover, this group is about Prolog not Python.

Talking about other languages in a language group wouldn't be
unprecedented. But have it your way.

> Therefore, I will not comment any further on "Python is good or not"
> or "Prolog could be converted into other language or not".
> I am leaving this topic for kindergarten kids.

On that note, gramps,
Goodbye.

Mats Carlsson

unread,
Oct 30, 2009, 10:49:08 AM10/30/09
to
On Oct 28, 2:55 pm, Mats Carlsson <ma...@sics.se> wrote:
> > Any news about Sicstus' IDE? They claim they are working on it.
>
> It has kept us busy indeed. The SICStus Prolog 4.1 beta release is
> scheduled for 1 November. It will feature an Eclipse-based IDE with
> working name SPIDER. Some members of our development team, die-hard
> Emacs users throughout their carreers, have switched to SPIDER.

The beta release is out now.

A.L.

unread,
Oct 30, 2009, 1:20:57 PM10/30/09
to

Spider is pretty good. However, two things are missing: Reference and
Refactor. If these functions are provided, I will abandon my current
development enviroinment.

Good start, anyway!

A.L.

fodor

unread,
Oct 31, 2009, 9:51:24 AM10/31/09
to

I cannot try Spider. Sicstus 4.1 doesn't seem to work with an
evaluation license: I got for an evaluation license, I installed 4.1
with it, but when I wanted to execute spwin.exe or sicstus.exe I get
"This is not a correct license." Is a beta version test just for
customers? I was just curious to try Spider.

A.L.

unread,
Oct 31, 2009, 11:58:01 AM10/31/09
to
On Sat, 31 Oct 2009 06:51:24 -0700 (PDT), fodor <fodor...@gmail.com>
wrote:

>On Oct 30, 10:49�am, Mats Carlsson <ma...@sics.se> wrote:

I had no problems with 4.1. There is specific license for 4.1 beta

A.L.

Paulo Moura

unread,
Oct 31, 2009, 2:02:42 PM10/31/09
to

As a side note, the current development release of Logtalk (r5151; see
http://trac.logtalk.org/wiki/RunningDeveloperVersions) supports the
SICStus Prolog 4.1 beta release.

Cheers,

Paulo

contingencyplan

unread,
Oct 31, 2009, 7:50:45 PM10/31/09
to
On Oct 28, 9:00 am, Jan Wielemaker <j...@hppc323.few.vu.nl> wrote:
> On 2009-10-28, A.L <alewa...@aol.com> wrote:
>
> > On Wed, 28 Oct 2009 04:26:22 -0700 (PDT), jfmcjf <jfm...@gmail.com>
> > wrote:
> >>To my point of view, there are also big problems in the language
> >>itself, not only the IDE. It is good to write small pieces of code for
> >>constraint programming, etc. But it is not easy to use methodologies
> >>from software engineering to write large programs. Even worse, once
> >>programs are written they tend to look more obfuscated than in other
> >>languages.
>
> For Prolog `in the wild', that may be true, I see a lot of really ugly
> Prolog around, using poor layout, poor naming conventions and weird
> control-structures. That is mostly a matter of education, in particular
> learning design patterns. As long as people follow shared design
> patterns, the code remains accessible for others. If they follow their
> own creativity you end up with lots of hard-to-understand

> control-structures. That is not new and not unique to Prolog. Therefore,
> I don't think that is a real issue with the language. There is a need
> for good teaching material in these areas. The Craft of Prolog is a
> `must-read', but it would be much nicer if it was more up-to-date.

Aside from Craft of Prolog, what resources are there for design
pattens in Prolog? Do you mean design patterns in general, or in the
style of the Gang of Four and those that followed in their mindset?


On Oct 28, 10:35 am, A.L. <alewa...@aol.com> wrote:
> On Wed, 28 Oct 2009 08:06:20 -0700 (PDT), fodor <fodor.p...@gmail.com>


> wrote:
>
> >> 4. I don't know ANY single college/university in the USA where Prolog
> >> is the subject of separate, semester long course. What is even worse,
> >> on majority of universities there is nothing like course in
> >> mathematical logic. What is even more worse, there is general
> >> perception that mathematics is not longer needed for computer
> >> scientists/engineers.
>
> >There are universities in US that offer both undergraduate and
> >graduate courses in logic and logic programming (including Prolog). I
> >can only give you examples from my university.
>
> Good to know. However, as I said, during last 10 years  I was unable
> to detect candidate who would know what "Prolog" means.
>
> If these courses are not mandatory, how many students will select
> them?
>

> ...
>
> A.L.

To add a few more:
* At Texas Tech, the Concepts of Programming Languages undergraduate
course, as taught by Dr. Daniel Cooke, had a few weeks of lessons
about Prolog, and the language he was developing used a Prolog-based
interpreter, giving a few more weeks of usage. This was my first and
only exposure to the language in undergrad. It's been a few years
since, so I would have to check with Dr. Cooke as to whether he still
teaches the course. Dr. Cooke also taught a graduate class on
programming languages. I was unable to take it, but from my
understanding he developed a from-scratch interpreter for his language
in Prolog over the course of the semester.

* At University of Texas at Dallas, Dr. Gupta teaches a graduate
course entitled Computational Logic, which covers the theoretical
basis of Prolog (resolution, Herbrand universe, etc.), Prolog, DCGs,
and CLP. Additionally, the Advanced Programming Languages course
covers Prolog for a few weeks. Other courses may cover it here, but
these are the ones I'm directly aware of.

Of note is a logic programming presence at both universities - Dr.
Gelfond at Texas Tech (though Dr. Cooke does his own work on
SequenceL, he works with Dr. Gelfond frequently) and Dr. Gupta at UTD.
However, it got me interested in language design in general and Prolog
specifically, so I'll blame them for getting me to this point. :-P


As a related note: is there a list of good CS programs for studying
logic programming? If not, I suppose once the ALP site is revamped and
has a wiki and soforth, that would be a good place to put it?

(On that note, does anybody know the status of the site redesign?)


On Oct 28, 6:26 am, jfmcjf <jfm...@gmail.com> wrote:
> Prolog should widen its field, the language should be revamped with
> new features that make programs easier to write. But I do not believe
> that it can be done in the current way. Most of the best Prolog (or
> logic) programmers are developers of their own implementation, and the
> economical support and development comes from the academy: research
> projects and papers. That divides the community and isolate language
> improvements on separate implementations. That does not encourage
> people to learn a language that, as a general purpose language, is
> artifically kept alive.
>
> ...
>
> The problem I see is that, even if there are people with great ideas,
> there is not a strong effort (mainly, the economical push) to improve
> the language. I have seen many good programmers and researchers moving
> away from Prolog development (programming, implementation, analysis)
> to more productive fields (paying your mortgage is sometimes more
> important...).

I'm of a similar mindset. One of things that concerns me with such an
effort, however, is that adoption of such a new language by the
existing LP community. Wikipedia lists several LP languages at
http://en.wikipedia.org/wiki/Category:Logic_programming_languages .
Several of these are not Prolog, but rather are new languages derived
from it, with different extensions to the core semantics. At the last
ICLP in Pasadena, I don't think I saw anybody discussing these
languages. So in a sense, I see a mirrored problem within the LP
community - how receptive are members of the LP community to switching
away from Prolog to a derivative that keeps with the same spirit, but
changes, adds, or removes (!) features to have a language better
geared towards general application development? What would the new
language have to contain to prompt the switch? Or is the general LP
community so happy with Prolog that they won't switch, come Hell or
high water?


On Oct 28, 1:26 pm, Tom Schrijvers <tomenanne...@gmail.com> wrote:
> On Oct 28, 6:46 pm, jfmcjf <jfm...@gmail.com> wrote:
>
> > > > Prolog is good within its own applicability area. It is good where it
> > > > is good. I don't see any reason to write large programs that could be
> > > > written in other languages more easily.
>
> > I disagree here. Prolog is a general purpose language. Do Haskell
> > programmers think the same about their language?
>
> Haskell programmers consider their language to be general purpose.
> That does
> not mean that Prolog programmers should think that. There are many
> special
> purpose languages that are much better at what they do than general
> purpose
> languages.

So do you believe that Prolog is better used in its specific domains -
e.g., NLP, prototyping (but not fully implementing?) compilers, CLP -
than being designed towards general programming? Should we maximize
the strengths at the expensive of generality, and tell people to use
other languages for other parts of their code?

A.L.

unread,
Nov 1, 2009, 1:22:02 AM11/1/09
to
On Sat, 31 Oct 2009 16:50:45 -0700 (PDT), contingencyplan
<conting...@gmail.com> wrote:

>I'm of a similar mindset. One of things that concerns me with such an
>effort, however, is that adoption of such a new language by the
>existing LP community. Wikipedia lists several LP languages at
>http://en.wikipedia.org/wiki/Category:Logic_programming_languages .
>Several of these are not Prolog, but rather are new languages derived
>from it, with different extensions to the core semantics. At the last
>ICLP in Pasadena, I don't think I saw anybody discussing these
>languages.

This thread is about "Real World Applications". In "Real World",
criteria for choosing programming language are complex, and the
decision process is multicriterial. Business aspects are more
important than technical aspects. We, in "real world" cannot use
languages that are 6 month old, are unfinished scientific product, are
not supported by SOLID business entity that can provide (paid) support
and most likely will not go belly up within next 6 month, or the
author of language decides that he/she is not more interested.

We, "in real world" need products that are proven, robust, bug free,
have good performance, scale well and have reference industrial
applications.

Most of languages listed on Wikipedia page are useless from the point
of view of "real world". What doesn't mean that they are not
interested for the academia. Actually, they are academic products.
Most of them half done.... Or less than half. And majority of them are
already abandoned by their authors.

A.L.

A.L.

unread,
Nov 1, 2009, 1:44:35 AM11/1/09
to
On Sat, 31 Oct 2009 16:50:45 -0700 (PDT), contingencyplan
<conting...@gmail.com> wrote:

>
>Aside from Craft of Prolog, what resources are there for design
>pattens in Prolog? Do you mean design patterns in general, or in the
>style of the Gang of Four and those that followed in their mindset?

On sci.physics and other physics groups there are plenty of posts such
as "I don't know and don't understand relativity theory, but I am sure
that Einstein was wrong"

It seems that you are criticizing Prolog from the same perspective

A.L.

jfmcjf

unread,
Nov 1, 2009, 3:20:59 PM11/1/09
to
On Oct 28, 9:03 pm, A.L. <alewa...@aol.com> wrote:
> On Wed, 28 Oct 2009 12:35:08 -0700 (PDT), jfmcjf <jfm...@gmail.com>
> wrote:
>
> >O
>
> >That is nonsense. First-order logic _can_ model declarative IO
> >(Mercury does it). Supporting that in the language will not kill
> >Prolog. Functions and loops can be added just as syntactical features.
> >That will not kill Prolog either. Most Prolog implementations support
> >high-order calls, and the equivalent of functional maps, etc.
>
> Object orientation can be done using Prolog itself - see SIStus
> Objects. Loops can be done using Prolog itself - see Prolog Loops.
>
> As I said: not everything in Prolog is right, and Standarization
> Committee is working on these problems. But don't try to develop new
> language and call it Prolog. Prolog is good enough.
>
> If you want language that does EVERYTHING - take, for example,
> Mozart-OZ

If you are part of the Standarization Committee, and you did not leave
this topic as you said before, could you please explain
how are those problems being addressed?

BTW, you seem to contradict yourself. Objects in SICStus and Prolog
loops are just particular and non-standarized extensions. Those have
not been accepted by most of Prolog users (is SWI or Yap implementing
and
using them?). Some are half-done, experimental, or have been abandoned
by their authors.

When you say "Prolog is good enough", do you mean that it is good
enough with the extensions it has? (please, try to understand the
difference between a library (e.g. lists) and a language extensions
that may alter the language semantics (e.g. objects, DCGs, loops)).

I say "Prolog is not good enough" because it misses many things that
current developers have in other languages, and it has some
rough edges that can be polished (e.g. is multi-argument indexing
part of Prolog, or is it another language?). But the language is good
enough to be easily extended. And more importantly, it can be done
while preserving the compatibility.

contingencyplan

unread,
Nov 1, 2009, 7:37:54 PM11/1/09
to
On Oct 31, 11:22 pm, A.L. <alewa...@aol.com> wrote:
> On Sat, 31 Oct 2009 16:50:45 -0700 (PDT), contingencyplan
>

I understand the problem of such research languages as used in the
real world - I am similarly frustrated with them. I was simply using
that list as an example. My overall point was a response to jfmcjf,
who indicated that a revamp of the language would be useful in making
Prolog more attractive for the "real world." I agree with the
sentiment, but the ease or difficulty of such an effort is very
dependent, in my view, on the involvement of the existing LP
community. If the LP community isn't even using, supporting,
extending, and refining the language (and the tools, IDEs, profilers,
debuggers, and soforth, of course!), why should anybody else? I was
not arguing that these languages should be used for "real world"
development - I agree that they should not, for the reasons you
mentioned. In fact, that's my exact point - the field is littered with
the bodies of attempts at refining Prolog or developing a new LP
language. Is the Prolog community interested enough in refining /
revamping the language to make it more "real world" relevant to help
keep such an effort from becoming another corpse?

If this is a derail of the original discussion, I could gladly start a
new thread to discuss it.


On Oct 31, 11:44 pm, A.L. <alewa...@aol.com> wrote:
> On Sat, 31 Oct 2009 16:50:45 -0700 (PDT), contingencyplan
>

> <contingencyp...@gmail.com> wrote:
>
> >Aside from Craft of Prolog, what resources are there for design
> >pattens in Prolog? Do you mean design patterns in general, or in the
> >style of the Gang of Four and those that followed in their mindset?
>

> On sci.physics and other physics groups there are plenty of posts such
> as "I don't know and don't understand relativity theory, but I am sure
> that Einstein was wrong"

But he totally was! I'm not sure how, but he was I tell ya!
(joking :) )


> It seems that you are criticizing Prolog from the same perspective
>
> A.L.

Well, with respect to the design patterns, I wasn't criticizing
anything - I was wondering how patterns are discussed in the logic
programming community, since I haven't really come across anything of
the sort. By referring to the GoF, I wasn't saying that Prolog needs
singletons and factories and visitors and <insert fave pattern here>,
or that such patterns would even make sense or fit within Prolog
programming. I was more referring to their methodology of collecting
and documenting patterns in an organized way - I haven't seen anything
like that for logic programming, so I was wondering if such a resource
existed. I was wondering what definition Dr. Wielemaker was using for
"design patterns."

If you mean in general, I'm not quite following. What am I missing -
what is the relativity theory in this analogy? (I'm not saying that
I'm not missing anything, I just don't see what it is offhand.)

Also, apologies if it's not clear: my questions are genuine, not some
sort of rhetorical device or criticism. I'm not trying to prove
anybody wrong; rather, my goal is to use the opportunity to get an
understanding of the culture of a community I'd like to be a part of.

Jan Wielemaker

unread,
Nov 2, 2009, 1:13:22 PM11/2/09
to
On 2009-11-02, contingencyplan <conting...@gmail.com> wrote:
> language. Is the Prolog community interested enough in refining /
> revamping the language to make it more "real world" relevant to help
> keep such an effort from becoming another corpse?

Some parts are, others are less interested. I think this is the case in all
language communities, although Prolog may have a relatively high percentage of
people that are interested in the idea of applying logic for programming but
not so much to making it actually work.

> existed. I was wondering what definition Dr. Wielemaker was using for
> "design patterns."

Please, 'Jan' suffices ... My comment only referred to the global notion of
creating a shared body of sketeton designs that can/should be applied if a
certain problem needs to be coded. This `experience' greatly boosts
programming performance. If this experience is shared, it greatly enhances
the readability of each others code.

Only a few of us are gifted with the ability to write code that reads
like a novel :-(

Cheers --- Jan


Jan Wielemaker

unread,
Nov 2, 2009, 1:23:29 PM11/2/09
to

Maybe A.L. is right in a sense. Prolog has fewer control structures and
datatypes that `obviously are designed for the task'. Instead, it has very
general datatypes and very general control-structures. This leaves lots of
freedom to the implementor. I do recall grading student's programs for basic
tasks. Of course many of them are broken, but still, I sometimes came accross
programs for what I though were really simple standard problems that were way
outside the paved paths and defendable. Such programs are hard to read
though. A more shared understanding of skeletons avoids this.

Of course, Prolog's ability for reflection and meta-programming can be used
to create unreadable code as well, but this is also one of the major
advantages of the language.

--- Jan

Ulrich Neumerkel

unread,
Nov 3, 2009, 7:48:22 AM11/3/09
to
jfmcjf <jfm...@gmail.com> writes:
>On Oct 28, 9:03 pm, A.L. <alewa...@aol.com> wrote:
>> On Wed, 28 Oct 2009 12:35:08 -0700 (PDT), jfmcjf <jfm...@gmail.com>
>> wrote:
>> >That is nonsense. First-order logic _can_ model declarative IO
>> >(Mercury does it). Supporting that in the language will not kill
>> >Prolog.

It is done in SWI's library(pio) - quite differently to
Mercury: There is no restriction in nondeterminism.

>> As I said: not everything in Prolog is right, and Standarization
>> Committee is working on these problems. But don't try to develop new
>> language and call it Prolog. Prolog is good enough.

>If you are part of the Standarization Committee, and you did not leave


>this topic as you said before, could you please explain
>how are those problems being addressed?

First, let me clarify one thing: There is no such thing as a
"Standardization Commitee" for Prolog. When people hear "Commitee"
most come to conclusion that this is some formal organization
where people are nominated in or even elected.

We have a working group (WG17) which is part of subcommitee 22 (SC22)
which in turn is part of the joint technical commitee 1 (JTC1) of
ISO/IEC. ISO, JTC1, and SC22 are institutions subject to international
law and bi- and multilateral agreements you never want to know in detail.

But WG17 is open to everyone. In particular it is open to people who
care about Prolog's strength!

The only purpose of WG17 is to produce documents which are then
transmitted up the ladder to JTC1 that circulates them for comments
and approval to the national member bodies. But if this balloting
fails too often, ISO stops the entire process - so that's ISO's
approach to loop checking.

Evidently, we have an interest to produce documents were agreement
is possible. And evidently we have an interest to keep in
contact with all interested member bodies. It is up to us to
improve that.

Currently WG17 focuses on the core language. Don't believe that all
things are there in shape. Neither in the standard nor in concrete
implementations.

Since you were discussing I/O:

N215 setup_call_cleanup/3:

http://www.complang.tuwien.ac.at/ulrich/iso-prolog/N215

This control construct is needed when you want side-effect free I/O
in Prolog. It's also needed for safe server programming and it is
useful (though not strictly needed) for side-effects in general. So
far only 8 (eight) people helped to improve it... If you are interested
in pure I/O you definitely should comment on it.

Here is a short explanation starting with simple uses:

https://mailbox.iai.uni-bonn.de/mailman/public/swi-prolog/2009/001944.html

There are many more drafts and discussion papers:

http://www.sju.edu/~jhodgson/wg17/Drafts/

Your comments are welcome - and needed! Don't wait until the next
meeting!

>When you say "Prolog is good enough", do you mean that it is good
>enough with the extensions it has? (please, try to understand the
>difference between a library (e.g. lists) and a language extensions
>that may alter the language semantics (e.g. objects, DCGs, loops)).

For quite some time it was believed that lambda expressions (which
are intimately related to loops) require language extensions.
Fortunatey this is not the case, a simple library suffices.

http://www.complang.tuwien.ac.at/ulrich/Prolog-inedit/ISO-Hiord

This means that WG17 can concentrate its efforts on other topics.

A.L.

unread,
Nov 3, 2009, 8:27:02 AM11/3/09
to
On Sun, 1 Nov 2009 16:37:54 -0800 (PST), contingencyplan
<conting...@gmail.com> wrote:

>O

>
>Well, with respect to the design patterns, I wasn't criticizing
>anything - I was wondering how patterns are discussed in the logic
>programming community, since I haven't really come across anything of
>the sort. By referring to the GoF, I wasn't saying that Prolog needs
>singletons and factories and visitors and <insert fave pattern here>,
>or that such patterns would even make sense or fit within Prolog
>programming. I was more referring to their methodology of collecting
>and documenting patterns in an organized way - I haven't seen anything
>like that for logic programming, so I was wondering if such a resource
>existed. I was wondering what definition Dr. Wielemaker was using for
>"design patterns."

Check two books:

"Constructing Logic Programs" by Jean-Marie Jacquet, especially
Chapter 6 "Applying Techiques to skeletons" . This is closest to the
concept of "patterns".

This chapter is available on-line

http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.56.7278

Boy the whole book should be treated as sort-of equivalent of GoF for
logic programming

Skeletons and techniques were also used by Spiro Michaylov, such as

http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.29.5170

Second book is "Logic Programming - Systematic Program Development" by
Yves Deville, less in GoF flavor, but more following Wirth school.

Other approach that is essential in software engineering is
refactoring. There is quite a bit about refactoring Prolog Programs,
such as paper by Demoen and othes

http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.9.4436

A.L.

rupert...@googlemail.com

unread,
Nov 6, 2009, 4:36:54 AM11/6/09
to
On Nov 1, 5:22 am, A.L. <alewa...@aol.com> wrote:
> This thread is about "Real World Applications". In "Real World",
> criteria for choosing programming language are complex, and the
> decision process is multicriterial. Business aspects are more
> important than technical aspects. We, in "real world" cannot use
> languages that are 6 month old, are unfinished scientific product, are
> not supported by SOLID business entity that can provide (paid) support
> and most likely will not go belly up within next 6 month, or the
> author of language decides that he/she is not more interested.
>
> We, "in real world" need products that are proven, robust, bug free,
> have good performance, scale well and have reference industrial
> applications.
>
> Most of languages listed on Wikipedia page are useless from the point
> of view of "real world". What doesn't mean that they are not
> interested for the academia. Actually, they are academic products.
> Most of them half done.... Or less than half. And majority of them are
> already abandoned by their authors.
>
> A.L.

I have found that this is an issue even with Prolog. Prolog is good
enough for "real world" applications, but almost all businesses that I
encounter would not use it. Simply put, it isn't popular enough, and
conservative businesses want to stick with the mainstream. This is
partly due to a closed minded attitude, but if you look at the field
of IT tools in its entirety, Prolog isn't exactly a tool that is
jumping out either. Finding staff with the relevant skills is part of
the 'multicriterial' decision that you talk about, and it is entirely
reasonable that businesses are not investing in tools to build systems
that they cannot find the resources to maintain easily and at a
reasonable price.

Embedding domain specific languages (DSLs) in say Java, has become a
popular technique for creating rich domain models in applications that
need them. These DSLs can be compared to the experimental logic
languages of academia in the sense that they are small experimental
languages used to encapsulate the properties of a specific domain of
application (or investigation in academia).

We have a situation where businesses are not happy to use industrial
strength Prolog, but quite happy to use their own non-industrial
strength toy languages.

If you have a domain of application where Prolog would be a suitable
language to use but have a skeptical client, consider embedding Prolog
or a mini-Prolog (non ISO, cut down version) and then you can sell the
whole concept as a DSL. This levels the field of Logic languages
somewhat, as the DSL implementer can equally draw on some of the more
experimental ideas from logic programming as from Prolog itself.

One area I have found Prolog to be useful in is generating functional
tests from a model of an application. The model is written in such a
way that it can be queried with an unbound or partially bound or
constrained set of input variables and it will produce all
combinations of inputs/outputs to test the application against. I have
used this technique to generate tens of thousands of test cases which
beats writing JUnit test cases by hand.

Rupert

Jan Wielemaker

unread,
Nov 6, 2009, 5:23:39 AM11/6/09
to
On 2009-11-06, rupert...@googlemail.com <rupert...@googlemail.com> wrote:
> If you have a domain of application where Prolog would be a suitable
> language to use but have a skeptical client, consider embedding Prolog
> or a mini-Prolog (non ISO, cut down version) and then you can sell the
> whole concept as a DSL. This levels the field of Logic languages
> somewhat, as the DSL implementer can equally draw on some of the more
> experimental ideas from logic programming as from Prolog itself.

AFAIK, that is commonly done. People simply claim that the program is written
in C. The main drawback is of course that it doesn't make Prolog visible,
strengthening the idea that it is an irrelevant language. Its more like a
secret weapon :-)

Other people indeed write a cut-down version. Of course, this is a lot of
work and the result is often inferior to the real thing. Long ago they had an
argument in reducing the footprint, but in these days there are few situations
where the e.g., 900Kb runtime kernel of SWI-Prolog (X64 version, compiled with
gcc -O2) is relevant. Many applications link to much larger libraries.

Cheers --- Jan

Tom Schrijvers

unread,
Nov 7, 2009, 11:12:07 AM11/7/09
to
On Nov 6, 11:23 am, Jan Wielemaker <j...@hppc323.few.vu.nl> wrote:

I think the main issue is probably not whether to use full Prolog or a
cut-down
version, but a matter of presenting the approach to the customer in
the right way.
DSLs are indeed on the rise, and this should be a good
opportunity for Prolog to promote itself as a language for
implementing DSLs.
Perhaps renaming SWI-Prolog to DSL-Prolog would do wonders :-)

A.L.

unread,
Nov 7, 2009, 3:18:40 PM11/7/09
to
On Sat, 7 Nov 2009 08:12:07 -0800 (PST), Tom Schrijvers
<tomena...@gmail.com> wrote:

>
>I think the main issue is probably not whether to use full Prolog or a
>cut-down
>version, but a matter of presenting the approach to the customer in
>the right way.

Customer doesn't care what technology is used within the application

A.L.

Cesar Rabak

unread,
Nov 8, 2009, 11:23:34 AM11/8/09
to
A.L. escreveu:
A.L.,

In order you can keep asserting about this, all the posters in this
thread need to unify the concept of 'customer' in the discourse.

_My_ undertanding that 'customer' would be the stakeholder that pays the
developer to program in a certain language this normally being a CTO or
Development Manager, which is a different interpretation of 'customer'
as the possible final user of the application.

A.L.

unread,
Nov 8, 2009, 11:32:00 AM11/8/09
to
On Sun, 08 Nov 2009 14:23:34 -0200, Cesar Rabak <csr...@yahoo.com.br>
wrote:

The above is my definition of "customer"

I have some experience with "customer" in the first sense, and in such
cases the language/technology used are subjects of the contract. There
is no way to "smuggle in" Prolog under the cover of C, DLL or any
other form

A.L.

rupert...@googlemail.com

unread,
Nov 9, 2009, 6:35:51 AM11/9/09
to
On Nov 8, 4:32 pm, A.L. <alewa...@aol.com> wrote:
> >> Customer doesn't care what technology is used within the application
>
> I have some experience with "customer" in the first sense, and in such
> cases the language/technology used are subjects of the contract. There
> is no way to "smuggle in" Prolog under the cover of C, DLL or any
> other form
>
> A.L.

In which case the customer does care about the implementing
technology, to the extent that they have made it a mandatory
requirement of the contract? Or have I misunderstood you?

Yes, usually my experience too. I accept work with the tool-set
predefined by the project sponsor. There is occasionally scope to
smuggle in some Prolog, but rarely. In most cases the 'real world' has
written off Prolog from the get go.

As I've said before businesses want the mainstream tools, with
support, with an already trained pool of workers to draw on when they
need it, and so on. With Java they get that from the core language,
but they certainly don't always get it from some of the libraries that
they use. There are lots of fads in the Java world that come and go.
Java may be relatively new but there is definitely a lot of
unmaintainable legacy Java code out there!

Rupert

rupert...@googlemail.com

unread,
Nov 9, 2009, 6:35:58 AM11/9/09
to
On Nov 8, 4:32 pm, A.L. <alewa...@aol.com> wrote:
> >> Customer doesn't care what technology is used within the application
>
> I have some experience with "customer" in the first sense, and in such
> cases the language/technology used are subjects of the contract. There
> is no way to "smuggle in" Prolog under the cover of C, DLL or any
> other form
>
> A.L.

In which case the customer does care about the implementing

Alan Baljeu

unread,
Nov 11, 2009, 8:35:03 AM11/11/09
to

On Nov 1, 7:37 pm, contingencyplan <contingencyp...@gmail.com> wrote:
>
> I understand the problem of such research languages as used in the
> real world - I am similarly frustrated with them. I was simply using
> that list as an example. My overall point was a response to jfmcjf,
> who indicated that a revamp of the language would be useful in making
> Prolog more attractive for the "real world." I agree with the
> sentiment, but the ease or difficulty of such an effort is very
> dependent, in my view, on the involvement of the existing LP
> community. If the LP community isn't even using, supporting,
> extending, and refining the language (and the tools, IDEs, profilers,
> debuggers, and soforth, of course!), why should anybody else? I was
> not arguing that these languages should be used for "real world"
> development - I agree that they should not, for the reasons you
> mentioned. In fact, that's my exact point - the field is littered with
> the bodies of attempts at refining Prolog or developing a new LP
> language. Is the Prolog community interested enough in refining /
> revamping the language to make it more "real world" relevant to help
> keep such an effort from becoming another corpse?
>
It seems not. But Prolog isn't dead. There are many new developments
happening today. Personally I just want to see it expanded in a
standardized way, such that if I have to switch platforms, I don't
have
to reinvent my programs to meet the quirks of the new platform.

> > On Sat, 31 Oct 2009 16:50:45 -0700 (PDT), contingencyplan
>
> > <contingencyp...@gmail.com> wrote:
>
> > >Aside from Craft of Prolog, what resources are there for design
> > >pattens in Prolog? Do you mean design patterns in general, or in the
> > >style of the Gang of Four and those that followed in their mindset?
>

Craft of Prolog is good. I'd love to see newer books that cover good
programming practice, and taking advantage of attributed variables,
global non-backtracking variables, whatever. In particular,
implementing
new abstract datatypes in Prolog (I imagine this is nearly possible
today
with these features) would be of real value.

A.L.

unread,
Nov 11, 2009, 11:25:38 AM11/11/09
to
On Wed, 11 Nov 2009 05:35:03 -0800 (PST), Alan Baljeu
<alanb...@gmail.com> wrote:

>
>Craft of Prolog is good. I'd love to see newer books that cover good
>programming practice,

Clause and Effect: Prolog Programming for the Working Programmer,
William F. Clocksin

A.L.

fodor

unread,
Nov 16, 2009, 1:29:25 PM11/16/09
to
On Oct 16, 9:16 am, John North <john.nor...@gmail.com> wrote:
> I am trying to research the use of Prolog now, outside of Academia and
> am struggling.  I was hoping somebody could point me to some real-
> world applications.

I think that very many companies use Prolog for modeling,
verification, workflows, business rules, parsers, complex event
processing with rules and many other things. I worked in a couple of
companies and they were using logic programming. IBM has an interface
for Prolog annotators in their Unstructured Information Management
Architecture (UIMA) with interfaces to Sicstus, SWI, XSB and Yap, and
it is used in their system to play 'Jeopardy!' (they also made it
public, see the following article: http://www.theregister.co.uk/2009/04/27/ibm_watson_jeopardy/page2.html
). The interface is also released in the public sources for UIMA at
the Apache Software Foundation. I also worked for the German branch of
DaimlerChrysler (before they re-structured the company) and they were
doing verification of the electronic schema for Airbus airplanes using
constraint solving and large-scale knowledge management.
Although, there are many logic languages, various semantics for logic
programs and many other rule formalisms (PRD and CEP languages), I
think that Prolog is most used rule-language in industry (because it's
very intuitive). Also, Prolog is used in many cases as a back-end for
other rule languages because: first, it eliminates a lot of coding for
unification, backtracking, handling variables, etc. and second, the
WAM technology is one of the top-performing implementations of rule
languages http://rulebench.projects.semwebcentral.org .

0 new messages