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.
eclipse-clp
86
questions
0
votes
0
answers
9
views
EC_resume returns EC_fail even when goal succeeds?
I have a C++ function that is supposed to count the number of solutions to an ECLiPSe goal, but it only works if there are choice points. If the goal immediately solves (e.g. returns Yes (0.00s cpu) ...
0
votes
1
answer
44
views
ECLiPSe create 2D matrix with C++ interfacing
I have a predicate that I use to initialise a 2D matrix in eclipse:
problem(1, [](
[](1,2,3,4),
[](1,2,4,3),
[](1,3,2,4),
)
).
I'd like to use a C++ program to interface ...
0
votes
1
answer
43
views
element/3 on matrix to find index returns range when value can only be at a single index
I have a matrix Board which starts as:
[](
[](1,2,3,4,5,6),
[](_,1,_,_,5,_),
[](_,5,1,_,_,6),
)
The goal of the program is solve it in a Sudoku style, where _ are unknowns.
The first rule ...
1
vote
1
answer
153
views
ECLiPSe Integration with VSCode
I have just spent a three hours trying to configure my working environment for VSCode and ECLiPSe (I am new to VSCode and rusty in ECLiPSe) in Windows.
So far
I have created a task (and a keyboard ...
0
votes
1
answer
104
views
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 (...
1
vote
1
answer
61
views
What is the uncontrollable automatic propagation behavior in ECLIPSe-CLP?
I am trying to research, evaluate, and compare some searching methods in ECLIPSe-CLP. The key method of evaluating complexity and the efficacy of a method in said system is counting backtracks, ...
1
vote
1
answer
53
views
prolog max_min_eval/2 solution issue
I want to create a predicate max_min_eval/2 or max_min_eval(List,Result) which read a list like this [1,min,2,max,4,max,3] -> (((1 min 2) max 4) max 3) in eclipse prolog and put the Result into a ...
1
vote
2
answers
183
views
How to read large Prolog files in ECLiPSe?
I generated a large file of paths via eclipse. Each line contains a clause for a list of 27 points.
$ wc -l snake_points.pl
240917 snake_points.pl
$ ls -lh snake_points.pl
-rw-rw-r-- 1 carl carl 72M ...
0
votes
2
answers
156
views
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 ...
1
vote
1
answer
143
views
ECLiPSe CLP - TSP with Time WIndow. How do i calculate the cost?
I'm working on a variant of a TSP, where each node has a Time Window, but i've some problems calculating the cost function.
I'm using a succesors model, so i have a list where each variable rapresents ...
1
vote
1
answer
117
views
Age comparsion for Zebra Riddle
I'm trying to solve a logic riddle similar to the Einstein riddle with ECLiPSe Prolog via CLP:
A band has 6 jazz-musicians, no one is younger than 70 years old. Every artist has written a different ...
1
vote
1
answer
67
views
Is there a good source for finding common problems with ECLiPSe?
As a new ECLiPSe user I am running into problems.
I was able to consult a .pl file, but when I changed the extension to .ecl I got a file-does-not-exist message.
I was even able to run the .pl file,...
1
vote
0
answers
97
views
Pruning symmetrical solutions in ECLiPSe Prolog with the use of constraints
This is a subproblem of a constraint satisfaction problem I'm currently working on and thus, I've omitted extra constraints that I apply to my variables.
Suppose we have a list of 5 variables and ...
2
votes
1
answer
69
views
Is there any explicit support for modulo operation in eplex library
I am using eplex and ic library and trying to solve a problem. I see that the eplex and ic provide explicit support for addition,multiplication and subtraction but there is no support for modulo or ...
0
votes
1
answer
104
views
Is it possible to delay an assignment operation
I have a small script/code and i want to impose some active constraints. In the code shown below, i have P[I,J] #= E and in the next line Result[I,E] #= J but this is throwing an instantiation error ...