Authors: Camille Bourgaux, Despoina Trivela.


*** Command line ***

java -jar cqapri.jar 
usePriority 
checkIARForRelevantFacts 
computeExactIARAnswers 
pathOntology 
pathQueries 
queries 
databasePath 
username 
password 
outputPath 
printAnswers
explainAll
explainOnDemand
onlySmallestDisjunctionsForARExplanations
onlySmallestNbOfAssertionsForARExplanations
sortARExplanationsByNbOfAssertions
encoded
smallestExplanationForNegativeIAR
repair

* Parameters *

usePriority: 1 for considering the semantics based on priority levels, 0 otherwise.

checkIARForRelevantFacts: 1 for computing for each assertion involved in a cause whether it is in the intersection of the repairs or not, it may help for queries with lot of redundant answers, 0 otherwise.

computeExactIARAnswers : 0 for computing only the approximation of IAR answers, 1 for computing exactly the IAR answers (AR answers are computed in both cases).

pathOntology: the path of the ontology file.

pathQueries: the path of the folder which contains the queries.

queries: the name of the queries files. Queries should be separated by "_": query1.txt_query2.txt

databasePath: the path of the database.

username: the user name for the database.

password: the password of the database.

outputPath: the path where the results files will be produced.

printAnswers: 1 for printing the answers in the output files, 0 for printing only the number of answers of each type.

explainAll: 1 for computing all explanations, 0 otherwise.

explainOnDemand: 1 for being given the possibility of asking explanations for some answers after the query answering phase, 0 otherwise.

onlySmallestDisjunctionsForARExplanations: when explanations are needed, 1 for obtaining only smallest disjunctions as AR explanations, 0 otherwise.

onlySmallestNbOfAssertionsForARExplanations: when explanations are needed, 1 for obtaining only the AR explanations which involve the smallest number of assertions, 0 otherwise.

sortARExplanationsByNbOfAssertions: when explanations are needed, 1 for sorting the AR explanations first by number of assertions and then by size of disjunction, 0 for sorting them first by size of disjunction, then by number of assertions.

encoded: 1 if the database encode the data, 0 otherwise.

smallestExplanationForNegativeIAR: 1 to compute a smallest explanation for negative IAR answers, 0 to compute an arbitrary explanation.

repair: 1 to be allowed to state wanted and unwanted answers to repair the data, 0 otherwise.

* Example *

If you need only the number of answers of each kind:
java -jar cqapri.jar 0 0 0 //Users/name/Desktop/CQAPriExpe/OntologyAndQueries/LUBM_with_disj.owl  /Users/name/Desktop/CQAPriExpe/OntologyAndQueries/ q1.txt_q2.txt jdbc:postgresql://localhost/mydatabase postgres password /Users/name/Desktop/CQAPriExpe/results/mydatabase/ 0 0 0 0 0 0 0 0 0

If you also need to print the answers:
java -jar cqapri.jar 0 0 0 //Users/name/Desktop/CQAPriExpe/OntologyAndQueries/LUBM_with_disj.owl  /Users/name/Desktop/CQAPriExpe/OntologyAndQueries/ q1.txt_q2.txt jdbc:postgresql://localhost/mydatabase postgres password /Users/name/Desktop/CQAPriExpe/results/mydatabase/ 1 0 0 0 0 0 0 0 0

If you want to explain all answers:
java -jar cqapri.jar 0 0 0 //Users/name/Desktop/CQAPriExpe/OntologyAndQueries/LUBM_with_disj.owl  /Users/name/Desktop/CQAPriExpe/OntologyAndQueries/ q1.txt_q2.txt jdbc:postgresql://localhost/mydatabase postgres password /Users/name/Desktop/CQAPriExpe/results/mydatabase/ 1 1 0 0 0 0 0 0 0

If you want to explain only some selected answers:
java -jar cqapri.jar 0 0 0 //Users/name/Desktop/CQAPriExpe/OntologyAndQueries/LUBM_with_disj.owl  /Users/name/Desktop/CQAPriExpe/OntologyAndQueries/ q1.txt_q2.txt jdbc:postgresql://localhost/mydatabase postgres password /Users/name/Desktop/CQAPriExpe/results/mydatabase/ 1 0 1 0 0 0 0 0 0

NB: example running on windows: 
java -jar cqapri.jar 0 0 0 Users/name/Desktop/CQAPriExpe/OntologyAndQueries/LUBM_with_disj.owl C:/Users/name/Desktop/CQAPriExpe/OntologyAndQueries/ q1.txt_q2.txt jdbc:postgresql://localhost/mydatabase postgres password C:/Users/name/Desktop/CQAPriExpe/results/mydatabase/ 0 0 0 0 0 0 0 0 0

*** Results ***

The results (numbers of answers, answers and explanations if required, and time spent in different phases) of each query are summarized in a file "outputPath+queryname".
When explanations are given on demand in a second phase, they are given in a file "outputPath+queryname+Explain".
When repairing the data, necessarily false and non false assertions as well as relevant are displayed in files "AssertionsStep+number of the repairing step".

*** Databases ***

This version of CQAPri handles databases such that each concept/role of the ontology corresponds to one table, whose name is the name of the concept/role in the ontology, with one (or two in case of role) column, plus possibly one column for the priority of the assertion.
In case of encoded data, the database has to have a table "dictionary" and the others tables names have to be encoded accordingly.
