Presentation is loading. Please wait.

Presentation is loading. Please wait.

Progetto PRIN: Specifica e verifica di protocolli di interazione fra agenti Viviana Mascardi Alessandria, 29-03-06.

Similar presentations


Presentation on theme: "Progetto PRIN: Specifica e verifica di protocolli di interazione fra agenti Viviana Mascardi Alessandria, 29-03-06."— Presentation transcript:

1 Progetto PRIN: Specifica e verifica di protocolli di interazione fra agenti Viviana Mascardi Alessandria,

2 Publisher side

3 process( parameters( ontology('FruitMarketOntology'), content_language('first order logic')), protocol_name('sd FruitMarket'), long_name('fs/fruitSeller:fruitSellerClass')), long_name('fb/fruitBuyer:fruitBuyerClass')), main_fragment( seq([ send(msg('REQUEST', 'availability_and_price(fruit(F))')), switch([case(no_guard, seq([receive(msg('INFORM', 'available(fruit(F),price(EuroForKg))')), receive(msg('PROPOSE', 'buy(fruit(F),price(EuroForKg))')), switch([case(no_guard, seq([send(msg('REQUEST', 'delivery_modes')), receive(msg('INFORM', 'delivery_mode(ListOfModes)')), Prolog representation exec(s('sd FruitMarket',0)) :- exec(s(s('sd FruitMarket',0),0)). exec(s(s('sd FruitMarket',0),0)) :- traceable_receive('REQUEST','availability_and_price(fruit(F))', exec(s(s('sd FruitMarket',0),1)). exec(s(s('sd FruitMarket',0),1)) :- check_case_guard_passed(s(s(s('sd FruitMarket',0),1),0),no_guard), !, exec(s(s(s('sd FruitMarket',0),1),0)). exec(s(s(s('sd FruitMarket',0),1),0)) :- exec(s(s(s(s('sd FruitMarket',0),1),0),0)). exec(s(s(s(s('sd FruitMarket',0),1),0),0)) :- traceable_send('INFORM','available(fruit(F),price(EuroForKg))', exec(s(s(s(s('sd FruitMarket',0),1),0),1)). ******************** THE PROTOCOL STARTS ******************** Received message: REQUEST availability_and_price(fruit(F)) Checked case guard: s(s(s('sd FruitMarket',0),1),0) no_guard Sent message: INFORM available(fruit(F),price(EuroForKg)) Sent message: PROPOSE buy(fruit(F),price(EuroForKg)) Checked case guard: s(s(s(s(s('sd FruitMarket',0),1),0),2),0) no_guard Received message: REQUEST delivery_modes Sent message: INFORM delivery_mode(ListOfModes) Received message: REQUEST accepted_payment_methods Sent message: INFORM accepted_payment_methods(ListOfMethods) Checked case guard: s(s(s(s(s(s(s('sd FruitMarket',0),1),0),2),0),4),0) no_guard Received message: ACCEPT-PROPOSAL sell(fruit(F), amount(A), payment_method(M), delivery_mode(D)) *********** THE PROTOCOL TERMINATED SUCCESSFULLY ************ Execution in DCaseLP: graphical and textual traces Generated Prolog code Publisher side

4 process( parameters( ontology('FruitMarketOntology'), content_language('first order logic')), protocol_name('sd FruitMarket'), long_name('fs/fruitSeller:fruitSellerClass')), long_name('fb/fruitBuyer:fruitBuyerClass')), main_fragment( seq([ send(msg('REQUEST', 'availability_and_price(fruit(F))')), switch([case(no_guard, seq([receive(msg('INFORM', 'available(fruit(F),')), receive(msg('PROPOSE', 'buy(fruit(F),price(E4Kg))')), exec(s(s('sd FruitMarket',0),1)) :- check_case_guard_passed(s(s(s('sd FruitMarket',0),1),0),no_guard), exec(s(s(s('sd FruitMarket',0),1),0)). exec(s(s(s('sd FruitMarket',0),1),0)) :- exec(s(s(s(s('sd FruitMarket',0),1),0),0)). exec(s(s(s(s('sd FruitMarket',0),1),0),0)) :- traceable_send('INFORM','available(fruit(F),price(EuroForKg))', exec(s(s(s(s('sd FruitMarket',0),1),0),1)). ******************** THE PROTOCOL STARTS ******************** Received message: REQUEST availability_and_price(fruit(F)) Checked case guard: s(s(s('sd FruitMarket',0),1),0) no_guard Sent message: INFORM available(fruit(F) Sent message: PROPOSE buy(fruit(F),price(E4Kg)) Checked case guard: s(s(s(s(s('sd FruitMarket',0),1),0),2),0) no_guard Received message: REQUEST delivery_modes Sent message: INFORM delivery_mode(ListOfModes) Received message: REQUEST accepted_payment_methods Sent message: INFORM accepted_payment_methods(ListOfMethods) Checked case guard: s(s(s(s(s(s(s('sd FruitMarket',0),1),0),2),0),4),0) no_guard Received message: ACCEPT-PROPOSAL sell(fruit(F), amount(A), payment_method(M), delivery_mode(D)) *********** THE PROTOCOL TERMINATED SUCCESSFULLY ************ Execution in DCaseLP


Download ppt "Progetto PRIN: Specifica e verifica di protocolli di interazione fra agenti Viviana Mascardi Alessandria, 29-03-06."

Similar presentations


Ads by Google