Skip to content

Uncertainty and Preference-Aware Solver Based on Answer Set Programming

Notifications You must be signed in to change notification settings

rconfalonieri/posPsmodels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

posPsmodels-v0.1
--------------


PosPsmodels is an ASP-based solver (in beta version) able to process logic programs with possibilsitic ordered disjunction (or LPPODs). 
LPPODs are a generalisation of LPODs and they are class of programs which can reason about preferences and uncertainty. 
PosPsmodels can be used to compute possibilistic preferred answer sets under LPPODs semantics. 
The semantics is implemented by means of a syntactic reduction and a fix-point operator used to compute possibilistic normal logic programs.

Pospsmodels needs lparse, psmodels, and possModels (and therefore smodels v2.28).

Usage: computeLppod/./posPsmodels lppod/input_file

For example, given the LPPOD program dessert.lppod:

60 ice_cream x cake.
40 coffee x tea.
100 :- ice_cream, coffee.

we can compute all possibilistic preferred stable models with:

 % (let's assume we are in the computeLppod folder)
 % ./posPsmodels lppod/dessert.lppod

The resulting answer is:

******** Possibilistic Model 1***********
(coffee,40) (cake,60) 
[Rule_id,sat_degree]: [1,2] [2,1] 
[Rule_id,Necessity_degree]: [1,60] [2,40] 
[Rule_id,Rule]: 1, 60 ice_cream x cake .
[Rule_id,Rule]: 2, 40 coffee x tea .
Was Best LpodModel 1
***************************************************


******** Possibilistic Model 3***********
(tea,40) (ice_cream,60) 
[Rule_id,sat_degree]: [1,1] [2,2] 
[Rule_id,Necessity_degree]: [1,60] [2,40] 
[Rule_id,Rule]: 1, 60 ice_cream x cake .
[Rule_id,Rule]: 2, 40 coffee x tea .
Was Best LpodModel 1
***************************************************


******** Possibilistic Model 2***********
(tea,40) (cake,60) 
[Rule_id,sat_degree]: [1,2] [2,2] 
[Rule_id,Necessity_degree]: [1,60] [2,40] 
[Rule_id,Rule]: 1, 60 ice_cream x cake .
[Rule_id,Rule]: 2, 40 coffee x tea .
Was Best LpodModel 1
***************************************************


As we see, there are three possibilistic preferred models. 

Possibilistic Model 1 and Possibilistic Model 3 are equally preferred by the satisfaction degrees but Possibilistic Model 3 is possibilistically preferred to Possibilistic Model 1. Possibilistic Model 2 is a third choice. 

Syntax
------

Basically everything that goes through lparse should work also with
posPsmodels but since this is a first prototype, it might be a good idea
to refrain from using more esoteric stuff. 

The basic syntax is as follows:

 (0..100]   a x b :- body.   % a basic possibilistic ordered disjunction rule
 
 where (0..100] means an integer belonging to (0,100], and Ôa x b :- bodyÕ is an ordered disjunction rule. 
 Informally it means that if body is true, then a should be certain at least at level alpha. If a canÕt be true, then b has to be certain at least alpha.

The formal definition can be found in:

Confalonieri, R., Nieves, J.C., Osorio, M., V‡zquez-Salceda, J. 
Possibilistic Semantics for Logic Programs with Ordered Disjunction. 
In: Foundations of Information and Knowledge Systems (Prade, H., Link, S., eds.), LNCS vol. 5956, pp. 133-152, Springer, (2010).

The posPsmodels distribution archive contains a README file that explains how to get ready with the solver. 
The solver is in beta release and it has been tested for OS X systems only.

Roberto Confalonieri
confalonieri@lsi.upc.edu



About

Uncertainty and Preference-Aware Solver Based on Answer Set Programming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published