Skip to main content

Questions tagged [logic-programming]

3 votes
0 answers
56 views

I am currently reading "Warren's Abstract Machine: A Tutorial Reconstruction" and I'm trying to follow along with the exercise as well as code my own implementation. I am trying to ...
kusakus's user avatar
  • 31
0 votes
0 answers
20 views

I am interested in the question of deriving decision procedures for formal theories which deal with a set $X$ equipped with a distinguished binary relation $\leq$ that is reflexive and transitive, as ...
Patrick Nicodemus's user avatar
1 vote
0 answers
77 views

According to this paper [1], higher-order Datalog is more expressive: ... we demonstrate that on ordered databases, for all k ≥ 2, ...
MWB's user avatar
  • 515
0 votes
0 answers
136 views

I see why ordinary Horn clauses (of the type Prolog might accept) are first order eg something like (with all variables universally quantified) $$ P(x) \leftarrow Q_1(x),Q_2(x,y).\\ P(x) \leftarrow ...
Motorhead's user avatar
  • 301
0 votes
1 answer
88 views

I am studying theoretical computer science using Ayala's book "Fundamentos da Programação Lógica e Funcional" (the book is written in Portuguese), but the part I am studying right now is ...
Gabriel F. Silva's user avatar
10 votes
4 answers
4k views

I’m a CS senior with and Individual Study period this coming semester, and I’ve decided I’d like to learn more about Programming Language Concepts. More specifically, different programming paradigms, ...
swr52's user avatar
  • 119
0 votes
1 answer
132 views

Intuitively, this seems impossible (because negation is forbidden in the head), but i am not sure. A naive (and wrong) example is p :- p But, this just means ...
chansey's user avatar
  • 295
0 votes
0 answers
185 views

Give two Prolog implementations to calculate the sum of first N numbers divisible by 3. For example: N=4 -> 30 (3+6+9+12). ...
hackermanwasd's user avatar
20 votes
2 answers
7k views

Pure Prolog (Prolog limited to Horn clauses only) is Turing-complete. In fact, a single Horn clause is enough for Turing-completeness. However, pure Prolog is incapable of expressing list intersection....
MWB's user avatar
  • 515
3 votes
1 answer
280 views

I've recently learned about Prolog and Logic programming which I find pretty cool, but the compiler is currently like magic to me and I want to know how they work. After a little bit of research I ...
StackMachine's user avatar
2 votes
1 answer
174 views

I was reading the book "Foundations of Logic Programming" written by J.W. Lloyd. In the book, there were definitions of interpretation and model, and when it comes to herbrand interpretation and model,...
MayaJ's user avatar
  • 31
2 votes
1 answer
105 views

I am looking for references on implementing unification over multidimensional array terms. Are there specialized unification algorithms for those cases? I wasn't able to find satisfactory literature ...
Raoul's user avatar
  • 205
1 vote
1 answer
12k views

The numbers in the table below are the result of executing an algorithm that has one parameter N, a non-negative integer, and produces sequences of integers as outputs. For values of N from 0 to 5, ...
Saad Mohamed's user avatar
2 votes
1 answer
174 views

I read a comment (I've forgotten the source), "Unification is an implementation of existential quantification." (Emphasis mine.) If true, this point of view clears up many things. For instance why ...
Dennis's user avatar
  • 143
4 votes
0 answers
78 views

Let's say we have the following rule: p -: X ≠ Y, X = Y Stating that $\forall x.y. x \neq y \land x = y \implies p$. Now let us suppose that we are searching for ...
Christopher King's user avatar

15 30 50 per page