SlideShare a Scribd company logo
1 of 40
Download to read offline
QSOUL/Aop

          Aspect Oriented Software
          Development using Logic
             Meta Programming
                 Johan Brichau,
                 Programming Technology Lab,
                 Vrije Universiteit Brussel,
                 Brussel, Belgium

7/29/10           ESUG 2001, Essen             1
Overview
 Aspect Oriented Software Development
 Goals of QSOUL/Aop
 Logic Meta Programming in QSOUL
 Aspect Oriented Logic Meta Programming
 QSOUL/Aop tool
 Demo time

7/29/10         ESUG 2001, Essen           2
Software Development
 Software development today happens through
 hiërarchical decomposition in ‘generalised
 procedures’
      Break program complexity
      Modularize concerns




 7/29/10               ESUG 2001, Essen    3
Aspect Oriented Software
 Development
 But some concerns cannot be modularized
 and occur in every module of the
 decomposition
      Cross-cutting concern (= aspect)
      E.g. synchronization, distribution, …




 7/29/10                 ESUG 2001, Essen      4
Aspect Oriented Software
Development
 AOSD tries to modularize these aspects.
 Aspects are combined with component program
 using a weaver
 Aspects specified in an aspect-language
         Describing
           •  Cross-cutting
           •  Functionality
         Examples:
           •  COOL (synchronisation)
           •  RG (loop fusion optimisation)
           •  AspectJ (advices over methods)
7/29/10                           ESUG 2001, Essen   5
Overview
 Aspect Oriented Software Development
 Goals of QSOUL/Aop
 Logic Meta Programming in QSOUL
 Aspect Oriented Logic Meta Programming
 QSOUL/Aop tool
 Demo time

7/29/10         ESUG 2001, Essen           6
Goals of QSOUL/Aop (1)
 Declarative Aspect Language
         Aspects have a declarative nature
         Examples
           •  Synchronisation: declare what methods are
              synchronized
           •  Error handling: declare what errors should be
              catched where and what should be executed.
           •  Wrap methods: declare what methods should be
              wrapped and what should be executed.
7/29/10                     ESUG 2001, Essen                  7
Goals of QSOUL/Aop (2)
 User-defined aspect-languages
         An open framework that allows definition of
          user-defined aspect-languages
         Express one aspect-language in another aspect-
          language
         Examples:
           •  A ‘wrap methods’ aspect-language could be used to
              introduce synchronisation or error handling, but is
              less suited than a specialized ‘synchronisation’ or
              ‘error handling’ aspect-language.
7/29/10                      ESUG 2001, Essen                       8
Goals of QSOUL/Aop (3)
 Combination and composition of several
 aspects
         Implemented in one aspect-language
         Implemented in different aspect-languages
         Detect and resolve conflicts between aspects
 Example conflict:
         If a scheduler-aspect does not know about a
          synchronisation aspect, deadlocks can occur!

7/29/10                   ESUG 2001, Essen               9
Overview
 Aspect Oriented Software Development
 Goals of QSOUL/Aop
 Logic Meta Programming in QSOUL
 Aspect Oriented Logic Meta Programming
 QSOUL/Aop tool
 Demo time

7/29/10         ESUG 2001, Essen           10
Logic Meta Programming
 Combines a logic meta language with
 a standard object-oriented base
 language
       base-level programs are expressed as
        terms, facts and rules at the meta level
       meta-level programs can manipulate and

        reason about the base-level programs
7/29/10              ESUG 2001, Essen              11
QSOUL: setup
             QSOUL                                              Smalltalk




                                         Meta-level Interface
                                                                 Image
Reason about and manipulate
source code:                                                       Smalltalk
      check, extract, search,                                   implementation
                                                                   artefacts
      generate, enforce, transform




7/29/10               ESUG 2001, Essen                                       12
QSOUL language
 Prolog and…
         Smalltalk terms
                             allClasses([Smalltalk allClasses])	


         Smalltalk clauses                  aCollection object	

               write(?text) if 	

                      	

[Transcript show: (?text asString). true].	

         Quasi Quoted Code
                                                            true	

           methodCode(Foo,bar, { ^ nil } )	

7/29/10                       ESUG 2001, Essen                           13
LMP achievements
 Emerging technique to build state-of-the art
 software development tools
 In particular, tools to support co-evolution in all
 facets and phases of the software life-cycle
          •  information in implementation and earlier life-cycle phases
             may evolve independently
          •  need to keep information in these phases synchronised
 To support advanced software engineering
 techniques


7/29/10                        ESUG 2001, Essen                            14
LMP Achievements
Declarative Reasoning about object-oriented base programs
supporting the Co-Evolution of design and implementation
    Extract design information from the implementation.
    Verify the implementation with the corresponding design.
    Generate the implementation from the design

   Theo D'Hondt, Kris De Volder, Kim Mens & Roel Wuyts, Co-evolution of Object-
   Oriented Software Design and Implementation. In Proceedings of SACT 2000. Kluwer
   Academic Publishers, 2000




   7/29/10                        ESUG 2001, Essen                          15
Overview
 Aspect Oriented Software Development
 Goals of QSOUL/Aop
 Logic Meta Programming in QSOUL
 Aspect Oriented Logic Meta Programming
 QSOUL/Aop tool
 Demo time

7/29/10         ESUG 2001, Essen           16
Aspect Oriented Logic Meta
Programming (AOLMP)
 Aspect language embedded in logic language.
 An aspect language consists of two parts
         the aspect-code
         how the aspect crosscuts the base program
 Inference engine gathers the logic declarations of
 all aspects and weaves them in the base program.
 Using logic rules we can build a domain-specific
 aspectlanguage embedded in the logic language.
 E.g. TyRuBa and QSOUL/Aop
7/29/10                     ESUG 2001, Essen          17
AOLMP using QSOUL/Aop
 Composition-mechanism to support composition
 of aspects
 Integrated Smalltalk-weaver
 Exploit symbiosis
         Use reasoning about base program to specify user-
          defined crosscuts. (E.g.: all places in the program
          where a certain variable is initialized)
         Multi-paradigm programming (logic & procedural
          programming) eases complexity of rules that implement
          a user-defined aspect-language

7/29/10                     ESUG 2001, Essen                 18
Overview
 Aspect Oriented Software Development
 Goals of QSOUL/Aop
 Logic Meta Programming in QSOUL
 Aspect Oriented Logic Meta Programming
 QSOUL/Aop tool
 Demo time

7/29/10         ESUG 2001, Essen           19
QSOUL/Aop
 Consider a simple aspect-language for
 error-handling:
         onError(?class,?selector,?error,?error-handling-block)
 Consider two simple error-handling
 aspects:
         onError([Array],[#at:put:],[OutOfBoundsError],
                  {[:e | … handle exception e…]})
         onError(?class,[#at:put:],[OutOfBoundsError],{…}) if
           subclass([SequenceableCollection],?class)

7/29/10                      ESUG 2001, Essen                      20
QSOUL/Aop
 Consider a wrap-around aspect-language:
         around(?class,?selector,?code)
 Define the meaning of the error-handling aspect-
 language in terms of the wrap-around aspect-
 language
         around(?class,?selector,
               {[original()] on: ?error do: ?errorcodeBlock}) if
            onError(?class,?selector,?error,?errorcodeBlock).
 Define the wrap-around aspect-language in terms
 of another aspect-language…

7/29/10                          ESUG 2001, Essen                  21
QSOUL/Aop
 Basic weaver
         Hard-coded in Smalltalk
         Invisible overriding of methods
           •  Only supports method-crosscuts
         Share state in group of overriden methods

    QSOUL
  Smalltalk
                         Basic weaver
7/29/10                     ESUG 2001, Essen          22
Basic weaver
  Basic aspect language: crosscut declarations
          weave(method(?class,?selector),{<aspect-code>})
           Override the method ?selector in ?class with
N>0        <aspect-code>
          scopeOf(?instVarList,{ <aspect-scope-code> })
      Share instance variables in all executions of
      aspect-code where <aspect-scope-code> results in
      same value. Create new instance variables where
N=0,1 <aspect-scope-code> results in a new, unique
      value.
 7/29/10                   ESUG 2001, Essen                  23
Basic weaver
 Basic aspect language: aspect-code weave(method(?
    class,?selector),{<aspect-code>})
       Smalltalk code and…

       thisObject

        Access to the current receiver in aspect-code
       original()

        Execute the original method (with the original
        arguments)
       thisAspect

        not yet…
7/29/10                   ESUG 2001, Essen               24
A basic-weaver aspect: Logging
Write the size of the collection to the Transcript every time after an
element is added to an Array or an OrderedCollection


    weave(?pc, { |tempResult| tempResult := original().
                 Transcript write: thisObject size asString.
                 ^ tempResult } ) if
           location(?pc).
    location(method([Array],at:put:) ).
    location(method([OrderedCollection],add:))

            QSOUL
       Smalltalk
  7/29/10                  Basic2001, Essen
                            ESUG weaver                         25
Building your own aspect
language
 An AspectWeaverMixin…
         …defines a new aspect-language in terms of
          another aspect-language.
         …defines a transformation of a higher-level
          aspect language to a lower-level aspect-
          language
         …can be mixed with other aspectweavermixins
          and the basic weaver to form a complete
          aspectweaver

7/29/10                  ESUG 2001, Essen           26
Building your own aspect
    language
after(execution(?class,?selector),{Transcript write: thisObject size asString}) if
         location(?class,?selector).
location([Array],at:put:).
location([OrderedCollection],add:)


weave(method(?class,?sel), { |tempResult| tempResult := original().
                   ?code. ^ tempResult } ) if
                 after(execution(?class,?sel),?code).
              QSOUL
         Smalltalk
    7/29/10
                                 Basic2001, Essen
                                  ESUG
                                       weaver                              27
Building your own aspect
language

          location([Array],at:put:).
          location([OrderedCollection],add:)


          Size Logging AspectWeaverMixin         location


             Advice AspectWeaverMixin      before/after/around
 QSOUL
                                                   weave
Smalltalk
7/29/10
                   Basic weaver
                       ESUG 2001, Essen                28
Combination of aspect-languages


           Logging aspect   Synchronization aspect


                  Logging and Synchronizing
                     AspectWeaverMixin
          QSOUL
     Smalltalk
7/29/10
                        Basic2001, Essen
                         ESUG
                              weaver                 29
Combination of aspect-languages
                Logging                  Synchronization
                 aspect                      aspect
               Logging                Synchronization
              Weavermixin              Weavermixin

                              Advice
                      Combination Weavermixin
                        Advice Weavermixin
           QSOUL
          Smalltalk
                            Basic weaver
7/29/10                   ESUG 2001, Essen                 30
QSOUL/Aop:
Open crosscut language
 QSOUL’s reasoning about Smalltalk basecode
 allows detection of patterns.
         Extract implicit call-structure
         Extract design patterns
         Etc…
 This information can be used to implement user-
 defined crosscuts
         Method that initializes instance variables
         Methods that send messages to a Stack instance
         Etc…
7/29/10                       ESUG 2001, Essen             31
Integration in Smalltalk
QSOUL/Aop AspectWeaverMixins
(an AspectWeaverMixin is a logic program)       Smalltalk metasystem

                                                    metaclass


           QSOUL/Aop basic-weaver                         Smalltalk system


                Invisible
                                                        class
          generated aspect-class
     7/29/10
                                       Invisible woven-calls
                                 ESUG 2001, Essen                      32
QSOUL/Aop: Future Work
 thisAspect
 Scope per aspect-instance variable
 Aspect methods
 Extend basic weaver to weave on other language
 elements
 Technical improvements
         Use method wrappers instead of hidden classes
         Check for uses of self in aspect-code
         …

7/29/10                     ESUG 2001, Essen              33
Demonstration:
The Conduits Framework




7/29/10    ESUG 2001, Essen   34
Aspects in Conduits-Framework
 User Interface update
         After each fill, update view
 Synchronization and message order
         fill and drain: in alternate order + blocking
 Overflow logging
         Setting of content everywhere should produce
          same message (throws error?)
 Etc…
7/29/10                    ESUG 2001, Essen               35
Links
Declarative (Logic) Meta Programming:

   http://prog.vub.ac.be/poolresearch/dmp/
QSOUL2:
   http://prog.vub.ac.be/poolresearch/qsoul/qsoul2.html

QSOUL/Aop:

   http://prog.vub.ac.be/poolresearch/aop/qsoulaop.html
                    johan.brichau@vub.ac.be
  7/29/10                 ESUG 2001, Essen                36
QSOUL LMP-tool
 Strong symbiosis between logic language
 and Smalltalk
         Logic language acts on current Smalltalk image
         Smalltalk objects are constants in the logic
          language
         Logic clauses can execute parameterised
          Smalltalk expressions
 Code generation through manipulation of
 quasi-quoted codestrings
7/29/10                   ESUG 2001, Essen             37
Aspect Oriented Software
Development
 Subject Oriented Programming and
 Multidimensional Separation of Concerns
         Different views on the program’s
          decomposition, each addressing a concern
         Compose the different views with composition
          rules
 Composition Filters
         Place wrappers around encapsulations, each
          addressing a cross-cutting concern
7/29/10                  ESUG 2001, Essen                38
Aspect Oriented Software
Development
 Design Patterns
         Use exisiting ‘generalised procedure’
          techniques to separate cross-cutting concern
          (e.g. Visitor pattern)
 Aspect Oriented Programming
         Encapsulate aspects
         Aspect-weaver composes aspects with other
          encapsulations guided by a pointcut-language
7/29/10                   ESUG 2001, Essen               39
AOLMP using TyRuBa
    Basic Functionality Code
                           	



                Parser	


      Facts representing 	

    basic functionality code 	


                                                  Weaver	

      Code 	

                   +	

                                          with 	

                                             Logic Program	

   aspects	

            Logic program
          representing aspect
              declarations
                         	

7/29/10                            ESUG 2001, Essen                          40

More Related Content

What's hot

iFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature ImplementationsiFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature ImplementationsShinpei Hayashi
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigmbusyking03
 
OOPSLA02 BehavioralSemantics.ppt
OOPSLA02 BehavioralSemantics.pptOOPSLA02 BehavioralSemantics.ppt
OOPSLA02 BehavioralSemantics.pptPtidej Team
 
12 iec t1_s1_oo_ps_session_17
12 iec t1_s1_oo_ps_session_1712 iec t1_s1_oo_ps_session_17
12 iec t1_s1_oo_ps_session_17Niit Care
 
EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!melbats
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Shinpei Hayashi
 
Software languages
Software languagesSoftware languages
Software languagesEelco Visser
 
Sentence-to-Code Traceability Recovery with Domain Ontologies
Sentence-to-Code Traceability Recovery with Domain OntologiesSentence-to-Code Traceability Recovery with Domain Ontologies
Sentence-to-Code Traceability Recovery with Domain OntologiesShinpei Hayashi
 
Fundamentals of programming and problem solving
Fundamentals of programming and problem solvingFundamentals of programming and problem solving
Fundamentals of programming and problem solvingJustine Dela Serna
 
Concurrency reification in the xDSML with MoCCML
Concurrency reification in the xDSML with MoCCMLConcurrency reification in the xDSML with MoCCML
Concurrency reification in the xDSML with MoCCMLBenoit Combemale
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementationBilal Maqbool ツ
 
Detecting Occurrences of Refactoring with Heuristic Search
Detecting Occurrences of Refactoring with Heuristic SearchDetecting Occurrences of Refactoring with Heuristic Search
Detecting Occurrences of Refactoring with Heuristic SearchShinpei Hayashi
 
Wrap-up of the ANR project GEMOC
Wrap-up of the ANR project GEMOCWrap-up of the ANR project GEMOC
Wrap-up of the ANR project GEMOCBenoit Combemale
 
Mise14 @ ICSE1 14 Uncertainty in Bidirectional Transformations
Mise14 @ ICSE1 14 Uncertainty in Bidirectional TransformationsMise14 @ ICSE1 14 Uncertainty in Bidirectional Transformations
Mise14 @ ICSE1 14 Uncertainty in Bidirectional TransformationsAlfonso Pierantonio
 
Generative programming (mostly parser generation)
Generative programming (mostly parser generation)Generative programming (mostly parser generation)
Generative programming (mostly parser generation)Ralf Laemmel
 
Software Technologies for the Interoperability, Reusability and Adaptability...
Software Technologies for the Interoperability,  Reusability and Adaptability...Software Technologies for the Interoperability,  Reusability and Adaptability...
Software Technologies for the Interoperability, Reusability and Adaptability...Daniele Gianni
 

What's hot (20)

iFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature ImplementationsiFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature Implementations
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigm
 
OOPSLA02 BehavioralSemantics.ppt
OOPSLA02 BehavioralSemantics.pptOOPSLA02 BehavioralSemantics.ppt
OOPSLA02 BehavioralSemantics.ppt
 
12 iec t1_s1_oo_ps_session_17
12 iec t1_s1_oo_ps_session_1712 iec t1_s1_oo_ps_session_17
12 iec t1_s1_oo_ps_session_17
 
Prgramming paradigms
Prgramming paradigmsPrgramming paradigms
Prgramming paradigms
 
EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
 
Software languages
Software languagesSoftware languages
Software languages
 
Sentence-to-Code Traceability Recovery with Domain Ontologies
Sentence-to-Code Traceability Recovery with Domain OntologiesSentence-to-Code Traceability Recovery with Domain Ontologies
Sentence-to-Code Traceability Recovery with Domain Ontologies
 
Fundamentals of programming and problem solving
Fundamentals of programming and problem solvingFundamentals of programming and problem solving
Fundamentals of programming and problem solving
 
Concurrency reification in the xDSML with MoCCML
Concurrency reification in the xDSML with MoCCMLConcurrency reification in the xDSML with MoCCML
Concurrency reification in the xDSML with MoCCML
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementation
 
Detecting Occurrences of Refactoring with Heuristic Search
Detecting Occurrences of Refactoring with Heuristic SearchDetecting Occurrences of Refactoring with Heuristic Search
Detecting Occurrences of Refactoring with Heuristic Search
 
Wrap-up of the ANR project GEMOC
Wrap-up of the ANR project GEMOCWrap-up of the ANR project GEMOC
Wrap-up of the ANR project GEMOC
 
Mini Project- ROM Based Sine Wave Generator
Mini Project- ROM Based Sine Wave GeneratorMini Project- ROM Based Sine Wave Generator
Mini Project- ROM Based Sine Wave Generator
 
Mise14 @ ICSE1 14 Uncertainty in Bidirectional Transformations
Mise14 @ ICSE1 14 Uncertainty in Bidirectional TransformationsMise14 @ ICSE1 14 Uncertainty in Bidirectional Transformations
Mise14 @ ICSE1 14 Uncertainty in Bidirectional Transformations
 
Generative programming (mostly parser generation)
Generative programming (mostly parser generation)Generative programming (mostly parser generation)
Generative programming (mostly parser generation)
 
Software Technologies for the Interoperability, Reusability and Adaptability...
Software Technologies for the Interoperability,  Reusability and Adaptability...Software Technologies for the Interoperability,  Reusability and Adaptability...
Software Technologies for the Interoperability, Reusability and Adaptability...
 
C# note
C# noteC# note
C# note
 

Viewers also liked

AOSD توسعه نرم افزار جنبه گرا
AOSD توسعه نرم افزار جنبه گراAOSD توسعه نرم افزار جنبه گرا
AOSD توسعه نرم افزار جنبه گراOmid Rajabi
 
Aspect-Oriented Software Development with Use Cases
Aspect-Oriented Software Development with Use CasesAspect-Oriented Software Development with Use Cases
Aspect-Oriented Software Development with Use Caseswww.myassignmenthelp.net
 
UML for Aspect Oriented Design
UML for Aspect Oriented DesignUML for Aspect Oriented Design
UML for Aspect Oriented DesignEdison Lascano
 
Aspect-Oriented Technologies
Aspect-Oriented TechnologiesAspect-Oriented Technologies
Aspect-Oriented TechnologiesEsteban Abait
 
Evolutionary Problems In Aspect Oriented Software Development
Evolutionary Problems In Aspect Oriented Software DevelopmentEvolutionary Problems In Aspect Oriented Software Development
Evolutionary Problems In Aspect Oriented Software Developmentkim.mens
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software DevelopmentOtavio Ferreira
 
Introduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software DevelopmentIntroduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software Developmentmukhtarhudaya
 
Aspect Mining Techniques
Aspect Mining TechniquesAspect Mining Techniques
Aspect Mining TechniquesEsteban Abait
 
Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)
Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)
Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)amirbabol
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software DevelopmentJignesh Patel
 
Aspect oriented software development
Aspect oriented software developmentAspect oriented software development
Aspect oriented software developmentMaryam Malekzad
 
Ch21-Software Engineering 9
Ch21-Software Engineering 9Ch21-Software Engineering 9
Ch21-Software Engineering 9Ian Sommerville
 

Viewers also liked (13)

AOSD توسعه نرم افزار جنبه گرا
AOSD توسعه نرم افزار جنبه گراAOSD توسعه نرم افزار جنبه گرا
AOSD توسعه نرم افزار جنبه گرا
 
Aspect-Oriented Software Development with Use Cases
Aspect-Oriented Software Development with Use CasesAspect-Oriented Software Development with Use Cases
Aspect-Oriented Software Development with Use Cases
 
Scrum doc
Scrum docScrum doc
Scrum doc
 
UML for Aspect Oriented Design
UML for Aspect Oriented DesignUML for Aspect Oriented Design
UML for Aspect Oriented Design
 
Aspect-Oriented Technologies
Aspect-Oriented TechnologiesAspect-Oriented Technologies
Aspect-Oriented Technologies
 
Evolutionary Problems In Aspect Oriented Software Development
Evolutionary Problems In Aspect Oriented Software DevelopmentEvolutionary Problems In Aspect Oriented Software Development
Evolutionary Problems In Aspect Oriented Software Development
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software Development
 
Introduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software DevelopmentIntroduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software Development
 
Aspect Mining Techniques
Aspect Mining TechniquesAspect Mining Techniques
Aspect Mining Techniques
 
Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)
Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)
Software reliability model(روش های اندازه گیری قابلیت اطمینان نرم افزار)
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software Development
 
Aspect oriented software development
Aspect oriented software developmentAspect oriented software development
Aspect oriented software development
 
Ch21-Software Engineering 9
Ch21-Software Engineering 9Ch21-Software Engineering 9
Ch21-Software Engineering 9
 

Similar to QSOUL/Aop

STATICMOCK : A Mock Object Framework for Compiled Languages
STATICMOCK : A Mock Object Framework for Compiled Languages STATICMOCK : A Mock Object Framework for Compiled Languages
STATICMOCK : A Mock Object Framework for Compiled Languages ijseajournal
 
Execution Framework of the GEMOC Studio
Execution Framework of the GEMOC StudioExecution Framework of the GEMOC Studio
Execution Framework of the GEMOC StudioBenoit Combemale
 
Office OpenXML: a technical approach for OOo.
Office OpenXML: a technical approach for OOo.Office OpenXML: a technical approach for OOo.
Office OpenXML: a technical approach for OOo.Alexandro Colorado
 
Re-implementing Thrift using MDE
Re-implementing Thrift using MDERe-implementing Thrift using MDE
Re-implementing Thrift using MDESina Madani
 
EGL Conference 2011 - EGL Overview
EGL Conference 2011 - EGL OverviewEGL Conference 2011 - EGL Overview
EGL Conference 2011 - EGL OverviewWill Smythe
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word documentSIVAJISADHANA
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word documentSIVAJISADHANA
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word documentSIVAJISADHANA
 
SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!melbats
 
The Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platformThe Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platformNuxeo
 
FABLES IME - Agent-Based Modeling environment
FABLES IME - Agent-Based Modeling environmentFABLES IME - Agent-Based Modeling environment
FABLES IME - Agent-Based Modeling environmentRichard Oliver Legendi
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3aminmesbahi
 
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Benoit Combemale
 
Breathe Life Into Your IDE
Breathe Life Into Your IDEBreathe Life Into Your IDE
Breathe Life Into Your IDEBenoit Combemale
 
Markus Voelter Textual DSLs
Markus Voelter Textual DSLsMarkus Voelter Textual DSLs
Markus Voelter Textual DSLsdeimos
 
Software development effort reduction with Co-op
Software development effort reduction with Co-opSoftware development effort reduction with Co-op
Software development effort reduction with Co-oplbergmans
 
SOFIA Poster (Abstract) - ADK VLHCC 2010. INDRA/ESI
SOFIA Poster (Abstract) - ADK VLHCC 2010. INDRA/ESISOFIA Poster (Abstract) - ADK VLHCC 2010. INDRA/ESI
SOFIA Poster (Abstract) - ADK VLHCC 2010. INDRA/ESISofia Eu
 

Similar to QSOUL/Aop (20)

STATICMOCK : A Mock Object Framework for Compiled Languages
STATICMOCK : A Mock Object Framework for Compiled Languages STATICMOCK : A Mock Object Framework for Compiled Languages
STATICMOCK : A Mock Object Framework for Compiled Languages
 
Execution Framework of the GEMOC Studio
Execution Framework of the GEMOC StudioExecution Framework of the GEMOC Studio
Execution Framework of the GEMOC Studio
 
Office OpenXML: a technical approach for OOo.
Office OpenXML: a technical approach for OOo.Office OpenXML: a technical approach for OOo.
Office OpenXML: a technical approach for OOo.
 
Re-implementing Thrift using MDE
Re-implementing Thrift using MDERe-implementing Thrift using MDE
Re-implementing Thrift using MDE
 
EGL Conference 2011 - EGL Overview
EGL Conference 2011 - EGL OverviewEGL Conference 2011 - EGL Overview
EGL Conference 2011 - EGL Overview
 
Inside.Net
Inside.NetInside.Net
Inside.Net
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
 
SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!
 
The Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platformThe Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platform
 
Objc
ObjcObjc
Objc
 
FABLES IME - Agent-Based Modeling environment
FABLES IME - Agent-Based Modeling environmentFABLES IME - Agent-Based Modeling environment
FABLES IME - Agent-Based Modeling environment
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3
 
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
 
Breathe Life Into Your IDE
Breathe Life Into Your IDEBreathe Life Into Your IDE
Breathe Life Into Your IDE
 
VMPaper
VMPaperVMPaper
VMPaper
 
Markus Voelter Textual DSLs
Markus Voelter Textual DSLsMarkus Voelter Textual DSLs
Markus Voelter Textual DSLs
 
Software development effort reduction with Co-op
Software development effort reduction with Co-opSoftware development effort reduction with Co-op
Software development effort reduction with Co-op
 
SOFIA Poster (Abstract) - ADK VLHCC 2010. INDRA/ESI
SOFIA Poster (Abstract) - ADK VLHCC 2010. INDRA/ESISOFIA Poster (Abstract) - ADK VLHCC 2010. INDRA/ESI
SOFIA Poster (Abstract) - ADK VLHCC 2010. INDRA/ESI
 

More from ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingESUG
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in PharoESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapESUG
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 

More from ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

QSOUL/Aop

  • 1. QSOUL/Aop Aspect Oriented Software Development using Logic Meta Programming Johan Brichau, Programming Technology Lab, Vrije Universiteit Brussel, Brussel, Belgium 7/29/10 ESUG 2001, Essen 1
  • 2. Overview  Aspect Oriented Software Development  Goals of QSOUL/Aop  Logic Meta Programming in QSOUL  Aspect Oriented Logic Meta Programming  QSOUL/Aop tool  Demo time 7/29/10 ESUG 2001, Essen 2
  • 3. Software Development  Software development today happens through hiërarchical decomposition in ‘generalised procedures’   Break program complexity   Modularize concerns 7/29/10 ESUG 2001, Essen 3
  • 4. Aspect Oriented Software Development  But some concerns cannot be modularized and occur in every module of the decomposition   Cross-cutting concern (= aspect)   E.g. synchronization, distribution, … 7/29/10 ESUG 2001, Essen 4
  • 5. Aspect Oriented Software Development  AOSD tries to modularize these aspects.  Aspects are combined with component program using a weaver  Aspects specified in an aspect-language   Describing •  Cross-cutting •  Functionality   Examples: •  COOL (synchronisation) •  RG (loop fusion optimisation) •  AspectJ (advices over methods) 7/29/10 ESUG 2001, Essen 5
  • 6. Overview  Aspect Oriented Software Development  Goals of QSOUL/Aop  Logic Meta Programming in QSOUL  Aspect Oriented Logic Meta Programming  QSOUL/Aop tool  Demo time 7/29/10 ESUG 2001, Essen 6
  • 7. Goals of QSOUL/Aop (1)  Declarative Aspect Language   Aspects have a declarative nature   Examples •  Synchronisation: declare what methods are synchronized •  Error handling: declare what errors should be catched where and what should be executed. •  Wrap methods: declare what methods should be wrapped and what should be executed. 7/29/10 ESUG 2001, Essen 7
  • 8. Goals of QSOUL/Aop (2)  User-defined aspect-languages   An open framework that allows definition of user-defined aspect-languages   Express one aspect-language in another aspect- language   Examples: •  A ‘wrap methods’ aspect-language could be used to introduce synchronisation or error handling, but is less suited than a specialized ‘synchronisation’ or ‘error handling’ aspect-language. 7/29/10 ESUG 2001, Essen 8
  • 9. Goals of QSOUL/Aop (3)  Combination and composition of several aspects   Implemented in one aspect-language   Implemented in different aspect-languages   Detect and resolve conflicts between aspects  Example conflict:   If a scheduler-aspect does not know about a synchronisation aspect, deadlocks can occur! 7/29/10 ESUG 2001, Essen 9
  • 10. Overview  Aspect Oriented Software Development  Goals of QSOUL/Aop  Logic Meta Programming in QSOUL  Aspect Oriented Logic Meta Programming  QSOUL/Aop tool  Demo time 7/29/10 ESUG 2001, Essen 10
  • 11. Logic Meta Programming  Combines a logic meta language with a standard object-oriented base language   base-level programs are expressed as terms, facts and rules at the meta level   meta-level programs can manipulate and reason about the base-level programs 7/29/10 ESUG 2001, Essen 11
  • 12. QSOUL: setup QSOUL Smalltalk Meta-level Interface Image Reason about and manipulate source code: Smalltalk check, extract, search, implementation artefacts generate, enforce, transform 7/29/10 ESUG 2001, Essen 12
  • 13. QSOUL language  Prolog and…   Smalltalk terms allClasses([Smalltalk allClasses])   Smalltalk clauses aCollection object write(?text) if [Transcript show: (?text asString). true].   Quasi Quoted Code true methodCode(Foo,bar, { ^ nil } ) 7/29/10 ESUG 2001, Essen 13
  • 14. LMP achievements  Emerging technique to build state-of-the art software development tools  In particular, tools to support co-evolution in all facets and phases of the software life-cycle •  information in implementation and earlier life-cycle phases may evolve independently •  need to keep information in these phases synchronised  To support advanced software engineering techniques 7/29/10 ESUG 2001, Essen 14
  • 15. LMP Achievements Declarative Reasoning about object-oriented base programs supporting the Co-Evolution of design and implementation  Extract design information from the implementation.  Verify the implementation with the corresponding design.  Generate the implementation from the design Theo D'Hondt, Kris De Volder, Kim Mens & Roel Wuyts, Co-evolution of Object- Oriented Software Design and Implementation. In Proceedings of SACT 2000. Kluwer Academic Publishers, 2000 7/29/10 ESUG 2001, Essen 15
  • 16. Overview  Aspect Oriented Software Development  Goals of QSOUL/Aop  Logic Meta Programming in QSOUL  Aspect Oriented Logic Meta Programming  QSOUL/Aop tool  Demo time 7/29/10 ESUG 2001, Essen 16
  • 17. Aspect Oriented Logic Meta Programming (AOLMP)  Aspect language embedded in logic language.  An aspect language consists of two parts   the aspect-code   how the aspect crosscuts the base program  Inference engine gathers the logic declarations of all aspects and weaves them in the base program.  Using logic rules we can build a domain-specific aspectlanguage embedded in the logic language.  E.g. TyRuBa and QSOUL/Aop 7/29/10 ESUG 2001, Essen 17
  • 18. AOLMP using QSOUL/Aop  Composition-mechanism to support composition of aspects  Integrated Smalltalk-weaver  Exploit symbiosis   Use reasoning about base program to specify user- defined crosscuts. (E.g.: all places in the program where a certain variable is initialized)   Multi-paradigm programming (logic & procedural programming) eases complexity of rules that implement a user-defined aspect-language 7/29/10 ESUG 2001, Essen 18
  • 19. Overview  Aspect Oriented Software Development  Goals of QSOUL/Aop  Logic Meta Programming in QSOUL  Aspect Oriented Logic Meta Programming  QSOUL/Aop tool  Demo time 7/29/10 ESUG 2001, Essen 19
  • 20. QSOUL/Aop  Consider a simple aspect-language for error-handling:   onError(?class,?selector,?error,?error-handling-block)  Consider two simple error-handling aspects:   onError([Array],[#at:put:],[OutOfBoundsError], {[:e | … handle exception e…]})   onError(?class,[#at:put:],[OutOfBoundsError],{…}) if subclass([SequenceableCollection],?class) 7/29/10 ESUG 2001, Essen 20
  • 21. QSOUL/Aop  Consider a wrap-around aspect-language:   around(?class,?selector,?code)  Define the meaning of the error-handling aspect- language in terms of the wrap-around aspect- language   around(?class,?selector, {[original()] on: ?error do: ?errorcodeBlock}) if onError(?class,?selector,?error,?errorcodeBlock).  Define the wrap-around aspect-language in terms of another aspect-language… 7/29/10 ESUG 2001, Essen 21
  • 22. QSOUL/Aop  Basic weaver   Hard-coded in Smalltalk   Invisible overriding of methods •  Only supports method-crosscuts   Share state in group of overriden methods QSOUL Smalltalk Basic weaver 7/29/10 ESUG 2001, Essen 22
  • 23. Basic weaver  Basic aspect language: crosscut declarations   weave(method(?class,?selector),{<aspect-code>}) Override the method ?selector in ?class with N>0 <aspect-code>   scopeOf(?instVarList,{ <aspect-scope-code> }) Share instance variables in all executions of aspect-code where <aspect-scope-code> results in same value. Create new instance variables where N=0,1 <aspect-scope-code> results in a new, unique value. 7/29/10 ESUG 2001, Essen 23
  • 24. Basic weaver  Basic aspect language: aspect-code weave(method(? class,?selector),{<aspect-code>})   Smalltalk code and…   thisObject Access to the current receiver in aspect-code   original() Execute the original method (with the original arguments)   thisAspect not yet… 7/29/10 ESUG 2001, Essen 24
  • 25. A basic-weaver aspect: Logging Write the size of the collection to the Transcript every time after an element is added to an Array or an OrderedCollection weave(?pc, { |tempResult| tempResult := original(). Transcript write: thisObject size asString. ^ tempResult } ) if location(?pc). location(method([Array],at:put:) ). location(method([OrderedCollection],add:)) QSOUL Smalltalk 7/29/10 Basic2001, Essen ESUG weaver 25
  • 26. Building your own aspect language  An AspectWeaverMixin…   …defines a new aspect-language in terms of another aspect-language.   …defines a transformation of a higher-level aspect language to a lower-level aspect- language   …can be mixed with other aspectweavermixins and the basic weaver to form a complete aspectweaver 7/29/10 ESUG 2001, Essen 26
  • 27. Building your own aspect language after(execution(?class,?selector),{Transcript write: thisObject size asString}) if location(?class,?selector). location([Array],at:put:). location([OrderedCollection],add:) weave(method(?class,?sel), { |tempResult| tempResult := original(). ?code. ^ tempResult } ) if after(execution(?class,?sel),?code). QSOUL Smalltalk 7/29/10 Basic2001, Essen ESUG weaver 27
  • 28. Building your own aspect language location([Array],at:put:). location([OrderedCollection],add:) Size Logging AspectWeaverMixin location Advice AspectWeaverMixin before/after/around QSOUL weave Smalltalk 7/29/10 Basic weaver ESUG 2001, Essen 28
  • 29. Combination of aspect-languages Logging aspect Synchronization aspect Logging and Synchronizing AspectWeaverMixin QSOUL Smalltalk 7/29/10 Basic2001, Essen ESUG weaver 29
  • 30. Combination of aspect-languages Logging Synchronization aspect aspect Logging Synchronization Weavermixin Weavermixin Advice Combination Weavermixin Advice Weavermixin QSOUL Smalltalk Basic weaver 7/29/10 ESUG 2001, Essen 30
  • 31. QSOUL/Aop: Open crosscut language  QSOUL’s reasoning about Smalltalk basecode allows detection of patterns.   Extract implicit call-structure   Extract design patterns   Etc…  This information can be used to implement user- defined crosscuts   Method that initializes instance variables   Methods that send messages to a Stack instance   Etc… 7/29/10 ESUG 2001, Essen 31
  • 32. Integration in Smalltalk QSOUL/Aop AspectWeaverMixins (an AspectWeaverMixin is a logic program) Smalltalk metasystem metaclass QSOUL/Aop basic-weaver Smalltalk system Invisible class generated aspect-class 7/29/10 Invisible woven-calls ESUG 2001, Essen 32
  • 33. QSOUL/Aop: Future Work  thisAspect  Scope per aspect-instance variable  Aspect methods  Extend basic weaver to weave on other language elements  Technical improvements   Use method wrappers instead of hidden classes   Check for uses of self in aspect-code   … 7/29/10 ESUG 2001, Essen 33
  • 35. Aspects in Conduits-Framework  User Interface update   After each fill, update view  Synchronization and message order   fill and drain: in alternate order + blocking  Overflow logging   Setting of content everywhere should produce same message (throws error?)  Etc… 7/29/10 ESUG 2001, Essen 35
  • 36. Links Declarative (Logic) Meta Programming: http://prog.vub.ac.be/poolresearch/dmp/ QSOUL2: http://prog.vub.ac.be/poolresearch/qsoul/qsoul2.html QSOUL/Aop: http://prog.vub.ac.be/poolresearch/aop/qsoulaop.html johan.brichau@vub.ac.be 7/29/10 ESUG 2001, Essen 36
  • 37. QSOUL LMP-tool  Strong symbiosis between logic language and Smalltalk   Logic language acts on current Smalltalk image   Smalltalk objects are constants in the logic language   Logic clauses can execute parameterised Smalltalk expressions  Code generation through manipulation of quasi-quoted codestrings 7/29/10 ESUG 2001, Essen 37
  • 38. Aspect Oriented Software Development  Subject Oriented Programming and Multidimensional Separation of Concerns   Different views on the program’s decomposition, each addressing a concern   Compose the different views with composition rules  Composition Filters   Place wrappers around encapsulations, each addressing a cross-cutting concern 7/29/10 ESUG 2001, Essen 38
  • 39. Aspect Oriented Software Development  Design Patterns   Use exisiting ‘generalised procedure’ techniques to separate cross-cutting concern (e.g. Visitor pattern)  Aspect Oriented Programming   Encapsulate aspects   Aspect-weaver composes aspects with other encapsulations guided by a pointcut-language 7/29/10 ESUG 2001, Essen 39
  • 40. AOLMP using TyRuBa Basic Functionality Code Parser Facts representing basic functionality code Weaver Code + with Logic Program aspects Logic program representing aspect declarations 7/29/10 ESUG 2001, Essen 40