Preference and Similaritybased Behavioral Discovery of Services Farhad Arbab 1 and Francesco Santini 1,2 1 Centrum Wiskunde & Informatica, Amsterdam, Netherlands 2 Dipartimento di Matematica e Informatica, University of Perugia, Italy
Intro and Motivations è We focus on the discovery process of Web Services (WSs) " Satisfactory alternatives for the user " Over-constrained queries è A formal tool to model queries " Constraint Automata (CA) to represent the desired behavior " Soft Constraints to represent user s preferences è Classical CA operators to reason on queries è Practical advantages " Expressivity of (soft) constraints " A parametric computational framework where to solve the problem " Techniques from AI to tackle the complexity
In a glimpse Soft constraints Soft constraint automata constraints Constraint automata preferences automata services A preference/similarity-based behavioral query language for services
Outline è Semirings è Semiring-based Soft Constraints è Soft Constraint Automata (SCA) è SCA as preference-based queries è SCA as similarity-based queries è SCA operators (Join/Hide) è A sketch of an implementation è Future Work / Conclusion
C-semirings (for preferences) è A c-semiring is a tuple " A is the (possibly infinite) set of preference values " 0 and 1 represent the bottom and top preference values " + defines a partial order ( S ) over A such that a S b iff a+b = a " + is commutative, associative, and idempotent, it is closed, 0 is its unit element and 1 is its absorbing element " closed, associative, commutative, and distributes over +, 1 is its unit element and 0 is its absorbing element ha, apple S i " is a complete lattice ha, +,, 0, 1i to compose the preferences and + to find the best one
Classical instantiations è Weighted è Fuzzy è Probabilistic è Boolean hr + [{+1}, min, ˆ+, 1, 0i h[0..1], max, min, 0, 1i h[0..1], max, ˆ, 0, 1i h{false, true}, _, ^, false, truei è Boolean semirings can be used to represent classical crisp problems è The Cartesian product is still a semiring h[0..1], R + [{+1}i, hmax, mini, hmin, ˆ i, h0, +1i, h1, 0ii
Soft Constraints è A constraint where each instantiation of its variables has an associated preference " Assignment : V! D C :! A " Constraint è Example of a binary soft constraint è Sum: (c 1 c 2 ) = c 1 + c 2 è Combination: (c 1 c 2 ) = c 1 c 2 è Projection: è Entailment: c x,y : V! D! A c + (V\{v}) c 0 = P d2d c [v := d] c 1 v S c 2 () c 1 apple S c 2 ( )
Examples c 1 :({x}!n)! R + s.t. c(x) = 2x + 8 c 2 :({x}!n)! R + s.t. c(x) = x + 5 c 3 :({x}!n)! R + s.t. c(x) = x + 3 c 4 :({x, y}!n)! R + s.t. c(x, y) = x + y + 5 c 2 c 3 = c 1 c 4 + {x} = c 2 c 1 v c 2 v c 3
Example of a SCSP <a,a> 11 <a,b> 7 <b,a> 16 <b,b> 16 The best level of consistency is 7
Soft Constraint Automata
Timed Weighted Data Streams è They represent the languages recognized by our SCA " Data stream λ " Time stream l " Preference stream a ha, +,, 0, 1i h, l, ai 2Data! R! + A! such that, 8k 0:l(k) < l(k + 1) and lim k!+1 l(k) =+1 A is a I/O port name {A} c yes/no preference! q o q 1
Simple Reo Circuit Writer A B Reader = 1-FIFO channel {A} c 1 q o s q 1 {B} c 2
Soft Data Constraints è Soft constraints used by SCA (labels of the transitions) c {dn n2n} = 0 1 c 1 c 2 c 1 c 2 c è d n are the variables corresponding to names in N è A soft constraint is a function defined as c :({d n n 2 N}!Data)! A
Soft Constraint Automata Query: i) States represent the states of our stateful service, ii) Transitions represent the operations that can be invoked on the service iii) Names are operation names, data elements are operation parameters
Preference-based query (Ex.) DB 0.2 1 1 0.8 0.3
A more complex example
Similarity-based query Variables now represent operations names!
Join and Hide Join T 1 S./ T 2 S = (Q 1 Q 2, N 1 [N 2,!, Q 0,1 Q 0,2, S) q 1 N 1,c 1! 1 p 1, q 2 N 2,c 2! 2 p 2, N 1 \N 2 = N 2 \N 1 hq 1, q 2 i N 1[N 2,c 1 c 2! hp1, p 2 i q 1 N,c! 1 p 1, N \N 2 = ; hq 1, q 2 i N,c! h p 1, q 2 i Hide 9O[T S ] = (Q, N\O,! O, Q 0,O, S) q p, p N,c! r, N 0 = N\O, ;, c 0 = c + {dn n2n 0 } q N0,c 0! O r
Practical applications
Implementation Automaton-structure constraints: q a N l! qb q a, q b 2Q DB c xi,y i (x i = q a, y i = q b ) = 1, and 0 otherwise Name preference constraints: q a N l! qb 2 DB c xi,y i,z i (x i = q a, y i = q b, z i = N l ) = a Ex. c x1,y 1,z 1 (x 1 = q a, y 1 = q b, z 1 = {Login}) = 0.8
Solving the SCSP DB = {T 1, T 2,...,T h } Q 1 [Q 2 [ [Q h = Q DB P = hs, V, D, Ci [ V = {x i, y i, z i }
Conclusion and FW è An evolution of classical Constraint Automata " Returning a preference value for the data used in the service operations " Returning a similarity value for the service operation-names (I/O) è A natural application of it as a " Preference/similarity based, " and behavioral query language for services è An implementation with standard (soft) solvers è A full implementation of the framework (on the way) è Further study on Simulation/Bisimulation, Join/Hide
Thank you for your time! Contacts: F.Santini@cwi.nl