Prolog is the most commonly used logic programming language. It supports non-deterministic programming through backtracking and pattern matching through unification.

learn more… | top users | synonyms

1
vote
1answer
44 views

How to determine if prolog query will give an answer or not?

Explain what will happen if we try to evaluate the query “path(a,e).”. When the query was actually run, it kept looping.I used the following method. Is it correct? When evaluating $path(Z,e)$, if $...
2
votes
1answer
29 views

Is there an implementation of higher kinded types in typed lambda calculus?

I can see that we can do higher kinded types ( * -> *) -> * in Scala and Haskell and other languages. I'm looking for a simpler vanilla implementation of just ...
0
votes
0answers
38 views

Statement true under minimal Herbrand model

Let's say I have a program like this: r(X, l(X)). r(X, t(Y,_)) :- r(X,Y). r(X, t(_,Z)) :- r(X,Z). Now the question is: is ¬r(a, l(b)) true in the minimum ...
0
votes
0answers
44 views

Is Prolog semi-decidible?

The first order logic is semi-decidible. If there is a correct sentence on the alphabet,which is a logical consequence, it is found. Instead if it isn't a logical consequence you can go in loop (or it ...
2
votes
0answers
71 views

Open Standard Prolog Knowledge Bases [closed]

Are there any standard Prolog knowledge bases available anywhere that have the same purpose as Cyc, namely to encode generally accepted common sense and human knowledge? Typically containing ...
0
votes
1answer
1k views

Horn clause to Prolog [closed]

At the needs of my HW at uni I need to transform some Horn clauses to Prolog but I cannot figure out how to do it. I found out some guides but they describe how to do it with only one fact. So can you ...
7
votes
1answer
1k views

What makes PROLOG Turing-complete?

I know that it can be proven PROLOG is Turing-complete by constructing a program that simulates a Turing machine like this: ...
2
votes
2answers
429 views

Proper terminology in Prolog/logical programming theory?

I have a good understanding of how to program using logic languages, but I'm currently writing up a paper describing some of my work, and I wanted to ensure that I wasn't abusing the proper ...
17
votes
2answers
5k views

How to implement a prolog interpreter in a purely functional language?

Is there a clear reference, with pseudo-code, on how to go about implementing a Prolog interpreter in a purely functional language? That which I have found so far seems to deal only with imperative ...
15
votes
3answers
1k views

Can constraint satisfaction problems be solved with Prolog?

Is "party attendance" type of problems solvable in Prolog? For example: Burdock Muldoon and Carlotta Pinkstone both said they would come if Albus Dumbledore came. Albus Dumbledore and Daisy ...