Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Declarative Meta-Programming Approach to Framework Documentation Tom Tourwé & Tom Mens Programming Technology Lab Vrije.

Similar presentations


Presentation on theme: "A Declarative Meta-Programming Approach to Framework Documentation Tom Tourwé & Tom Mens Programming Technology Lab Vrije."— Presentation transcript:

1 A Declarative Meta-Programming Approach to Framework Documentation Tom Tourwé & Tom Mens Programming Technology Lab Vrije Universiteit Brussel

2 25 July, 2014Tom Tourwé2 Motivation Framework Documentation Framework Documentation –Often non-existent –Outdated, due to constant evolution –Not integrated in the development process Problems for evolution & instantiation of the framework!

3 25 July, 2014Tom Tourwé3 Proposed Solution Use declarative meta programming (DMP) Use declarative meta programming (DMP) –To document a framework’s design accurately and concisely »By means of design patterns used in the framework –Use the available information actively »Check completeness/correctness of the documentation w.r.t. the source code Concrete DMP Environment used: SOUL

4 25 July, 2014Tom Tourwé4 Why DMP? Declarative Declarative –Represent knowledge in a straightforward and concise way Powerful reasoning capabilities Powerful reasoning capabilities –Infer extra information from available information Tight Integration Tight Integration –Of SOUL with the development environment –Allows to consult the source code

5 25 July, 2014Tom Tourwé5 Documenting the Design

6 25 July, 2014Tom Tourwé6 Documenting the Design dpRole(astVisitor,abstractElement,ScExpression). dpRole(astVisitor,concreteElement,ScConsExpression). dpRole(astVisitor,concreteElement,ScBlockExpression).... dpRole(astVisitor,acceptMethod,nodeDo:). dpRole(astVisitor,abstractVisitor,AbstractASTEnumerator). dpRole(astVisitor,concreteVisitor,SchemeToSmalltalkConverter). dpRole(astVisitor,visitMethod,doConsExpression:). dpRole(astVisitor,visitMethod,doBlockExpression:).... dpRelation(astVisitor, ). dpRole([instance],[role],[source code artifact])

7 25 July, 2014Tom Tourwé7 dpRole(astVisitor,abstractElement,ScExpression). … dpRole(?instance,concreteElement,?concreteElement) if dpInstance(?instance,visitorDP), dpRole(?instance,abstractElement,?root), hierarchy(abstractElement,?concreteElement), concreteClass(?concreteElement). Consult documentation Consult implementation Documenting the Design Rather verbose Rather verbose Use full power of DMP instead Use full power of DMP instead

8 25 July, 2014Tom Tourwé8 requiredRole(visitorDP,abstractElement). requiredRole(visitorDP,abstractVisitor). requiredRole(visitorDP,acceptMethod). checkPatternInstance(?pattern, ?instance, ?role) if requiredRole(?pattern,?role), not(dpRole(?instance,?role)) Checking Completeness Describe “required” roles Describe “required” roles –By means of logic facts Check documentation for their presence Check documentation for their presence –By means of logic rules –Report missing roles

9 25 July, 2014Tom Tourwé9 patternConstraint(visitorDP,?instance, noAcceptMethod(?concreteElement,?acceptSelector)) if dpRole(?instance,acceptMethod,?acceptSelector), dpRole(?instance,concreteElement,?concreteElement), not(classImplements(?concreteElement,?acceptSelector)) Checking Consistency Identify appropriate design constraints Identify appropriate design constraints Implement them by means of logic rules Implement them by means of logic rules Report conflicts & suggest possible actions Report conflicts & suggest possible actions Consult documentation Check implementation


Download ppt "A Declarative Meta-Programming Approach to Framework Documentation Tom Tourwé & Tom Mens Programming Technology Lab Vrije."

Similar presentations


Ads by Google