SlideShare uma empresa Scribd logo
1 de 57
Baixar para ler offline
CARA Applications
                                            Modelling
                                    Case Study Model
                                         Other Issues




     Model Driven Context Aware Reactive Applications

          Tony Clark (with Dean Kramer and Samia Oussena, UWL)

              School of Engineering and Information Sciences, Middlesex University


                                          October 5, 2011




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Contents

    1   CARA Applications
          Definitions
          Research
          Case Study
    2   Modelling
         Diagrams
         Widget Calculus
    3   Case Study Model
    4   Other Issues
          Types
          Implementation

Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Context Aware Reactive Applications

           Context aware applications are: intelligent applications
           that can monitor the user’s context and, in case of
           changes in this context, consequently adapt their
           behaviour in order to satisfy the user’s current needs or
           anticipate the user’s intentions.
    L.M. Daniele, E. Silva, L.F. Pires, and M. Sinderen. A SOA-based Platform-
    specfic Framework for Context-Aware Mobile Applications. Enterprise
    Interoperability, 2009.
           Reactive applications must deal with events that are
           received from their environment and react accordingly.
    D. Harel and A. Pnueli. On the development of reactive systems. Weizmann
    Institute of Science, Dept. of Computer Science, 1985.

Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


The Rise of CARA




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


The Rise of CARA




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


The Rise of CARA




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Model Driven Development



           Use models as the primary system artifact.
           Focus on key aspects of systems.
           Use standards to support interoperability and tools.
           Use meta-modelling to construct domain-specific abstractions.
           Analyse, verify and validate the models.
           Generate (parts of) the system from models.




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Knowledge Connext and KTP




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Knowledge Connext and KTP




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Problem and Proposal




           MDD should be available for CARA applications - right?




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Problem and Proposal




           MDD should be available for CARA applications - right?
           Some attempts:




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Problem and Proposal




           MDD should be available for CARA applications - right?
           Some attempts:
                  Complex or tool specific.




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Problem and Proposal




           MDD should be available for CARA applications - right?
           Some attempts:
                  Complex or tool specific.
                  Incomplete, lacks execution.




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Problem and Proposal




           MDD should be available for CARA applications - right?
           Some attempts:
                  Complex or tool specific.
                  Incomplete, lacks execution.
           Can we design a simple, universal MDD solution?




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


CARA Overview




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Buddy
           Mobile phones have address lists.




    L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach
    for Behaviour Modelling of Context-aware Mobile Applications. In Model
    Driven Architecture-Foundations and Applications. Springer, 2009.
Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Buddy
           Mobile phones have address lists.
           A phone is always in contact with its network provider.




    L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach
    for Behaviour Modelling of Context-aware Mobile Applications. In Model
    Driven Architecture-Foundations and Applications. Springer, 2009.
Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Buddy
           Mobile phones have address lists.
           A phone is always in contact with its network provider.
           Each phone has a unique address, e.g. tony@widget.org.




    L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach
    for Behaviour Modelling of Context-aware Mobile Applications. In Model
    Driven Architecture-Foundations and Applications. Springer, 2009.
Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Buddy
           Mobile phones have address lists.
           A phone is always in contact with its network provider.
           Each phone has a unique address, e.g. tony@widget.org.
           Each phone maintains a database of contacts.




    L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach
    for Behaviour Modelling of Context-aware Mobile Applications. In Model
    Driven Architecture-Foundations and Applications. Springer, 2009.
Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Buddy
           Mobile phones have address lists.
           A phone is always in contact with its network provider.
           Each phone has a unique address, e.g. tony@widget.org.
           Each phone maintains a database of contacts.
           Users want to know about contacts in their database that are
           co-located.




    L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach
    for Behaviour Modelling of Context-aware Mobile Applications. In Model
    Driven Architecture-Foundations and Applications. Springer, 2009.
Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Buddy
           Mobile phones have address lists.
           A phone is always in contact with its network provider.
           Each phone has a unique address, e.g. tony@widget.org.
           Each phone maintains a database of contacts.
           Users want to know about contacts in their database that are
           co-located.
           When one phone moves into the vicinity of the other then
           both phones are told of the availability of the other in terms
           of the contact address.



    L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach
    for Behaviour Modelling of Context-aware Mobile Applications. In Model
    Driven Architecture-Foundations and Applications. Springer, 2009.
Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Buddy
           Mobile phones have address lists.
           A phone is always in contact with its network provider.
           Each phone has a unique address, e.g. tony@widget.org.
           Each phone maintains a database of contacts.
           Users want to know about contacts in their database that are
           co-located.
           When one phone moves into the vicinity of the other then
           both phones are told of the availability of the other in terms
           of the contact address.
           If the address is in the user’s database then the phone flashes
           the contact.
    L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach
    for Behaviour Modelling of Context-aware Mobile Applications. In Model
    Driven Architecture-Foundations and Applications. Springer, 2009.
Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Tony’s Phone




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Tony Knows Sally




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                                        Definitions
                                            Modelling
                                                        Research
                                    Case Study Model
                                                        Case Study
                                         Other Issues


Context Aware




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Contents

    1   CARA Applications
          Definitions
          Research
          Case Study
    2   Modelling
         Diagrams
         Widget Calculus
    3   Case Study Model
    4   Other Issues
          Types
          Implementation

Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Domain Analysis


       GUI Trees GUI elements are organized in trees.
            Events Elements generate events and listeners handle them.
         Platform Each platform provides a different collection of event
                  generators.
    Object-Orientation Implementation technologies are mostly OO.
    Transitional Behaviour Application execute by performing state
                  transitions.
    Data Persistence Applications manage simple databases.
    Static Typing Generally lacked by most implementation
                 technologies for platforms.


Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


UML Profile



    <<external>> Application components supplied by platform.
    <<widget>> User defined components, tree-shaped.
    Containership Associations, black-diamond.
               Root Root containers define application states.
     <<event>> Generated by the platform, context events.
    <<handler>> Process events.
        Machines State transitions.




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Single Button Model




                     c o n t e x t Push i n v :
                        label = ’ PUSHME ’

Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Toggle Button Model




        c o n t e x t Main1 i n v :
            display . label = ’ PUSHME ’

        c o n t e x t Main2 i n v :
            display . label = ’ PUSHED ’

Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Widget Calculus: Key Features


    Take a standard λ-calculus and add:
           widgets tree-structured records that generate and handle
                   events.
         externals each platform provides some built-in widgets.
      commands change the state of the world.
          methods each external provides some built-in commands.
               cycle eval, command, wait
    CARA models translate onto the widget-calculus. The calculus
    provides the action-language for the models.



Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


A Button (1)



      events            ids     eval

                                main =
                                  w i d g e t self       ( screen (50 ,50 ,50 ,50 , push )) {
                                      move (x , y )      = do { r e t u r n self }
                                  };
      0<-push(0)
                                push =
                                  w i d g e t self       ( button ( ’ PUSHME ’)) {
                                      push ( i ) =       do { r e t u r n self }
                                  }




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


A Button (2)



      events            ids     command

                                < w i d g e t self ( screen (50 ,50 ,50 ,50 ,
                                   w i d g e t self ( button ( ’ PUSHME ’)) {
                                        push ( i ) = do { r e t u r n self }
      0<-push(0)
                                   }) {
                                   move (x , y ) = do { r e t u r n self }
                                }>




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


A Button (3)



      events            ids      wait

                                 w i d g e t (3) self ( screen (2 ,50 ,50 ,50 ,50 ,
                                     w i d g e t (1) self ( button (0 , ’ PUSHME ’)) {
                                         push ( i ) = do { r e t u r n self }
      0<-push(0) 0 1
                                     }) {
                        2 3          move (x , y ) = do { r e t u r n self }
                                 }




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


A Button (4)



      events       ids      eval

                            w i d g e t (3) self ( screen (2 ,50 ,50 ,50 ,50 ,
                                < w i d g e t (1) self ( button (0 , ’ PUSHME ’)) {
                                    push ( i ) = do { r e t u r n self }
                   0 1
                                }. push (0) >) {
                   2 3          move (x , y ) = do { r e t u r n self }
                            }




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


A Button (5)


      events       ids      command

                            w i d g e t (3) self ( screen (2 ,50 ,50 ,50 ,50 ,
                                <do {
                                    r e t u r n w i d g e t (1) self ( button (0 , ’ PUSHME ’))
                                        push ( i ) = do { r e t u r n self }
                   0 1
                                   }
                   2 3          } >) {
                                move (x , y ) = do { r e t u r n self }
                            }




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


A Button (6)



      events       ids      wait

                            w i d g e t (3) self ( screen (2 ,50 ,50 ,50 ,50 ,
                                w i d g e t (1) self ( button (0 , ’ PUSHME ’)) {
                                    push ( i ) = do { r e t u r n self }
                   0 1
                                }) {
                   2 3          move (x , y ) = do { r e t u r n self }
                            }




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Toggle (1)

      events            ids     eval

                                main =
                                  w i d g e t self ( screen (50 ,50 ,50 ,50 , push )) {
                                      move (x , y ) = do { r e t u r n self }
                                  };
                                push =
      0<-push(0)                  w i d g e t ( button ( ’ PUSHME ’)) {
      1<-push(1)                      push ( i ) = do { r e t u r n pushed }
                                  };
                                pushed =
                                  w i d g e t ( button ( ’ PUSHED ’)) {
                                      push ( i ) = do { r e t u r n push }
                                  }



Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Toggle (2)


      events            ids      command

                                 < w i d g e t self ( screen (50 ,50 ,50 ,50 ,
                                    w i d g e t ( button ( ’ PUSHME ’)) {
                                         push ( i ) = do {
                                             r e t u r n w i d g e t ( button ( ’ PUSHED ’)) {
      0<-push(0)                                 push ( i ) = do { r e t u r n push }
      1<-push(1)                            }
                                         }
                                    })) {
                                    move (x , y ) = do { r e t u r n self }
                                 }>




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Toggle (3)

      events            ids wait

                              w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 ,
                                  w i d g e t (3) ( button (0 , ’ PUSHME ’)) {
                                      push ( i ) = do {
                                          r e t u r n w i d g e t (2) ( button (1 , ’ PUSHED ’)) {
      0<-push(0)                              push ( i ) = do { r e t u r n push }
                        0
      1<-push(1)                          }
                        1             }
                        2         })) {
                        3         move (x , y ) = do { r e t u r n self }
                              }
                        4
                        5



Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Toggle (4)

      events            ids eval

                              w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 ,
                                  < w i d g e t (3) ( button (0 , ’ PUSHME ’)) {
                                      push ( i ) = do {
                                          r e t u r n w i d g e t (2) ( button (1 , ’ PUSHED ’)) {
                                              push ( i ) = do { r e t u r n push }
      1<-push(1) 0
                                          }
                        1            }
                        2         }. push (0) >)) {
                        3         move (x , y ) = do { r e t u r n self }
                              }
                        4
                        5



Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Toggle (5)


      events            ids command

                              w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 ,
                                  <do {
                                      r e t u r n w i d g e t (2) ( button (1 , ’ PUSHED ’)) {
      1<-push(1) 0                        push ( i ) = do { r e t u r n push }
                        1         } >)) {
                                  move (x , y ) = do { r e t u r n self }
                        2
                              }
                        3
                        4
                        5




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Toggle (6)


      events            ids wait

                              w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 ,
                                  w i d g e t (2) ( button (1 , ’ PUSHED ’)) {
                                      push ( i ) = do { r e t u r n push }
      1<-push(1) 0
                                  })) {
                        1         move (x , y ) = do { r e t u r n self }
                        2     }
                        3
                        4
                        5




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Toggle (7)


      events            ids eval

                              w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 ,
                                  < w i d g e t (2) ( button (1 , ’ PUSHED ’)) {
                                      push ( i ) = do { r e t u r n push }
                        0
                                  }. push (1) >)) {
                        1         move (x , y ) = do { r e t u r n self }
                        2     }
                        3
                        4
                        5




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Toggle (8)


      events            ids command

                              w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 ,
                                  <do { r e t u r n push } >)) {
                        0
                                  move (x , y ) = do { r e t u r n self }
                        1     }
                        2
                        3
                        4
                        5




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Toggle (9)

      events            ids wait

                              w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 ,
                                  w i d g e t (3) ( button (0 , ’ PUSHME ’)) {
                                      push ( i ) = do {
                                          r e t u r n w i d g e t (2) ( button (1 , ’ PUSHED ’)) {
                                              push ( i ) = do { r e t u r n push }
                        0
                                          }
                        1             }
                        2         })) {
                        3         move (x , y ) = do { r e t u r n self }
                              }
                        4
                        5



Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Diagrams
                                    Case Study Model    Widget Calculus
                                         Other Issues


Commands


    Commands can:
           Create widgets.
           Create, access or update variables.
           Read or write files and databases.
           Access local context, e.g. orientation, battery charge, light
           levels.
           Connect to servers.
           Write to servers.
           Send emails.



Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling
                                    Case Study Model
                                         Other Issues


Contents

    1   CARA Applications
          Definitions
          Research
          Case Study
    2   Modelling
         Diagrams
         Widget Calculus
    3   Case Study Model
    4   Other Issues
          Types
          Implementation

Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling
                                    Case Study Model
                                         Other Issues


Main Screen




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling
                                    Case Study Model
                                         Other Issues


Add New Contacts




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling
                                    Case Study Model
                                         Other Issues


Notify




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling
                                    Case Study Model
                                         Other Issues


Execution




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Types
                                    Case Study Model    Implementation
                                         Other Issues


Contents

    1   CARA Applications
          Definitions
          Research
          Case Study
    2   Modelling
         Diagrams
         Widget Calculus
    3   Case Study Model
    4   Other Issues
          Types
          Implementation

Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Types
                                    Case Study Model    Implementation
                                         Other Issues


Widget Types


    Standard functional types:
             Atoms int, str, bool
        Functions α → β
               Lists [α]
      Definitions type name = α
    Extra types:
            Widget Widget(α){x : β; . . .}
      Commands <α>
            Events ∗



Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                              Modelling   Types
                                      Case Study Model    Implementation
                                           Other Issues


 Simple Button (with types)
e x t e r n a l w i d g e t . Screen ;
e x t e r n a l w i d g e t . Button ;

t y p e Push = r e c B . Widget ( Button ) { push :( int ) - > <B > }

t y p e Main = r e c M . Widget ( Screen [ < Push >]){ move :( int , int ) - > <M > }

r e c v a l main : < Main > =
          f o l d [ < Main >]
              w i d g e t self : Main ( screen [ < Push >](50 ,50 ,50 ,50 , push )) {
                  move ( x : int , y : int ): < Main > = do { r e t u r n self }
              };
      v a l push : < Push > =
          f o l d [ < Push >]
              w i d g e t self : Push ( button ( ’ PUSHME ’)) {
                  push ( i : int ): < Push > = do { r e t u r n self }
              }

  Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Types
                                    Case Study Model    Implementation
                                         Other Issues


Java




           Java parser for language.
           Java type-checker for Widget.
           Java interpreter for Widget.
           Swing-based external library.
           Phone ’platform’ in Swing.




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA
CARA Applications
                                            Modelling   Types
                                    Case Study Model    Implementation
                                         Other Issues


Next Steps




           Implement the profile using standard UML tools.
           Link CARA models and Widget calculus via model
           transformations.
           More external libraries (Swing, HTML, Android).
           Simplify types.




Tony Clark (with Dean Kramer and Samia Oussena, UWL)    CARA

Mais conteúdo relacionado

Destaque

Structured system analysis
Structured system analysisStructured system analysis
Structured system analysislearnt
 
Entity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERDEntity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERDtorp42
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramSiti Ismail
 
SE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context ModelSE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context ModelAmr E. Mohamed
 
Software Engineering- ERD DFD Decision Tree and Table
Software Engineering- ERD DFD Decision Tree and TableSoftware Engineering- ERD DFD Decision Tree and Table
Software Engineering- ERD DFD Decision Tree and TableNishu Rastogi
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramRakhi Mukherji
 
SOC System Design Approach
SOC System Design ApproachSOC System Design Approach
SOC System Design ApproachA B Shinde
 
Introduction to embedded system design
Introduction to embedded system designIntroduction to embedded system design
Introduction to embedded system designMukesh Bansal
 
Lecture 03 data abstraction and er model
Lecture 03 data abstraction and er modelLecture 03 data abstraction and er model
Lecture 03 data abstraction and er modelemailharmeet
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Mudasir Qazi
 
Active Story System - design methodology for transmedia storytelling
Active Story System - design methodology for transmedia storytellingActive Story System - design methodology for transmedia storytelling
Active Story System - design methodology for transmedia storytellingRobert Pratten
 
Dick &amp; carey instructional design model sabri elamin
Dick &amp; carey instructional design model sabri elaminDick &amp; carey instructional design model sabri elamin
Dick &amp; carey instructional design model sabri elaminMemorial University
 
Software Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and SpecificationSoftware Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and SpecificationNishu Rastogi
 
Communication concepts
Communication conceptsCommunication concepts
Communication conceptsRatish Kakad
 

Destaque (20)

Structured system analysis
Structured system analysisStructured system analysis
Structured system analysis
 
Entity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERDEntity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERD
 
Erd (info sys)
Erd (info sys)Erd (info sys)
Erd (info sys)
 
Erd
ErdErd
Erd
 
Erd chapter 3
Erd chapter 3Erd chapter 3
Erd chapter 3
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
SE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context ModelSE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context Model
 
Software Engineering- ERD DFD Decision Tree and Table
Software Engineering- ERD DFD Decision Tree and TableSoftware Engineering- ERD DFD Decision Tree and Table
Software Engineering- ERD DFD Decision Tree and Table
 
Archimate Viewpoints
Archimate ViewpointsArchimate Viewpoints
Archimate Viewpoints
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
SOC System Design Approach
SOC System Design ApproachSOC System Design Approach
SOC System Design Approach
 
Introduction to embedded system design
Introduction to embedded system designIntroduction to embedded system design
Introduction to embedded system design
 
Erd practice exercises
Erd practice exercisesErd practice exercises
Erd practice exercises
 
Lecture 03 data abstraction and er model
Lecture 03 data abstraction and er modelLecture 03 data abstraction and er model
Lecture 03 data abstraction and er model
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
 
Active Story System - design methodology for transmedia storytelling
Active Story System - design methodology for transmedia storytellingActive Story System - design methodology for transmedia storytelling
Active Story System - design methodology for transmedia storytelling
 
Dick &amp; carey instructional design model sabri elamin
Dick &amp; carey instructional design model sabri elaminDick &amp; carey instructional design model sabri elamin
Dick &amp; carey instructional design model sabri elamin
 
System design
System designSystem design
System design
 
Software Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and SpecificationSoftware Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and Specification
 
Communication concepts
Communication conceptsCommunication concepts
Communication concepts
 

Mais de ClarkTony

The Uncertain Enterprise
The Uncertain EnterpriseThe Uncertain Enterprise
The Uncertain EnterpriseClarkTony
 
Actors for Behavioural Simulation
Actors for Behavioural SimulationActors for Behavioural Simulation
Actors for Behavioural SimulationClarkTony
 
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...ClarkTony
 
LEAP A Language for Architecture Design, Simulation and Analysis
LEAP A Language for Architecture Design, Simulation and AnalysisLEAP A Language for Architecture Design, Simulation and Analysis
LEAP A Language for Architecture Design, Simulation and AnalysisClarkTony
 
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
A Common Basis for Modelling Service-Oriented and Event-Driven ArchitectureA Common Basis for Modelling Service-Oriented and Event-Driven Architecture
A Common Basis for Modelling Service-Oriented and Event-Driven ArchitectureClarkTony
 
Model Slicing
Model SlicingModel Slicing
Model SlicingClarkTony
 
Patterns 200711
Patterns 200711Patterns 200711
Patterns 200711ClarkTony
 
Kings 120711
Kings 120711Kings 120711
Kings 120711ClarkTony
 
Iswim for testing
Iswim for testingIswim for testing
Iswim for testingClarkTony
 
Iswim for testing
Iswim for testingIswim for testing
Iswim for testingClarkTony
 
Kiss at oopsla 09
Kiss at oopsla 09Kiss at oopsla 09
Kiss at oopsla 09ClarkTony
 
Mcms and ids sig
Mcms and ids sigMcms and ids sig
Mcms and ids sigClarkTony
 
Reverse engineering and theory building v3
Reverse engineering and theory building v3Reverse engineering and theory building v3
Reverse engineering and theory building v3ClarkTony
 
Onward presentation.en
Onward presentation.enOnward presentation.en
Onward presentation.enClarkTony
 
Formalizing homogeneous language embeddings
Formalizing homogeneous language embeddingsFormalizing homogeneous language embeddings
Formalizing homogeneous language embeddingsClarkTony
 
Filmstrip testing
Filmstrip testingFilmstrip testing
Filmstrip testingClarkTony
 
Dsm as theory building
Dsm as theory buildingDsm as theory building
Dsm as theory buildingClarkTony
 

Mais de ClarkTony (20)

The Uncertain Enterprise
The Uncertain EnterpriseThe Uncertain Enterprise
The Uncertain Enterprise
 
Actors for Behavioural Simulation
Actors for Behavioural SimulationActors for Behavioural Simulation
Actors for Behavioural Simulation
 
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
 
LEAP A Language for Architecture Design, Simulation and Analysis
LEAP A Language for Architecture Design, Simulation and AnalysisLEAP A Language for Architecture Design, Simulation and Analysis
LEAP A Language for Architecture Design, Simulation and Analysis
 
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
A Common Basis for Modelling Service-Oriented and Event-Driven ArchitectureA Common Basis for Modelling Service-Oriented and Event-Driven Architecture
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
 
Model Slicing
Model SlicingModel Slicing
Model Slicing
 
Patterns 200711
Patterns 200711Patterns 200711
Patterns 200711
 
Kings 120711
Kings 120711Kings 120711
Kings 120711
 
Iswim for testing
Iswim for testingIswim for testing
Iswim for testing
 
Iswim for testing
Iswim for testingIswim for testing
Iswim for testing
 
Kiss at oopsla 09
Kiss at oopsla 09Kiss at oopsla 09
Kiss at oopsla 09
 
Mcms and ids sig
Mcms and ids sigMcms and ids sig
Mcms and ids sig
 
Ocl 09
Ocl 09Ocl 09
Ocl 09
 
Scam 08
Scam 08Scam 08
Scam 08
 
Reverse engineering and theory building v3
Reverse engineering and theory building v3Reverse engineering and theory building v3
Reverse engineering and theory building v3
 
Onward presentation.en
Onward presentation.enOnward presentation.en
Onward presentation.en
 
Hcse pres
Hcse presHcse pres
Hcse pres
 
Formalizing homogeneous language embeddings
Formalizing homogeneous language embeddingsFormalizing homogeneous language embeddings
Formalizing homogeneous language embeddings
 
Filmstrip testing
Filmstrip testingFilmstrip testing
Filmstrip testing
 
Dsm as theory building
Dsm as theory buildingDsm as theory building
Dsm as theory building
 

Último

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Context Aware Reactive Applications

  • 1. CARA Applications Modelling Case Study Model Other Issues Model Driven Context Aware Reactive Applications Tony Clark (with Dean Kramer and Samia Oussena, UWL) School of Engineering and Information Sciences, Middlesex University October 5, 2011 Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 2. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Contents 1 CARA Applications Definitions Research Case Study 2 Modelling Diagrams Widget Calculus 3 Case Study Model 4 Other Issues Types Implementation Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 3. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Context Aware Reactive Applications Context aware applications are: intelligent applications that can monitor the user’s context and, in case of changes in this context, consequently adapt their behaviour in order to satisfy the user’s current needs or anticipate the user’s intentions. L.M. Daniele, E. Silva, L.F. Pires, and M. Sinderen. A SOA-based Platform- specfic Framework for Context-Aware Mobile Applications. Enterprise Interoperability, 2009. Reactive applications must deal with events that are received from their environment and react accordingly. D. Harel and A. Pnueli. On the development of reactive systems. Weizmann Institute of Science, Dept. of Computer Science, 1985. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 4. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues The Rise of CARA Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 5. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues The Rise of CARA Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 6. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues The Rise of CARA Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 7. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Model Driven Development Use models as the primary system artifact. Focus on key aspects of systems. Use standards to support interoperability and tools. Use meta-modelling to construct domain-specific abstractions. Analyse, verify and validate the models. Generate (parts of) the system from models. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 8. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Knowledge Connext and KTP Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 9. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Knowledge Connext and KTP Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 10. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Problem and Proposal MDD should be available for CARA applications - right? Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 11. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Problem and Proposal MDD should be available for CARA applications - right? Some attempts: Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 12. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Problem and Proposal MDD should be available for CARA applications - right? Some attempts: Complex or tool specific. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 13. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Problem and Proposal MDD should be available for CARA applications - right? Some attempts: Complex or tool specific. Incomplete, lacks execution. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 14. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Problem and Proposal MDD should be available for CARA applications - right? Some attempts: Complex or tool specific. Incomplete, lacks execution. Can we design a simple, universal MDD solution? Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 15. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues CARA Overview Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 16. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Buddy Mobile phones have address lists. L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach for Behaviour Modelling of Context-aware Mobile Applications. In Model Driven Architecture-Foundations and Applications. Springer, 2009. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 17. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Buddy Mobile phones have address lists. A phone is always in contact with its network provider. L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach for Behaviour Modelling of Context-aware Mobile Applications. In Model Driven Architecture-Foundations and Applications. Springer, 2009. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 18. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Buddy Mobile phones have address lists. A phone is always in contact with its network provider. Each phone has a unique address, e.g. tony@widget.org. L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach for Behaviour Modelling of Context-aware Mobile Applications. In Model Driven Architecture-Foundations and Applications. Springer, 2009. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 19. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Buddy Mobile phones have address lists. A phone is always in contact with its network provider. Each phone has a unique address, e.g. tony@widget.org. Each phone maintains a database of contacts. L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach for Behaviour Modelling of Context-aware Mobile Applications. In Model Driven Architecture-Foundations and Applications. Springer, 2009. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 20. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Buddy Mobile phones have address lists. A phone is always in contact with its network provider. Each phone has a unique address, e.g. tony@widget.org. Each phone maintains a database of contacts. Users want to know about contacts in their database that are co-located. L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach for Behaviour Modelling of Context-aware Mobile Applications. In Model Driven Architecture-Foundations and Applications. Springer, 2009. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 21. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Buddy Mobile phones have address lists. A phone is always in contact with its network provider. Each phone has a unique address, e.g. tony@widget.org. Each phone maintains a database of contacts. Users want to know about contacts in their database that are co-located. When one phone moves into the vicinity of the other then both phones are told of the availability of the other in terms of the contact address. L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach for Behaviour Modelling of Context-aware Mobile Applications. In Model Driven Architecture-Foundations and Applications. Springer, 2009. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 22. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Buddy Mobile phones have address lists. A phone is always in contact with its network provider. Each phone has a unique address, e.g. tony@widget.org. Each phone maintains a database of contacts. Users want to know about contacts in their database that are co-located. When one phone moves into the vicinity of the other then both phones are told of the availability of the other in terms of the contact address. If the address is in the user’s database then the phone flashes the contact. L. Daniele, L. Ferreira Pires, and M. van Sinderen. An MDA-based Approach for Behaviour Modelling of Context-aware Mobile Applications. In Model Driven Architecture-Foundations and Applications. Springer, 2009. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 23. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Tony’s Phone Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 24. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Tony Knows Sally Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 25. CARA Applications Definitions Modelling Research Case Study Model Case Study Other Issues Context Aware Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 26. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Contents 1 CARA Applications Definitions Research Case Study 2 Modelling Diagrams Widget Calculus 3 Case Study Model 4 Other Issues Types Implementation Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 27. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Domain Analysis GUI Trees GUI elements are organized in trees. Events Elements generate events and listeners handle them. Platform Each platform provides a different collection of event generators. Object-Orientation Implementation technologies are mostly OO. Transitional Behaviour Application execute by performing state transitions. Data Persistence Applications manage simple databases. Static Typing Generally lacked by most implementation technologies for platforms. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 28. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues UML Profile <<external>> Application components supplied by platform. <<widget>> User defined components, tree-shaped. Containership Associations, black-diamond. Root Root containers define application states. <<event>> Generated by the platform, context events. <<handler>> Process events. Machines State transitions. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 29. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Single Button Model c o n t e x t Push i n v : label = ’ PUSHME ’ Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 30. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Toggle Button Model c o n t e x t Main1 i n v : display . label = ’ PUSHME ’ c o n t e x t Main2 i n v : display . label = ’ PUSHED ’ Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 31. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Widget Calculus: Key Features Take a standard λ-calculus and add: widgets tree-structured records that generate and handle events. externals each platform provides some built-in widgets. commands change the state of the world. methods each external provides some built-in commands. cycle eval, command, wait CARA models translate onto the widget-calculus. The calculus provides the action-language for the models. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 32. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues A Button (1) events ids eval main = w i d g e t self ( screen (50 ,50 ,50 ,50 , push )) { move (x , y ) = do { r e t u r n self } }; 0<-push(0) push = w i d g e t self ( button ( ’ PUSHME ’)) { push ( i ) = do { r e t u r n self } } Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 33. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues A Button (2) events ids command < w i d g e t self ( screen (50 ,50 ,50 ,50 , w i d g e t self ( button ( ’ PUSHME ’)) { push ( i ) = do { r e t u r n self } 0<-push(0) }) { move (x , y ) = do { r e t u r n self } }> Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 34. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues A Button (3) events ids wait w i d g e t (3) self ( screen (2 ,50 ,50 ,50 ,50 , w i d g e t (1) self ( button (0 , ’ PUSHME ’)) { push ( i ) = do { r e t u r n self } 0<-push(0) 0 1 }) { 2 3 move (x , y ) = do { r e t u r n self } } Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 35. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues A Button (4) events ids eval w i d g e t (3) self ( screen (2 ,50 ,50 ,50 ,50 , < w i d g e t (1) self ( button (0 , ’ PUSHME ’)) { push ( i ) = do { r e t u r n self } 0 1 }. push (0) >) { 2 3 move (x , y ) = do { r e t u r n self } } Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 36. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues A Button (5) events ids command w i d g e t (3) self ( screen (2 ,50 ,50 ,50 ,50 , <do { r e t u r n w i d g e t (1) self ( button (0 , ’ PUSHME ’)) push ( i ) = do { r e t u r n self } 0 1 } 2 3 } >) { move (x , y ) = do { r e t u r n self } } Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 37. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues A Button (6) events ids wait w i d g e t (3) self ( screen (2 ,50 ,50 ,50 ,50 , w i d g e t (1) self ( button (0 , ’ PUSHME ’)) { push ( i ) = do { r e t u r n self } 0 1 }) { 2 3 move (x , y ) = do { r e t u r n self } } Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 38. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Toggle (1) events ids eval main = w i d g e t self ( screen (50 ,50 ,50 ,50 , push )) { move (x , y ) = do { r e t u r n self } }; push = 0<-push(0) w i d g e t ( button ( ’ PUSHME ’)) { 1<-push(1) push ( i ) = do { r e t u r n pushed } }; pushed = w i d g e t ( button ( ’ PUSHED ’)) { push ( i ) = do { r e t u r n push } } Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 39. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Toggle (2) events ids command < w i d g e t self ( screen (50 ,50 ,50 ,50 , w i d g e t ( button ( ’ PUSHME ’)) { push ( i ) = do { r e t u r n w i d g e t ( button ( ’ PUSHED ’)) { 0<-push(0) push ( i ) = do { r e t u r n push } 1<-push(1) } } })) { move (x , y ) = do { r e t u r n self } }> Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 40. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Toggle (3) events ids wait w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 , w i d g e t (3) ( button (0 , ’ PUSHME ’)) { push ( i ) = do { r e t u r n w i d g e t (2) ( button (1 , ’ PUSHED ’)) { 0<-push(0) push ( i ) = do { r e t u r n push } 0 1<-push(1) } 1 } 2 })) { 3 move (x , y ) = do { r e t u r n self } } 4 5 Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 41. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Toggle (4) events ids eval w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 , < w i d g e t (3) ( button (0 , ’ PUSHME ’)) { push ( i ) = do { r e t u r n w i d g e t (2) ( button (1 , ’ PUSHED ’)) { push ( i ) = do { r e t u r n push } 1<-push(1) 0 } 1 } 2 }. push (0) >)) { 3 move (x , y ) = do { r e t u r n self } } 4 5 Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 42. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Toggle (5) events ids command w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 , <do { r e t u r n w i d g e t (2) ( button (1 , ’ PUSHED ’)) { 1<-push(1) 0 push ( i ) = do { r e t u r n push } 1 } >)) { move (x , y ) = do { r e t u r n self } 2 } 3 4 5 Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 43. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Toggle (6) events ids wait w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 , w i d g e t (2) ( button (1 , ’ PUSHED ’)) { push ( i ) = do { r e t u r n push } 1<-push(1) 0 })) { 1 move (x , y ) = do { r e t u r n self } 2 } 3 4 5 Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 44. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Toggle (7) events ids eval w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 , < w i d g e t (2) ( button (1 , ’ PUSHED ’)) { push ( i ) = do { r e t u r n push } 0 }. push (1) >)) { 1 move (x , y ) = do { r e t u r n self } 2 } 3 4 5 Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 45. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Toggle (8) events ids command w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 , <do { r e t u r n push } >)) { 0 move (x , y ) = do { r e t u r n self } 1 } 2 3 4 5 Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 46. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Toggle (9) events ids wait w i d g e t (5) self ( screen (4 ,50 ,50 ,50 ,50 , w i d g e t (3) ( button (0 , ’ PUSHME ’)) { push ( i ) = do { r e t u r n w i d g e t (2) ( button (1 , ’ PUSHED ’)) { push ( i ) = do { r e t u r n push } 0 } 1 } 2 })) { 3 move (x , y ) = do { r e t u r n self } } 4 5 Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 47. CARA Applications Modelling Diagrams Case Study Model Widget Calculus Other Issues Commands Commands can: Create widgets. Create, access or update variables. Read or write files and databases. Access local context, e.g. orientation, battery charge, light levels. Connect to servers. Write to servers. Send emails. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 48. CARA Applications Modelling Case Study Model Other Issues Contents 1 CARA Applications Definitions Research Case Study 2 Modelling Diagrams Widget Calculus 3 Case Study Model 4 Other Issues Types Implementation Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 49. CARA Applications Modelling Case Study Model Other Issues Main Screen Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 50. CARA Applications Modelling Case Study Model Other Issues Add New Contacts Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 51. CARA Applications Modelling Case Study Model Other Issues Notify Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 52. CARA Applications Modelling Case Study Model Other Issues Execution Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 53. CARA Applications Modelling Types Case Study Model Implementation Other Issues Contents 1 CARA Applications Definitions Research Case Study 2 Modelling Diagrams Widget Calculus 3 Case Study Model 4 Other Issues Types Implementation Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 54. CARA Applications Modelling Types Case Study Model Implementation Other Issues Widget Types Standard functional types: Atoms int, str, bool Functions α → β Lists [α] Definitions type name = α Extra types: Widget Widget(α){x : β; . . .} Commands <α> Events ∗ Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 55. CARA Applications Modelling Types Case Study Model Implementation Other Issues Simple Button (with types) e x t e r n a l w i d g e t . Screen ; e x t e r n a l w i d g e t . Button ; t y p e Push = r e c B . Widget ( Button ) { push :( int ) - > <B > } t y p e Main = r e c M . Widget ( Screen [ < Push >]){ move :( int , int ) - > <M > } r e c v a l main : < Main > = f o l d [ < Main >] w i d g e t self : Main ( screen [ < Push >](50 ,50 ,50 ,50 , push )) { move ( x : int , y : int ): < Main > = do { r e t u r n self } }; v a l push : < Push > = f o l d [ < Push >] w i d g e t self : Push ( button ( ’ PUSHME ’)) { push ( i : int ): < Push > = do { r e t u r n self } } Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 56. CARA Applications Modelling Types Case Study Model Implementation Other Issues Java Java parser for language. Java type-checker for Widget. Java interpreter for Widget. Swing-based external library. Phone ’platform’ in Swing. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA
  • 57. CARA Applications Modelling Types Case Study Model Implementation Other Issues Next Steps Implement the profile using standard UML tools. Link CARA models and Widget calculus via model transformations. More external libraries (Swing, HTML, Android). Simplify types. Tony Clark (with Dean Kramer and Samia Oussena, UWL) CARA