An Evolutional Cooperative Computation Based on Adaptation to Environment

33
An Evolutional Cooperative Computation Based on Adaptati on to Environment Naoyasu UBAYASHI and Tetsuo TAMAI Graduate School of Arts and Sciences University of Tokyo APSEC’99

description

APSEC’99. An Evolutional Cooperative Computation Based on Adaptation to Environment. Naoyasu UBAYASHI and Tetsuo TAMAI Graduate School of Arts and Sciences University of Tokyo. Overview. 1. Introduction 2. Environment Adaptation Model 3. Advanced topics - PowerPoint PPT Presentation

Transcript of An Evolutional Cooperative Computation Based on Adaptation to Environment

Page 1: An Evolutional Cooperative Computation Based on Adaptation to Environment

An Evolutional   Cooperative Computation Based on Adaptation to Environment

Naoyasu UBAYASHI and Tetsuo TAMAI

Graduate School of Arts and Sciences

University of Tokyo

APSEC’99

Page 2: An Evolutional Cooperative Computation Based on Adaptation to Environment

Overview

1. Introduction

2. Environment Adaptation Model

3. Advanced topics

using Environment Adaptation Model

4. Related Works

5. Conclusion

Page 3: An Evolutional Cooperative Computation Based on Adaptation to Environment

Introduction

Page 4: An Evolutional Cooperative Computation Based on Adaptation to Environment

BackgroundRecently, software systems that reside in network environments are spreading rapidly. These systems has properties such asdistributed, mobile, dynamic, adaptable.

*These kinds of software systems are composed of a number of   distributed objects that may change their locations dynamically.

*These objects change their functions dynamically to adapt themselves to their external environments.

Constructions of these kinds of systems are considered as very hard and difficult works.

Page 5: An Evolutional Cooperative Computation Based on Adaptation to Environment

Illustration ofRecent software systems

object

object

object

collaboration

Page 6: An Evolutional Cooperative Computation Based on Adaptation to Environment

Problems

It is difficult to describe functions that are dispersed in a number ofdistributed objects in current object oriented programming languages.These functions are implemented by collaborations among objects. -- not implemented by a single object!

gives abstraction mechanisms for collaborations

It is difficult to describe dynamic evolution in current object orientedprogramming languages.

gives abstraction mechanisms for evolution

Page 7: An Evolutional Cooperative Computation Based on Adaptation to Environment

Target (1)

Presents a framework that an object evolves through collaborations.

an object acquires or discards functions andattributes dynamically

Collaborations

a number of objects engaging in their own roles send messagesto each other and perform a job that cannot be executedby a single object

Evolution

Page 8: An Evolutional Cooperative Computation Based on Adaptation to Environment

Target (2)

gives

mechanisms for abstracting collaborations among objectsmechanisms for creating collaboration partsmechanisms for synthesizing collaboration partsmechanisms for object evolutionmechanisms for integrating collaborations with evolution

Page 9: An Evolutional Cooperative Computation Based on Adaptation to Environment

Environment Adaptation Model

Page 10: An Evolutional Cooperative Computation Based on Adaptation to Environment

Basic Concepts

role

environment

role

environment

(collaboration filed)

bindunbind

object object object

Multipleadaptation

Page 11: An Evolutional Cooperative Computation Based on Adaptation to Environment

Model Constructs (1)

Environment

- logical field where a group of objects collaborate with each other- composed of environment methods/attributes, role definitions- aims 1) to give name space 2) to give common methods/attributes 3) to coordinate behaviors of objects in the field 4) to define object behaviors that are available only in the field >> roles

Role

- composed of role methods/attributes

Page 12: An Evolutional Cooperative Computation Based on Adaptation to Environment

Model Constructs (2)

Evolution

- an object joins into an environment and acquires new collaboration functions by bind-operations.

the object can collaborate with otherobjects in the environment

role

environment

bind

object

object

Bind-operation

messagedelegation

- creates a message delegation path between an object and a role.

Page 13: An Evolutional Cooperative Computation Based on Adaptation to Environment

Merits

1) gives mechanisms that encapsulate collaboration descriptions among objects into environments and roles.

* design methods that abstract collaborations* techniques that construct reusable collaboration components

2) gives evolution mechanisms.

* design methods for distributed mobile agent systems -- agents need to change their functions dynamically in order to adapt themselves to their environments.

Page 14: An Evolutional Cooperative Computation Based on Adaptation to Environment

Example -- Contract Net Protocol

(1) task-announcement(2) bid(3) award

Role methods

Role ( manager)

Role(contractor)

(1)(3)

(2)

Environment ( contract-net)

Evolve to manager

(bind-operation)

object

Environment ( contract-net)

Evolve to contractor

General contract net protocol

Synthesizing simple contract-net environments

Page 15: An Evolutional Cooperative Computation Based on Adaptation to Environment

Programming Language Epsilon/0

1) Epsilon/0 supports Environment Adaptation Model. - environments, roles and bind-operations are supported as language constructs.

2) Epsilon/0 supports reflection mechanisms.

3) Epsilon/0 is implemented using ABCL/R3 that is a reflective object oriented programming language based on Scheme.

Page 16: An Evolutional Cooperative Computation Based on Adaptation to Environment

Descriptions of Contract Net Protocolin Epsilon/0

<< Environment >> contract-net

<< Role >> manager

start()bid()

<< Role >> contractor

task-announcement()award()execute-task()

manager

contractor

contractor

contractor

object

task-announcement

bid

award

bindexecute-task(delegate!!)

Page 17: An Evolutional Cooperative Computation Based on Adaptation to Environment

(define-context contract-net ()   … common attributes)

(define-context-method contract-net (common method….))

Descriptions of contract-net environment

Environment class

Page 18: An Evolutional Cooperative Computation Based on Adaptation to Environment

(define-role contract-net manager () condition-shown-by-manager)

(define-role-method contract-net manager (start self) (let ((contractor-list (get-role (context-of self) ‘contractor)))  ... broadcasts a task-announcement message to all roles that are contained in the contractor-list))

(define-role-method contract-net manager (bid self a-contractor a-condition-shown-by-contractor) ... stores a bid-information (if (bidding is finished) (award (select-contractor self) self)))

Descriptions of manager role

Role class

Page 19: An Evolutional Cooperative Computation Based on Adaptation to Environment

Descriptions of contractor role

(define-role contract-net contractor () condition-shown-by-contractor)

(define-role-method contract-net contractor (task-announcement self a-manager a-condition-shown-by-manager) (if satisfies conditions) (bid a-manager self condition-shown-by-contractor)))

(define-role-method contract-net contractor (award self a-manager) (execute-task self))

1) execute a method of an object bound with this role2) execute-task is interface for binding with an object

Page 20: An Evolutional Cooperative Computation Based on Adaptation to Environment

Execute a program(define contract-A (make-context contract-net))(define contract-B (make-context contract-net))

(define-class person () name)(define-method person (execute-task …))(define a-person (make person))

;; evolves to manager(bind contract-A a-person (make-role contract-net manager contract-A))(start (search-role a-person contract-A))

;; evolves to contractor(bind contract-B a-person (make-role contract-net contractor contract-B))(start (search-role a-person contract-B))

behaves different roles

contract-A

contract-B

evolvesto manager

evolvesto contractor

Page 21: An Evolutional Cooperative Computation Based on Adaptation to Environment

Advanced topics using Environment Adaptation Model

Page 22: An Evolutional Cooperative Computation Based on Adaptation to Environment

Advanced topics

1) Autonomous evolution using reflection mechanisms

2) Reusable collaboration components

Environment Adaptation Model presents nice features for software constructions

Page 23: An Evolutional Cooperative Computation Based on Adaptation to Environment

Autonomous Evolution

evolution

evolution

Contract-net protocolenvironment

manager

contractor

Nancy John

Steve

Contract-net protocolenvironment

manager

Page 24: An Evolutional Cooperative Computation Based on Adaptation to Environment

Reflective Architecture

objectobject

Meta object Meta object Meta object

Each object can have its own engine

Meta level

Base level

Engine of autonomous action(replaceable)

Engine of autonomous action(replaceable)

Engine of autonomous action(replaceable)

object

Action strategies --- plans for environment adaptations

Page 25: An Evolutional Cooperative Computation Based on Adaptation to Environment

Reusable Collaboration ComponentConstruction Mechanism (1)

*It is difficult to abstract execution information such as number/kind/reference of objects that participate in collaborations.*This information changes dynamically and cannot be defined statically.

Problems ...

Page 26: An Evolutional Cooperative Computation Based on Adaptation to Environment

Reusable Collaboration ComponentConstruction Mechanism (2)

Abstracts execution informationusing refection mechanisms

get-all-contextget-all-contextnamecontext-ofget-roleget-all-roleget-all-rolenamebound?

Metainformationenvironment

Metainformation

role

rolemethod

access

Collaboration field

Name space

Presentsbuilt-in functions

Page 27: An Evolutional Cooperative Computation Based on Adaptation to Environment

Related Works

Page 28: An Evolutional Cooperative Computation Based on Adaptation to Environment

Related Works

Researches for abstracting collaborations

1) Aspect Oriented Programming (G.Kiczales, et al.) propose a programming paradigm that a system is divided into a number of aspects.

2) Role based design method (M.VanHilst, D.Notkin 1996) propose an idea of role components that are described by C++ templates.

3) Coordinated Roles (Juan M.Murillo, et al. 1999)

* Dynamic evolution is not so emphasized.

Page 29: An Evolutional Cooperative Computation Based on Adaptation to Environment

Conclusion

Page 30: An Evolutional Cooperative Computation Based on Adaptation to Environment

Summary

We proposed

mechanisms for abstracting collaborations among objectsmechanisms for creating collaboration partsmechanisms for synthesizing collaboration partsmechanisms for object evolutionmechanisms for integrating collaborations with evolution

Page 31: An Evolutional Cooperative Computation Based on Adaptation to Environment

Future Works

applies environment adaptation model

to distributed mobile agent systems to familiar languages such as Java ...

Page 32: An Evolutional Cooperative Computation Based on Adaptation to Environment

Base Level Descriptions

;; Class definition(define-class person () name money)(define-method person (execute-task self) ...)(define-method person (life self job) (meta-life (meta-of self) job))

;; Start autonomous actions(define taro (make person :name "Taro Yamada" :metaobject-creator make-taro-meta))

(life taro a-job)Specifies meta object

Calls meta object

Page 33: An Evolutional Cooperative Computation Based on Adaptation to Environment

Meta Level Description

;; Descriptions for adaptation strategies(meta (define-class taro-meta (metaobject)) (define (make-taro-meta class slots evaluator options) (make taro-meta :class class :slots slots :evaluator evaluator :lock (make-lock)))

(define-method john-meta (meta-life self job) (future-to-base ... divides a job into a number of sub-tasks. ... repeats the following activities. (let ((env (get-all-context))) (begin ... searches contract-net environments where he can join as a manager. (bind selected-contract-net (den-of self) selected-manager) (start (search-role (den-of self) selected-contract-net))))))

1) Searches target environments2) Searches target roles that exist in the selected environment 3) Binds itself with the selected role ( evolution ! )

Design Pattern

If this part is changed, a number of adaptation strategies can be implemented! !

Open Implementations