1 / 25

Agent Programming Extensions Relying on a Component-based Platform

Agent Programming Extensions Relying on a Component-based Platform. Christian Vecchiola, Mauro Coccoli, and Antonio Boccalatte (speaker C. Vecchiola). l.i.d.o. – DIST University Of Genova. International Conference on Information Reuse And Integration (IRI 2003) 27-29 October Las Vegas (NV).

jonah-hill
Download Presentation

Agent Programming Extensions Relying on a Component-based Platform

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Agent Programming Extensions Relying on a Component-based Platform Christian Vecchiola, Mauro Coccoli, and Antonio Boccalatte (speaker C. Vecchiola) l.i.d.o. – DIST University Of Genova International Conference on Information Reuse And Integration (IRI 2003) 27-29 October Las Vegas (NV)

  2. Outline • Agent Programming • Agent Programming eXtensions • Comparison • Conclusions • Future Work Agent Programming eXtensions Relying on Component-based platform

  3. Agent Programming [1] • Applied agent programming is often based on the existence of an underlying agent programming framework. • Frameworks are commonly implemented as software packages containing hierarchy of classes. • The object oriented model has proven to be a powerful paradigm to address agent programming. Agent Programming eXtensions Relying on Component-based platform

  4. Agent Programming [2] • Agents and Objects are similar but different: • agents are commonly implemented as self contained, concurrent, autonomous objects; • objects have control over their state, agents needs to control their behavior also. • Agents seems to be a little bit more than objects… Agent Programming eXtensions Relying on Component-based platform

  5. Agent Programming [3] • A sort of infrastructure has to be shaped on top of the object oriented layer, to provide all the features the agents need. • Such infrastructure is normally provided with frameworks and explicit programming patterns. • Different support is given to this aspect in actual agent programming frameworks. Agent Programming eXtensions Relying on Component-based platform

  6. Agent Programming [4] • This support can be given at different levels: • wizards and automation tools: they silently create all the programming patterns needed by the framework, offering to the developer customized templates; • programming language and a tailored compiler: an agent oriented interface is offered to the developer at code level; Agent Programming eXtensions Relying on Component-based platform

  7. Agent Programming eXtensions [1] • Our approach to agent programming is the following: • AgentService: agent programming framework with a full featured class library to develop, implement and manage agents; • Agent Programming eXtensions (APX): bridges the gap between the agent oriented approach and the object oriented back-end. Agent Programming eXtensions Relying on Component-based platform

  8. Agent Programming eXtensions[2] • AgentService: • built on the top of the Common Language Infrastructure; • definition of real autonomous, indipendent and persistent agents; • concurrent execution of agents and their multi-behavior activity; • transactional agent communication by message passing; • wants to be FIPA compliant. Agent Programming eXtensions Relying on Component-based platform

  9. Agent Programming eXtensions [3] • APX: • agent oriented interface at code level; • templates to implement agents and all the components they are made up of; • syntactical structures that leverage the coding phase of the developer; • C# (and Java)–like syntax; • C# grammar for expression and statements; • client of the object oriented model exposed by the Common Language Infrastructure. Agent Programming eXtensions Relying on Component-based platform

  10. Agent Programming eXtensions [4] • The Agent Model: • An agent is designed as a software entity whose state is defined by a particular managed set of data (Knowledge) and whose activities is performed by objects known as Behaviors; • Behaviors interoperate by using the shared data (Knowledge) inside the agent; • An agent turns to be a container that olds data and activities. Agent Programming eXtensions Relying on Component-based platform

  11. Knowledge objects • K1 myKnow1 • K2 myKnow2 Behavior objects - B1 myBehavior1 - B2 myBheavior2 Agent Programming eXtensions [5] agent AgentName { knowledges{ K1 myKnow1; K2 myKnow2; } behaviors{ B1 myBehavior1; B2 myBehavior2; } init{ // agent setup and initialization // mostly C# code … } done{ // agent cleanup and resource release // mostly C# code … } } • The Agent Model (2): AgentTemplate class + Initialize method + Ending method // other methods.. APX provides a more agent oriented interface and hides the underlying object oriented model of the platform. AgentService provides particular classes to implement the previous agent model. It needs an opportune programming pattern to develop a “safe” agent. Agent Programming eXtensions Relying on Component-based platform

  12. Agent Programming eXtensions [6] • APX key elements: • agent template; • knowledge template; • behavior template; • freeze statement. Agent Programming eXtensions Relying on Component-based platform

  13. Agent Programming eXtensions [7] • agent template: • used by programmer to define an agent and compose him with the needed behaviors and knowledges; • designed as a container; • provides blocks where the programmers can configure behaviors with the needed data, and eventually clean-up the agent; • localizes code inside behaviors and fosters code reuse; • hidden inheritance from the AgentService AgentTemplate class type. Agent Programming eXtensions Relying on Component-based platform

  14. Agent Programming eXtensions [8] • knowledge template: • designed as Pascal-like record; • can contain every object accepted by the Common Language Runtime, except pointers; • is the minimum bunch of data that can be handled for thread safe access. • hidden inheritance from the AgentService Knowledge class type. knowledge JobKnowledge { int JobID; System.DateTime ArrivalTime; System.DateTime StartingTime; System.DateTime StoppingTime; MachineType MachineRequestedType; // every CLR object // no pointers!!! // no APX templates!! } Agent Programming eXtensions Relying on Component-based platform

  15. Agent Programming eXtensions [9] • behavior template: • shapes the concept of an agent activity; • really similar to a class (fields, and methods but no inhertance is provided); • has a special block called body that is the entry point for the behavior execution; • silently inherits from the AgentService Behavior class. behavior BehaviorName { knowledges{ K1 myKnow1; K2 myKnow2; } fields{ // every CLR object // no pointers!!! // no APX templates!! } methods{ // methods definition … } body{ // entry point for the behavior execution // start here coding behavior activity … } } Agent Programming eXtensions Relying on Component-based platform

  16. compiler error: variable out scope compiler error: variable out scope Agent Programming eXtensions [10] • freeze statement: • provides a context for a thread-safe access; • explicitly designed for Knowledge type fields; • it is the unique scope where knowledge fields can be addressed. myKnow1.JobID = 7; freeze (myKnow1, ….) { // access here all the myKnow1 fields.. intjobID = myKnow1.JobID; ….. ….. myKnow1.ArrivalTime = arrivalTime; ….. } int j = myKnow1.JobID; Agent Programming eXtensions Relying on Component-based platform

  17. Agent Assembly APX compiler Agent source program templates definition expression & statements C# grammar APX grammar types definition Agent Programming eXtensions [11] • The APX compiler and the CLR Agent Platform AgentService Framework class libraries (C#) CLR Agent Programming eXtensions Relying on Component-based platform

  18. Agent Programming eXtensions [12] Components developed with VC++ .NET, VB.NET, Oberon, Eiffel.NET Agent source program • Interoperability [1] • the APX compiler targets the CLR; • the extensions provided with APX are a full “client” of the object oriented model exposed by the Common Language Infrastructure; • in an agent source program is possible to instantiate and use every object component developed with any other language that targets the CLR. APX compiler Agent Programming eXtensions Relying on Component-based platform Managed assembly

  19. Agent Programming eXtensions [13] Components developed with VC++ .NET, VB.NET, Oberon, Eiffel.NET Agent source program • Interoperability [2] • benefits: • code reuse; • separation of concern; • modularity; • better team organization; • … APX compiler Agent Programming eXtensions Relying on Component-based platform Managed assembly

  20. Comparison [1] • Other research projects have offered an agent oriented interface by means of a programming language: • Agent-0, Agent-K, PLACA extensions; • AgentSpeak(L); • APRIL; • JACK; • APL; Agent Programming eXtensions Relying on Component-based platform

  21. Comparison [2] • JACK and APL are the most similar projects to the Agent Programming eXtensions • JACK: is an agent framework programming that comes with some extensions to the java language and a tailored compiler. Supports the BDI architecture for agents as well as others. • APL: is an agent programming language on top of the Java type system tighly bounded to BDI agent architecture. Does not come with a framework. Agent Programming eXtensions Relying on Component-based platform

  22. Conclusions [1] • The Agent Programming eXtensions offers an agent oriented interface at code level. • There is no need to cast an agent designed solution to an object oriented model during the implementation phase. Agent Programming eXtensions Relying on Component-based platform

  23. Conclusions [2] • Agent Programming eXtensions automates some of the patterns required by the underlying agent framework without worring the developer about this process; • Interoperability among languages hosted in the Common Language Infrastructure offers: • a complete programming environment; • a good separation of concerns among agent oriented features and the other aspects of a software project; Agent Programming eXtensions Relying on Component-based platform

  24. Future Work • Agent Programming eXtensions are still a work in progress.. • Next tasks: • complete integration with the AgentService framework; • complete access to the Common Language Infrastructure type system and services; • new features to come… Agent Programming eXtensions Relying on Component-based platform

  25. Thanks for your attention.. ..questions? Agent Programming eXtensions Relying on Component-based platform

More Related