You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[OWL API](https://github.com/owlcs/owlapi) to reason on active instances of a running Java application.
5
5
6
6
## Project Goals ##
7
-
Complex Java applications often contain a data model representing the domain they are related to. Our idea is to give to the programmer the possibility to check the java application model and the runtime evolution of its instances against an OWL2 ontology and a related knowledge base.
7
+
Complex Java applications often contain a data model representing the domain they are related to. Our idea is to give to the programmer the possibility to check the Java application model and the runtime evolution of its instances against an OWL2 ontology and a related knowledge base.
@@ -29,9 +29,6 @@ Given a Java application we would like to connect it to a _JKI_ component able t
29
29
### The application ###
30
30
Given a generic Java application we would like to connect it to a _JKI_ component able to monitor it providing runtime snapshots of active instances running in the JVM. We exploit the Java Debug Interface (JDI) running the application in debug mode and connecting to it remotely through socket and ```AttachingConnector```.
31
31
32
-
To run the java application in debug virtual machine it must be run with options:
***Attach** to the Java Application listening on a given port
37
34
***Dialogue with the class loader** to ensure classes of interest are loaded
@@ -110,14 +107,15 @@ We can save the KB axioms (TBox, RBox, ABox) managed by the ```javareasoner``` a
110
107
111
108
## How to run the demo ##
112
109
113
-
### The application ###
110
+
### The demo applications ###
114
111
The project contains two example application in packages ```app.artmarket``` and ```app.eshop```. For each application an ontology is described through the OWLAPI in the respective extension of ```OntologyHandler``` ( ```AMOntologyHandler``` and ```ESOntologyHandler```).
115
112
116
-
The two applications are two toy example and their execution is managed respectively by ```ReasonedArtMarketMain``` and ```ReasonedEshopMain``` that must be run with above specified options to enable remote debug mode.
113
+
The two applications are two toy examples and their execution is managed respectively by ```ReasonedArtMarketMain``` and ```ReasonedEshopMain``` that must be run in debug mode setting the following arguments for the JVM:
A [document](https://github.com/marioscrock/java-reasoning/blob/master/docs/demo-docs.pdf) describing the two Java applications, the defined ontologies and the peculiarities of each demo is available in the ```docs``` folder.
119
-
120
-
### Java Reasoner ###
118
+
### The demo Java reasoner ###
121
119
122
120
The ```javareasoner``` package contains the main classes of the _java-reasoner_ component. Two implementations, one for each example application can be executed respectively through the classes ```MainAM``` and ```MainES```.
123
121
@@ -129,13 +127,23 @@ Example reasoning routines are defined for the [```app.artmarket```](https://git
129
127
130
128
**Note** The user is expected to provide inputs from the console in both running executables to enable connection and ensure debugger is ready when the application actually starts its execution.
131
129
132
-
### SPARQL Engine ###
130
+
### The SPARQL demo ###
133
131
134
132
The ```sparql``` package contains the main class ```MainSPARQLDemo``` that shows (through an example KB obtained by running the EShop demo and saved in ```appOntologyES.owl``` file) the tradeoff between expressivity of queries and model/reasoning enabled.
135
133
136
-
## How to connect your own application ##
134
+
### Demo Material ###
135
+
136
+
A [document](https://github.com/marioscrock/java-reasoning/blob/master/demo/demo-docs.pdf) describing the two Java applications, the defined ontologies and the peculiarities of each demo is available in the ```demo``` folder. The console logs, obtained by running the demo, is also available in the ```demo``` folder.
137
+
138
+
## How to test JKI with your own application ##
137
139
138
140
* Extend ```InspectToAxiom``` providing an implementation of methods as specified above.
139
141
* Extend ```OntologyHandler``` providing a default ontology through OWLAPI overriding the ```initOntology``` method (follow the same structure of examples provided) or load your ontology from file.
140
142
* Build a ```Main``` class for reasoning backend managing execution of ```javareasoner``` components.
141
143
* Run your Java application in debug mode (listening for remote connection) and the *main* method of the backend.
144
+
145
+
## How to cite ##
146
+
147
+
If you use JKI in your work, please cite the following article:
148
+
149
+
> Mario Scrocca and Riccardo Tommasini: _Towards a Knowledge Interface for Java Applications_, Proceedings of the ISWC 2021 Posters, Demos and Industry Tracks, CEUR-WS.org, [http://ceur-ws.org/Vol-2980/paper327.pdf](http://ceur-ws.org/Vol-2980/paper327.pdf), 2021.
0 commit comments