Predicate Dispatching A Unified Theory of Dispatch by liamei12345

VIEWS: 1 PAGES: 9

									                       Outline
• System architecture
   • How to use the community to reduce learning cost
   • Algorithm for Merging Constraints
• Experiments
   • Overhead
   • Accuracy
                  System Architecture
                                 Central Management System


                                       Patch/Repair
                                      Code Generation
       Merge Constraints
          (Daikon)


          Constraints                               Patches                     Patch results


  Learning                 Learning
  (Daikon)                 (Daikon)

Sample Data      … Sample Data                                        …

   MPEE                     MPEE                   Live Shield                Live Shield
 Application            Application                Application                Application

Client Workstations (Learning)                          Client Workstations (Protected)
        Merge Constraints Example

1.    W=2             1.   W=2               1.    W=2
2.    X=42            2.                     2.
3.    X in {42}       3.   X in {3,57}       3.    X in {3,42,57}
4.    X%W=0           4.                     4.
5.    X-21*W=0        5.                     5.
6.    W<X         +   6.   W<X           =   6.    W<X
7.    Y<8             7.   Y<9               7.    Y<8
8.    Y<X             8.                     8.
9.    Y=Z|Y           9.   Y=Z|Y             9.    Y=Z|Y
10. Y%W=0             10. Y%W=0              10. Y%W=0
11.                   11. Y+3*W=0            11.
        …                     …                          …
             Merge Constraints
• Stateless constraints
   • Example: x=y , x=y|x , x%y=0
   • Either true/false
   • Merging algorithm: if the constraint always appear
• Sample dependent constraints
   • Example: x<42 , x in {1,4,8} , 3x-7y+2z=9
   • Change as new samples arrive
   • Merging example:
      • x<42 and x<56 are merged to x<42
• Update number of samples, missing variables, etc.
• Corner cases
   • Suppressed invariants, constant optimization
   • Small number of samples for an invariant
       Integration Experiments
• Evaluate community effectiveness by comparing:
   • Learning from one copy of an application
   • Community-based learning (multiple executions)
• Two experiments
   • Overhead comparison
   • Accuracy comparison
• Infrastructure
   • Apache web server (HTTPD) on Windows
   • A community of ten or more executions of Apache
  Instrumentation Overhead Experiment
• Baseline
   • Instrument 100% of Apache
   • Time a sequence of HTTP GET operations
   • (Daikon processes the single output file)
• Community Learning
   • Instrument a different 10% of Apache in 10 executions
   • Instrument a different 1% of Apache in 100 executions
   • Each execution will create a distinct trace of part of the
     program
   • The combined executions will instrument all of Apache
   • (Daikon processes all trace files)
• Community learning constraints match baseline
  constraints
• Instrumentation overhead is reduced significantly
  Instrumentation Overhead Results
• Community learning constraints match baseline
  constraints
• Instrumentation overhead is reduced significantly
              70
                          59.1               Overhead
              60                             Not-instrumented time

              50
    Seconds




              40

              30

              20

                                                 6.7
              10
                                                                          1.1
                                 1.6                    1.6                      1.6
              0
                   1 execution (100%)   10 different executions 100 different executions
                                                 (10%)                    (1%)
            Accuracy Experiment
• Community Learning
  • Instrument 100% of Apache during 1000 HTTP
    operations
  • Divide into two sets: learning and testing
  • Build constraints based on
      •   1% of the learning set
      •   2% of the learning set
      •   …
      •   100% of the learning set
  • A constraint is a false-positive is if it is violated by a
    sample in the testing set
                            Accuracy Experiment Results
     • False positives are reduced as more community
       learning is used.
                       12.00%



                       10.00%
Flase Positive Rates




                        8.00%



                        6.00%



                        4.00%



                        2.00%



                        0.00%
                                         HTTP GETs

								
To top