Questions tagged [tuprolog]

tuProlog is a light-weight Prolog system for distributed applications and infrastructures, intentionally designed around a minimal core

tuProlog is a light-weight Prolog system for distributed applications and infrastructures, intentionally designed around a minimal core.

tuProlog natively supports multi-paradigm programming, providing a clean, seamless integration model between Prolog and mainstream object-oriented languages -- namely Java, for tuProlog Java version, and any .NET-based language (C#, F#..), for tuProlog .NET version.

It is also easily deployable, just requiring the presence of a Java/CLR virtual machine and an invocation upon a single self-contained archive file. Interoperability is further developed along the two main lines of Internet standard patterns and coordination models.

tuProlog and related packages are released under the GNU Lesser General Public License, so no payment is required for using it.

Official website: http://tuprolog.unibo.it/

17 questions
4
votes
1 answer

Need to Capture selective STDOUT from Android for display in listview

I'm running the an embedded library [tuProlog (2p.jar)] Prolog Inference Engine in Android with custom logic bases which I can successfully query and display (some) of the results in an Android ListView. What gets displayed is only the results from…
ProfVersaggi
  • 886
  • 13
  • 18
3
votes
2 answers

Prolog/tuprolog, a single line that returns 'The enitire [sic] string could not be read as one term'

tl:dr - I have a single line of prolog, that works fine in one version of Prolog (SWI) but not in another (TuProlog). I'm porting a script from SWI prolog, to Tuprolog. (TuProlog recently did a big update and I get the same behaviour on both…
Joe
  • 4,367
  • 7
  • 33
  • 52
2
votes
3 answers

tuProlog unknown behavior

I'm using tuProlog to integrate Prolog with Java, to do so I have defined a prolog.pl file with the following code: go:-write('hello world!'),nl. Then, in my Java project I Have the Main Class that invokes this: Prolog engine = new Prolog(); …
WSD
  • 3,243
  • 26
  • 38
1
vote
1 answer

tuProlog - using multiple files with consult - can't get engine to load additional files with consult(otherFile.pl)

Edit: Clarity - the main .pl file loads, it's all the subfiles that it has been told to load which don't load. (all the consult('subfile.pl').) I have a Java project that uses tuProlog. It calls a theory as: Theory theory = new…
R.Sama
  • 103
  • 12
1
vote
1 answer

tuprolog program - term part not ended with period exception

I'm getting this exception Exception in thread "main" alice.tuprolog.InvalidTheoryException: The term part is not ended with a period. at alice.tuprolog.TheoryManager.consult(Unknown Source) at alice.tuprolog.Prolog.addTheory(Unknown…
karthi
  • 2,762
  • 4
  • 30
  • 28
1
vote
2 answers

Error executing query in tuProlog

i downloaded the tuprolog and i'm not able to get the result for the following query, while i get answer in PROL ide.. can someone help? verb(admit-1). verb(work-4). nsubjpass(admit-1, patient-2). agent(admit-1, doctor-3). nsubj(work-4,…
karthi
  • 2,762
  • 4
  • 30
  • 28
1
vote
1 answer

How can I write key-value pairs in Prolog?

Imagine I have the following predicate, which states that the ID loc1 designates a location. isLocation('loc1', 'Location 1'). I want to provide translations for the second text (Location 1), i. e. key-value pairs such as en='Location 1', de='Ort…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
1
vote
1 answer

Tuprolog and defining infix operators

So I have some prolog... cobrakai$more operator.pl be(a,c). :-op(35,xfx,be). +=(a,c). :-op(35,xfx,+=). cobrakai$ Which defines some infix operators. I run it using SWI prolog and get the following (perfectly expected) results ?-…
Joe
  • 4,367
  • 7
  • 33
  • 52
1
vote
1 answer

how to shift from swiprolog to tuprolog

I got a .pl file through an eclipse plugin called JTransformer.The problem is that the .pl file I got is based on swiprolog and now I need to do query based on prolog in a java file which is easy to achieving using tuprolog. But I can't consult the…
York
  • 503
  • 3
  • 23
1
vote
2 answers

tuprolog and Definite Clause Grammars

I'm using tuProlog (http://tuprolog.alice.unibo.it/) to run some prolog clauses from inside java. I'm having some problems with Definite Clause Grammars, and I think Stackoverflow might be the right place. Using the Definite Clause Grammar example…
Joe
  • 4,367
  • 7
  • 33
  • 52
1
vote
1 answer

I want to use TuProlog in my Android Project

How I can make an Android Project using tuProlog like Api I have benn trying it but I couldn't I have this error: Could not find class 'alice.tuprolog.Theory', referenced from method....
1
vote
3 answers

Running prolog in Android

I am testing tuProlog in Android. I have an Activity TuProlog, class Parser to interact with prolog code and data.pl which contains prolog code. I can run it fine as a java project with output to console but I am facing trouble doing so as an…
Yogesh
  • 1,307
  • 3
  • 13
  • 18
0
votes
3 answers

Where can I find a list of Prolog commands?

I'm new to Prolog and trying to do a program to check if some values can be a date, but I don't know what can I do with the language. I don't know the commands. As example, I want to get the length of a string, but I don't know if this is…
Renato Dinhani
  • 35,057
  • 55
  • 139
  • 199
0
votes
0 answers

tuProlog: how to make dynamic procedures?

tuProlog is a light version of prolog but does it support dynamic procedures? I read manual and explore other sources but could not find any information. If there is maybe other way to make dynamic procedure in tuProlog. in swi-prolog we have:…
0
votes
2 answers

How to make TuProlog recognize invalid facts?

I have following two Prolog files: ontology.pl: isSite(Url) :- string(Url). guestPostPublished(GuestPostId, Date, Site, Url) :- string(GuestPostId), date(Date), isSite(Site), string(Url), \+(guestPostPublished(GuestPostId, _, _,…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
1
2