programmier- paradigmen im bezug auf modellierung ...ubicomp/projekte/master2013... ·...

27
PROGRAMMIER- PARADIGMEN IM BEZUG AUF MODELLIERUNG NEBENLÄUFIGER SYSTEME Anwendungen 1 Betreuer: Kai v. Luck von Sigurd Sippel Samstag, 30. November 13

Upload: others

Post on 27-Sep-2019

1 views

Category:

Documents


0 download

TRANSCRIPT

PROGRAMMIER-PARADIGMEN IM BEZUG

AUF MODELLIERUNG NEBENLÄUFIGER

SYSTEME Anwendungen 1

Betreuer: Kai v. Luck

von Sigurd Sippel

Samstag, 30. November 13

Motivation

p: x = 0

NEBENLÄUFIGKEIT

2

t1: x = x + 1 t2: x = x + 1

Shared State

t1:read(x) t1:write(x) t2:read(x) t2:write(x)

t1:read(x) t1:write(x)t2:read(x) t2:write(x)

x = 2

x = 1

Samstag, 30. November 13

Motivation

MONOLITH

3

Single Core

One Node

Samstag, 30. November 13

Motivation

VERTEILUNG

4

Single Core Multicore

One Node Netzwerk

Samstag, 30. November 13

Motivation

VERTEILUNG

5

Single Core Multicore

One Node Netzwerk

Manycores

Cloud

Samstag, 30. November 13

Motivation Konzepte

funktionalobjektorientiert

ZWEI WELTEN

6

Shared State

Seperation

Manipulation

Freigabe

Immutable values

Message Passing

Queue

[Nie88]OOPSALA Conference Uni. CH-GenevaSamstag, 30. November 13

Motivation Konzepte

AKTORENMODELL

7

Architekturmuster

[HBS73]

kein shared state Verhalten

Distributed Artificial Intelligence

Planen

Nachricht als Vertrag

autonom

lose Kopplung

Samstag, 30. November 13

Motivation Konzepte

AKTORENMODEL

Mailbox

Aktor

Message Dispatcher

Verhalten def receive = { case Ping => { sender ! Pong } }

8 [Typ13]Samstag, 30. November 13

Motivation Konzepte

AKTOR BEISPIEL

9

m:Magier k:Kobold

Fight(attack)

defense

attack

defense

attack

Samstag, 30. November 13

Motivation Konzepte

AGENT

10

Umwelt

Agent

AktuatorSensor

Samstag, 30. November 13

Motivation Konzepte

Architektur-muster

FIPA

11

Foundation for Intelligent Physical Agents

Standardisierungsgremium

Ressourcen

Nachrichten

[FIP02c]

Modellierung

Samstag, 30. November 13

Motivation Konzepte

ACL

12

Agent Communication Language

Message

Adressat

Absender

Encoding

Value

Interface Description Language

Java Serialisierung XML

[FIP02a]Samstag, 30. November 13

Motivation Konzepte

Statement

RDF

13

Resource Description Framework

XML Resource Property Property value

www.google.de

publishedGoogle Inc.

Turtle

SELECT ?title WHERE{ ?res published ?pub . ?res titled ?title }

titledSearch

title

Search

SPARQL

[CLS01]Samstag, 30. November 13

Motivation Konzepte

FIPA DESIGN PROCESS

14

Deployment

System Requirements

Agent Society

Agent Implementation

RollenbeschreibungOntologie

Analyse und Identifizierung

[FIP02b]

Protokolle

Samstag, 30. November 13

Motivation Konzepte

N(P,T,W,M0)P = {p1}T = {t1, t2, t3}1W = {(t1, p1), (p1, t2)

(p1, t3), (t2, p2), (p2, t3)}

M0(x) = {1: x = p1; 0: sonst}

PETRINETZE

p1

t2 t3

formal beschrieben

15

p2

t1

Samstag, 30. November 13

Motivation Konzepte

HISTORIE

16

Carl Hewitt 1973

Actor Model

Joe Armstrong 1986

Frank Manola, Eric Miller 1997

FIPA 1996

Erlang

RDF

FIPA

Adam Petri 1962

Petri Netze

Samstag, 30. November 13

State of the artMotivation Konzepte

KONFERENZEN

17

6th_ICAART 2014

23th_ICAIJ 2013

20th_ECAIJ 2012

Pieter Spronck Tilburg University

REA Pattern

Andreas HerzogUniversity of Toulouse

MAS Logics

Jacques FerberUniversité de MontpellierSymbolic Layer for Agents

Samstag, 30. November 13

State of the artMotivation Konzepte

GAMEDESIGN

18

Regeln

Umwelt

Akteure

Magier, Kobold

Kobold kann Magier im Wald besiegen

Ein Magier und ein Kobold stehen im Wald

Samstag, 30. November 13

State of the artMotivation Konzepte

REA Pattern

REA PATTERN

19

Resource Entity Action: Generalized Design Pattern for Real Time Strategy Games

Resource Entities Actions

[ADGO+13]

StärkeVerteidung

LebenMaterialKosten

LogicResources

DAG of Entities

Samstag, 30. November 13

State of the artMotivation Konzepte

Target Entity .

Source Entity .

ACTIONS

20

Kobold

Magier

Resources

rt = Waffe(15),Leben(1000)

Resources

rs = Waffe(20),Leben(500)

Regel für den Angriff: Leben‘ = Leben-Waffenstärke

rt‘ = rt + (0,-20) = (15,980)

Samstag, 30. November 13

State of the artMotivation Konzepte Idee

ZIEL

21

+

Modellierung von nebenläufigen, skalierbaren Systemen

Ausführung auf Aktoren

||v

Vereinigung theoretischer und praktischer Konzepte

Anwendung: Gamedesign

Samstag, 30. November 13

QUELLEN

22

[ADGO+13] Abbadi, Mohamed ; Di Giacomo, Francesco ; Orsini, Renzo ; Plaat, Aske ; Spronck, Pieter ; Maggiore, Giuseppe: Resource Entity Action: A Generalized Design Pattern for RTS games. (2013)[CLS01] Candan, K. S. ; Liu, Huan ; Suvarna, Reshma: Resource Description Framework: Metadata and Its Applications. In: SIGKDD Explor. Newsl. 3 (2001), Juli, Nr. 1, 6–19. http://dx.doi.org/10.1145/507533.507536. – DOI 10.1145/507533.507536. – ISSN 1931–0145[FIP02a] FIPA: ACL Message Structure Specification, 2002. http://www.fipa.org/specs/fipa00061/SC00061G.pdf. – Online; Abruf am 17.11.2013[FIP02b] FIPA: Design Process Documentation Template, 2002. http://www.fipa.org/specs/fipa00097/SC00097B.pdf. – Online; Abruf am 17.11.2013[FIP02c] FIPA: FIPA Abstract Architecture Specification, 2002. http://www.fipa.org/specs/fipa00001/SC00001L.pdf. – Online; Abruf am 17.11.2013[HBS73] Hewitt, Carl ; Bishop, Peter ; Steiger, Richard: A universal modular ACTOR formalism for artificial intelligence. In: Proceedings of the 3rd international joint conference on Artificial intelligence. San Francisco, CA, USA : Morgan Kaufmann Publishers Inc., 1973 (IJCAI’73), 235–245[Nie88] Nierstrasz, O. M.: Two Models of Concurrent Objects. In: Proceedings of the 1988 ACM SIGPLAN Workshop on Object-based Concurrent Pro- gramming. New York, NY, USA : ACM, 1988 (OOPSLA/ECOOP ’88). – ISBN 0–89791–304–3, 174–176[Typ13] TypeSafe: Akka Documentation 2.1.1. Online Abruf (04.03.2013) doc.akka.io/docs/akka/2.1.1/Akka.pdf, 2013

Samstag, 30. November 13

Motivation Konzepte

FIPA DESIGN PROCESS

23 [FIP02a]

Process for Agent Societies Specification and Implementation

Samstag, 30. November 13

Motivation Konzepte

PROZESS

24

Wald

r1

MK

r2

MK

K MK

M

MM

Samstag, 30. November 13

PARTITIONIERUNG

25

p1

t1 t2

p1

t1 t2

p1

t1 t2

Samstag, 30. November 13

2: Nodes

PARTITIONIERUNG

26

Node

100 Magier

MagierActor für 50 Magier

Node

MagierActor für 50 Magier

Samstag, 30. November 13

State of the artMotivation Konzepte

THE SYMBOLS

27

A symbolic layer for autonomous component-based software agents

S = {Symbols}

L = {Links}

m: S‘ => S

l : S => {(Sx,Sy)}

i : S => I

< S, l, i, m >

Samstag, 30. November 13