SlideShare a Scribd company logo
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, 2012




Tony 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
Plan




           Problem, Hypothesis, Solution.
           LEAP.
           Use-Cases.
           LEAP-based Research Areas




Tony 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
Architectural Complexity




Tony 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
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
The LEAP Tool




Tony 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
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
Syntax Checking




Tony 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
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
State




Tony 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
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,      10 / 44
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
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
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
Simulation 1




Tony 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
Simulation 2




Tony 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
Simulation 3




Tony 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
Simulation 4




Tony 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
Simulation 5




Tony 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
Simulation 6




Tony 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
Simulation 7




Tony 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
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
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
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
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
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, 2012
Tony                                      LEAP A Language for Architecture Design,                 April             25 / 44
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
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
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
State Machines: Execution




Tony 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
State Machines: Execution




Tony 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
State Machines: Execution




Tony 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
State Machines: Execution




Tony 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
State Machines: Execution




Tony 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
State Machines: Execution




Tony 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
State Machines: Execution




Tony 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
State Machines: Execution




Tony 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
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
Communication: Execution




Tony 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
Communication: Execution




Tony 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
GUI: Contacts




Tony 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
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
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
GUI: Execution




Tony 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
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
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

More Related Content

PPT
UML01
PDF
Code gen 09 kiss results
PDF
Blended learning in Software Engineering Education: the Application Lifecycle...
PDF
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
PPTX
Collaborative and Workflow Tools
PPT
Filmstrip testing
PDF
Context Aware Reactive Applications
PDF
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
UML01
Code gen 09 kiss results
Blended learning in Software Engineering Education: the Application Lifecycle...
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
Collaborative and Workflow Tools
Filmstrip testing
Context Aware Reactive Applications
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...

Similar to LEAP A Language for Architecture Design, Simulation and Analysis (20)

PPT
Design Patterns By Sisimon Soman
PDF
UCD Generator (ICIET 2007)
PDF
Lo 03
PPTX
Meta l metacase tools & possibilities
PDF
Planning-Based Approach for Automating Sequence Diagram Generation
DOC
Detailed syllabus
PPTX
Procedural programming
PDF
Building DSLs with the Spoofax Language Workbench
PDF
Automata And Compiler Design
PDF
AADL Overview: Brief and Pointless
PDF
IN4308 1
PDF
Icpads2012 callfor papers
PDF
Software Language Design & Engineering
PPTX
Modelling and Programming: Isn&rsquo;t it all the same?
PPTX
Software engg lect1
PDF
Paper 55 final
PDF
An Introduction to Software Architecture - Summary
PDF
scalaliftoff2009.pdf
PDF
scalaliftoff2009.pdf
PDF
scalaliftoff2009.pdf
Design Patterns By Sisimon Soman
UCD Generator (ICIET 2007)
Lo 03
Meta l metacase tools & possibilities
Planning-Based Approach for Automating Sequence Diagram Generation
Detailed syllabus
Procedural programming
Building DSLs with the Spoofax Language Workbench
Automata And Compiler Design
AADL Overview: Brief and Pointless
IN4308 1
Icpads2012 callfor papers
Software Language Design & Engineering
Modelling and Programming: Isn&rsquo;t it all the same?
Software engg lect1
Paper 55 final
An Introduction to Software Architecture - Summary
scalaliftoff2009.pdf
scalaliftoff2009.pdf
scalaliftoff2009.pdf
Ad

More from ClarkTony (20)

PDF
The Uncertain Enterprise
PDF
Actors for Behavioural Simulation
PDF
Model Slicing
PDF
Patterns 200711
PDF
Kings 120711
PDF
Iswim for testing
PPT
Iswim for testing
PPTX
Kiss at oopsla 09
PPTX
Mcms and ids sig
PPTX
Ocl 09
PPTX
Scam 08
PPTX
Reverse engineering and theory building v3
PDF
Onward presentation.en
PDF
Hcse pres
PPTX
Formalizing homogeneous language embeddings
PPTX
Dsm as theory building
PDF
Dsl overview
PDF
Dsl tutorial
PPTX
Cg 2011
PPTX
Ast 09
The Uncertain Enterprise
Actors for Behavioural Simulation
Model Slicing
Patterns 200711
Kings 120711
Iswim for testing
Iswim for testing
Kiss at oopsla 09
Mcms and ids sig
Ocl 09
Scam 08
Reverse engineering and theory building v3
Onward presentation.en
Hcse pres
Formalizing homogeneous language embeddings
Dsm as theory building
Dsl overview
Dsl tutorial
Cg 2011
Ast 09
Ad

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Machine learning based COVID-19 study performance prediction
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Electronic commerce courselecture one. Pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Machine Learning_overview_presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Assigned Numbers - 2025 - Bluetooth® Document
Cloud computing and distributed systems.
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine learning based COVID-19 study performance prediction
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Per capita expenditure prediction using model stacking based on satellite ima...
The AUB Centre for AI in Media Proposal.docx
Electronic commerce courselecture one. Pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)
Digital-Transformation-Roadmap-for-Companies.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Review of recent advances in non-invasive hemoglobin estimation
Machine Learning_overview_presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Assigned Numbers - 2025 - Bluetooth® Document

LEAP A Language for Architecture Design, Simulation and Analysis

  • 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, 2012 Tony 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. Plan Problem, Hypothesis, Solution. LEAP. Use-Cases. LEAP-based Research Areas Tony 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. Architectural Complexity Tony 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. 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. The LEAP Tool Tony 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. 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. Syntax Checking Tony 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. 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. State Tony 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. 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, 10 / 44
  • 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. 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. 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. Simulation 1 Tony 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. Simulation 2 Tony 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. Simulation 3 Tony 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. Simulation 4 Tony 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. Simulation 5 Tony 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. Simulation 6 Tony 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. Simulation 7 Tony 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. 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. 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. 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. 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. 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, 2012 Tony LEAP A Language for Architecture Design, April 25 / 44
  • 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. 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. 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. State Machines: Execution Tony 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. State Machines: Execution Tony 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. State Machines: Execution Tony 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. State Machines: Execution Tony 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. State Machines: Execution Tony 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. State Machines: Execution Tony 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. State Machines: Execution Tony 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. State Machines: Execution Tony 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. 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. Communication: Execution Tony 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. Communication: Execution Tony 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. GUI: Contacts Tony 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. 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. 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. GUI: Execution Tony 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. 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. 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