Comments (10)
Version 2.6.1 ? Do you have a small ontology that produce the error ? something I could try.
from openllet.
It is possible that the problem came from the rule itself. Sometime the production of a predicat (wapa:hasQuantityValue(?c, ?moved)) can lead to application of the rule one more time. Then the new predicat lead to application one more time etc... The endless loop is logical not in the reasonner.
That why I absolutely need the ontology to understand what is the problem.
from openllet.
Hi @Galigator, the version we use is 2.6.0. Well, the rule does work with the Pellet reasoner in Protege, so, I assume that the rule itself is correct. I'll attach the turtle-file as .txt.
bigtu-wapa-model+instances.txt
Hopefully, you can use it to find out what the problem is.
Thanks again, Jack
from openllet.
Thx for the ontology.
I have made some trys with the OwlApi(like Protege) and it looks okay.
Also when using jena with Openllet 2.6.2, there is no java.lang.StackOverflowError .
But results aren't correct because in openllet-jena some builtin are missing. "date", "substract" are not set.
from openllet.
By playing around with your ontology.
I manage to create an infinite loop.
It look like ordering on some iterator is important to create the bug.
But most of ordering depend on hashcodes that rely on natives.
By the way, there is no support for swrlb-builtins in the openllet-jena module; maybe I could try to add it.
from openllet.
Hi, thanks for all your efforts!
Good to know that the rule itself is correct. Sorry to hear that the reasoning depends on the order of some iterator. Of course, you are free to add functionality to the openllet-jena module :-). I also look into alternatives to see what kind of SWRL support they provide.
Best, Jack
from openllet.
I am a stupid hedgehog.
Jena does support the builtins you are using; the builtin that aren't support are only the following ones :
addYearMonthDurations; subtractYearMonthDurations; multiplyYearMonthDuration; divideYearMonthDuration; addDayTimeDurations; subtractDayTimeDurations; multiplyDayTimeDuration; divideDayTimeDuration; subtractDates; subtractTimes; dYearMonthDurationToDateTime; addDayTimeDurationToDateTime;subtractYearMonthDurationFromDateTime; subtractDayTimeDurationFromDateTime; addYearMonthDurationToDate; addDayTimeDurationToDate; subtractYearMonthDurationFromDate; subtractDayTimeDurationFromDate; addDayTimeDurationToTime; subtractDayTimeDurationFromTime: subtractDateTimesYieldingYearMonthDuration; subtractDateTimesYieldingDayTimeDuration;
Then by adding, the namespace that are missing in your file :
@prefix swrl: <http://www.w3.org/2003/11/swrl#> .
@prefix swrlb: <http://www.w3.org/2003/11/swrlb#> .
results are goods with the 2.6.2 :
@Test
public void testSWRLConsistencyWithBuiltIn()
{
final InputStream stream = AddDelTripleInferenceTest.class.getResourceAsStream("/bigtu-wapa-model.instances.ttl");
final OntModel ontoModelInferred = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC);
ontoModelInferred.read(stream, null, "TURTLE");
ontoModelInferred.prepare();
final Resource s = ontoModelInferred.createResource("http://wapa#Moved-Jun-17-1");
final Property p = ontoModelInferred.createProperty("http://bwapa#hasQuantityValue");
{
final Literal o = ontoModelInferred.createTypedLiteral(40.0);
final Statement stmt = ResourceFactory.createStatement(s, p, o);
assertTrue(ontoModelInferred.contains(stmt));
}
{
final Literal o = ontoModelInferred.createTypedLiteral(41.0);
final Statement stmt = ResourceFactory.createStatement(s, p, o);
assertFalse(ontoModelInferred.contains(stmt));
}
ontoModelInferred.listObjectsOfProperty(s, p).forEachRemaining(System.out::println);
}
``` (I shorten the wapas namespaces to read them faster).
from openllet.
Thx for all the work! Good to know...I'll try to make it work in our Jena Fuseki server!
Best, Jack.
from openllet.
Did you make it work with success ?
from openllet.
Hi, to be honest...unfortunately not!
We downloaded your 2.6.3 version of openllet, build the .jar files and incorporated them into our Apache Jena Fuseki config file to call the reasoner via the "openllet.jena.PelletReasonerFactory"
class as shown below.
So, the facts are that the ontology and reasoning works with Protege, with your implementation but not in Jena Fuseki. And thus the problem will somewhere in there, meaning that Jena Fuseki uses your openllet implementation differently.
Next step would be to dive into the Jena Fuseki source code to find out how the openllet reasoner is being used. However, we are reluctant to do that as it takes a lot of time. So, a good example of how others are using the combination of Jena Fuseki and openllet would be welcome.
# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
[] rdf:type fuseki:Server ;
fuseki:services (
<#service1>
) .
# Custom code.
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
# TDB
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .
## ---------------------------------------------------------------
## Service with only SPARQL query on an inference model.
## Inference model bbase data in TDB.
<#service1> rdf:type fuseki:Service ;
fuseki:name "pizza" ; # http://host/pizza
fuseki:serviceQuery "query" ; # SPARQL query service
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ; # Non-SPARQL upload service
fuseki:serviceReadWriteGraphStore "data" ; # SPARQL Graph store protocol (read and write)
# A separate read-only graph store endpoint:
fuseki:serviceReadGraphStore "get" ; # SPARQL Graph store protocol (read only)
fuseki:dataset <#dataset> .
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph <#model_inf> .
<#model_inf> a ja:InfModel ;
ja:baseModel <#tdbGraph> ;
ja:content <#test-inf> ;
ja:reasoner [
# ja:reasonerURL <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>
ja:reasonerClass "openllet.jena.PelletReasonerFactory"
] .
<#tdbGraph> rdf:type tdb:GraphTDB ;
tdb:dataset <#tdbDataset> .
<#tdbDataset> rdf:type tdb:DatasetTDB ;
tdb:location "DB" ;
#set the timeout for a SPARQL query in milliseconds. 0 means no timeout and the query never times out.
ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "0" ] .
<#test-inf> ja:externalContent <file:///opt/ontology-plus-data.ttl> .
from openllet.
Related Issues (20)
- Openllet: UnsupportedClassVersionError HOT 4
- Inconsistent results for EL and DL ontologies. HOT 2
- Clearify the relation to Pellet HOT 3
- Build Error (maven on debian10) HOT 2
- ArrayIndexOutOfBoundsException when using minQualifiedCardinality
- class file has wrong version 54.0, should be 52.0 HOT 2
- getInstances for Class Expressions using Complement doesn't work correctly HOT 2
- invalid explanations with owlapi HOT 3
- Reasoner `.bindSchema` doesn't work HOT 1
- USE_UNIQUE_NAME_ASSUMPTION = true leads to contradictions HOT 1
- DL query is NULL for Openllet reasoner
- Openllet-Jena 2.6.5 is conflicting with Apache Jena Libs > 3.15.0 ( java.lang.NoSuchFieldError: SHACLC) HOT 2
- Unsupported rule Rule HOT 2
- replace travis-ci.org with different ci service HOT 2
- The command line interface shound be documented
- [ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:4.1.0:bundle HOT 1
- Broken Logging
- Jena API Performance Problems HOT 2
- Wrong DisjointClass(A,B) inferred if the ontology includes a Subclass(A, ObjectComplementOf(B)) HOT 2
- Do not work in Protege5.1.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openllet.