Questions tagged [sicstus-prolog]

SICStus Prolog is an ISO-standard compliant Prolog dialect developed at the Swedish Institute of Computer Science (SICS). Current version: 4.3.5 - as of 2016-12-08

SICStus Prolog is an ISO-standard compliant Prolog dialect developed at the Swedish Institute of Computer Science (SICS). As of 2021-01-03, the current version is 4.6.0.

Home page.

125 questions
0
votes
0 answers

how to optimize this code so that it executes faster

I am trying to code "Peaceable armies of queens" problem. The goal is to put possible maximum equal no. of black and white queens on the chessboard so that they dont attack each other but they can attack within same color. I have implemented and…
filip
  • 1
  • 1
0
votes
1 answer

Sictus Program is not open

I couldn't start my Sictus program. It shows an error like "The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer." I successfully install Visual Studio 2012 as well.But it did not runtut. Please help me…
user9947358
0
votes
1 answer

Running Prolog Sicstus through a shell file

I've been trying to run a file through a shell script and write its output into that file. The script is very simple: /usr/local/sicstus4.1.1/bin/sicstus -l run --goal "runh('examples/calls_matlab.pl', S), halt." > …
kkudi
  • 1,583
  • 4
  • 23
  • 47
0
votes
1 answer

Java: creating a key binding to close a running Prolog program

I would like to create a little program in Java that runs in the background and that detects a certain combination of pressed keys (in my case the space bar) and that after getting a space bar, sends a ctrl+c and and a to a Prolog console command to…
noloman
  • 9,990
  • 15
  • 77
  • 114
0
votes
1 answer

Error when compiling Prolog in SICStus using SPIDER IDE

I have just installed SICStus Prolog and the SPIDER IDE plugin for Eclipse. SPIDER was installed using the Update Site, and I set the SICStus installation path in the preferences and verified it. Then I created a new workspace and a Prolog Project…
alexraasch
  • 705
  • 6
  • 17
0
votes
1 answer

Restricting running time in SICStus Prolog

Is it possible to restrict the running time of a query in SICStus Prolog?
sentinel
  • 401
  • 4
  • 14
0
votes
1 answer

prolog Existance error: procedure does not exist

Existence error in user:nth1/3 ! procedure user:nth1/3 does not exist I have included module for lists : :- use_module(library(lists)). but still getting this error.. Can anyone please help?
Android_enthusiast
  • 823
  • 5
  • 22
  • 40
0
votes
1 answer

convert comment string to an ASCII character list in sicstus-prolog

currently I am working on comparison between SICStus3 and SICStus4 but I got one issue that is SICStus4 will not consult any cases where the comment string has carriage controls or tab characters etc as given below. Example case as given below.It…
Ayyappa Boligala
  • 1,106
  • 7
  • 7
0
votes
1 answer

Prolog - reload source files

I just finished creating a game in Prolog using Sicstus. During the game I use assert's and retract's to update the values of some variables I use. When the game finishes, if I don't reconsult the source files, and re-run the game, those variables…
Pedro Pereira
  • 182
  • 2
  • 20
0
votes
1 answer

Appending facts into an existing prolog file

I'm having trouble inserting facts into an existing Prolog file, without overwriting the original contents. Suppose I have a file test.pl: :- dynamic born/2. born(john,london). born(tim,manchester). If I load this in prolog, and I assert more…
vuj
  • 15
  • 1
  • 3
0
votes
1 answer

Prolog Constraints -> Solving Puzzle Grid

So guys, I'm learning constraints with prolog, and trying to implement a little puzzle using this new knowledge. The goal of the puzzle is simple: I have a square grid with some numbers on top/below each column and on the right/left of each row. The…
PedroFaria
  • 51
  • 5
0
votes
1 answer

Endtime for machine in cumulatives

I'm working on a scheduling problem which I have used cumulatives/3 to model. Ex: s1(Ss, Es, Ms ) :- Ss = [S1,S2,S3,S4,S5,S6,S7], Es = [E1,E2,E3,E4,E5,E6,E7], Ms = [M1,M2,M3,M4,M5,M6,M7], domain(Ss, 1, 30), domain(Es, 1, 30), …
MortenM
  • 562
  • 2
  • 12
0
votes
1 answer

Difference between matrix column and use of all_different

I'm trying to express a relation on transition from one element in a list-of-lists, to another element. What I want to be able to do, is to say that there should exist a certain difference between two arbitrary elements. If we have the list …
MortenM
  • 562
  • 2
  • 12
0
votes
2 answers

how to convert a code that is using atom_to_term from SWI-prolog to SICStus Prolog

I'm trying to write a rule to compare two atoms to see which one is better for example (memory_with_gb_2 is better than memory_with_gb_1) and what I've written and tried in SWI-prolog is the…
0
votes
0 answers

Prolog error: "expected stream, but found '$stream' ..."

I am working on a program for a college assignment, currently I'm trying to write some denials from an abductive procedure written on a file as integrity constraints, but I'm having some problems. My predicates for the task look like…
1 2 3
8
9