Questions tagged [xsb]

XSB is a Prolog dialect developed at Stony Brook University in collaboration with the Katholieke Universiteit Leuven, the New University of Lisbon, Uppsala University and software vendor XSB, Inc.

XSB is the name of a dialect of the Prolog programming language and its implementation developed at Stony Brook University in collaboration with the Katholieke Universiteit Leuven, the New University of Lisbon, Uppsala University and software vendor XSB, Inc.

XSB extends Prolog with tabled resolution and HiLog (a standard extension of Prolog permitting limited higher-order logic programming).

The open source XSB implementation includes an interface to the Java programming language.

XSB was originally developed at Stony Brook University by David S. Warren, Terrance Swift, and Kostis Sagonas. It was based on the SB-Prolog language that was also developed at Stony Brook University in 1986. It is a logic programming language.

Syntax

XSB supports several standard programming language data types such as Integers, Floating Point numbers, and Atoms.

Integers in XSB can be interpreted in multiple bases. By default integers are interpreted in base 10 but can be interpreted in a range of bases from 2 to 36.

Atoms are similar to Strings. They are a sequence of characters.

Source:http://en.wikipedia.org/wiki/XSB

35 questions
14
votes
3 answers

Prolog support for Vim users

I am starting with Prolog programming using XSB. What syntax highlighting script or plugin for vim editor would you suggest for (XSB) Prolog ?
Sourabh Daptardar
  • 259
  • 1
  • 3
  • 7
8
votes
1 answer

Unit testing in XSB Prolog?

How do people working with XSB Prolog do unit testing? Is there a library available? Or is it possible to somehow use SWI-Prolog's plunit library in XSB? If there is not an available testing library for XSB (or other Prologs no compatibles with…
Sergio
  • 8,532
  • 11
  • 52
  • 94
8
votes
1 answer

Sliding tile puzzle with varying tile size using logic programming

So I am trying to solve this Booth arrangement problem given here. It is basically a sliding tile puzzle where one (booth)tile has to reach a target spot and in the end all other (booths)tiles should be in their original location. Each tile/booth…
Wajahat
  • 1,593
  • 3
  • 20
  • 47
8
votes
2 answers

Are HiLog terms still useful in modern Prolog?

Are Hilog terms (i.e. compounds having as functors arbitrary terms) still regarded as a powerful feature in XSB Prolog (or any other Prolog) ? Are there many XSB projects currently using this feature ? which of them for example ? I ask since as far…
Sergio
  • 8,532
  • 11
  • 52
  • 94
5
votes
3 answers

Does HiLog add anything that can not be done with "call" in Prolog?

The Wikipedia article for Prolog states: Higher-order programming style in Prolog was pioneered in HiLog and λProlog. The motivation for HiLog includes its ability to implement higher-order predicates like…
MWB
  • 11,740
  • 6
  • 46
  • 91
5
votes
1 answer

Hosting XSB Prolog in a Server

I wanted to host XSB Prolog in a server. Can someone please tell me what the procedure is? The following git link explains how to host SWIPL on a server, but the same is not working for XSB https://github.com/SWI-Prolog/swish Your help is greatly…
UnderWood
  • 803
  • 3
  • 12
  • 23
5
votes
4 answers

How can I simulate a soft cut in Prolog?

How can I simulate a soft cut I *-> T; E in ISO Prolog? I has side effects, so I can not call it multiple times. Except for the last requirement, I think the following definition works: if_(I, T, E) :- not(not(I)) -> call((I, T)); …
Ed McMan
  • 521
  • 2
  • 15
5
votes
0 answers

from OWL to Prolog code

I have a owl ontology and I would use prolog rules and XSB to make inference. I know that the THEA library helps to convert owl code into prolog but no examples are available . So could anybody help me. Thanks in advance.
3
votes
3 answers

Prolog infinite loop

This is a program that should find out who is compatible with john. I am new to Prolog. In order to let Prolog know eg. met(X,Y) = met (Y,X) lots of code has been written. Now when I start the query ?- compatible(john, X) it goes into infinite…
r0n1am
  • 33
  • 1
  • 6
2
votes
1 answer

ERROR: No procedure usermod : select / 3 exists

Im learning prolog and was having problems with the select/3 predicate so I made a test file for it. The entire code i'm trying to run is the following 1 line of XSB in its own file: find(X,B) :- select(X, [1,2,3,4,5], B). It compiles fine but I'm…
cebo
  • 688
  • 1
  • 8
  • 26
2
votes
1 answer

Prolog: String to List

I have a string that I want to convert to a list: "a + b = c" I need it in list format to pass it onto to a member rule. When I pass it onto the member rule directly, it passes as a series of numbers which I assume is their character code, but I…
CSharpFiasco
  • 204
  • 3
  • 8
2
votes
1 answer

Change the Return response of Prolog

I am a novice at programming in prolog. I want to change the value returned by a prolog program such that it returns true / false instead of the standard yes or no. Consider a very simple example : E.g. simple.P node(1). isNode(X) : node(X) on the…
user1944347
2
votes
0 answers

XSB no procedure apply/2

I'm trying to get into HiLog and am stuck from the very beginning. Even when boiled down to the most textbook example : :- hilog sum. sum(X,Y,Z):-Z is X + Y. :- import bagReduce/4 from aggregs. f(_):- bagReduce([1,2],Res,sum,0). the compiler…
tcmon
  • 351
  • 2
  • 6
1
vote
1 answer

Generate attack graph by mulval

I have installed Mulval successfully. The problem is : I have not get the AttackGraph.pdf by using the coding "graph_gen.sh /root/data/mulval/testcases/3host/input.P -v".
numberfairy
  • 11
  • 1
  • 2
1
vote
0 answers

FLORA2 v1.2 with Eclipse vizualizer plugin

Just start to play with http://flora.sf.net reasoning system. Trying to configure Window/Preferences/Flora-2 Preferences/Reasoner pointing to installed D:\FLORA or D:\FLORA\flora2 have message box Did you install Flora-2 with cygwin? Eclipse was…
Dmitry Ponyatov
  • 348
  • 1
  • 11
1
2 3