45
LEAP A Language for Architecture Design, Simulation and Analysis Tony Clark 1 , Balbir S. Barn 1 , Samia Oussena 2 1 Middlesex University, London, UK 2 School of Computing, University of West London, UK April 18, 2012 Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) LEAP A Language for Architecture Design, Simulation and Analysis April 18, 2012 1 / 44

LEAP A Language for Architecture Design, Simulation and Analysis

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: LEAP A Language for Architecture Design, Simulation and Analysis

LEAPA Language for Architecture Design, Simulation and

Analysis

Tony Clark1, Balbir S. Barn1, Samia Oussena2

1Middlesex University, London, UK2School of Computing, University of West London, UK

April 18, 2012

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 1 / 44

Page 2: LEAP A Language for Architecture Design, Simulation and Analysis

Plan

Problem, Hypothesis, Solution.

LEAP.

Use-Cases.

LEAP-based Research Areas

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 2 / 44

Page 3: LEAP A Language for Architecture Design, Simulation and Analysis

Architectural Complexity

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 3 / 44

Page 4: LEAP A Language for Architecture Design, Simulation and Analysis

Proposal

Identify the key features:I Components, port, connectors.I Information models, highly structured data.I Specification of behaviour, state machines.I High-level operations, complex where necessary.I Event processing.I Simulation.I Text for definition, diagrams for understanding.

Identify use-cases.

Incrementally extend features as necessary.

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 4 / 44

Page 5: LEAP A Language for Architecture Design, Simulation and Analysis

The LEAP Tool

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 5 / 44

Page 6: LEAP A Language for Architecture Design, Simulation and Analysis

Data Models

component library {

model {

class Reader {

name:str}

class Book {

name:str}

assoc Borrow {

reader:Reader;

book:Book

}

}

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 6 / 44

Page 7: LEAP A Language for Architecture Design, Simulation and Analysis

Syntax Checking

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 7 / 44

Page 8: LEAP A Language for Architecture Design, Simulation and Analysis

Invariants

component library {

model {

class Reader { name:str }

class Book { name:str }

assoc Borrow {

reader:Reader;

book:Book

}

}

invariants {

reader_can_borrow_3_books {

forall Reader(n) in state {

(length([n | Borrow(Reader(n),_) <- state ])) <= 3

}

}

}

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 8 / 44

Page 9: LEAP A Language for Architecture Design, Simulation and Analysis

State

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 9 / 44

Page 10: LEAP A Language for Architecture Design, Simulation and Analysis

State

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 10 / 44

Page 11: LEAP A Language for Architecture Design, Simulation and Analysis

Ports and Interfaces

model {

class Reader { name:str }

class Book { name:str }

assoc Borrow {

reader:Reader;

book:Book

}

}

port manage_readers[in]: interface {

register(r:str):void}

port manage_books[in]: interface {

borrow(r:str, b:str):void}

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 11 / 44

Page 12: LEAP A Language for Architecture Design, Simulation and Analysis

Specifications

component library {

model { // Reader, Book, Borrow...

}

// ports manage_readers, manage_books...

spec {

register(r:str):void {

pre not(Reader(r))post Reader(r)

}

borrow(r:str,b:str):void {

pre Reader(r) Book(b) not(Borrow(_,Book(b)))post Borrow(Reader(r),Book(b))

}

}

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 12 / 44

Page 13: LEAP A Language for Architecture Design, Simulation and Analysis

Operationscomponent library {

model { // Reader, Book, Borrow...

}

// ports manage_readers, manage_books...

operations {

register(r) {

new Reader(r)

}

borrow(r,b) {

find reader=Reader(r) in state {

find book=Book(b) in state {

find Borrow(_,book) in state {

error(’book ’ + b + ’ already borrowed’)

} else new Borrow(reader,book)

} else error(’no book: ’ + b)

} else error(’no reader: ’ + r)

}

}

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 13 / 44

Page 14: LEAP A Language for Architecture Design, Simulation and Analysis

Simulation 1

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 14 / 44

Page 15: LEAP A Language for Architecture Design, Simulation and Analysis

Simulation 2

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 15 / 44

Page 16: LEAP A Language for Architecture Design, Simulation and Analysis

Simulation 3

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 16 / 44

Page 17: LEAP A Language for Architecture Design, Simulation and Analysis

Simulation 4

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 17 / 44

Page 18: LEAP A Language for Architecture Design, Simulation and Analysis

Simulation 5

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 18 / 44

Page 19: LEAP A Language for Architecture Design, Simulation and Analysis

Simulation 6

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 19 / 44

Page 20: LEAP A Language for Architecture Design, Simulation and Analysis

Simulation 7

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 20 / 44

Page 21: LEAP A Language for Architecture Design, Simulation and Analysis

Data Representation

model {

class Faculty {

name:str;schools:[Department]

}

class Department {

name:str;groups:[Group]

}

class Group {

name:str;members:[Staff]

}

class Staff {

name:str;age:int

}

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 21 / 44

Page 22: LEAP A Language for Architecture Design, Simulation and Analysis

Constructing Trees

init {

new Faculty(’Engineering’,[

Department(’Maths’,[

Group(’Pure’,[

Staff(’Dr. Piercemuller’,60),

Staff(’Dr. Eager’,30)

]),

Group(’Applied’,[

Staff(’Prof. Lappin’,57),

Staff(’Mr. Qip’,40)

])

]),

Department(’Computing’,[])

])

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 22 / 44

Page 23: LEAP A Language for Architecture Design, Simulation and Analysis

Comprehensions

operations {

staff_names() {

[ name | Faculty(_,departments) <- state,Department(_,groups) <- departments,

Group(_,staff) <- groups,

Staff(name,_) <- staff ]

}

staff_over(age) {

[ name | Faculty(_,departments) <- state,Department(_,groups) <- departments,

Group(_,staff) <- groups,

Staff(name,staff_age) <- staff,

?(staff_age > age) ]

}

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 23 / 44

Page 24: LEAP A Language for Architecture Design, Simulation and Analysis

Recursive Functions

operations {

staff_names() {

letrec get_names =

fun(data)case data {

[] -> [];

h:t -> (get_names(h))+get_names(t);

Faculty(_,departments) -> get_names(departments);

Department(_,groups) -> get_names(groups);

Group(_,staff) -> get_names(staff);

Staff(name,_) -> [name]

}

in get_names(state)}

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 24 / 44

Page 25: LEAP A Language for Architecture Design, Simulation and Analysis

Rulescomponent order_processing {

port authorization[in]: interface {

finance(id:int):void;manager(id:int):void;procurement(id:int):void

}

port dispatch[out]: interface {

order(id:int):void}

operations {

finance(id) { new Finance(id) }

manager(id) { new Manager(id) }

procurement(id) { new Procurement(id) }

}

rules {

order: Finance(id) Manager(id) Procurement(id) {

dispatch <- order(id)

}

}

}Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 25 / 44

Page 26: LEAP A Language for Architecture Design, Simulation and Analysis

State Machines: Messagesport authorization[in]: interface {

// Messages are received when specific

// authorization is received. The order

// id is supplied...

finance(id:int):void;manager(id:int):void;procurement(id:int):void;complete(id:int):void;reset():void

}

port dispatch[out]: interface {

// Sent to the output port when the

// order is complete...

order(id:int):void}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 26 / 44

Page 27: LEAP A Language for Architecture Design, Simulation and Analysis

State Machines: Types

machine(Start:start) {

// Types are used to define states.

// Types may be named and then used in

// the rest of the machine...

type start = Start

type finance = Finance(int)type manager = Manager(int)type procurement = Procurement(int)type end = End(int)

// Transitions...

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 27 / 44

Page 28: LEAP A Language for Architecture Design, Simulation and Analysis

State Machines: Transitionsmachine(Start:start) {

// (finance

// (manager procurement + procurement manager)

// complete reset)*

go:start->finance

finance(i) Start->Finance(i);

multiple_finance:finance->finance

finance(i) Finance(i)->Finance(i);

got_manager:finance->manager

manager(i) Finance(i)->Manager(i);

got_procurement:finance->procurement

procurement(i) Finance(i)->Procurement(i);

end1:manager->end

complete(i) Manager(i) -> End(i) { dispatch <- order(i) }

end2:procurement->end

complete(i) Procurement(i) -> End(i) { dispatch <- order(i) }

reset:end->start

reset End(i) -> Start;

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 28 / 44

Page 29: LEAP A Language for Architecture Design, Simulation and Analysis

State Machines: Execution

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 29 / 44

Page 30: LEAP A Language for Architecture Design, Simulation and Analysis

State Machines: Execution

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 30 / 44

Page 31: LEAP A Language for Architecture Design, Simulation and Analysis

State Machines: Execution

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 31 / 44

Page 32: LEAP A Language for Architecture Design, Simulation and Analysis

State Machines: Execution

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 32 / 44

Page 33: LEAP A Language for Architecture Design, Simulation and Analysis

State Machines: Execution

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 33 / 44

Page 34: LEAP A Language for Architecture Design, Simulation and Analysis

State Machines: Execution

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 34 / 44

Page 35: LEAP A Language for Architecture Design, Simulation and Analysis

State Machines: Execution

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 35 / 44

Page 36: LEAP A Language for Architecture Design, Simulation and Analysis

State Machines: Execution

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 36 / 44

Page 37: LEAP A Language for Architecture Design, Simulation and Analysis

Communication: Definitioncomponent container {

component sender {

port output[out]: interface {

m():void}

init { output <- m() }

}

component receiver {

port input[in]: interface {

m():void}

machine(0:int) {

t:int->int m 0->0 {

print(’RECEIVED MESSAGE’)

}

}

}

init {

connect(sender.output,receiver.input)

}

}Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 37 / 44

Page 38: LEAP A Language for Architecture Design, Simulation and Analysis

Communication: Execution

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 38 / 44

Page 39: LEAP A Language for Architecture Design, Simulation and Analysis

Communication: Execution

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 39 / 44

Page 40: LEAP A Language for Architecture Design, Simulation and Analysis

GUI: Contacts

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 40 / 44

Page 41: LEAP A Language for Architecture Design, Simulation and Analysis

Manager

component manager {

// Ports changed and manage...

operations {

add(n) {

new Contact(n);

changed <- show([name | Contact(name) <- state])}

remove(n) {

delete Contact(n);

changed <- show([name | Contact(name) <- state])}

}

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 41 / 44

Page 42: LEAP A Language for Architecture Design, Simulation and Analysis

GUI

component gui {

display = jcomponent(’frames.GUI’)

// Ports manage and update...

add_button = Button(’add’,fun(e) manage <- add(e.contact))

operations {

show(data) {

display.in <- display(

Table(

[[Text(n),delete_button(n)] | n <- data] +

[[Input(’contact’,’’,10),add_button]]

))

}

delete_button(name) {

Button(’delete’,fun(e) manage <- remove(n))

}

}

}

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 42 / 44

Page 43: LEAP A Language for Architecture Design, Simulation and Analysis

GUI: Execution

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 43 / 44

Page 44: LEAP A Language for Architecture Design, Simulation and Analysis

Use Cases and Research Areas

Simulation.

Refinement.

Alignment.

Goal modelling and goal modelling.

Analysis of non-functional properties:I Cost.I Performance.I Security.

Architectural Patterns.

Product Lines and Configuration.

Slicing.

Testing.

Publications: [3, 1, 2, 4], InfoSys SETLAB Briefings, WAMBSEWorkshop. ICSoft alignment paper submitted.

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 44 / 44

Page 45: LEAP A Language for Architecture Design, Simulation and Analysis

T. Clark, B.S. Barn, and S. Oussena.Leap: a precise lightweight framework for enterprise architecture.In Proceedings of the 4th India Software Engineering Conference,pages 85–94. ACM, 2011.

Tony Clark and Balbir S. Barn.Event driven architecture modelling and simulation.In SOSE, pages 43–54, 2011.

Tony Clark and Balbir S. Barn.A common basis for modelling service-oriented and event-drivenarchitectures.In 5th India Software Engineering Conference, IIT Kanpur, ISEC 12,2012.

Tony Clark, Balbir S. Barn, and Samia Oussena.A method for enterprise architecture alignment.In PRET at CAISE 2011, 2012.

Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere)LEAP A Language for Architecture Design, Simulation and AnalysisApril 18, 2012 44 / 44