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, 29-03-06

2 Publisher side

3 process( parameters( ontology('FruitMarketOntology'), content_language('first order logic')), protocol_name('sd FruitMarket'), agent_publisher(short_name('fruitSeller@klimt:1099/JADE'), long_name('fs/fruitSeller:fruitSellerClass')), agent_reader(short_name('fruitBuyer@klimt:1099/JADE'), 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))', 'fruitBuyer@klimt:1099/JADE'), 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))', 'fruitBuyer@klimt:1099/JADE'), exec(s(s(s(s('sd FruitMarket',0),1),0),1)). ******************** THE PROTOCOL STARTS ******************** Received message: REQUEST availability_and_price(fruit(F)) fruitBuyer@klimt:1099/JADE Checked case guard: s(s(s('sd FruitMarket',0),1),0) no_guard Sent message: INFORM available(fruit(F),price(EuroForKg)) fruitBuyer@klimt:1099/JADE Sent message: PROPOSE buy(fruit(F),price(EuroForKg)) fruitBuyer@klimt:1099/JADE Checked case guard: s(s(s(s(s('sd FruitMarket',0),1),0),2),0) no_guard Received message: REQUEST delivery_modes fruitBuyer@klimt:1099/JADE Sent message: INFORM delivery_mode(ListOfModes) fruitBuyer@klimt:1099/JADE Received message: REQUEST accepted_payment_methods fruitBuyer@klimt:1099/JADE Sent message: INFORM accepted_payment_methods(ListOfMethods) fruitBuyer@klimt:1099/JADE 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)) fruitBuyer@klimt:1099/JADE *********** 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'), agent_publisher(short_name('fruitSeller@klimt:1099/JADE'), long_name('fs/fruitSeller:fruitSellerClass')), agent_reader(short_name('fruitBuyer@klimt:1099/JADE'), 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))', 'fruitBuyer@klimt:1099/JADE'), exec(s(s(s(s('sd FruitMarket',0),1),0),1)). ******************** THE PROTOCOL STARTS ******************** Received message: REQUEST availability_and_price(fruit(F)) fruitBuyer@klimt:1099/JADE Checked case guard: s(s(s('sd FruitMarket',0),1),0) no_guard Sent message: INFORM available(fruit(F) fruitBuyer@klimt:1099/JADE Sent message: PROPOSE buy(fruit(F),price(E4Kg)) fruitBuyer@klimt:1099/JADE Checked case guard: s(s(s(s(s('sd FruitMarket',0),1),0),2),0) no_guard Received message: REQUEST delivery_modes fruitBuyer@klimt:1099/JADE Sent message: INFORM delivery_mode(ListOfModes) fruitBuyer@klimt:1099/JADE Received message: REQUEST accepted_payment_methods fruitBuyer@klimt:1099/JADE Sent message: INFORM accepted_payment_methods(ListOfMethods) fruitBuyer@klimt:1099/JADE 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)) fruitBuyer@klimt:1099/JADE *********** THE PROTOCOL TERMINATED SUCCESSFULLY ************ Execution in DCaseLP { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/10/2727586/slides/slide_4.jpg", "name": "process( parameters( ontology( FruitMarketOntology ), content_language( first order logic )), protocol_name( sd FruitMarket ), agent_publisher(short_name( fruitSeller@klimt:1099/JADE ), long_name( fs/fruitSeller:fruitSellerClass )), agent_reader(short_name( fruitBuyer@klimt:1099/JADE ), 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)).", "description": "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)) , fruitBuyer@klimt:1099/JADE ), exec(s(s(s(s( sd FruitMarket ,0),1),0),1)). ******************** THE PROTOCOL STARTS ******************** Received message: REQUEST availability_and_price(fruit(F)) fruitBuyer@klimt:1099/JADE Checked case guard: s(s(s( sd FruitMarket ,0),1),0) no_guard Sent message: INFORM available(fruit(F) fruitBuyer@klimt:1099/JADE Sent message: PROPOSE buy(fruit(F),price(E4Kg)) fruitBuyer@klimt:1099/JADE Checked case guard: s(s(s(s(s( sd FruitMarket ,0),1),0),2),0) no_guard Received message: REQUEST delivery_modes fruitBuyer@klimt:1099/JADE Sent message: INFORM delivery_mode(ListOfModes) fruitBuyer@klimt:1099/JADE Received message: REQUEST accepted_payment_methods fruitBuyer@klimt:1099/JADE Sent message: INFORM accepted_payment_methods(ListOfMethods) fruitBuyer@klimt:1099/JADE 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)) fruitBuyer@klimt:1099/JADE *********** 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