Skip to content

sisinflab/dlpreferences

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DLPreferences

DLPreferences is a Java API for computing the Pareto-optimal outcomes in a semantic negotiation between a provider and a decision maker. The provider describes his offer by sharing an OWL 2 DL ontology, while the decision maker expresses preferences using OWL API class expressions.

DLPreferences currently supports a qualitative preference representation formalism called ontological CP-nets, which expands the expressive power of propositional CP-nets by adopting Description Logics.

A CP-net is a convenient way of representing a ranking of the possible outcomes of a negotiation. To build a CP-net, the decision maker defines the set of features that make up an outcome, then they rank the domain values of each feature; finally, they specify conditional preferences on different features. To extend a CP-net into an ontological CP-net, domain values must be specified as OWL 2 DL classes w.r.t. the provider's OWL 2 DL ontology.

Some outcomes may be unfeasible due to constraints imposed by the shared ontology. DLPreferences computes the Pareto-optimal outcomes, that is the feasible outcomes who are not dominated by any other feasible outcome. To learn more about ontological CP-nets and reasoning with qualitative preferences, see Di Noia et al. (2005) "Ontological CP-Nets" (PDF).

Support for quantitative preferences, whereby outcomes are ranked according to the utility value the decision maker assigns to each preference, is planned for a future version.

Prerequisites

  • A JDK supporting Java SE 8 or superior.
  • NuSMV 2.5.4 or superior.

Usage

Since ontological CP-nets are an extension of CP-nets, a CP-net must be specified first. This is achieved by creating an XML document that follows the CRISNER input syntax. A CPNet instance is constructed by passing the CRISNER spec file and the NuSMV executable file as arguments:

CPNet baseCPNet = new CPNet(
    Paths.get("spec.xml"),
    Paths.get("nusmv-2.6.0", "bin", "NuSMV"));

The provider's ontology is created as an OWL API ontology object:

OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLOntology ontology = manager.loadOntologyFromOntologyDocument(
    Paths.get("ontology.owl").toFile());

To build an ontological CP-net, an OWL API class expression must be associated with each domain value defined in the CRISNER spec file. Let R be a feature defined in the XML spec file and {Rs, Rm} its domain; the ontological CP-net is constructed as follows:

OntologicalCPNet.Builder cpnetBuilder =
    OntologicalCPNet.builder(baseCPNet, ontology);

OWLClassExpression rs = ...
cpnetBuilder.addPreferenceDefinition("Rs", rs);

OWLClassExpression rm = ...
cpnetBuilder.addPreferenceDefinition("Rm", rm);

OntologicalCPNet cpnet = cpnetBuilder.build();

The Pareto-optimal outcomes can now be computed:

Set<Outcome> outcomes = cpnet.paretoOptimal();

Javadoc

The javadoc is available in the project tree at docs/apidocs.

Running the tests

If NuSMV is installed and its main binary is accessible via the system's PATH environment variable, no further action is required; simply run the tests with

gradlew test

To specify a custom location for the NuSMV executable file, use its absolute path as value of the nusmv-path parameter in the TestNG configuration file, which is located at

src/test/testng.xml

Status

Development is in the early stages, therefore the API is subject to change without notice.

Acknowledgements

Thanks to Dr. Ganesh Ram Santhanam for providing the CRISNER library. His work is described in Santhanam et al. (2010) "Dominance Testing via Model Checking" (PDF).

License

DLPreferences is released under the MIT license.

About

Reasoning with preferences in Description Logics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published