Friday afternoon post: A quick diagram of the LP landscape

(After several modifications)

Just my attempt a organizing what’s out there.

The organization is not really fully consistent. All errors are mine etc. The diagram is now a bit too large.

It can be found in this directory, in graphml, svg and png formats:

It looks like this (but the image below is reduced to unreadability, so only good as overview):

Probably missing a good part (especially in the direction of Semantic Web, there are actually several logics that are used) or misinterpreting.

Idle thought:

While imperative languages are similar and created mainly under criteria of conciseness, efficiency, elegance, syntactic agreeableness, feature-richness, adherence to C style, marketing etc., LP languages have a global constraint: they are supposed to follow a specific logic calculus (however pared down from a complete logic and laden with escape hatches). In fact, they are problem modeling languages.

8 Likes

Thank you very much,

being a beginner in LP, this might give me some orientation in the field.

Regards,

Thomas

BTW, what tool did you use to make the diagram?

It was done with yEd, a free editor written in Java. It is essentially a demo project by yWorks.

It is closed-source (actually obfuscated code as can be seen when it produces one of the rare exceptions), infuriating and nasty, misses major features (in particular the ability to change a shape of an existing element … you have to start from scratch editing it) and is not updated very often, but I am used to it.

It outputs graphml, which should be portable but I have not yet tried to open the .graphml output in inkscape for example.

Thanks! Appreciate it.

Got 404 for https://raw.githubusercontent.com/dtonhofer/prolog_notes/master/pics/quick_map_of_LP_landscape.png

Of historical interest: MU-Prolog and NU-Prolog introduced delayed evaluation, allowing a sound definition of negation (not just negation-as-failure) and if-then-else. SICStus Prolog extended this to attributed variables; a limited variant is in SWI-Prolog and XSB.
Also, SWI-Prolog now implements tabling, from XSB.

2 Likes

Sorry Peter, I moved the pics around on github. The URL is correct now.

Thanks - Negation is rather mysterious, being nonmonotonic (it becomes less mysterious if you regard it correctly as “at this point there is no evidence for X” (frankly intuitionistic) instead of the classical “it is not the case that X”). I will take a look.

1 Like

MU-Prolog and NU-Prolog took the position of “delay computing the negation until there’s sufficient information for it to be sound.” Swipl’s dif/2 is an example of doing that.

This example might help.
Query #1 gives a wrong result because \=/2 was evaluated before X and Y were sufficiently ground.
Query #2 is correct – dif/2 is the same as \=/2, delayed until enough is known about the arguments to give a correct answer.

1 ?- X \= Y, X = 1, Y = 2.
false.

2 ?- dif(X, Y), X = 1, Y = 2.
X = 1,
Y = 2.

3 ?- freeze(X, freeze(Y, X \= Y)), X = 1, Y = 2.
X = 1,
Y = 2.

Query #3 has too weak a delay condition:

4 ?- freeze(X, freeze(Y, X \= Y)), X = f(A), Y = f(B), A = 1, B = 2.
false.

5 ?- dif(X, Y), X = f(A), Y = f(B), A = 1, B = 2.
X = f(1),
Y = f(2),
A = 1,
B = 2.
2 Likes

Thanks Jan. I have not much knowledge about tabling at this point in time.

It’s not meant to be complete or 100% correct. That would be network over several A3 pages.

But I will update.

I find your effort interesting, but a single ‘hardcoded’ graph cannot realistically be sufficient for such complex domain.
I think a better approach would be to lift the information in RDF, to allow faceted search and automatic graph rendering.

Btw, I think you should add scryer-prolog - and shen -, and the various Java based Prologs produced by Paul Tarau in your graph as directly related to the Prolog node.

1 Like

but a single ‘hardcoded’ graph cannot realistically be sufficient for such complex domain.

I agree with that. Maybe later.

Btw, I think you should add scryer-prolog - and shen -, and the various Java based Prologs produced by Paul Tarau in your graph as directly related to the Prolog node.

This is getting out of hand.

1 Like

Your link is broken again.

To quote the famous.

Aiee thanks.

Yes, I don’t know why Discourse has that rule in by default. When I find it I will nullify it.

Try editing your post now. Should work. If not let me know.

Done! Thank you.

I thought you were going to change the one in the first post. :thinking:

Most people will not read past the first post and will also try and click on Fat PNG which is still returning 404: Not Found

If you want I can convert the first post into a Wiki and put the rest into a Wiki Discussion. But I will make Wiki the owner of the Wiki post.

Hold on, I will look into this a bit later.