Creating and running the PDQ jar file - ProofDrivenQuerying/pdq GitHub Wiki
-
After installing the gui project in eclipse, make sure you can run the FullMain file (uk.ac.ox.cs.pdq.FullMain). No WM arguments required, the project contains the required jsf and such.
-
Export the project creating a runnable jar file, using the launch configuration created before. Select the "Package required libraries" option, click finish.
-
chmod +x [newjarfile]
-
try to run it. If you get the following error: 15:06:28.646 [JavaFX Application Thread] FATAL uk.ac.ox.cs.pdq.ui.PDQApplication - {java.util.MissingResourceException: Can't find bundle for base name resources.i18n.ui, locale en_GB java.util.MissingResourceException: Can't find bundle for base name resources.i18n.ui, locale en_GB at java.base/java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2055) at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1689) at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1593) }
This happens because the eclipse project ignores the "Resources" folder as a source. You can ether tell eclipse to generate good jar file, or unzip the generated jar file, and move the resources folder from the src directory to the root. After this it should work.
In case the provided jfx is not playing well with your java: Create a launch configuration in eclipse for the PDQApplication file. update the following vm parameters to point to your installation: --module-path /home/gabor/git/openjfx/javafx-sdk-11.0.2/lib/ --add-modules=javafx.controls,javafx.fxml,javafx.graphics,javafx.swing,javafx.web,javafx.base
Do the same as above, but when executing you will need to specify the same vm arguments.
- the simplest is to doubleclick the jar. Without attributes it should start the gui. If you give the first argument as one of cost,planner,runtime,regression,reasoning then it will call the appropriate main with the remaining attributes. For example:
-planner ./WhateverIsTheNameOfTheJar.jar planner -s ../regression/test/planner/linear/fast/demo/case_003a/schema.xml -q ../regression/test/planner/linear/fast/demo/case_003a/query.xml This should run the Planner.main with the schema and query attributes.
-runtime ./WhateverIsTheNameOfTheJar.jar runtime -s /home/gabor/git/pdq/regression/test/runtime/simple/rest_002/schema.xml -p /home/gabor/git/pdq/regression/test/runtime/simple/rest_002/expected-plan.xml -a /home/gabor/git/pdq/regression/test/runtime/simple/rest_002/accesses -v
One can also add -o to redirect the output to a file.
-reasoner ./WhateverIsTheNameOfTheJar.jar reasoner -s /home/gabor/git/pdq/regression/test/chaseBench/tgds/schema.xml -f /home/gabor/git/pdq/regression/test/chaseBench/tgds/data
This will create a csv file for each relation, representing its content in the chase.
Example run of the doctors chasebench test with a query:
$ ./mypdq2020_test.jar reasoning -s /home/gabor/git/pdq/regression/test/chaseBench/doctors/schema/doctors.s-schema.txt -q /home/gabor/git/pdq/regression/test/chaseBench/doctors/queries/10k/q01.txt -v
Reasoning starts on /home/gabor/git/pdq/regression/test/chaseBench/doctors/schema/doctors.s-schema.txt Reasoning finished, processing results. doctor(c0,c1,c2,c3,c4) prescription(c9,c10,c0,c11) targethospital(c1,c5,c6,c7,c8) Reasoning results generated in 0.131 sec. Found 3 amount of tuples.