Questions tagged [sicstus-prolog]

SICStus Prolog is an ISO-standard compliant Prolog dialect developed at the Swedish Institute of Computer Science (SICS).

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.

135 questions
1
vote
3 answers

State propagation during bactracking in Prolog

Let's assume, that I have a simple program in Prolog, which is searching through a certain state space: search(State, State) :- is_solution(State). search(State, Solution) :- generate(State, NewState), search(NewState, Solution). And I…
1
vote
1 answer

Prolog powerset predicate

I wish to define a predicate powerset(X, P) which is true when P is the powerset of X. Should work whether or not P is ground.
user1283759
  • 51
  • 1
  • 2
0
votes
2 answers

SICStus multidimensional arrays

I want to create a multidimensional array in SICStus which woudld do pretty much the same thing as the ECLiPSe Dim function. For that I made this code, but unfortunetly it always enters in an infinite loop. Can anyone fix the problem? …
0
votes
1 answer

Sicstus: a module and the CWD

I have a SICStus script like below. What I need is to print out the Current Working Directory (to be able to save that script in it) and load that file with something like load command. How can I finish that off ? Last but not least, how can I…
0
votes
1 answer

How to use cut while trying random numbers until a condition is met

I'm coding a board game similar to checkers using prolog and I have this function that tests random generated numbers. I want it to return the first instance that works but, for some reason, it fails after finding it because it tries to redo in what…
0
votes
1 answer

How to install Berkeley DB for SICstus on Windows?

This maybe a dumb question but can someone explain how to install Berkeley for SICstus on Windows? This is my last resort
ac4824
  • 17
  • 4
0
votes
0 answers

How do I do away with Atom and Functor keywords from my query result in Python Swipl Prolog Implementation?

I am running my Prolog query from Python 3 using pyswip, but the response to the query is not what I am expecting. Instead of: X = us, D = [fact2,ipGeolocation(us)] ? I am getting {'X': 'us', 'D': [Atom('712197'), Atom('711429'),…
0
votes
0 answers

Restrict automata counter prolog sicstus

I am working on a university project in Programming in Logic. I have to develop an automaton that performs a series of restrictions. One of which is to guarantee that the number 2 has a 4 to it's left and right (only 2) Also, the 4's must be at the…
user12205212
0
votes
1 answer

How to redirect the standard output from Sicstus4 to a Java component using Jasper?

I'm using a library called Jasper to link my Java application to the Sicstus4 software. This is working smoothly but when I make a query to it I need to grab the output in order to show it in a JTextArea. Right now the Sicstus software prints the…
Aerozeek
  • 495
  • 1
  • 3
  • 11
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,625
  • 4
  • 25
  • 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
  • 11,411
  • 20
  • 82
  • 129
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…
alexkelbo
  • 724
  • 6
  • 18
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
  • 5
  • 14
1 2 3
8
9