This is one of the possible Use Cases.
This use case shows the need of uncertainty representation in personalisation. For example, an online service can help its clients to find products (such as books) with reasonable price. Note that different clients might have different "reasonable prices". The following user-defined function
- reasonable_price(?x,?rp) = max(0, 1-?x/?rp)
calculates the values of "resonable" for the price ?x, given the reference maximum price ?rp. For instance, reasonable_price(30,50)=0.4, while reasonable_price(80,50)=0.
This use case provides a scenario where datatype built-ins can be used to represent some levels of uncertainty in rules. The application aims at personalisations. It requires reasoning with rules and datatype built-ins, such as those defined in XQuery and XPath.
Links to Related Use Cases
Relationship to OWL/RDF Compatibility
The semantics of datatype built-ins should be compatibale with RDF and OWL datatypes.
Requirements on the RIF
- Datatype built-in predicates and functions
An online servise provides suggestions on hotels reasonably near business locations and with reasonable price. Its suggestions are expected to be based on clients' personal preference, i.e., the price that she finds reasonable and the distance that she thinks is accpetable.
1) Personalised closeness can be defined by the following user-defined function:
2) Personalised reasonable prices can be defined by the following user-defined function:
3) Candidate hotels w.r.t some business location for a clients can be decided by the following rule
hotelCandidate(?c,?b,?h) <- business(?b), hotel(?h), client(?c), location(?b,?bLoc), location(?h,?hLoc), distance(?hLoc,?bLoc,?d), price(?h, ?p), acceptableDistance(?c, ?ad), acceptablePrice(?c,?rp), ?v1=close(?d, ?ad), ?v2=reasonablePrice(?p,?rp), (?v1+?v2)/2 >= 0.8
In the above example, closeness and reasonable prices are vague concepts, and are represented by datatype-related functions.
 P. Vojtas. Fuzzy logic programming. Fuzzy Sets and Systems, 124:361-370, 2001.