LEAP A Language for Architecture Design, Simulation and Analysis

676 views

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
676
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

LEAP A Language for Architecture Design, Simulation and Analysis

  1. 1. LEAP A Language for Architecture Design, Simulation and Analysis Tony Clark1 , Balbir S. Barn1 , Samia Oussena2 1 Middlesex University, London, UK 2 School of Computing, University of West London, UK April 18, 2012Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 18, 2012 LEAP A Language for Architecture Design, April 1 / 44
  2. 2. Plan Problem, Hypothesis, Solution. LEAP. Use-Cases. LEAP-based Research AreasTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 18, 2012 LEAP A Language for Architecture Design, April 2 / 44
  3. 3. Architectural ComplexityTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 18, 2012 LEAP A Language for Architecture Design, April 3 / 44
  4. 4. Proposal Identify the key features: Components, port, connectors. Information models, highly structured data. Specification of behaviour, state machines. High-level operations, complex where necessary. Event processing. Simulation. 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) Simulation and Analysis 18, 2012 LEAP A Language for Architecture Design, April 4 / 44
  5. 5. The LEAP ToolTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 18, 2012 LEAP A Language for Architecture Design, April 5 / 44
  6. 6. 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) Simulation and Analysis 18, 2012 LEAP A Language for Architecture Design, April 6 / 44
  7. 7. Syntax CheckingTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 18, 2012 LEAP A Language for Architecture Design, April 7 / 44
  8. 8. 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) Simulation and Analysis 18, 2012 LEAP A Language for Architecture Design, April 8 / 44
  9. 9. StateTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 18, 2012 LEAP A Language for Architecture Design, April 9 / 44
  10. 10. StateTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 10 / 44
  11. 11. 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 11 / 44
  12. 12. 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 12 / 44
  13. 13. Operations component 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 13 / 44
  14. 14. Simulation 1Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 14 / 44
  15. 15. Simulation 2Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 15 / 44
  16. 16. Simulation 3Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 16 / 44
  17. 17. Simulation 4Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 17 / 44
  18. 18. Simulation 5Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 18 / 44
  19. 19. Simulation 6Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 19 / 44
  20. 20. Simulation 7Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 20 / 44
  21. 21. 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 21 / 44
  22. 22. 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 22 / 44
  23. 23. 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 23 / 44
  24. 24. 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 24 / 44
  25. 25. Rules component 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) } } }Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis18, 2012Tony LEAP A Language for Architecture Design, April 25 / 44
  26. 26. State Machines: Messages port 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 26 / 44
  27. 27. 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 27 / 44
  28. 28. State Machines: Transitions machine(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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 28 / 44
  29. 29. State Machines: ExecutionTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 29 / 44
  30. 30. State Machines: ExecutionTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 30 / 44
  31. 31. State Machines: ExecutionTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 31 / 44
  32. 32. State Machines: ExecutionTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 32 / 44
  33. 33. State Machines: ExecutionTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 33 / 44
  34. 34. State Machines: ExecutionTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 34 / 44
  35. 35. State Machines: ExecutionTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 35 / 44
  36. 36. State Machines: ExecutionTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 36 / 44
  37. 37. Communication: Definition component 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 37 / 44
  38. 38. Communication: ExecutionTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 38 / 44
  39. 39. Communication: ExecutionTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 39 / 44
  40. 40. GUI: ContactsTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 40 / 44
  41. 41. 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 41 / 44
  42. 42. 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 42 / 44
  43. 43. GUI: ExecutionTony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 43 / 44
  44. 44. Use Cases and Research Areas Simulation. Refinement. Alignment. Goal modelling and goal modelling. Analysis of non-functional properties: Cost. Performance. Security. Architectural Patterns. Product Lines and Configuration. Slicing. Testing. Publications: [3, 1, 2, 4], InfoSys SETLAB Briefings, WAMBSE Workshop. ICSoft alignment paper submitted.Tony Clark, Balbir S. Barn, Samia Oussena (Universities of Somewhere and Elsewhere) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 44 / 44
  45. 45. 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-driven architectures. 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) Simulation and Analysis 2012 LEAP A Language for Architecture Design, April 18, 44 / 44

×