Questions tagged [prolog-toplevel]

The "toplevel" or "top level loop" is Prolog's REPL.

The toplevel or top level loop is Prolog's REPL.

The toplevel differs from the read-eval-print loop in several ways:

Evaluation is performed incrementally. Typically, evaluation is only performed up to determining one answer, requiring user interaction to compute the next answer.

Printing an answer includes printing answer substitutions but may also include residual constraints.

155 questions
0
votes
1 answer

How to take out the ... from (swi) prolog output

Possible Duplicate: Using SWI-Prolog Interactively - Output Taken off I have written a program to replace X occurrences of 1 by 8 in Prolog. The program works correct as it gives correct output. But it abbreviates my output when I give it long…
footy
  • 5,803
  • 13
  • 48
  • 96
0
votes
1 answer

Prolog showing results on the interpretator

I have this prolog predicate that computes the number of primes depending on the input count. However on the interpretator, it only shows the first 9 primes even though I input my required prime count as 10. the result looks like this as below L =…
kkh
  • 4,799
  • 13
  • 45
  • 73
-1
votes
1 answer

How to write a Prolog rule to define a predicate?

here's the assignment: In a Prolog program, predicates are defined: mother(M,Y) — M is the mother of Y father(F,X) — F is the father of X Write Prolog code to implement the predicate: cousins(X,Y) — X and Y are cousins brother_or_sister(X,Y) — X…
bebraed
  • 3
  • 1
-1
votes
1 answer

Prolog - fail; true

I have some problem with my code here. Let's say I have a knowledge base like this: university('University of Cambridge', 1, 'United Kingdom', 90.3, 92.8, 89.4). university('University of Oxford', 2, 'United Kingdom', 88.9, 94.8,…
Huxley
  • 1
  • 6
-2
votes
1 answer

Modify the SWI-Prolg toplevel

Is it possible to do modifications to the toplevel of SWI Prolog?
user1220625
  • 75
  • 1
  • 4
1 2 3
10
11