Questions tagged [eclipse-clp]

ECLiPSe is a constraint logic programming system that works with Prolog as a basic engine. It includes modules for integer constraint logic programming as well as floating points. It also supports a large number of global constraints.

Books

A free downloadable pdf

A Gentle Guide to Constraint Logic Programming via ECLiPSe

83 questions
1
vote
1 answer

How to use clpfd in eclipseCLP prolog (no eclipse java IDE)

I'm trying to make a simple route plan with CLP in prolog using eclipseclp and I want to use the clpfd prolog library, but the compiler doesn't recognize them. I obtain this error: library not found in use_module(library(clpfd)) I have installed…
rafaelleru
  • 367
  • 1
  • 2
  • 19
1
vote
1 answer

ECLiPSe CLP : Pause between subresults found by search/6 in ic library

(This question regards search/6.) I was wondering if there is a way -rather than manual tracing- to pause the execution of search/6 every time a new solution for a single variable was found? I would like to accomplish this to further investigate…
SND
  • 1,552
  • 2
  • 16
  • 29
1
vote
1 answer

ECLiPSe clp : getting all adjacent cells on grid

So my problem is the following: I want, given some point with X,Y-coordinates in a grid, to return all of its adjacent cells. ( Note: in the following examples, I'm using the notation UL = upper-left, UM = upper-middle, UR = upper-right, L = left,…
SND
  • 1,552
  • 2
  • 16
  • 29
1
vote
1 answer

ECLiPSe CLP Type error in dim?

I'm trying to get the dimensions of a sudoku board in ECLiPSE CLP, however I get the following error: type error in dim([[_389, 9, 8, _395, _397, _399, _401, _403, _405], [_409, _411, _413, _415, 7, _419, _421, _423, _425], [_429, _431, _433, _435,…
The Oddler
  • 6,314
  • 7
  • 51
  • 94
1
vote
0 answers

Why does emacs inferior eclipse backtrack only two times?

example: [eclipse 6]: X=1;X=2;X=3. X = 1 Yes (0.00s cpu, solution 1, maybe more) ? ; <-- this ; results in the end of the query X = 2 Yes (0.00s cpu, solution 2, maybe more) ? (no chance to enter anything before the following prompt…
1
vote
1 answer

Instantiation fault ECLiPSe CSP

I have problems with my CSP under ECLiPSe. I wish to add a constraint to my cryptogram which requires that the number represented by TWO is divisible by 2. [eclipse 11]: test(Xs). instantiation fault in (_268{[1..4]}*100 + _200{[0..9]}*10 +…
1
vote
2 answers

Connecting java with constraint logic programming

i'm trying to connect java with constraint logic, i'm using netbeans for java and eclipse 6.1 for constraint logic, but when i'm trying to run the code there is an exception appears java.lang.IllegalArgumentException: Missing eclipse.directory…
1
vote
1 answer

What is the meaning of the double plus (++) instantiation mode in ECLiPSe Prolog?

A comprehensive list of Prolog instantiation modes is given in a previous question: Meaning of instantiation mode indicators in arguments of Prolog predicates. However, I have not been able to find any reference to or explanation about the double…
1
vote
1 answer

How can I speed up this program? It is a coin holder calculation

So this is a program where it calculates the fewest number of coins to carry with certain values on these coins. The program works, but it's way too slow... When you replace the length of the values 7 or less, it works... But 8 or above, it's…
1
vote
1 answer

How can I include a value to be included inside a coin counter currency program for Prolog?

So thisis a currency system that calculates the fewest amount of coins with 8 different values of coins. Ex: 1 cent, 2, cent, 4 cent, 33 cent, etc... One of the coins must have a value of '5'. So this program is trying to determine what other…
1
vote
1 answer

Need assistance with similar More Money code for Prolog

Every letter below in the puzzle uniquely represent one of the 10 digits in 0, 1, …, 9. No two letters represent the same digit. For each word below in the puzzle, the first letter is not 0. Ex: SHINE - THAN == KNIT All I've got for the code is…
1
vote
4 answers

Is there a way to use module/2 in ECLiPSe Prolog?

In SWI-Prolog, I am using code such as at the beginning of a module text file: :- module(foo, [bar/2]). :- use_module(library(jack)). I don't want to change my code. How can I neverthelss use ECLiPSe Prolog (*). Is there some library that defines a…
user502187
1
vote
2 answers

How to read a stream in Eclipse CLP?

I am new to Eclipse, and I have been trying to read a file stream without success. The code that I normally use for this in SWI-Prolog is this: read_until_stop(File, [L|Lines]) :- read_line_to_codes(File, Codes), Codes \= end_of_file, …
picardo
  • 24,530
  • 33
  • 104
  • 151
0
votes
1 answer

tkeclipse - GUI colors assignments - Edit which file to fix?

The default settings for the installation of tkeclipse are unusable. What I see get is this: Also, I looked thru the menu choices and there is no option there to make required changes. Which file (or files) control the colour assignments and could…
Eric Marceau
  • 1,601
  • 1
  • 8
  • 11
0
votes
2 answers

How to use Prolog's foreach/2 loop

I am trying to get the foreach/2 loop to work in Prolog (using tkeclipse). I understand it needs an element in the first argument and a list to search for that element within as a second argument. My problem is that I haven't been able to make it…