SlideShare a Scribd company logo
1 of 39
Download to read offline
Photo (cc) Horia Varlan




Virtual Separation of Concerns
Toward preprocessors 2.0




Christian KƤstner
Christian KƤstner: Virtual Separation of Concerns   2



          Software Product Lines & Features

 ā€¢ Set of related software systems (variants)
   in a domain
 ā€¢ Generated from common code base
 ā€¢ Variants distinguished in terms of features
Christian KƤstner: Virtual Separation of Concerns                                       3



                  Conditional Compilation with
                         Preprocessors
 ā— Annotated code                                   static int _rep_queue_filedone(...
                                                        DB_ENV *dbenv;
   fragments                                            REP *rep;
                                                        __rep_fileinfo_args *rfp; {
 ā— Variants with and                                #ifndef HAVE_QUEUE
                                                        COMPQUIET(rep, NULL);
   without features                                     COMPQUIET(rfp, NULL);
                                                        return (__db_no_queue_am(dbenv
                                                    #else
                                                        db_pgno_t first, last;
 ā— Common for product-                                  u_int32_t flags;
                                                        int empty, ret, t_ret;
   line implementation                              #ifdef DIAGNOSTIC
                                                        DB_MSGBUF mb;
   in industry                                      #endif
                                                        ...
                                                    Excerpt from Oracleā€™s Berkeley DB

 Preprocessors in C, C++, Java ME, Pascal, Erlang, C#, Visual Basic, ā€¦
 GPP, GNU M4, SPLET, Frames/XVCL, Gears, pure::variants
Christian KƤstner: Virtual Separation of Concerns                                         4




                            Objections / Criticism


    Designed in the 70th and hardly evolved since

      ā€œ#ifdef considered harmfulā€
                                                                  ā€œ#ifdef hellā€
   ā€œmaintenance becomes a ā€˜hit or missā€™ processā€

                                          ā€œis difficult to determine if the code being
                                           viewed is actually compiled into the systemā€

                    ā€œincomprehensible source textsā€
     ā€œprogramming errors are easy                     ā€œCPP makes maintenance difficultā€
      to make and difficult to detectā€
                                                         ā€œsource code rapidly
ā€œpreprocessor diagnostics are poorā€                       becomes a mazeā€
Christian KƤstner: Virtual Separation of Concerns                                                  5



       Academia: Compositional Approaches

 Base / Platform
   class Stack {
   class Stack {
     void push(Object o) {
     void push(Object o) {
       elementData[size++] = o;
       elementData[size++] = o;
     }
     }
     ...
     ...
   }
   }


                                                                    class Stack {
                                                                    class Stack {
                                                                      void push(Object o) {
                                                                      void push(Object o) {
                                                                        Lock l = lock(o);
 Feature: Queue                                                         Lock l = lock(o);
                                                                        elementData[size++] = o;
                                                                        elementData[size++] = o;
   refines class Stack {
   refines class Stack {
                                                    Composition       }
                                                                      }
                                                                        l.unlock();
                                                                        l.unlock();
                                                                      ...
     void push(Object o) {
     void push(Object o) {                                            ...
       Lock l = lock(o);
       Lock l = lock(o);                                            }
                                                                    }
       Super.push(o);
       Super.push(o);
       l.unlock();
       l.unlock();
     }
     }
     ...
     ...
   }
   }
                                                        Module
                                                        Components
 Feature: Diagnostic                                    Frameworks, Plug-ins
   aspect Diagnostics {
   aspect Diagnostics {
     ...
                                                        Feature-Modules / Mixin Layers / ā€¦
     ...
   }
   }                                                    Aspects / Subjects, Hyper/J
Christian KƤstner: Virtual Separation of Concerns      6




                                              Agenda

ā€¢ Problems and Advantages of Preprocessors
ā€¢ 4 Improvements
      ā€¢   Views
      ā€¢   Visual Representation
      ā€¢   Disciplined Annotations
      ā€¢   Product-Line-Aware Type System
ā€¢ Summary and Perspective
Christian KƤstner: Virtual Separation of Concerns   7




Problem 1: Lack of Separation of Concerns

ā€¢    Scattered and tangled source code
ā€¢    Global search to understand a feature
ā€¢    Deleting obsolete feature as challenge
ā€¢    Difficult distributed development
ā€¢    Difficult reuse



    Beispiel Berkeley DB:
    Feature Sperren mit 1835 LOC
    in 28 von 300 Dateien
    an 155 Stellen
Christian KƤstner: Virtual Separation of Concerns                               8




                         Problem 2: Obfuscation

ā€¢ Mixture of two                                    class Stack {
                                                    class Stack {
                                                        void push(Object o
  languages                                             void push(Object o
                                                    #ifdef SYNC
                                                    #ifdef SYNC
                                                        , Transaction txn
  (C und #ifdef, ā€¦)                                     , Transaction txn
                                                    #endif
                                                    #endif
                                                        ) {
ā€¢ Control flow hard to                                  ) {
                                                            if (o==null
                                                            if (o==null
                                                    #ifdef SYNC
                                                    #ifdef SYNC
  follow                                                        || txn==null
                                                                || txn==null
                                                    #endif
                                                    #endif
ā€¢ Additional line breaks                                        ) return;
                                                                ) return;
                                                    #ifdef SYNC
                                                    #ifdef SYNC
  destroy code layout                                       Lock l=txn.lock(o);
                                                            Lock l=txn.lock(o);
                                                    #endif
                                                    #endif
ā€¢ Long annotations                                          elementData[size++] = o;
                                                            elementData[size++] = o;
                                                    #ifdef SYNC
                                                    #ifdef SYNC
  difficult to recognize                                    l.unlock();
                                                            l.unlock();
                                                    #endif
                                                    #endif
                                                            fireStackChanged();
                                                            fireStackChanged();
                                                        }
                                                        }
                                                    }
                                                    }
Christian KƤstner: Virtual Separation of Concerns   9




                      Preprocessor in Femto OS
Christian KƤstner: Virtual Separation of Concerns                            10




                          Problem 3: Error-Prone

ā€¢ Syntax Errors                                     ā€¢ Type Errors
  static int _rep_queue_filedone(...)               #ifdef TABLES
      DB_ENV *dbenv;                                class Table {
      REP *rep;                                       void insert(Object data,
      __rep_fileinfo_args *rfp; {                               Txn txn) {
  #ifndef HAVE_QUEUE                                       storage.set(data,
      COMPQUIET(rep, NULL);                                     txn.getLock());
      COMPQUIET(rfp, NULL);                           }
      return (__db_no_queue_am(dbenv));             }
  #else                                             #endif
      db_pgno_t first, last;                        class Storage {
      u_int32_t flags;                              #ifdef WRITE
      int empty, ret, t_ret;                            boolean set(ā€¦) { ... }
  #ifdef DIAGNOSTIC                                 #endif
      DB_MSGBUF mb;                                 }
  #endif
      // over 100 lines of additional code
  }
  #endif
Christian KƤstner: Virtual Separation of Concerns                            11




                          Problem 3: Error-Prone

ā€¢ Syntax Errors                                     ā€¢ Type Errors
  static int _rep_queue_filedone(...)               #ifdef TABLES
      DB_ENV *dbenv;                                class Table {
      REP *rep;                                       void insert(Object data,
      __rep_fileinfo_args *rfp; {                               Txn txn) {
  #ifndef HAVE_QUEUE                                       storage.set(data,
      COMPQUIET(rep, NULL);                                     txn.getLock());
      COMPQUIET(rfp, NULL);                           }
      return (__db_no_queue_am(dbenv));             }
  #else                                             #endif
      db_pgno_t first, last;                        class Storage {
      u_int32_t flags;                              #ifdef WRITE
      int empty, ret, t_ret;                            boolean set(ā€¦) { ... }
  #ifdef DIAGNOSTIC                                 #endif
      DB_MSGBUF mb;                                 }
  #endif
      // over 100 lines of additional code
  }
  #endif
Christian KƤstner: Virtual Separation of Concerns                            12




                          Problem 3: Error-Prone

ā€¢ Syntax Errors                                     ā€¢ Type Errors
  static int _rep_queue_filedone(...)               #ifdef TABLES
      DB_ENV *dbenv;                                class Table {
      REP *rep;                                       void insert(Object data,
      __rep_fileinfo_args *rfp; {                               Txn txn) {
  #ifndef HAVE_QUEUE                                       storage.set(data,
      COMPQUIET(rep, NULL);                                     txn.getLock());
      COMPQUIET(rfp, NULL);                           }
      return (__db_no_queue_am(dbenv));             }
  #else                                             #endif
      db_pgno_t first, last;                        class Storage {
      u_int32_t flags;                              #ifdef WRITE
      int empty, ret, t_ret;                            boolean set(ā€¦) { ... }
  #ifdef DIAGNOSTIC                                 #endif
      DB_MSGBUF mb;                                 }
  #endif
      // over 100 lines of additional code
  }
  #endif
Christian KƤstner: Virtual Separation of Concerns       13




                                        Advantages

ā€¢ Easy to use
      ā€¢ ā€œannotate and removeā€
      ā€¢ Already part of many languages / simple tools
      ā€¢ Most developers already familiar


ā€¢ Flexible / Expressive
ā€¢ Language-independent / Uniform

ā€¢ Low Adoption Barrier
      ā€¢ esp. with legacy code
Christian KƤstner: Virtual Separation of Concerns      14




                                              Agenda

ā€¢ Problems and Advantages of Preprocessors
ā€¢ 4 Improvements
      ā€¢   Views
      ā€¢   Visual Representation
      ā€¢   Disciplined Annotations
      ā€¢   Product-Line-Aware Type System
ā€¢ Summary and Perspective
Christian KƤstner: Virtual Separation of Concerns                                 15

                                                              [ICSEā€™08, ViSPLEā€™08]

                                                Views

ā€¢ Emulate modularity
ā€¢ Hide irrelevant source code
      ā€¢ Hides entire files
      ā€¢ Hides code inside files



                                                        Related work:
                                                        ā€¢ C-CLR
                                                        ā€¢ Version Editor
                                                        ā€¢ FeatureMapper
                                                        ā€¢ pure::variants
                                                        ā€¢ Effective Views
                                                        ā€¢ on-demand remodularization
                                                        ā€¦
Christian KƤstner: Virtual Separation of Concerns   16




                              Expression Problem
Christian KƤstner: Virtual Separation of Concerns   17




                            View on Feature Eval




ā€¢ Shows all files containing Eval code
ā€¢ Shows context information (kursiv)
ā€¢ Hides code without annotations
Christian KƤstner: Virtual Separation of Concerns   18




         View on the Variant ā€œAdd and Evalā€




ā€¢ Entirely hides file Power
ā€¢ Hides method print in Add ([ā€¦])
ā€¢ Code without annotation remains visible
Christian KƤstner: Virtual Separation of Concerns      19




                                              Agenda

ā€¢ Problems and Advantages of Preprocessors
ā€¢ 4 Improvements
      ā€¢   Views
      ā€¢   Visual Representation
      ā€¢   Disciplined Annotations
      ā€¢   Product-Line-Aware Type System
ā€¢ Summary and Perspective
Christian KƤstner: Virtual Separation of Concerns                      20

                                                     [ICSEā€™08, ViSPLEā€™08]

 Visual Representation: Background Colors

  class Stack {
  class Stack {
      void push(Object o
       void push(Object o
  #ifdef SYNC
  #ifdef SYNC
      , Transaction txn
       , Transaction txn
  #endif
  #endif
      ) {
       ) {
           if (o==null
           if (o==null
  #ifdef SYNC
  #ifdef SYNC
               || txn==null
                || txn==null
  #endif
  #endif
               ) return;
                ) return;
  #ifdef SYNC
  #ifdef SYNC
           Lock l=txn.lock(o);
           Lock l=txn.lock(o);
  #endif
  #endif
           elementData[size++] = o;
           elementData[size++] = o;
  #ifdef SYNC
  #ifdef SYNC                                       Related Work:
           l.unlock();
           l.unlock();
  #endif                                            ā€¢ Spotlight
  #endif
           fireStackChanged();
           fireStackChanged();                      ā€¢ NetBeans
      }}                                            ā€¢ fmp2rsm
  }
  }                                                 ā€¢ FeatureMapper
                                                    ā€¢ AspectBrowser
                                                    ā€¦
Christian KƤstner: Virtual Separation of Concerns                 21




          Alternative Visual Representations

 ā— NetBeans                                         ā— Spotlight
Christian KƤstner: Virtual Separation of Concerns   22




               Scaling Visual Representations

ā€¢ Focus on few features at a time
ā€¢ Repeating colors / manual assignment
  sufficient
ā€¢ Analysis of 4 Java ME and 40 C programs:
      ā€¢ 96 % pages of source code with ā‰¤ 3 colors
      ā€¢ 99 % pages of source code with ā‰¤ 7 colors
Christian KƤstner: Virtual Separation of Concerns   23




   Program Comprehension: An Experiment

 ā€¢ #ifdef vs. colors
 ā€¢ 43 subjects in 2
   groups
 ā€¢ S1-2: search tasks
   faster with colors
   (43% & 23%)
 ā€¢ M1-3: maintenance
   tasks same perform.
 ā€¢ M4: maintenance
   task with red back-
   ground color -37%
 ā€¢ No influence on correctness
 ā€¢ Subjects prefer colors
Christian KƤstner: Virtual Separation of Concerns      24




                                              Agenda

ā€¢ Problems and Advantages of Preprocessors
ā€¢ 4 Improvements
      ā€¢   Views
      ā€¢   Visual Representation
      ā€¢   Disciplined Annotations
      ā€¢   Product-Line-Aware Type System
ā€¢ Summary and Perspective
Christian KƤstner: Virtual Separation of Concerns                                   25

                                                                     [TOOLSā€˜09]

                         Disciplined Annotations
                                                                 class Foo { }
ā€¢ Syntax errors caused by
  annotations on plain text            class Foo                                 { }

ā€¢ Solution: Use underlying artifact structure
      ā€¢ Enforce disciplined annotations on entire classes,
        methods, or statements
      ā€¢ Annotations of isolated brackets or      ClassDeclaration
                                                     Name=C
        keywords regarded as undisciplined      MethodDeclaration
                                                                     Name=m

                                                    ReturnType   Parameter
           class C {                                 Type-void    Name=p
                                                                                Block
               void m(int p) {
                   s1();
                                                                 MethodInvk   MethodInvk
                   s2(p, true);                                   Name=s1      Name=s2
               }
           }                                                     Parameter    Parameter
                                                                  Name=p      Name=true
Christian KƤstner: Virtual Separation of Concerns                                                          26




Variant Generation by AST Transformation
                    ClassDeclaration                                          ClassDeclaration
                        Name=C                                                    Name=C

                   MethodDeclaration
                                                                          MethodDeclaration
                       Name=m
                                                                              Name=m

       ReturnType    Parameter
                                       Block
        Type-void     Name=p                                     ReturnType     Parameter
                                                                                                   Block
                                                                  Type-void      Name=p
                     MethodInvk    MethodInvk
                      Name=s1       Name=s2
                                                      variant                                    MethodInvk
                                                                                                  Name=s1
                     Parameter     Parameter        generation
                      Name=p       Name=true
                                                                                          print /
                               parsing                                                    unparse
            class C {                                                 class C {
                void m(int p) {                                           void m(int p) {
                    s1();                                                     s1();
                    s2(p, true);                                          }
                }                                                     }
            }

                         Variant generation cannot cause syntax errors.
Christian KƤstner: Virtual Separation of Concerns                             27




 Expressiveness of Disciplined Annotations

ā€¢ Not all annotations are possible
ā€¢ Sometimes workarounds required
ā€¢ Experience: not a significant restriction in
  practice
ā€¢ ~90% of all annotations in 40 C programs is
  disciplined already
 high flexibility                                                 no flexibility



unrestricted                  disciplined annotations    classes          no
annotations                     (underlying structure)     only  annotations
on any character
Christian KƤstner: Virtual Separation of Concerns      28




                                              Agenda

ā€¢ Problems and Advantages of Preprocessors
ā€¢ 4 Improvements
      ā€¢   Views
      ā€¢   Visual Representation
      ā€¢   Disciplined Annotations
      ā€¢   Product-Line-Aware Type System
ā€¢ Summary and Perspective
Christian KƤstner: Virtual Separation of Concerns                                        29

                                                                                 [ASEā€™08]

            Product-Line-Aware Type System
                                                                    class Database {
                                                                      Storage storage;
ā€¢ Base: Type correct without                                          void insert(Object data
                                                                                Txn txn) {
  annotations (for tool support)                                           storage.set(data,
                                                                                txn.getLock())
ā€¢ Detecting all pairs:                                                }
                                                                    }
      ā€¢ Method invocation and                                       class Storage {
                                                                    #ifdef WRITE
        method declaration                                              boolean set(ā€¦) { ... }
      ā€¢ Reference and declaration                                   #endif
                                                                    }
        of class, variable, etc.
      ā€¢ ā€¦                                                               Related Work:
ā€¢ Comparison of annotations for                                         ā€¢ SafeGen
                                                                        ā€¢ fmp2rsm
  each pair                                                             ā€¢ Safe Composition
                                                                        ā€¢ FFJPL
  Declaration annotated +                           Error in some       ā€¢ Conditional
  Reference not annotated                           variants              Methods
Christian KƤstner: Virtual Separation of Concerns                               30



                 Type Checking in the Context
                      of a Feature Model
                                                                        Ā¬Read
ā€¢ Handling dependencies                             class Database {
  between features                                    void insert(ā€¦) {
                                                        storage.set(ā€¦);

ā€¢ Can all variants with
                                                      }
                                                    }
                                                    class Storage {
  reference reach a                                   boolean set(ā€¦) { ... }
  corresp. declaration?                             }
                                                                     Write

                                                            FM = API āˆ§ ( API ā‡’
ā€¢ Implementation: Propositional                                 (read āˆØ write))
  logic and SAT solvers:
   In all variants in which code fragment A is
   included also code fragment B is included:
                FM ā‡’ ( AT (a ) ā‡’ AT (b))
Christian KƤstner: Virtual Separation of Concerns          31

                                                     [ASEā€™08]

                                Formalization: CFJ

 ā— On top of Featherweight Java
 ā— Theorem: Generation preserves typing
       ā— Formal proof with Coq
Christian KƤstner: Virtual Separation of Concerns            32




                           Implementation: CIDE




                                       http://fosd.de/cide
Christian KƤstner: Virtual Separation of Concerns                           33

                                                                      [GPCEā€™09]

                         Automated Refactorings

 ā€¢ Feature Module                                    ā— Annotationen
       class Stack {
       class Stack {                     class Stack {
                                         class Stack {
          int[] data;
           int[] data;                       int[] data;
                                             int[] data;
Base




          void push(int o) { ā€¦ }
           void push(int o) { ā€¦ }        #ifdef UNDO
                                         #ifdef UNDO
          int pop() { /*...*/ }
           int pop() { /*...*/ }             int backup;
                                             int backup;
       }
       }                                     void undo() { /*...*/ }
                                             void undo() { /*...*/ }
                                         #endif
                                         #endif
       refines class Stack {
       refines class Stack {             #ifdef TOP
                                         #ifdef TOP
                           Automated Transformationtop() { /*...*/ }
Top




          int top() { /*...*/ }
          int top() { /*...*/ }              int top() { /*...*/ }
                                             int
       }
       }                                 #endif
                                         #endif
                                             void push(int o) {
                                             void push(int o) {
       refines class Stack {
       refines class Stack {             #ifdef UNDO
                                         #ifdef UNDO
          int backup;
          int backup;                             backup = top();
                                                  backup = top();
          void undo() { /*...*/ }
          void undo() { /*...*/ }        #endif
                                         #endif
Undo




          void push(int o) {
          void push(int o) {                      /*...*/
                                                  /*...*/
             backup = top();
              backup = top();                }
                                             }
             original(v);
              original(v);                   int pop() { /*...*/ }
                                             int pop() { /*...*/ }
          }
          }                              }
                                         }
Christian KƤstner: Virtual Separation of Concerns      34




                                              Agenda

ā€¢ Problems and Advantages of Preprocessors
ā€¢ 4 Improvements
      ā€¢   Views
      ā€¢   Visual Representation
      ā€¢   Disciplined Annotations
      ā€¢   Product-Line-Aware Type System
ā€¢ Summary and Perspective
Christian KƤstner: Virtual Separation of Concerns                               35




                                            Summary

ā€¢ Problems:                                         ā€¢ Improvements:
      ā€¢ Separation of Concerns                        ā€¢   Views
      ā€¢ Obfuscation                                   ā€¢   Visual representation
      ā€¢ Error-proneness                               ā€¢   Disciplined annotations
                                                      ā€¢   Product-line-aware type
                                                          system
ā€¢ Retained advantages:
      ā€¢   Easy to use
      ā€¢   Flexible
      ā€¢   Language-independent
      ā€¢   Low adoption barrier

             ā€œVirtual Separation of Concernsā€
Christian KƤstner: Virtual Separation of Concerns                               36




                                            Summary

ā€¢ Problems:                                         ā€¢ Improvements:
      ā€¢ Separation of Concerns                        ā€¢   Views
      ā€¢ Obfuscation                                   ā€¢   Visual representation
      ā€¢ Error-proneness                               ā€¢   Disciplined annotations
                                                      ā€¢   Product-line-aware type
                                                          system
ā€¢ Retained advantages:
      ā€¢   Easy to use
      ā€¢   Flexible
      ā€¢   Language-independent
      ā€¢   Low adoption barrier

             ā€œVirtual Separation of Concernsā€
Christian KƤstner: Virtual Separation of Concerns                               37




                                            Summary

ā€¢ Problems:                                         ā€¢ Improvements:
      ā€¢ Separation of Concerns                        ā€¢   Views
      ā€¢ Obfuscation                                   ā€¢   Visual representation
      ā€¢ Error-proneness                               ā€¢   Disciplined annotations
                                                      ā€¢   Product-line-aware type
                                                          system
ā€¢ Retained advantages:
      ā€¢   Easy to use                               ā€¢ Remaining Problems:
      ā€¢   Flexible                                    ā€¢ Separate Compilation
      ā€¢   Language-independent                        ā€¢ Black-box Reuse
      ā€¢   Low adoption barrier

             ā€œVirtual Separation of Concernsā€
Christian KƤstner: Virtual Separation of Concerns     38




                                        Perspective

 ā€¢ Preprocessors common in practice,
   despite strong criticism
 ā€¢ Neglected by researchers
 ā€¢ Tool support can address most problems

 ā€¢ Interim solution (with migration path) or
   serious alternative?

 ā€¢ Give preprocessors a second chance!
Christian KƤstner: Virtual Separation of Concerns                     39




                                         Questions?




                                                      http://fosd.de/cide

More Related Content

What's hot

Scala design pattern
Scala design patternScala design pattern
Scala design patternKenji Yoshida
Ā 
A recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesA recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesCoen De Roover
Ā 
Applicative Logic Meta-Programming as the foundation for Template-based Progr...
Applicative Logic Meta-Programming as the foundation for Template-based Progr...Applicative Logic Meta-Programming as the foundation for Template-based Progr...
Applicative Logic Meta-Programming as the foundation for Template-based Progr...Coen De Roover
Ā 
Dependency Breaking Techniques
Dependency Breaking TechniquesDependency Breaking Techniques
Dependency Breaking Techniqueshyun soomyung
Ā 
Oop04 6
Oop04 6Oop04 6
Oop04 6schwaa
Ā 
201005 accelerometer and core Location
201005 accelerometer and core Location201005 accelerometer and core Location
201005 accelerometer and core LocationJavier Gonzalez-Sanchez
Ā 
Core java concepts
Core java concepts Core java concepts
Core java concepts javeed_mhd
Ā 
Writing Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel SchulhofWriting Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel SchulhofWithTheBest
Ā 
Let's talk about jni
Let's talk about jniLet's talk about jni
Let's talk about jniYongqiang Li
Ā 
Scala overview
Scala overviewScala overview
Scala overviewSteve Min
Ā 
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency GotchasAlex Miller
Ā 
JVM bytecode - The secret language behind Java and Scala
JVM bytecode - The secret language behind Java and ScalaJVM bytecode - The secret language behind Java and Scala
JVM bytecode - The secret language behind Java and ScalaTakipi
Ā 
Fundamental of programming - Ł…Ł‚ŲÆŁ…Ų§ŲŖ ŲØŲ±Ł†Ų§Ł…Ł‡ Ł†ŁˆŪŒŲ³ŪŒ
Fundamental of programming - Ł…Ł‚ŲÆŁ…Ų§ŲŖ ŲØŲ±Ł†Ų§Ł…Ł‡ Ł†ŁˆŪŒŲ³ŪŒFundamental of programming - Ł…Ł‚ŲÆŁ…Ų§ŲŖ ŲØŲ±Ł†Ų§Ł…Ł‡ Ł†ŁˆŪŒŲ³ŪŒ
Fundamental of programming - Ł…Ł‚ŲÆŁ…Ų§ŲŖ ŲØŲ±Ł†Ų§Ł…Ł‡ Ł†ŁˆŪŒŲ³ŪŒSaman Chitsazian
Ā 
Š”Š¼ŠøтрŠøŠ¹ ŠŠµŃŃ‚ŠµŃ€ŃƒŠŗ, ŠŸŠ°Ń‚Ń‚ŠµŃ€Š½Ń‹ ŠæрŠ¾ŠµŠŗтŠøрŠ¾Š²Š°Š½Šøя Š² XXI Š²ŠµŠŗŠµ
Š”Š¼ŠøтрŠøŠ¹ ŠŠµŃŃ‚ŠµŃ€ŃƒŠŗ, ŠŸŠ°Ń‚Ń‚ŠµŃ€Š½Ń‹ ŠæрŠ¾ŠµŠŗтŠøрŠ¾Š²Š°Š½Šøя Š² XXI Š²ŠµŠŗŠµŠ”Š¼ŠøтрŠøŠ¹ ŠŠµŃŃ‚ŠµŃ€ŃƒŠŗ, ŠŸŠ°Ń‚Ń‚ŠµŃ€Š½Ń‹ ŠæрŠ¾ŠµŠŗтŠøрŠ¾Š²Š°Š½Šøя Š² XXI Š²ŠµŠŗŠµ
Š”Š¼ŠøтрŠøŠ¹ ŠŠµŃŃ‚ŠµŃ€ŃƒŠŗ, ŠŸŠ°Ń‚Ń‚ŠµŃ€Š½Ń‹ ŠæрŠ¾ŠµŠŗтŠøрŠ¾Š²Š°Š½Šøя Š² XXI Š²ŠµŠŗŠµSergey Platonov
Ā 

What's hot (19)

Project Roslyn: Exposing the C# and VB compilerā€™s code analysis
Project Roslyn: Exposing the C# and VB compilerā€™s code analysisProject Roslyn: Exposing the C# and VB compilerā€™s code analysis
Project Roslyn: Exposing the C# and VB compilerā€™s code analysis
Ā 
Scala design pattern
Scala design patternScala design pattern
Scala design pattern
Ā 
A recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesA recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templates
Ā 
Smart Pointers
Smart PointersSmart Pointers
Smart Pointers
Ā 
Applicative Logic Meta-Programming as the foundation for Template-based Progr...
Applicative Logic Meta-Programming as the foundation for Template-based Progr...Applicative Logic Meta-Programming as the foundation for Template-based Progr...
Applicative Logic Meta-Programming as the foundation for Template-based Progr...
Ā 
Dependency Breaking Techniques
Dependency Breaking TechniquesDependency Breaking Techniques
Dependency Breaking Techniques
Ā 
Oop04 6
Oop04 6Oop04 6
Oop04 6
Ā 
201005 accelerometer and core Location
201005 accelerometer and core Location201005 accelerometer and core Location
201005 accelerometer and core Location
Ā 
Core java concepts
Core java concepts Core java concepts
Core java concepts
Ā 
Writing Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel SchulhofWriting Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel Schulhof
Ā 
Let's talk about jni
Let's talk about jniLet's talk about jni
Let's talk about jni
Ā 
Scala overview
Scala overviewScala overview
Scala overview
Ā 
Java generics final
Java generics finalJava generics final
Java generics final
Ā 
Javamschn3
Javamschn3Javamschn3
Javamschn3
Ā 
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency Gotchas
Ā 
JVM bytecode - The secret language behind Java and Scala
JVM bytecode - The secret language behind Java and ScalaJVM bytecode - The secret language behind Java and Scala
JVM bytecode - The secret language behind Java and Scala
Ā 
Fundamental of programming - Ł…Ł‚ŲÆŁ…Ų§ŲŖ ŲØŲ±Ł†Ų§Ł…Ł‡ Ł†ŁˆŪŒŲ³ŪŒ
Fundamental of programming - Ł…Ł‚ŲÆŁ…Ų§ŲŖ ŲØŲ±Ł†Ų§Ł…Ł‡ Ł†ŁˆŪŒŲ³ŪŒFundamental of programming - Ł…Ł‚ŲÆŁ…Ų§ŲŖ ŲØŲ±Ł†Ų§Ł…Ł‡ Ł†ŁˆŪŒŲ³ŪŒ
Fundamental of programming - Ł…Ł‚ŲÆŁ…Ų§ŲŖ ŲØŲ±Ł†Ų§Ł…Ł‡ Ł†ŁˆŪŒŲ³ŪŒ
Ā 
Java Programming - 03 java control flow
Java Programming - 03 java control flowJava Programming - 03 java control flow
Java Programming - 03 java control flow
Ā 
Š”Š¼ŠøтрŠøŠ¹ ŠŠµŃŃ‚ŠµŃ€ŃƒŠŗ, ŠŸŠ°Ń‚Ń‚ŠµŃ€Š½Ń‹ ŠæрŠ¾ŠµŠŗтŠøрŠ¾Š²Š°Š½Šøя Š² XXI Š²ŠµŠŗŠµ
Š”Š¼ŠøтрŠøŠ¹ ŠŠµŃŃ‚ŠµŃ€ŃƒŠŗ, ŠŸŠ°Ń‚Ń‚ŠµŃ€Š½Ń‹ ŠæрŠ¾ŠµŠŗтŠøрŠ¾Š²Š°Š½Šøя Š² XXI Š²ŠµŠŗŠµŠ”Š¼ŠøтрŠøŠ¹ ŠŠµŃŃ‚ŠµŃ€ŃƒŠŗ, ŠŸŠ°Ń‚Ń‚ŠµŃ€Š½Ń‹ ŠæрŠ¾ŠµŠŗтŠøрŠ¾Š²Š°Š½Šøя Š² XXI Š²ŠµŠŗŠµ
Š”Š¼ŠøтрŠøŠ¹ ŠŠµŃŃ‚ŠµŃ€ŃƒŠŗ, ŠŸŠ°Ń‚Ń‚ŠµŃ€Š½Ń‹ ŠæрŠ¾ŠµŠŗтŠøрŠ¾Š²Š°Š½Šøя Š² XXI Š²ŠµŠŗŠµ
Ā 

Viewers also liked

Parsing and Type checking all 2^10000 configurations of the Linux kernel
Parsing and Type checking all 2^10000 configurations of the Linux kernelParsing and Type checking all 2^10000 configurations of the Linux kernel
Parsing and Type checking all 2^10000 configurations of the Linux kernelchk49
Ā 
Semseo socialamedier-hr
Semseo socialamedier-hrSemseo socialamedier-hr
Semseo socialamedier-hrPeter Tilling
Ā 
Virtual Separation of Concerns (2011 Update)
Virtual Separation of Concerns (2011 Update)Virtual Separation of Concerns (2011 Update)
Virtual Separation of Concerns (2011 Update)chk49
Ā 
Variability-Aware Parsing -- OOPSLA Talk
Variability-Aware Parsing -- OOPSLA TalkVariability-Aware Parsing -- OOPSLA Talk
Variability-Aware Parsing -- OOPSLA Talkchk49
Ā 
Seeing Software
Seeing SoftwareSeeing Software
Seeing SoftwareMichele Lanza
Ā 
Variability-Aware Analysis (FOSD Dagstuhl 2011)
Variability-Aware Analysis (FOSD Dagstuhl 2011)Variability-Aware Analysis (FOSD Dagstuhl 2011)
Variability-Aware Analysis (FOSD Dagstuhl 2011)chk49
Ā 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
Ā 

Viewers also liked (7)

Parsing and Type checking all 2^10000 configurations of the Linux kernel
Parsing and Type checking all 2^10000 configurations of the Linux kernelParsing and Type checking all 2^10000 configurations of the Linux kernel
Parsing and Type checking all 2^10000 configurations of the Linux kernel
Ā 
Semseo socialamedier-hr
Semseo socialamedier-hrSemseo socialamedier-hr
Semseo socialamedier-hr
Ā 
Virtual Separation of Concerns (2011 Update)
Virtual Separation of Concerns (2011 Update)Virtual Separation of Concerns (2011 Update)
Virtual Separation of Concerns (2011 Update)
Ā 
Variability-Aware Parsing -- OOPSLA Talk
Variability-Aware Parsing -- OOPSLA TalkVariability-Aware Parsing -- OOPSLA Talk
Variability-Aware Parsing -- OOPSLA Talk
Ā 
Seeing Software
Seeing SoftwareSeeing Software
Seeing Software
Ā 
Variability-Aware Analysis (FOSD Dagstuhl 2011)
Variability-Aware Analysis (FOSD Dagstuhl 2011)Variability-Aware Analysis (FOSD Dagstuhl 2011)
Variability-Aware Analysis (FOSD Dagstuhl 2011)
Ā 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
Ā 

Similar to Virtual Separation of Concerns

Shiksharth com java_topics
Shiksharth com java_topicsShiksharth com java_topics
Shiksharth com java_topicsRajesh Verma
Ā 
14.jun.2012
14.jun.201214.jun.2012
14.jun.2012Tech_MX
Ā 
Exciting JavaScript - Part I
Exciting JavaScript - Part IExciting JavaScript - Part I
Exciting JavaScript - Part IEugene Lazutkin
Ā 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Agora Group
Ā 
A Sceptical Guide to Functional Programming
A Sceptical Guide to Functional ProgrammingA Sceptical Guide to Functional Programming
A Sceptical Guide to Functional ProgrammingGarth Gilmour
Ā 
Programming Android Application in Scala.
Programming Android Application in Scala.Programming Android Application in Scala.
Programming Android Application in Scala.Brian Hsu
Ā 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).pptAlok Kumar
Ā 
Static code analysis: what? how? why?
Static code analysis: what? how? why?Static code analysis: what? how? why?
Static code analysis: what? how? why?Andrey Karpov
Ā 
C interview questions
C interview questionsC interview questions
C interview questionsSoba Arjun
Ā 
Š¾Š±Š·Š¾Ń€ Python
Š¾Š±Š·Š¾Ń€ PythonŠ¾Š±Š·Š¾Ń€ Python
Š¾Š±Š·Š¾Ń€ PythonYehor Nazarkin
Ā 
C++ Interview Question And Answer
C++ Interview Question And AnswerC++ Interview Question And Answer
C++ Interview Question And AnswerJagan Mohan Bishoyi
Ā 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answerlavparmar007
Ā 
Scala at GenevaJUG by Iulian Dragos
Scala at GenevaJUG by Iulian DragosScala at GenevaJUG by Iulian Dragos
Scala at GenevaJUG by Iulian DragosGenevaJUG
Ā 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to ScalaBrian Hsu
Ā 
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)Theo Jungeblut
Ā 
Lecture20 vector
Lecture20 vectorLecture20 vector
Lecture20 vectornurkhaledah
Ā 
Clean Code for East Bay .NET User Group
Clean Code for East Bay .NET User GroupClean Code for East Bay .NET User Group
Clean Code for East Bay .NET User GroupTheo Jungeblut
Ā 
Cross Platform App Development with C++
Cross Platform App Development with C++Cross Platform App Development with C++
Cross Platform App Development with C++Joan Puig Sanz
Ā 

Similar to Virtual Separation of Concerns (20)

Shiksharth com java_topics
Shiksharth com java_topicsShiksharth com java_topics
Shiksharth com java_topics
Ā 
14.jun.2012
14.jun.201214.jun.2012
14.jun.2012
Ā 
Exciting JavaScript - Part I
Exciting JavaScript - Part IExciting JavaScript - Part I
Exciting JavaScript - Part I
Ā 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011
Ā 
A Sceptical Guide to Functional Programming
A Sceptical Guide to Functional ProgrammingA Sceptical Guide to Functional Programming
A Sceptical Guide to Functional Programming
Ā 
Programming Android Application in Scala.
Programming Android Application in Scala.Programming Android Application in Scala.
Programming Android Application in Scala.
Ā 
core java
core javacore java
core java
Ā 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
Ā 
Static code analysis: what? how? why?
Static code analysis: what? how? why?Static code analysis: what? how? why?
Static code analysis: what? how? why?
Ā 
F#3.0
F#3.0 F#3.0
F#3.0
Ā 
C interview questions
C interview questionsC interview questions
C interview questions
Ā 
Š¾Š±Š·Š¾Ń€ Python
Š¾Š±Š·Š¾Ń€ PythonŠ¾Š±Š·Š¾Ń€ Python
Š¾Š±Š·Š¾Ń€ Python
Ā 
C++ Interview Question And Answer
C++ Interview Question And AnswerC++ Interview Question And Answer
C++ Interview Question And Answer
Ā 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answer
Ā 
Scala at GenevaJUG by Iulian Dragos
Scala at GenevaJUG by Iulian DragosScala at GenevaJUG by Iulian Dragos
Scala at GenevaJUG by Iulian Dragos
Ā 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
Ā 
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)
Ā 
Lecture20 vector
Lecture20 vectorLecture20 vector
Lecture20 vector
Ā 
Clean Code for East Bay .NET User Group
Clean Code for East Bay .NET User GroupClean Code for East Bay .NET User Group
Clean Code for East Bay .NET User Group
Ā 
Cross Platform App Development with C++
Cross Platform App Development with C++Cross Platform App Development with C++
Cross Platform App Development with C++
Ā 

Recently uploaded

Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
Ā 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
Ā 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
Ā 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
Ā 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
Ā 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
Ā 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
Ā 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
Ā 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxDavid Douglas School District
Ā 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
Ā 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
Ā 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
Ā 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
Ā 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
Ā 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
Ā 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
Ā 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
Ā 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
Ā 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
Ā 

Recently uploaded (20)

Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
Ā 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
Ā 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
Ā 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Ā 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
Ā 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
Ā 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
Ā 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
Ā 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
Ā 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
Ā 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
Ā 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
Ā 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
Ā 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
Ā 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Ā 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Ā 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
Ā 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
Ā 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
Ā 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
Ā 

Virtual Separation of Concerns

  • 1. Photo (cc) Horia Varlan Virtual Separation of Concerns Toward preprocessors 2.0 Christian KƤstner
  • 2. Christian KƤstner: Virtual Separation of Concerns 2 Software Product Lines & Features ā€¢ Set of related software systems (variants) in a domain ā€¢ Generated from common code base ā€¢ Variants distinguished in terms of features
  • 3. Christian KƤstner: Virtual Separation of Concerns 3 Conditional Compilation with Preprocessors ā— Annotated code static int _rep_queue_filedone(... DB_ENV *dbenv; fragments REP *rep; __rep_fileinfo_args *rfp; { ā— Variants with and #ifndef HAVE_QUEUE COMPQUIET(rep, NULL); without features COMPQUIET(rfp, NULL); return (__db_no_queue_am(dbenv #else db_pgno_t first, last; ā— Common for product- u_int32_t flags; int empty, ret, t_ret; line implementation #ifdef DIAGNOSTIC DB_MSGBUF mb; in industry #endif ... Excerpt from Oracleā€™s Berkeley DB Preprocessors in C, C++, Java ME, Pascal, Erlang, C#, Visual Basic, ā€¦ GPP, GNU M4, SPLET, Frames/XVCL, Gears, pure::variants
  • 4. Christian KƤstner: Virtual Separation of Concerns 4 Objections / Criticism Designed in the 70th and hardly evolved since ā€œ#ifdef considered harmfulā€ ā€œ#ifdef hellā€ ā€œmaintenance becomes a ā€˜hit or missā€™ processā€ ā€œis difficult to determine if the code being viewed is actually compiled into the systemā€ ā€œincomprehensible source textsā€ ā€œprogramming errors are easy ā€œCPP makes maintenance difficultā€ to make and difficult to detectā€ ā€œsource code rapidly ā€œpreprocessor diagnostics are poorā€ becomes a mazeā€
  • 5. Christian KƤstner: Virtual Separation of Concerns 5 Academia: Compositional Approaches Base / Platform class Stack { class Stack { void push(Object o) { void push(Object o) { elementData[size++] = o; elementData[size++] = o; } } ... ... } } class Stack { class Stack { void push(Object o) { void push(Object o) { Lock l = lock(o); Feature: Queue Lock l = lock(o); elementData[size++] = o; elementData[size++] = o; refines class Stack { refines class Stack { Composition } } l.unlock(); l.unlock(); ... void push(Object o) { void push(Object o) { ... Lock l = lock(o); Lock l = lock(o); } } Super.push(o); Super.push(o); l.unlock(); l.unlock(); } } ... ... } } Module Components Feature: Diagnostic Frameworks, Plug-ins aspect Diagnostics { aspect Diagnostics { ... Feature-Modules / Mixin Layers / ā€¦ ... } } Aspects / Subjects, Hyper/J
  • 6. Christian KƤstner: Virtual Separation of Concerns 6 Agenda ā€¢ Problems and Advantages of Preprocessors ā€¢ 4 Improvements ā€¢ Views ā€¢ Visual Representation ā€¢ Disciplined Annotations ā€¢ Product-Line-Aware Type System ā€¢ Summary and Perspective
  • 7. Christian KƤstner: Virtual Separation of Concerns 7 Problem 1: Lack of Separation of Concerns ā€¢ Scattered and tangled source code ā€¢ Global search to understand a feature ā€¢ Deleting obsolete feature as challenge ā€¢ Difficult distributed development ā€¢ Difficult reuse Beispiel Berkeley DB: Feature Sperren mit 1835 LOC in 28 von 300 Dateien an 155 Stellen
  • 8. Christian KƤstner: Virtual Separation of Concerns 8 Problem 2: Obfuscation ā€¢ Mixture of two class Stack { class Stack { void push(Object o languages void push(Object o #ifdef SYNC #ifdef SYNC , Transaction txn (C und #ifdef, ā€¦) , Transaction txn #endif #endif ) { ā€¢ Control flow hard to ) { if (o==null if (o==null #ifdef SYNC #ifdef SYNC follow || txn==null || txn==null #endif #endif ā€¢ Additional line breaks ) return; ) return; #ifdef SYNC #ifdef SYNC destroy code layout Lock l=txn.lock(o); Lock l=txn.lock(o); #endif #endif ā€¢ Long annotations elementData[size++] = o; elementData[size++] = o; #ifdef SYNC #ifdef SYNC difficult to recognize l.unlock(); l.unlock(); #endif #endif fireStackChanged(); fireStackChanged(); } } } }
  • 9. Christian KƤstner: Virtual Separation of Concerns 9 Preprocessor in Femto OS
  • 10. Christian KƤstner: Virtual Separation of Concerns 10 Problem 3: Error-Prone ā€¢ Syntax Errors ā€¢ Type Errors static int _rep_queue_filedone(...) #ifdef TABLES DB_ENV *dbenv; class Table { REP *rep; void insert(Object data, __rep_fileinfo_args *rfp; { Txn txn) { #ifndef HAVE_QUEUE storage.set(data, COMPQUIET(rep, NULL); txn.getLock()); COMPQUIET(rfp, NULL); } return (__db_no_queue_am(dbenv)); } #else #endif db_pgno_t first, last; class Storage { u_int32_t flags; #ifdef WRITE int empty, ret, t_ret; boolean set(ā€¦) { ... } #ifdef DIAGNOSTIC #endif DB_MSGBUF mb; } #endif // over 100 lines of additional code } #endif
  • 11. Christian KƤstner: Virtual Separation of Concerns 11 Problem 3: Error-Prone ā€¢ Syntax Errors ā€¢ Type Errors static int _rep_queue_filedone(...) #ifdef TABLES DB_ENV *dbenv; class Table { REP *rep; void insert(Object data, __rep_fileinfo_args *rfp; { Txn txn) { #ifndef HAVE_QUEUE storage.set(data, COMPQUIET(rep, NULL); txn.getLock()); COMPQUIET(rfp, NULL); } return (__db_no_queue_am(dbenv)); } #else #endif db_pgno_t first, last; class Storage { u_int32_t flags; #ifdef WRITE int empty, ret, t_ret; boolean set(ā€¦) { ... } #ifdef DIAGNOSTIC #endif DB_MSGBUF mb; } #endif // over 100 lines of additional code } #endif
  • 12. Christian KƤstner: Virtual Separation of Concerns 12 Problem 3: Error-Prone ā€¢ Syntax Errors ā€¢ Type Errors static int _rep_queue_filedone(...) #ifdef TABLES DB_ENV *dbenv; class Table { REP *rep; void insert(Object data, __rep_fileinfo_args *rfp; { Txn txn) { #ifndef HAVE_QUEUE storage.set(data, COMPQUIET(rep, NULL); txn.getLock()); COMPQUIET(rfp, NULL); } return (__db_no_queue_am(dbenv)); } #else #endif db_pgno_t first, last; class Storage { u_int32_t flags; #ifdef WRITE int empty, ret, t_ret; boolean set(ā€¦) { ... } #ifdef DIAGNOSTIC #endif DB_MSGBUF mb; } #endif // over 100 lines of additional code } #endif
  • 13. Christian KƤstner: Virtual Separation of Concerns 13 Advantages ā€¢ Easy to use ā€¢ ā€œannotate and removeā€ ā€¢ Already part of many languages / simple tools ā€¢ Most developers already familiar ā€¢ Flexible / Expressive ā€¢ Language-independent / Uniform ā€¢ Low Adoption Barrier ā€¢ esp. with legacy code
  • 14. Christian KƤstner: Virtual Separation of Concerns 14 Agenda ā€¢ Problems and Advantages of Preprocessors ā€¢ 4 Improvements ā€¢ Views ā€¢ Visual Representation ā€¢ Disciplined Annotations ā€¢ Product-Line-Aware Type System ā€¢ Summary and Perspective
  • 15. Christian KƤstner: Virtual Separation of Concerns 15 [ICSEā€™08, ViSPLEā€™08] Views ā€¢ Emulate modularity ā€¢ Hide irrelevant source code ā€¢ Hides entire files ā€¢ Hides code inside files Related work: ā€¢ C-CLR ā€¢ Version Editor ā€¢ FeatureMapper ā€¢ pure::variants ā€¢ Effective Views ā€¢ on-demand remodularization ā€¦
  • 16. Christian KƤstner: Virtual Separation of Concerns 16 Expression Problem
  • 17. Christian KƤstner: Virtual Separation of Concerns 17 View on Feature Eval ā€¢ Shows all files containing Eval code ā€¢ Shows context information (kursiv) ā€¢ Hides code without annotations
  • 18. Christian KƤstner: Virtual Separation of Concerns 18 View on the Variant ā€œAdd and Evalā€ ā€¢ Entirely hides file Power ā€¢ Hides method print in Add ([ā€¦]) ā€¢ Code without annotation remains visible
  • 19. Christian KƤstner: Virtual Separation of Concerns 19 Agenda ā€¢ Problems and Advantages of Preprocessors ā€¢ 4 Improvements ā€¢ Views ā€¢ Visual Representation ā€¢ Disciplined Annotations ā€¢ Product-Line-Aware Type System ā€¢ Summary and Perspective
  • 20. Christian KƤstner: Virtual Separation of Concerns 20 [ICSEā€™08, ViSPLEā€™08] Visual Representation: Background Colors class Stack { class Stack { void push(Object o void push(Object o #ifdef SYNC #ifdef SYNC , Transaction txn , Transaction txn #endif #endif ) { ) { if (o==null if (o==null #ifdef SYNC #ifdef SYNC || txn==null || txn==null #endif #endif ) return; ) return; #ifdef SYNC #ifdef SYNC Lock l=txn.lock(o); Lock l=txn.lock(o); #endif #endif elementData[size++] = o; elementData[size++] = o; #ifdef SYNC #ifdef SYNC Related Work: l.unlock(); l.unlock(); #endif ā€¢ Spotlight #endif fireStackChanged(); fireStackChanged(); ā€¢ NetBeans }} ā€¢ fmp2rsm } } ā€¢ FeatureMapper ā€¢ AspectBrowser ā€¦
  • 21. Christian KƤstner: Virtual Separation of Concerns 21 Alternative Visual Representations ā— NetBeans ā— Spotlight
  • 22. Christian KƤstner: Virtual Separation of Concerns 22 Scaling Visual Representations ā€¢ Focus on few features at a time ā€¢ Repeating colors / manual assignment sufficient ā€¢ Analysis of 4 Java ME and 40 C programs: ā€¢ 96 % pages of source code with ā‰¤ 3 colors ā€¢ 99 % pages of source code with ā‰¤ 7 colors
  • 23. Christian KƤstner: Virtual Separation of Concerns 23 Program Comprehension: An Experiment ā€¢ #ifdef vs. colors ā€¢ 43 subjects in 2 groups ā€¢ S1-2: search tasks faster with colors (43% & 23%) ā€¢ M1-3: maintenance tasks same perform. ā€¢ M4: maintenance task with red back- ground color -37% ā€¢ No influence on correctness ā€¢ Subjects prefer colors
  • 24. Christian KƤstner: Virtual Separation of Concerns 24 Agenda ā€¢ Problems and Advantages of Preprocessors ā€¢ 4 Improvements ā€¢ Views ā€¢ Visual Representation ā€¢ Disciplined Annotations ā€¢ Product-Line-Aware Type System ā€¢ Summary and Perspective
  • 25. Christian KƤstner: Virtual Separation of Concerns 25 [TOOLSā€˜09] Disciplined Annotations class Foo { } ā€¢ Syntax errors caused by annotations on plain text class Foo { } ā€¢ Solution: Use underlying artifact structure ā€¢ Enforce disciplined annotations on entire classes, methods, or statements ā€¢ Annotations of isolated brackets or ClassDeclaration Name=C keywords regarded as undisciplined MethodDeclaration Name=m ReturnType Parameter class C { Type-void Name=p Block void m(int p) { s1(); MethodInvk MethodInvk s2(p, true); Name=s1 Name=s2 } } Parameter Parameter Name=p Name=true
  • 26. Christian KƤstner: Virtual Separation of Concerns 26 Variant Generation by AST Transformation ClassDeclaration ClassDeclaration Name=C Name=C MethodDeclaration MethodDeclaration Name=m Name=m ReturnType Parameter Block Type-void Name=p ReturnType Parameter Block Type-void Name=p MethodInvk MethodInvk Name=s1 Name=s2 variant MethodInvk Name=s1 Parameter Parameter generation Name=p Name=true print / parsing unparse class C { class C { void m(int p) { void m(int p) { s1(); s1(); s2(p, true); } } } } Variant generation cannot cause syntax errors.
  • 27. Christian KƤstner: Virtual Separation of Concerns 27 Expressiveness of Disciplined Annotations ā€¢ Not all annotations are possible ā€¢ Sometimes workarounds required ā€¢ Experience: not a significant restriction in practice ā€¢ ~90% of all annotations in 40 C programs is disciplined already high flexibility no flexibility unrestricted disciplined annotations classes no annotations (underlying structure) only annotations on any character
  • 28. Christian KƤstner: Virtual Separation of Concerns 28 Agenda ā€¢ Problems and Advantages of Preprocessors ā€¢ 4 Improvements ā€¢ Views ā€¢ Visual Representation ā€¢ Disciplined Annotations ā€¢ Product-Line-Aware Type System ā€¢ Summary and Perspective
  • 29. Christian KƤstner: Virtual Separation of Concerns 29 [ASEā€™08] Product-Line-Aware Type System class Database { Storage storage; ā€¢ Base: Type correct without void insert(Object data Txn txn) { annotations (for tool support) storage.set(data, txn.getLock()) ā€¢ Detecting all pairs: } } ā€¢ Method invocation and class Storage { #ifdef WRITE method declaration boolean set(ā€¦) { ... } ā€¢ Reference and declaration #endif } of class, variable, etc. ā€¢ ā€¦ Related Work: ā€¢ Comparison of annotations for ā€¢ SafeGen ā€¢ fmp2rsm each pair ā€¢ Safe Composition ā€¢ FFJPL Declaration annotated + Error in some ā€¢ Conditional Reference not annotated variants Methods
  • 30. Christian KƤstner: Virtual Separation of Concerns 30 Type Checking in the Context of a Feature Model Ā¬Read ā€¢ Handling dependencies class Database { between features void insert(ā€¦) { storage.set(ā€¦); ā€¢ Can all variants with } } class Storage { reference reach a boolean set(ā€¦) { ... } corresp. declaration? } Write FM = API āˆ§ ( API ā‡’ ā€¢ Implementation: Propositional (read āˆØ write)) logic and SAT solvers: In all variants in which code fragment A is included also code fragment B is included: FM ā‡’ ( AT (a ) ā‡’ AT (b))
  • 31. Christian KƤstner: Virtual Separation of Concerns 31 [ASEā€™08] Formalization: CFJ ā— On top of Featherweight Java ā— Theorem: Generation preserves typing ā— Formal proof with Coq
  • 32. Christian KƤstner: Virtual Separation of Concerns 32 Implementation: CIDE http://fosd.de/cide
  • 33. Christian KƤstner: Virtual Separation of Concerns 33 [GPCEā€™09] Automated Refactorings ā€¢ Feature Module ā— Annotationen class Stack { class Stack { class Stack { class Stack { int[] data; int[] data; int[] data; int[] data; Base void push(int o) { ā€¦ } void push(int o) { ā€¦ } #ifdef UNDO #ifdef UNDO int pop() { /*...*/ } int pop() { /*...*/ } int backup; int backup; } } void undo() { /*...*/ } void undo() { /*...*/ } #endif #endif refines class Stack { refines class Stack { #ifdef TOP #ifdef TOP Automated Transformationtop() { /*...*/ } Top int top() { /*...*/ } int top() { /*...*/ } int top() { /*...*/ } int } } #endif #endif void push(int o) { void push(int o) { refines class Stack { refines class Stack { #ifdef UNDO #ifdef UNDO int backup; int backup; backup = top(); backup = top(); void undo() { /*...*/ } void undo() { /*...*/ } #endif #endif Undo void push(int o) { void push(int o) { /*...*/ /*...*/ backup = top(); backup = top(); } } original(v); original(v); int pop() { /*...*/ } int pop() { /*...*/ } } } } }
  • 34. Christian KƤstner: Virtual Separation of Concerns 34 Agenda ā€¢ Problems and Advantages of Preprocessors ā€¢ 4 Improvements ā€¢ Views ā€¢ Visual Representation ā€¢ Disciplined Annotations ā€¢ Product-Line-Aware Type System ā€¢ Summary and Perspective
  • 35. Christian KƤstner: Virtual Separation of Concerns 35 Summary ā€¢ Problems: ā€¢ Improvements: ā€¢ Separation of Concerns ā€¢ Views ā€¢ Obfuscation ā€¢ Visual representation ā€¢ Error-proneness ā€¢ Disciplined annotations ā€¢ Product-line-aware type system ā€¢ Retained advantages: ā€¢ Easy to use ā€¢ Flexible ā€¢ Language-independent ā€¢ Low adoption barrier ā€œVirtual Separation of Concernsā€
  • 36. Christian KƤstner: Virtual Separation of Concerns 36 Summary ā€¢ Problems: ā€¢ Improvements: ā€¢ Separation of Concerns ā€¢ Views ā€¢ Obfuscation ā€¢ Visual representation ā€¢ Error-proneness ā€¢ Disciplined annotations ā€¢ Product-line-aware type system ā€¢ Retained advantages: ā€¢ Easy to use ā€¢ Flexible ā€¢ Language-independent ā€¢ Low adoption barrier ā€œVirtual Separation of Concernsā€
  • 37. Christian KƤstner: Virtual Separation of Concerns 37 Summary ā€¢ Problems: ā€¢ Improvements: ā€¢ Separation of Concerns ā€¢ Views ā€¢ Obfuscation ā€¢ Visual representation ā€¢ Error-proneness ā€¢ Disciplined annotations ā€¢ Product-line-aware type system ā€¢ Retained advantages: ā€¢ Easy to use ā€¢ Remaining Problems: ā€¢ Flexible ā€¢ Separate Compilation ā€¢ Language-independent ā€¢ Black-box Reuse ā€¢ Low adoption barrier ā€œVirtual Separation of Concernsā€
  • 38. Christian KƤstner: Virtual Separation of Concerns 38 Perspective ā€¢ Preprocessors common in practice, despite strong criticism ā€¢ Neglected by researchers ā€¢ Tool support can address most problems ā€¢ Interim solution (with migration path) or serious alternative? ā€¢ Give preprocessors a second chance!
  • 39. Christian KƤstner: Virtual Separation of Concerns 39 Questions? http://fosd.de/cide