Title: An AgentOriented Programming Language Targeting the Microsoft CLR AgentService and APX
1An Agent-Oriented Programming Language Targeting
the Microsoft CLRAgentService and APX
- l . i . d . o .
- DIST - University of Genova
2Introduction
3Outline
- The Team
- Agent Platform
- Agent Oriented Language
- Portability Issues
- http//www.lido.dist.unige.it/ags.asp
4The Team
- Mauro Coccoli
- Alberto Grosso
- Christian Vecchiola
- Daniele Marino
- Andrea Gozzi
- Academic Support by
- Prof. A. Boccalatte
- Prof. M. Paolucci
5Agent Platform
- Runtime Agents
- Execution Environments
- Class Library
6Agent Language
- Object Oriented Paradigm
- Agent Oriented Paradigm
- Improved Programmability
7Portability Issues
8AgentServicePlatform
9Summary
- Agents and MASs
- AgentService
- Platform Architecture
- Agent Model
- Runtime Environment
10Agents and MASs
- Agent
- Autonomous entity
- Intelligence
- Reactivity
- Pro-activeness
- Multi-behaviour
11Agents and MASs
- Multiagent system
- Community where agents interact in order to meet
their goals - Cooperation
- Competition
- Negotiation
12Agents 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
13Agents 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
14Agents and MASs
- What does FIPA standardize?
- The platform architecture
- Agent communication
- Message structure
- Message exchange interaction protocols
- Content language (ACL)
15Agents 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
16AgentService
- Features
- Technology
- Common Language Infrastructure
- Platform
- FIPA abstract architecture compliance
- Extremely modular and customizable structure
17AgentService - Architecture
18AgentService 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
19AgentService - 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
20AgentService Agent Model
21AgentService - 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
22AgentService - Runtime
logging
persistence
messaging
storage
23Agent 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)
24Agent Programming eXtensions
- speaker Christian Vecchiola
25Agent 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
26Agent Programming eXtensions
- Is OO programming too bad?
- ...obviously not
- powerful
- general purpose
- intuitive
- but....
- enhancements to support agent oriented development
27Agent 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
28Agent 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
29Agent 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
30Agent 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
31Agent Programming eXtensions
- Features
- AgentService object model
- AgentTemplate class
- Knowledge class
- Behaviour class
- APX types
- agent template
- knowledge template
- behaviour template
32Agent Programming eXtensions
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
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.
33Agent Programming eXtensions
knowledge JobKnowledge int JobID
System.DateTime ArrivalTime
System.DateTime StartingTime
System.DateTime StoppingTime MachineType
MachineRequestedType // every CLR object
// no pointers!!! // no APX templates!!
34Agent Programming eXtensions
myKnow1.JobID 7 acquire (myKnow1, .)
// access here all the myKnow1 fields.. int
jobID 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.. int
jobID myKnow1.JobID .. ..
myKnow1.ArrivalTime arrivalTime
.. finally this.ReleaseKnowedge(true)
int j myKnow1.JobID
35Agent 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)
36Agent Programming eXtensions
CompilerHost
Compiler
lexer minor changes, recognize new tokens
front end
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
back end
37Agent Programming eXtensions
DEMO
38Agent 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
39Portability Issues
40Why porting AgentService?
- CLI
- Virtual Execution
- Enviroment
- Nowadays
- Strong internetworking
41Rotor Mono Overview
42Rotor Mono Overview
- C Compilers and environment
- Rotor csc, clix
- Mono mcs, mono
- Framework Class Library
- Tools for debug and analisys
43Porting Issues
- Non standard libraries
- System.Xml
- Non standard behaviour
- System specific path
- Path separator symbol (/ vs \)
- Path termination character
44Conclusions
- Rotor
- .NET 1.0 Framework Supported
- Standard library implementations
- Lack of GUI development tool
45Conclusions
- Mono
- .NET 1.1 Framework Supported
- Active developing
- Work either on Linux or on OS X
46Thank you for your attention
www.lido.dist.unige.it