Research Article

Prefiltering Strategy to Improve Performance of Semantic Web Service Discovery

Listing 6

Prefiltering process containing two filtering stages (lines 2 to 4: Cat_Filt; lines 5 to 10: Cap_Filt).
(1) %FilterMain:- ?_Inserted = setof ?Ins
           //- - - - - - - - -First stage of filtering- Cat_Filt- - - - - - - - - - - - - -
(2)       ?GoalName[hasCategory?GoalCat]@?_GoalModule,
(3)       ?WsName[hasCategory?WsCat]@?_WsModule,
(4)       ((?WsCat :=: ?GoalCat); (?WsCat :: ?GoalCat); (?GoalCat ::?WsCat)),
           //- - - - - - - - - -Second stage of filtering- Cap_Filt- - - - - - - - - -
(5)       %Filter_Cap (?GoalName, ?WsName),
(6)       alreadySelected(?WsName, GOAL)@FilteredWsModule,
(7)       alreadySelected(?WsName, WEBSERVICE)@FilteredWsModule,
(8)
(9)       insertrelated(?GoalName, ?WsName)@RelatedGoalWsModule,
(10)      ?Ins=related(?GoalName, ?WsName)
(11)              .