SlideShare ist ein Scribd-Unternehmen logo
1 von 51
Downloaden Sie, um offline zu lesen
Browser-based Enforcement of
         Interface Contracts in Web Applications
                     with BeepBeep

                 Sylvain Hallé, Roger Villemaire


                University of California   Université du Québec à Montréal
                  Santa Barbara, USA       Montréal, CANADA



Sylvain Hallé
Some web services



           E-Commerce Service
           Compute Cloud


           PayPal API: billing, express checkout


           Shopping: like Amazon
           Google Search, Google Maps, GMail, ...


Sylvain Hallé
Using web applications


                             MyApplication.com




Sylvain Hallé
Using web applications


                             MyApplication.com




Sylvain Hallé
Using web applications


                    i   ?    MyApplication.com




Sylvain Hallé
Using web applications


                    i   ?         MyApplication.com




                             1.

                             2.
                                  ...


Sylvain Hallé
Using web applications

        XML request
         <ListItems>                  MyApplication.com
           <title>birds</title>
         </ListItems>




                                  <Items>
                                    <Item>
                                      <ID>1</ID>
                                      <Title>abc</Title>
                                    </Item>
                                    ...         XML
                                  </Items>
                                                   response

Sylvain Hallé
Using web applications
                       2


                             MyApplication.com




Sylvain Hallé
Using web applications
                       2


                             MyApplication.com




                               c



Sylvain Hallé
Using web applications

        XML request
          <cartCreate>         MyApplication.com
            <item>2</item>
          </cartCreate>




                             <cart>
                               <id>c</id>
                               <items>
                                 <item>2</item>
                               </items>
                             </cart>     XML
                                            response

Sylvain Hallé
Using web applications
                       2


                       c     MyApplication.com




Sylvain Hallé
Using web applications
                       2


                       c     MyApplication.com




Sylvain Hallé
Constraints on the message trace




Sylvain Hallé
Constraints on the message trace




         i   ?




Sylvain Hallé
Constraints on the message trace




         i   ?
                 1.

                 2.
                      ...




Sylvain Hallé
Constraints on the message trace




                            2

         i   ?
                 1.

                 2.
                      ...       c




Sylvain Hallé
Constraints on the message trace




                            2          2

         i   ?
                                       c
                 1.

                 2.
                      ...       c




Sylvain Hallé
Constraints on the message trace


             You cannot add the same item twice
                    to the shopping cart
                            2           2

         i   ?
                                         c
                 1.

                 2.
                      ...       c




Sylvain Hallé
Constraints on the message trace


             You cannot add the same item twice
                    to the shopping cart
                            2           2

         i   ?
                                         c    ???
                 1.

                 2.
                      ...       c




Sylvain Hallé
Constraints on the message trace




                                       ???




Sylvain Hallé
Constraints on the message trace




                                       ???




Sylvain Hallé
Constraints on the message trace


           You cannot add the same item twice
                  to the shopping cart
                              2                 2


                                                c



      ! Atoms are properties over messages...




Sylvain Hallé
Constraints on the message trace


           You cannot add the same item twice
                  to the shopping cart


                G   (         2
                                   Þ ØF
                                                2


                                                c
                                                    (
      ! Atoms are properties over messages...
      ! + LTL operators...


Sylvain Hallé
Constraints on the message trace


           You cannot add the same item twice
                  to the shopping cart


                 (
                G "i
                              i
                                   Þ ØF
                                                i


                                                c
                                                    (
      ! Atoms are properties over messages...
      ! + LTL operators...
      ! + quantification on elements

Sylvain Hallé
Constraints on the message trace


           You cannot add the same item twice
                  to the shopping cart


                 (
                G "i
                              i
                                   Þ ØF
                                                    i


                                                    c
                                                          (
      ! Atoms are properties over messages...
      ! + LTL operators...
      ! + quantification on elements            }       LTL-FO+

Sylvain Hallé
Enter BeepBeep


                     MyApplication.com




Sylvain Hallé
Enter BeepBeep


                     MyApplication.com




Sylvain Hallé
Enter BeepBeep

        (
      G "i
                i
                    Þ ØF
                           i


                           c
                               (
                                   MyApplication.com




Sylvain Hallé
Enter BeepBeep
                 2

                     MyApplication.com




Sylvain Hallé
Enter BeepBeep


                     MyApplication.com




Sylvain Hallé
Enter BeepBeep
                 2

                     MyApplication.com




Sylvain Hallé
Enter BeepBeep
                 2

                     MyApplication.com




Sylvain Hallé
Enter BeepBeep


                     MyApplication.com




Sylvain Hallé
Enter BeepBeep


                     MyApplication.com




Sylvain Hallé
Adding BeepBeep to a real application




Sylvain Hallé
Adding BeepBeep to a real application

     Π     Copy BeepBeep to application folder
            http://beepbeep.sourceforge.net




Sylvain Hallé
Adding BeepBeep to a real application

     Π     Copy BeepBeep to application folder
            http://beepbeep.sourceforge.net

           Include BeepBeep




Sylvain Hallé
Adding BeepBeep to a real application

     Π     Copy BeepBeep to application folder
            http://beepbeep.sourceforge.net

           Include BeepBeep

     myapplication.html
       <html>
       <head>
       <title>My Application
       </title>
       <script type="text/javascript"
         href="myapplication.js"/>

       </head>
       <body>
       ...
       </body>
       </html>



Sylvain Hallé
Adding BeepBeep to a real application

     Π     Copy BeepBeep to application folder
            http://beepbeep.sourceforge.net

           Include BeepBeep

     myapplication.html
       <html>
       <head>
       <title>My Application
       </title>
       <script type="text/javascript"
         href="myapplication.js"/>
       <script type="text/javascript"
         href="beepbeep.js"/>
       </head>
       <body>
       ...
       </body>
       </html>



Sylvain Hallé
Adding BeepBeep to a real application

     Π     Copy BeepBeep to application folder
            http://beepbeep.sourceforge.net

           Include BeepBeep

     myapplication.html                 myapplication.js
       <html>
       <head>                            // Initializations
       <title>My Application             ...
       </title>
       <script type="text/javascript"    req = new XMLHttpRequest();
         href="myapplication.js"/>
       <script type="text/javascript"    ...
         href="beepbeep.js"/>
       </head>                           function abc()
       <body>                            {
       ...                                 ...
       </body>                             req.send(some_message);
       </html>                           }



Sylvain Hallé
Adding BeepBeep to a real application

     Π     Copy BeepBeep to application folder
            http://beepbeep.sourceforge.net

           Include BeepBeep

     myapplication.html                 myapplication.js
       <html>
       <head>                            // Initializations
       <title>My Application             ...
       </title>
       <script type="text/javascript"    req = new XMLHttpRequestBB();
         href="myapplication.js"/>
       <script type="text/javascript"    ...
         href="beepbeep.js"/>
       </head>                           function abc()
       <body>                            {
       ...                                 ...
       </body>                             req.send(some_message);
       </html>                           }



Sylvain Hallé
Adding BeepBeep to a real application

     Ž      Obtain (or create) a contract file with LTL-FO+ formulae
      # ---------------------------------------------------------------
      # BeepBeep contract file for the Amazon ECS
      # ---------------------------------------------------------------
      % To create a cart, you must put at least one item
      ; G ([x1 /CartCreate/Operation] (((x1) = ({CartCreate})) ->
        (<x2 /CartCreate/Items/Item/ASIN> ({TRUE}))))

      % You can only create a cart once
      ; G ([x1 /CartCreate/Operation] (((x1) = ({CartCreate})) ->
       (X (G (!(<x2 /CartCreate/Operation> ((x2) = ({CartCreate}))))))))
      % No CartAdd can occur before a CartCreate
      ; (!(<x1 /CartAdd/Operation> ((x1) = ({CartAdd})))) U
        (<x2 /CartCreate/Operation> ((x2) = ({CartCreate})))
      % You cannot add the same item twice to the shopping cart
      ; G ([i /CartCreate/Items/Item/ASIN] (X (G
        ([j /CartAdd/Items/Item/ASIN] (!((i) = (j)))))))




Sylvain Hallé
Quick demo




Sylvain Hallé
Experimental results

   Sample property: "each car entering in a parking lot must exit
   before entering again"

                                                          < 5 ms/msg.
                Time per message (ms)




                                        Trace length

                                                       Hallé & Villemaire, EDOC 2008

Sylvain Hallé
Experimental results

   Simultaneous monitoring of 11 properties (Amazon example)


                                      20
                                                                                         < 5%
                Time difference (%)




                                      10

                                                                                                      Moyenne
                                       0


                                      -10


                                      -20
                                            0   20   40   60   80     100   120   140   160   180   200

                                                                    Trace length



Sylvain Hallé
Experimental results

   Simultaneous monitoring of 11 properties (Amazon example)


                                        14
                Time per message (ms)



                                        12
                                                                                       Data domain
                                        10
                                                                                            25
                                         8
                                                                                            200
                                         6
                                         4
                                         2
                                         0
                                             0   20   40   60   80   100 120 140 160

                                                                Trace length



Sylvain Hallé
Take-home points




Sylvain Hallé
Take-home points

   1. Constraints involving temporal operators and quantification
      on message contents arise naturally in real web applications




Sylvain Hallé
Take-home points

   1. Constraints involving temporal operators and quantification
      on message contents arise naturally in real web applications

   2. An extension of LTL can formalize them: LTL-FO+




Sylvain Hallé
Take-home points

   1. Constraints involving temporal operators and quantification
      on message contents arise naturally in real web applications

   2. An extension of LTL can formalize them: LTL-FO+

   3. Runtime monitoring of these constraints can be done
      efficiently, even with quantification




Sylvain Hallé
Take-home points

   1. Constraints involving temporal operators and quantification
      on message contents arise naturally in real web applications

   2. An extension of LTL can formalize them: LTL-FO+

   3. Runtime monitoring of these constraints can be done
      efficiently, even with quantification

   4. BeepBeep is a tool that allows it with
      minimal modifications on real applications

        http://beepbeep.sourceforge.net/


Sylvain Hallé

Weitere ähnliche Inhalte

Mehr von Sylvain Hallé

Synthia: a Generic and Flexible Data Structure Generator (Long Version)
Synthia: a Generic and Flexible Data Structure Generator (Long Version)Synthia: a Generic and Flexible Data Structure Generator (Long Version)
Synthia: a Generic and Flexible Data Structure Generator (Long Version)Sylvain Hallé
 
Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)
Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)
Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)Sylvain Hallé
 
Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)
Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)
Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)Sylvain Hallé
 
A Generic Explainability Framework for Function Circuits
A Generic Explainability Framework for Function CircuitsA Generic Explainability Framework for Function Circuits
A Generic Explainability Framework for Function CircuitsSylvain Hallé
 
Detecting Responsive Web Design Bugs with Declarative Specifications
Detecting Responsive Web Design Bugs with Declarative SpecificationsDetecting Responsive Web Design Bugs with Declarative Specifications
Detecting Responsive Web Design Bugs with Declarative SpecificationsSylvain Hallé
 
Streamlining the Inclusion of Computer Experiments in Research Papers
Streamlining the Inclusion of Computer Experiments in Research PapersStreamlining the Inclusion of Computer Experiments in Research Papers
Streamlining the Inclusion of Computer Experiments in Research PapersSylvain Hallé
 
Writing Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeepWriting Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeepSylvain Hallé
 
Real-Time Data Mining for Event Streams
Real-Time Data Mining for Event StreamsReal-Time Data Mining for Event Streams
Real-Time Data Mining for Event StreamsSylvain Hallé
 
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)Sylvain Hallé
 
Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3Sylvain Hallé
 
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)Sylvain Hallé
 
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)Sylvain Hallé
 
Event Stream Processing with Multiple Threads
Event Stream Processing with Multiple ThreadsEvent Stream Processing with Multiple Threads
Event Stream Processing with Multiple ThreadsSylvain Hallé
 
A Few Things We Heard About RV Tools (Position Paper)
A Few Things We Heard About RV Tools (Position Paper)A Few Things We Heard About RV Tools (Position Paper)
A Few Things We Heard About RV Tools (Position Paper)Sylvain Hallé
 
Runtime monitoring de propriétés temporelles par (streaming) XML
Runtime monitoring de propriétés temporelles par (streaming) XMLRuntime monitoring de propriétés temporelles par (streaming) XML
Runtime monitoring de propriétés temporelles par (streaming) XMLSylvain Hallé
 
La quantification du premier ordre en logique temporelle
La quantification du premier ordre en logique temporelleLa quantification du premier ordre en logique temporelle
La quantification du premier ordre en logique temporelleSylvain Hallé
 
When RV Meets CEP (RV 2016 Tutorial)
When RV Meets CEP (RV 2016 Tutorial)When RV Meets CEP (RV 2016 Tutorial)
When RV Meets CEP (RV 2016 Tutorial)Sylvain Hallé
 
Decentralized Enforcement of Artifact Lifecycles
Decentralized Enforcement of Artifact LifecyclesDecentralized Enforcement of Artifact Lifecycles
Decentralized Enforcement of Artifact LifecyclesSylvain Hallé
 
Chasing Bugs with the BeepBeep Event Stream Processor
Chasing Bugs with the BeepBeep Event Stream ProcessorChasing Bugs with the BeepBeep Event Stream Processor
Chasing Bugs with the BeepBeep Event Stream ProcessorSylvain Hallé
 
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings Sylvain Hallé
 

Mehr von Sylvain Hallé (20)

Synthia: a Generic and Flexible Data Structure Generator (Long Version)
Synthia: a Generic and Flexible Data Structure Generator (Long Version)Synthia: a Generic and Flexible Data Structure Generator (Long Version)
Synthia: a Generic and Flexible Data Structure Generator (Long Version)
 
Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)
Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)
Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)
 
Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)
Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)
Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)
 
A Generic Explainability Framework for Function Circuits
A Generic Explainability Framework for Function CircuitsA Generic Explainability Framework for Function Circuits
A Generic Explainability Framework for Function Circuits
 
Detecting Responsive Web Design Bugs with Declarative Specifications
Detecting Responsive Web Design Bugs with Declarative SpecificationsDetecting Responsive Web Design Bugs with Declarative Specifications
Detecting Responsive Web Design Bugs with Declarative Specifications
 
Streamlining the Inclusion of Computer Experiments in Research Papers
Streamlining the Inclusion of Computer Experiments in Research PapersStreamlining the Inclusion of Computer Experiments in Research Papers
Streamlining the Inclusion of Computer Experiments in Research Papers
 
Writing Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeepWriting Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeep
 
Real-Time Data Mining for Event Streams
Real-Time Data Mining for Event StreamsReal-Time Data Mining for Event Streams
Real-Time Data Mining for Event Streams
 
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
 
Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3
 
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
 
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
 
Event Stream Processing with Multiple Threads
Event Stream Processing with Multiple ThreadsEvent Stream Processing with Multiple Threads
Event Stream Processing with Multiple Threads
 
A Few Things We Heard About RV Tools (Position Paper)
A Few Things We Heard About RV Tools (Position Paper)A Few Things We Heard About RV Tools (Position Paper)
A Few Things We Heard About RV Tools (Position Paper)
 
Runtime monitoring de propriétés temporelles par (streaming) XML
Runtime monitoring de propriétés temporelles par (streaming) XMLRuntime monitoring de propriétés temporelles par (streaming) XML
Runtime monitoring de propriétés temporelles par (streaming) XML
 
La quantification du premier ordre en logique temporelle
La quantification du premier ordre en logique temporelleLa quantification du premier ordre en logique temporelle
La quantification du premier ordre en logique temporelle
 
When RV Meets CEP (RV 2016 Tutorial)
When RV Meets CEP (RV 2016 Tutorial)When RV Meets CEP (RV 2016 Tutorial)
When RV Meets CEP (RV 2016 Tutorial)
 
Decentralized Enforcement of Artifact Lifecycles
Decentralized Enforcement of Artifact LifecyclesDecentralized Enforcement of Artifact Lifecycles
Decentralized Enforcement of Artifact Lifecycles
 
Chasing Bugs with the BeepBeep Event Stream Processor
Chasing Bugs with the BeepBeep Event Stream ProcessorChasing Bugs with the BeepBeep Event Stream Processor
Chasing Bugs with the BeepBeep Event Stream Processor
 
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings
 

Browser-Based Enforcement of Interface Contracts in Web Applications with BeepBeep (Talk @ CAV 2009)

  • 1. Browser-based Enforcement of Interface Contracts in Web Applications with BeepBeep Sylvain Hallé, Roger Villemaire University of California Université du Québec à Montréal Santa Barbara, USA Montréal, CANADA Sylvain Hallé
  • 2. Some web services E-Commerce Service Compute Cloud PayPal API: billing, express checkout Shopping: like Amazon Google Search, Google Maps, GMail, ... Sylvain Hallé
  • 3. Using web applications MyApplication.com Sylvain Hallé
  • 4. Using web applications MyApplication.com Sylvain Hallé
  • 5. Using web applications i ? MyApplication.com Sylvain Hallé
  • 6. Using web applications i ? MyApplication.com 1. 2. ... Sylvain Hallé
  • 7. Using web applications XML request <ListItems> MyApplication.com <title>birds</title> </ListItems> <Items> <Item> <ID>1</ID> <Title>abc</Title> </Item> ... XML </Items> response Sylvain Hallé
  • 8. Using web applications 2 MyApplication.com Sylvain Hallé
  • 9. Using web applications 2 MyApplication.com c Sylvain Hallé
  • 10. Using web applications XML request <cartCreate> MyApplication.com <item>2</item> </cartCreate> <cart> <id>c</id> <items> <item>2</item> </items> </cart> XML response Sylvain Hallé
  • 11. Using web applications 2 c MyApplication.com Sylvain Hallé
  • 12. Using web applications 2 c MyApplication.com Sylvain Hallé
  • 13. Constraints on the message trace Sylvain Hallé
  • 14. Constraints on the message trace i ? Sylvain Hallé
  • 15. Constraints on the message trace i ? 1. 2. ... Sylvain Hallé
  • 16. Constraints on the message trace 2 i ? 1. 2. ... c Sylvain Hallé
  • 17. Constraints on the message trace 2 2 i ? c 1. 2. ... c Sylvain Hallé
  • 18. Constraints on the message trace You cannot add the same item twice to the shopping cart 2 2 i ? c 1. 2. ... c Sylvain Hallé
  • 19. Constraints on the message trace You cannot add the same item twice to the shopping cart 2 2 i ? c ??? 1. 2. ... c Sylvain Hallé
  • 20. Constraints on the message trace ??? Sylvain Hallé
  • 21. Constraints on the message trace ??? Sylvain Hallé
  • 22. Constraints on the message trace You cannot add the same item twice to the shopping cart 2 2 c ! Atoms are properties over messages... Sylvain Hallé
  • 23. Constraints on the message trace You cannot add the same item twice to the shopping cart G ( 2 Þ ØF 2 c ( ! Atoms are properties over messages... ! + LTL operators... Sylvain Hallé
  • 24. Constraints on the message trace You cannot add the same item twice to the shopping cart ( G "i i Þ ØF i c ( ! Atoms are properties over messages... ! + LTL operators... ! + quantification on elements Sylvain Hallé
  • 25. Constraints on the message trace You cannot add the same item twice to the shopping cart ( G "i i Þ ØF i c ( ! Atoms are properties over messages... ! + LTL operators... ! + quantification on elements } LTL-FO+ Sylvain Hallé
  • 26. Enter BeepBeep MyApplication.com Sylvain Hallé
  • 27. Enter BeepBeep MyApplication.com Sylvain Hallé
  • 28. Enter BeepBeep ( G "i i Þ ØF i c ( MyApplication.com Sylvain Hallé
  • 29. Enter BeepBeep 2 MyApplication.com Sylvain Hallé
  • 30. Enter BeepBeep MyApplication.com Sylvain Hallé
  • 31. Enter BeepBeep 2 MyApplication.com Sylvain Hallé
  • 32. Enter BeepBeep 2 MyApplication.com Sylvain Hallé
  • 33. Enter BeepBeep MyApplication.com Sylvain Hallé
  • 34. Enter BeepBeep MyApplication.com Sylvain Hallé
  • 35. Adding BeepBeep to a real application Sylvain Hallé
  • 36. Adding BeepBeep to a real application Œ Copy BeepBeep to application folder http://beepbeep.sourceforge.net Sylvain Hallé
  • 37. Adding BeepBeep to a real application Œ Copy BeepBeep to application folder http://beepbeep.sourceforge.net  Include BeepBeep Sylvain Hallé
  • 38. Adding BeepBeep to a real application Œ Copy BeepBeep to application folder http://beepbeep.sourceforge.net  Include BeepBeep myapplication.html <html> <head> <title>My Application </title> <script type="text/javascript" href="myapplication.js"/> </head> <body> ... </body> </html> Sylvain Hallé
  • 39. Adding BeepBeep to a real application Œ Copy BeepBeep to application folder http://beepbeep.sourceforge.net  Include BeepBeep myapplication.html <html> <head> <title>My Application </title> <script type="text/javascript" href="myapplication.js"/> <script type="text/javascript" href="beepbeep.js"/> </head> <body> ... </body> </html> Sylvain Hallé
  • 40. Adding BeepBeep to a real application Œ Copy BeepBeep to application folder http://beepbeep.sourceforge.net  Include BeepBeep myapplication.html myapplication.js <html> <head> // Initializations <title>My Application ... </title> <script type="text/javascript" req = new XMLHttpRequest(); href="myapplication.js"/> <script type="text/javascript" ... href="beepbeep.js"/> </head> function abc() <body> { ... ... </body> req.send(some_message); </html> } Sylvain Hallé
  • 41. Adding BeepBeep to a real application Œ Copy BeepBeep to application folder http://beepbeep.sourceforge.net  Include BeepBeep myapplication.html myapplication.js <html> <head> // Initializations <title>My Application ... </title> <script type="text/javascript" req = new XMLHttpRequestBB(); href="myapplication.js"/> <script type="text/javascript" ... href="beepbeep.js"/> </head> function abc() <body> { ... ... </body> req.send(some_message); </html> } Sylvain Hallé
  • 42. Adding BeepBeep to a real application Ž Obtain (or create) a contract file with LTL-FO+ formulae # --------------------------------------------------------------- # BeepBeep contract file for the Amazon ECS # --------------------------------------------------------------- % To create a cart, you must put at least one item ; G ([x1 /CartCreate/Operation] (((x1) = ({CartCreate})) -> (<x2 /CartCreate/Items/Item/ASIN> ({TRUE})))) % You can only create a cart once ; G ([x1 /CartCreate/Operation] (((x1) = ({CartCreate})) -> (X (G (!(<x2 /CartCreate/Operation> ((x2) = ({CartCreate})))))))) % No CartAdd can occur before a CartCreate ; (!(<x1 /CartAdd/Operation> ((x1) = ({CartAdd})))) U (<x2 /CartCreate/Operation> ((x2) = ({CartCreate}))) % You cannot add the same item twice to the shopping cart ; G ([i /CartCreate/Items/Item/ASIN] (X (G ([j /CartAdd/Items/Item/ASIN] (!((i) = (j))))))) Sylvain Hallé
  • 44. Experimental results Sample property: "each car entering in a parking lot must exit before entering again" < 5 ms/msg. Time per message (ms) Trace length Hallé & Villemaire, EDOC 2008 Sylvain Hallé
  • 45. Experimental results Simultaneous monitoring of 11 properties (Amazon example) 20 < 5% Time difference (%) 10 Moyenne 0 -10 -20 0 20 40 60 80 100 120 140 160 180 200 Trace length Sylvain Hallé
  • 46. Experimental results Simultaneous monitoring of 11 properties (Amazon example) 14 Time per message (ms) 12 Data domain 10 25 8 200 6 4 2 0 0 20 40 60 80 100 120 140 160 Trace length Sylvain Hallé
  • 48. Take-home points 1. Constraints involving temporal operators and quantification on message contents arise naturally in real web applications Sylvain Hallé
  • 49. Take-home points 1. Constraints involving temporal operators and quantification on message contents arise naturally in real web applications 2. An extension of LTL can formalize them: LTL-FO+ Sylvain Hallé
  • 50. Take-home points 1. Constraints involving temporal operators and quantification on message contents arise naturally in real web applications 2. An extension of LTL can formalize them: LTL-FO+ 3. Runtime monitoring of these constraints can be done efficiently, even with quantification Sylvain Hallé
  • 51. Take-home points 1. Constraints involving temporal operators and quantification on message contents arise naturally in real web applications 2. An extension of LTL can formalize them: LTL-FO+ 3. Runtime monitoring of these constraints can be done efficiently, even with quantification 4. BeepBeep is a tool that allows it with minimal modifications on real applications http://beepbeep.sourceforge.net/ Sylvain Hallé