gnu-prolog Questions
3
Solved
I'm trying to learn the basics of Prolog and keep running into a existence_error with the following code.
comes_after(m1, m2).
comes_after(m2, m3).
comes_after(m3, m4).
comes_after(m4, m5).
comes_...
Polonium asked 4/11, 2017 at 5:34
3
Solved
Are there any up-to-date Prolog implementation benchmarks (with results)?
I found this on the mercury web site. Surprisingly, it shows a 20-fold gap between swi-prolog and Aquarius. I suspect that ...
Quickman asked 20/12, 2020 at 1:22
1
Solved
I wrote a quick predicate in Prolog trying out CLP(FD) and its ability to solve systems of equations.
problem(A, B) :-
A-B #= 320,
A #= 21*B.
When I call it in SWI, I get:
?- problem(A,B).
32...
Sontag asked 26/12, 2017 at 6:24
2
Solved
Is there a way to 'trap' (e.g. 'catch') an operating system signal within GNU Prolog? (I'm using Ubuntu/Linux, latest gprolog).
I think a long time ago I used this approach in WAMCC, before that m...
Herl asked 20/6, 2015 at 16:44
2
Solved
While using gprolog I often have exceptions without any kind of line numbers or context like this one:
uncaught exception: error(instantiation_error,(is)/2)
Without any kind of context. I know I...
Inly asked 11/6, 2015 at 18:3
1
Solved
I am new to Prolog, but I am stuck at this supposedly simple command. I have loaded
a knowledge base with no errors, and whenever I try do assert (and even help) I
get the following message:
uncau...
Monsignor asked 17/11, 2013 at 4:25
1
Solved
I'm new to prolog and want to save all queries in a file instead of typing them by hand.
I have these facts in facts.pl:
likes(wallace, cheese).
likes(grommit, cheese).
likes(wendolene, sheep).
...
Trackless asked 17/1, 2013 at 17:40
1
I have a Prolog database file (test_inserts.p) that I used to insert all my data.
I also have a Prolog query file (test_queries.pl) that has all of the Prolog queries I wrote up to receive specifi...
Granjon asked 8/4, 2012 at 1:26
3
Solved
I'd like to use predicates like:
range(X,0,5)
range(X,4,200)
range(X,-1000000,1000000)
dom_range(X,-1000000,1000000)
with meaning :
range(X,0,5) :- member(X,[0,1,2,3,4,5]).
range(X,4,200) :- me...
Vacation asked 24/8, 2011 at 12:17
1
Solved
There is a lack of some predicates in one Prolog implementations, that are available in others.
We can implement lacking predicates, let's call this "Prolog Compatibility Layer".
Do you know "Pro...
Polycythemia asked 22/8, 2011 at 18:12
3
Solved
I'm trying to keep my Prolog code modular, and I was wondering if anyone had any advice as to how to do this. The way I was doing this with simple consults, but that is getting cumbersome as the nu...
Vision asked 14/7, 2011 at 15:29
4
Solved
I'm reading "Seven languages in seven weeks" atm, and I'm stumped over some Prolog query that I don't understand the 'no' response to.
The friends.pl file looks like this:
likes(wallace, cheese)....
Hospitalet asked 12/5, 2011 at 0:9
1
© 2022 - 2024 — McMap. All rights reserved.