views:

217

answers:

4

Hi! I would like to ask you about what formal system could be more interesting to implement from scratch/reverse engineer.

I've looked through some existing and rather open (open in the sense of free/open-source) projects of logical/declarative programming systems. I've decided to make up something similar in my free time, or at least to catch the general idea of implementation.

It would be great if some of these systems would provide most of the expressive power and conciseness of modern academic investigations in logic and it's relation with computational models.

What would you recommend to study at least at the conceptual level? For example, Lambda-Prolog is interesting particularly because it allows for higher order relations, but AFAIK (I might really be mistaken :)) is based on intuitionist logic and therefore lack the excluded-middle principle; that's generally a disatvantage for me..

I would also welcome any suggestions about modern logical programming systems which are less popular but more expressive/powerful. I guess, this question will need refactoring, but thank you in advance! :)

+5  A: 

Prolog - was the first language which changed my point of view at programming. But later I found it to be not so high-level as I'd like to see it.
Curry - I've tried only Munster CC, and found it somewhat inconvenient. Actually at this point I decided to stop ignoring Haskell.
Mercury - have many things which I wanted to see in Prolog. I have a really good expectation about possibility to distinguish modes of rules. Programs written in mercury should inspire compiler to do a lot of optimizations, I guess.

ony
Thx for sharing experience :)
Bubba88
Prolog is fascinating. But even more so, is how "simple" it really is.
alex
+2  A: 

For the final project in a programming languages course I took, we had to embed a Prolog evaluator in Scheme using continuations and macros. The end result was that you could freely mix Scheme and Prolog code, and even pass arbitrary predicates written in Scheme to the Prolog engine.

It was a very instructive exercise. The first 12 lines of code (and and or) literally took about 6 hours to write and get correct. It was pretty much the search logic, written very concisely using continuations. The rest followed a bit more easily. Then once I added the unification algorithm, it all just worked.

Claudiu
+1  A: 

If I were to try to extend a logic based system, I'd choose Prolog Cafe as it is small, open sourced, standards compliant, and can be easily integrated into java based systems.

WamBamBoozle
Thx for the suggestion, didn't hear about Prolog Cafe in the past :)
Bubba88
+1  A: 

Twelf. It generalizes lambda-prolog significantly, and it's a logical framework and a metalogical framework as well as a logic programming language. If you need a language with a heavy focus on logic as well as computation, it's the best I know of.

RD1