SWRL API Processing Time

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SWRL API Processing Time

martingrant
Hi,

I've got a small ontology with a couple SWRL rules using build in atoms,
like swrlb:lessThan() and so on. The rules assign a new object property
between individuals by comparing data properties between them:

"hasPositionX(?b, ?bx) ^ hasPositionX(?a, ?ax) ^ swrlb:lessThan(?ax, ?bx) ->
isLeftOf(?a, ?b)"

I've got a really basic Java program using the SWRL API which opens the
ontology, executes those rules and exits. I've got it bundled up into a jar
file so I can execute it from other programs.

To execute the jar it takes just under 4 seconds to execute.

If I open the ontology in Protege and use the Pellet reasoner, the results
of the rules appear instantly. The only difference is that in Protege they
show as inferences (yellow background) and disappear when I stop the
reasoner. Through my SWRL API program they show as assertions, saved
permanently.

I'm just wondering what reason might there be in the time difference?

Thanks



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-Developer-f4659816.html
_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev
Reply | Threaded
Open this post in threaded view
|

Re: SWRL API Processing Time

Martin O'Connor-2

The Drools-based reasoner implementation in the SWRLAPI has a 2-3 second startup time, which is likely what you are seeing.

In general, though, Pellet will likely be faster than the SWRLAPI’s fairly naive OWL 2 RL-based reasoner (see [1]).

Martin

[1] http://ceur-ws.org/Vol-849/paper_31.pdf

> On Dec 7, 2018, at 1:42 PM, martingrant <[hidden email]> wrote:
>
> Hi,
>
> I've got a small ontology with a couple SWRL rules using build in atoms,
> like swrlb:lessThan() and so on. The rules assign a new object property
> between individuals by comparing data properties between them:
>
> "hasPositionX(?b, ?bx) ^ hasPositionX(?a, ?ax) ^ swrlb:lessThan(?ax, ?bx) ->
> isLeftOf(?a, ?b)"
>
> I've got a really basic Java program using the SWRL API which opens the
> ontology, executes those rules and exits. I've got it bundled up into a jar
> file so I can execute it from other programs.
>
> To execute the jar it takes just under 4 seconds to execute.
>
> If I open the ontology in Protege and use the Pellet reasoner, the results
> of the rules appear instantly. The only difference is that in Protege they
> show as inferences (yellow background) and disappear when I stop the
> reasoner. Through my SWRL API program they show as assertions, saved
> permanently.
>
> I'm just wondering what reason might there be in the time difference?
>
> Thanks
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-Developer-f4659816.html
> _______________________________________________
> protege-dev mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-dev

_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev