from OWL to Prolog code - prolog

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.

Related

SWI-PROLOG How to use library(clpqr) solver predicates

I am failing with using the predicates from the library CLPQR in SWI-Prolog. The library itself works. Expressions like "clpq: {X = 5^2}" are solved correctly. But I can't figure out how to use "minimize", "maximize", "inf", "sup", etc.
Link to the Prolog Manual http://www.swi-prolog.org/pldoc/man?section=clpqr. I'd really appreciate if anybody can give some Code Examples!!

Using Datalog by itself, is it possible?

I am currently studying Datalog for my report in class, I only need to discuss basic syntax and a basic example.
I know Datalog is usually used as a query language and is usually only implemented to other languages such as Java, Lua, C, etc. but is it possible to teach Datalog only by itself, or am I required to use another language implementing it to show a simple working program?
There are a few online demos you can use:
http://iris-reasoner.org/demo
http://ysangkok.github.io/mitre-datalog.js/wrapper.html
https://repl.logicblox.com/ (docs here:
https://developer.logicblox.com/content/docs4/tutorial/repl/section/split.html )
I haven't tried it myself yet, but http://abcdatalog.seas.harvard.edu also looks nice and easy to run.
A complete overview is on Wikipedia: https://en.wikipedia.org/wiki/Datalog

Library system in prolog

I need help with a library system in prolog.
I tried to define all the books in my library this way:
book(['programming in logic'],
[nm(k, clark), nm(f, mcCabe)],
['programation'],
['editorial 123']).
And I tried to do a query for all programming books this way:
?- book(Title,Autgor,Genre,Editorial),
findall( Genre, (member('programation', Genre)), [G]).
but I need to suggest books by genre, author...
I also need to do statistics, most wanted book, genre most searched, author most wanted, things like that, but I'm not sure how to define the rules to do these queries. I have searched for examples, but only find things like family tree and I don't understand. If you could collaborate with examples for this exercise, I would appreciate too much.
For sure, modelling a library system could be a very complex topic.
I would suggest to start to learn RDF, for instance with SWI-Prolog, that has a very powerful library devoted to the task.
I just tried to use RDF to model objects simpler than biblio domain.
Anyway, I googled 'biblio ontology' and got some reasonable result, like bibo.
To start with, maybe you could consider some introductory material.

Examples to show how to use Racket lexer generator?

I am playing with the Racket recently, currently implementing a lexer for a subset of scripting language...and wondering whether there are more examples to show how to use the lexer generator in Racket?
I understand the calculator example in the doc, but it is too simple to show the full features...
I am especially curious how to reference position of each character....
The libraries at PLaneT are a great resource for more elaborate examples.
Try for example the Infix Parser .

fuzzyCLIPS examples

I am learning how to use the version of fuzzyCLIPS from NRC. I would
appreciate if someone could point out some ftp/web sites with examples and
code using fuzzyCLIPS. I find the manual difficult to learn from
Try a search for FuzzyJess. As the syntax for CLIPS and Jess are similar you might find some FuzzyJess examples that can be adapted to FuzzyCLIPS.

Resources