1 / 46

An Agent-Oriented Programming Language Targeting the Microsoft CLR [AgentService and APX]

An Agent-Oriented Programming Language Targeting the Microsoft CLR [AgentService and APX]. l . i . d . o . DIST - University of Genova. Introduction. speaker: Mauro Coccoli. Outline. The Team Agent Platform Agent Oriented Language Portability Issues

Download Presentation

An Agent-Oriented Programming Language Targeting the Microsoft CLR [AgentService and APX]

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. An Agent-Oriented Programming Language Targeting the Microsoft CLR[AgentService and APX] l. i. d. o. DIST - University of Genova

  2. Introduction speaker: Mauro Coccoli

  3. Outline • The Team • Agent Platform • Agent Oriented Language • Portability Issues http://www.lido.dist.unige.it/ags.asp AgentService

  4. The Team • Mauro Coccoli • Alberto Grosso • Christian Vecchiola • Daniele Marino • Andrea Gozzi • Academic Support by • Prof. A. Boccalatte • Prof. M. Paolucci AgentService

  5. Agent Platform • Runtime Agents • Execution Environments • Class Library AgentService

  6. Agent Language • Object Oriented Paradigm • Agent Oriented Paradigm • Improved Programmability AgentService

  7. Portability Issues • .NET • Mono • Rotor - SSCLI AgentService

  8. AgentServicePlatform speaker: Alberto Grosso

  9. Summary • Agents and MASs • AgentService • Platform Architecture • Agent Model • Runtime Environment AgentService

  10. [1] Agents and MASs • Agent Autonomous entity • Intelligence • Reactivity • Pro-activeness • Multi-behaviour AgentService

  11. [2] Agents and MASs • Multi–agent system Community where agents interact in order to meet their goals • Cooperation • Competition • Negotiation AgentService

  12. [3] Agents and MASs • Agent system applications Problems dealing with distributed and concurrent systems • Electronic commerce and electronic markets • Real time monitoring and management of telecommunication networks • Information handling in information environments like the Internet • Improving the flow of transport traffic • Optimization of industrial manufacturing and production processes AgentService

  13. [4] Agents and MASs • FIPA • The Foundation for Intelligent Physical Agents • FIPA was formed in 1996 to produce software standards for heterogeneous and interacting agents and agent-based systems • The aim is to provide standard strategies for agent communication, referring to industrial and commercial world AgentService

  14. [5] Agents and MASs • What does FIPA standardize? • The platform architecture • Agent communication • Message structure • Message exchange interaction protocols • Content language (ACL) AgentService

  15. [6] Agents and MASs • Agent Programming Frameworks • agent model definition • platform architecture definition • FIPA compliant • agent implementation and scheduling • communication system • services (persistence, white and yellow pages, …) • integration with “non-agent” software and services AgentService

  16. AgentService • Features • Technology • Common Language Infrastructure • Platform • FIPA abstract architecture compliance • Extremely modular and customizable structure AgentService

  17. Core Modules Runtime Environment for Agents Agents FIPA Service Components (Agents) Additional Modules • Agent Management System • - agents management • - scheduling of agent activities • platform services supervision • white pages services • Directory Facilitator • - agents localization • - yellow pages services • Message Transport System • - agent communication • - message dispatching AMS DF MTS AgentService platform Platform Context AgentService - Architecture AgentService

  18. [1] Agent Knowledge objects Behaviour objects Runtime stubs AgentService – Agent Model • Knowledge • Shared data structure • Concurrent access • Deadlock avoidance • Persistence • Behaviour • Agent activity • Concurrent execution • Access to FIPA services • Runtime environment • Exposes platform services • Messaging System, Persistence, Yellow and White Pages, Logging AgentService

  19. [2] AgentService - Agent Model • Agent Implementation • Two different models • Design Time: AgentTemplate • Run Time: Agent • An Agent is created upon an AgentTemplate • The AgentTemplate defines the “type” of the agent • Knowledge Units • Behaviours • The Agent is the run-time container of the AgentTemplate and binds the template to the platform execution environment AgentService

  20. [3] Behaviour + knowledgeList + conversationList + Body() Knowledge - items + this[string] • AgentTemplate • behaviourList • knowledgeList • + Initialize() • + Ending() • + Resume() • + OnIncomingConversation() MyKnowledge - items properties MyBehaviour + knowledgeList + conversationList + Body() + methods 1..* 1..* • MyAgent • behaviourList • knowledgeList • + Initialize() • + Ending() • + Resume() • + OnIncomingConversation() AgentService – Agent Model AgentService

  21. [1] AgentService - Runtime • Agent Scheduling • Each Agent is deployed in a dedicated Application Domain • Application Domain features • intra-process structure • execution boundaries for data and type isolation • lightweight process • security profile • multi-threading AgentService

  22. [2] Agent Instance AgentTemplate Creation of the Application Domain template Knowledge types and default instances Behaviour types and default instances Runtime stub All the assemblies necessary to create agent defined by the template X are retrieved Registration AMS DF MTS User request: create an agent of type X • Upload of assemblies containing: • AgentTemplate type • Knowledge and Behaviour types AgentService - Runtime logging persistence messaging storage AgentService

  23. Agent Service - Conclusions • AgentService • Agent Model • Modular Architecture • Advanced Scheduling System • Work in progress • FIPA ACL • A library of Agent, Knowledge, and Behaviour types ready to use • AOSE methodology • Interaction protocol designer (AUML) AgentService

  24. Agent Programming eXtensions speaker: Christian Vecchiola

  25. Agent Programming eXtensions • AO application development • object-oriented frameworks • framework programming patterns • design to development gap: • agent oriented perspective for design • object oriented perspective for code AgentService

  26. Agent Programming eXtensions • Is OO programming too bad? • ...obviously not: • powerful • general purpose • intuitive • but.... • enhancements to support agent oriented development AgentService

  27. Agent Programming eXtensions • APX • facilities to define and handle new elements related to agent programming • agent, behaviour and knowledge types • a compiler • applies the programming patterns required by AgentService • checks the code AgentService

  28. Agent Programming eXtensions • Is it feasible? • the idea • the new structural elements of APX simplify and speed up the code development • the APX compiler is able to automate many of the task required by AgentService • this is a practice already used in today compilers • using statement implementation • lock statement implementation AgentService

  29. Agent Programming eXtensions • Is it feasible? • the language • only few syntactical and semantical elements have been added • such elements are integrated into an object oriented programming language (C#) • the learning curve is very smooth AgentService

  30. Agent Programming eXtensions • Is it feasible? • the compiler • changes to the compiler are only related to the front-end (scanner, parser, semantic analyzer) • changes and add-on can be applied seamlessly to an already exixsting C# compiler • there are a lot of ready to use and modify C# compilers • SSCLI (aka rotor) csc • Mono mcs • Portable .NET AgentService

  31. Agent Programming eXtensions • Features • AgentService object model • AgentTemplate class • Knowledge class • Behaviour class • APX types • agent template • knowledge template • behaviour template AgentService

  32. AgentTemplate class • Knowledge objects • K1 myKnow1 • K2 myKnow2 Behavior objects - B1 myBehavior1 - B2 myBheavior2 + Initialize method + Ending method + Resume method + OnIncomingConversation method Agent Programming eXtensions • agent template agent AgentName { init{ // definition and creation of knowledge // and behaviour that characterize the agent // agent setup and initialization // mostly C# code … } .... done{ // agent cleanup and resource release // mostly C# code … } } AgentService 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.

  33. Agent Programming eXtensions • knowledge template knowledge JobKnowledge { int JobID; System.DateTime ArrivalTime; System.DateTime StartingTime; System.DateTime StoppingTime; MachineType MachineRequestedType; // every CLR object // no pointers!!! // no APX templates!! } AgentService

  34. compiler error: variable out of scope compiler error: variable out of scope Agent Programming eXtensions • acquire statement myKnow1.JobID = 7; acquire (myKnow1, ….) { // access here all the myKnow1 fields.. intjobID = myKnow1.JobID; ….. ….. myKnow1.ArrivalTime = arrivalTime; ….. } int j = myKnow1.JobID; myKnow1.JobID = 7; // what happens is there is an invocation to a knowledge // property without acquiring a lock? // .... runtime exception try { this.LockKnowledge(myKnow1, ….); // access here all the myKnow1 fields.. intjobID = myKnow1.JobID; ….. ….. myKnow1.ArrivalTime = arrivalTime; ….. } finally { this.ReleaseKnowedge(true); } int j = myKnow1.JobID; AgentService

  35. Agent Programming eXtensions • Implementation • APX was developed by using the SSCLI as codebase • clone of the sscli/clr/src/csharp/csharp tree • modified elements • scanner (introduction of the new tokens) • parser (construction of new nodes in the syntactic tree) • semantic analyzer (new checks added) AgentService

  36. Components developed with VC++ .NET, VB.NET, Oberon, Eiffel.NET Agent source program APX compiler Managed assembly Agent Programming eXtensions CompilerHost Compiler front end lexer: minor changes, recognize new tokens parser: major changes, synthesys of new constructs, additional information added to the nodes APX node builder: parser support: creates node for the AgentService specific types, tags the nodes with additional info semantic analyzer: no changes integration with the new info added to the nodes APX semantic analyzer: performs additional checks to ensure that the code is AgentService compliat intermediate code generator: no changes emitter: no changes AgentService back end

  37. Agent Programming eXtensions DEMO AgentService

  38. Agent Programming eXtensions • Conclusions • APX are a set of programming extensions to the C# language to support agent programming • APX were designed to.. • ..speed up the coding phase • ..deliver useful tool to end user AgentService

  39. Portability Issues speaker: Daniele Marino

  40. Porting of Agent Service Portability Many OSes Why porting AgentService? • CLI: • Virtual Execution • Enviroment • Nowadays: • Strong internetworking AgentService

  41. [1] Pal System.Xml System Interface SDK CLI System Execution Enviroment SDK CLI Compiler, debugger ... System Library PAL .NET 1.0 Rotor & Mono: Overview AgentService

  42. [2] Rotor & Mono: Overview • C# Compilers and environment • Rotor: csc, clix • Mono: mcs, mono • Framework Class Library • Tools for debug and analisys AgentService

  43. Porting Issues • Non standard libraries • System.Xml • Non standard behaviour • System specific path • Path separator symbol (”/” vs “\”) • Path termination character AgentService

  44. [1] Conclusions • Rotor: • .NET 1.0 Framework Supported • Standard library implementations • Lack of GUI development tool AgentService

  45. [2] Conclusions • Mono: • .NET 1.1 Framework Supported • Active developing • Work either on Linux or on OS X AgentService

  46. Thank you for your attention www.lido.dist.unige.it

More Related