Formal Definition
1 Preliminaries
- Ɲ – a set of all the possible value names,
- n ∈ Ɲ – a value name,
- Ƒ – a set of all the possible feature names,
- f ∈ Ƒ – a feature name,
- F ⊆ Ƒ - a feature set,
- V ⊆ Ƒ × Ɲ - a feature/value relation, a set of ‹f,n› ordered pairs, i.e. a binary relation between Ƒ and Ɲ.
Example:
- F1 = {lang, type} – a feature set containing two feature names and ,
- V1 = {(lang, en),(lang,de),(type,text/plain)} – feature/value relation containing three ordered pairs.
2 Profile
A profile is a tuple P = ‹FP, VP› describing some input/output data for a web service:
- FP ⊆ Ƒ – profile features, a feature set of data features,
- VP ↦ Ɲ – profile feature/value map , a function from profile features to their values representing input data.
Example:
- FP1 = {lang, type}
- VP1 = {(lang, en), (type, text/plain)}
3 Input
A web service input is a tuple I = ‹FI, VI, FIU, VIS›
- input features FI ⊆ Ƒ a set of features that must be present in the input of a web service,
- input feature/value relation VI ⊆ ƑI × Ɲ a relation representing possible values of the input features of a web service,
- user specifiable input features FIU ⊆ FI features that a user may specify,
- input selected feature/value map VIS : FI ↦ Ɲ, VIS ⊆ VI a total function mapping each input feature to its selected value.
Example:
- FI1 = {lang, type},
- VI1 = {(lang, en), (lang, de), (type, text/plain), (type, application/pdf)},
- FUI1 = {lang},
- VIS = {(lang, en), (type, text/plain)}.
4 Output
A web service output is a tuple O = ‹FO, VO, VOS, D, new›
- output features FO ⊆ Ƒ a feature set representing an output of a web service,
- output feature/value relation VO ⊆ ƑO × Ɲ a relation representing possible values of the output features of a web service,
- output selected feature/value map VOS : FO ↦ Ɲ, VOS ⊆ VO a total function mapping each output feature to its selected value.
- input dependence map D : VI ↦ VD, where VD ⊆ 2VO, such that ∩ VD = ∅ maps input feature/value pair to a set of dependent output feature/value pairs.
- new - a web service output does not include its input, i.e. VI ∩ VO = ∅.
Example:
- FO1 = {lang, type},
- VO1 = {(lang, en), (type, text/html)},
- VOS = {(lang, en), (type, text/html)},
- D1 = ∅,
- new1 = true.
5 Service
A web service chaining description is a tuple S = ‹I, O›.
- input I a web service input,
- output O a web service output.
6 Chaining Requirements
- required input features FIR = FI ∖ FU,
- matching profile values VPM = {(f,v) ∈ VP : f ∈ F1}.
Example:
- FIR1 = FI1 ∖ FUI1 = {type},
- VPM1 = {(lang, en), (type, text/plain)}.
7 Match Function
A match function M : ‹S × Ƥ› ↦ {0,1} from a set of all the possible web service/profile tuples into zero or one. If the value is one then profile P ∈ Ƥ describes a possible input of web service S ∈ S. M is defined as follows:
1, | FIR ∈ FP, and | |
VPM ∈ VI, and | ||
M(S,P) = | if new == true then FO ∩ FP = ∅ | |
0, | otherwise |
Example:
Profile P1 = ‹FP1, VP1› describes a possible input of service S1 = ‹I1, O1› where:
- I1 = ‹FI1, VI1, FOU1, VIS1›,
- O1 = ‹FO1, VO1, VOS1, D1, new1›,
because:
- FIR1 ∈ FP1, i.e. {type} ∈ {lang, type}, and
- VPM ∈ VI, i.e. {(lang,en),(type,text/plain)} ∈ {(lang,en),(lang,de),(type,text/plain),(type,application/pdf)}, and
- the output is new i.e new1 == true.
8 Specialisation Function
A specialisation function E : ‹S × Ƥ› ↦ S, E is defined as follows:
E(S,P) = SN = ‹IN, ON› such that:
- IN = ‹FI, VIN, FIU, VISN›, where:
- VISN = {(f,v) ∈ VIS : f ∈ FP ↦ (f,v) ∈ VPM},
- VIN = {(f,v) ∈ VI : f ∈ FP ↦ (f,v) ∈ VPM},
and
- ON = ‹FO, VON, VOSN, new›, where:
- VT = ∪ D(v) for v ∈ VISN,
- VOSN = VT ∪ {(f,v) ∈ VOS : f ∉ domain(VT)},
- VON = {(f,v) ∈ VO : f ∈ domain(VT) ↦ (f,v) ∈ VT}