... | ... | @@ -12,7 +12,7 @@ You need Java version >= 21 to use InteGraal. |
|
|
|
|
|
We recommend the use of an IDE [such as Eclipse](https://www.eclipse.org/downloads/) to work with java but this is not needed if you only use the CLI tool.
|
|
|
|
|
|
If using Eclipse, you may need to configure it to use the correct version of Java
|
|
|
If using Eclipse, you may need to configure it to use the correct version of Java:
|
|
|
```
|
|
|
In Window > Preferences (or Eclipse > Settings):
|
|
|
Java/Installed JREs >
|
... | ... | @@ -52,8 +52,9 @@ In Project > Properties: |
|
|
click Apply
|
|
|
```
|
|
|
|
|
|
Next, you can create the main file for this example. You can find it at https://notes.inria.fr/z7uLn0irTsKVAh2jEfr4pA.
|
|
|
- Please note that this content assumes that the file is named `Main.java`. You can change the name of the class according to the name of your file.
|
|
|
Next, you can create the main class in a file called for instance `Main.java` and copy-paste the content at https://notes.inria.fr/z7uLn0irTsKVAh2jEfr4pA.
|
|
|
|
|
|
You may change the name of the class according to the name of your file.
|
|
|
|
|
|
You will also need to create a file `example.dlgp` at the root of the java project with the following content :
|
|
|
|
... | ... | @@ -81,8 +82,8 @@ When you execute the given example, the `example.dlgp` file is parsed and a fact |
|
|
|
|
|
The previous example included rules but they are not taken into account for answering the queries. In this step we will add the reasoning part with a saturation approach.
|
|
|
|
|
|
If you want to familiarize with the library you can try to do so by yourself
|
|
|
- Hint : There is 2 lines of code to copy from the documentation
|
|
|
If you want to get familiar with the library you can try to do so by yourself
|
|
|
- Hint: There is 2 lines of code to copy from the documentation
|
|
|
|
|
|
Otherwise, you can add the following 2 lines at line 77, between the parsing of the data file and the evaluation of the queries :
|
|
|
```
|
... | ... | |