SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Pavel Krivanek, Inria Nord Europe, RMoD
Moose
● platform for software and data analysis
● language independent meta-modeling toolkit
A platform for the development of
exploratory environments
for any language
FAMIX
● the basic meta-model for Moose
● language independent
● needs to cover several programming paradigms
● uniforms representation of procedural
and object-oriented languages
FAMIX issues
● impossible to uniform all languages
● one language implementation can have different
meta-models
● SQL? DSLs? Structured data?
● AST-level meta-models?
● need of custom extensions
● multiple inheritance
new Famix
Standalone meta-models
Old Famix:
CppEntity
CppBehavioural
CppMethod CppFunction
CppClass
CEntity
CFunction
JavaEntity
JavaMethod JavaClass
FAMIXEntity
FAMIXBehavioural
FAMIXMethod FAMIXFunction
FAMIXClass
New Famix:
new Famix
Meta-model composition
● Famix = collection of trait groups
● relations
● useful messages, metrics, tools support...
Access
Accessible WithAccesses
* accesses
accessor
incomingAccesses *
variable
new Famix
Meta-model composition
● meta-model entities use common traits
TAccess
TAccessible TWithAccesses JavaAccess
JavaLocalVariable JavaMethod
**
new Famix
Relations
● realized using slotsslots
● automatic relation management
Trait named: #TAccess
slots: {
#accessor => FMOne type: #TWithAccesses opposite: #accesses.
#variable => FMOne type: #TAccessible opposite: #incomingAccesses }
Trait named: #TAccessible
slots: {
#incomingAccesses => FMMany type: #TAccess opposite: #variable }
Trait named: #TWithAccesses
slots: {
#accesses => FMMany type: #TAccess opposite: #accessor }
Access
Accessible WithAccesses
* accesses
accessor
incomingAccesses *
variable
new Famix
Stateful traits
● New feature of Pharo 7
● by Pablo Tesone
● separate ESUG 2018 talk – do not miss it!
● traits can provide instance variables
● image-side enhancement, no extra VM support
● loadable library (kernel without traits support)
● realized using custom Metaclasses
new Famix
How to create meta-models?
By hand?
FAMIXSourcedEntity subclass: #FAMIXNamedEntity
uses: FamixTInvocationsReceiver + FamixTNamed + FamixTPackageable +
FamixTPossibleStub + FamixTWithAnnotationInstances + FamixTWithModifiers +
TDependencyQueries + TEntityMetaLevelDependency...
● complex class definitions
● need to write some manual methods
● annotations for FAME
● accessors
● additional containment definitions for Moose-Query
● testing methods...
new Famix
Meta-model builder
● Smalltalk-based DSL for meta-models description
behaviouralEntity := builder newClassNamed: #BehaviouralEntity.
function := builder newClassNamed: #Function.
behaviouralEntity <|-- function.
function --|> #TFunction
(namedEntity property: #name type: #String)
comment: 'This is a comment'.
new Famix
Meta-model builder - relations
● new Famix meta-model is described using DSL
class -* method.
((tAccess property: #accessor)
comment: 'Behavioural entity making the access to the variable';
source)
*-
((tWithAccesses property: #accesses)
comment: 'Accesses to variables made by this behaviour').
new Famix
Meta-model generators
● Most meta-models share the same basic
infrastructure
● entity, namedEntity, sourceLanguage,
association, sourced entity, comment...
● own meta-model generator as subclass of
a predefined one
● FamixBasicInfrastructureGenerator
● FamixFileBasedLanguageGenerator
● + file, fileAnchor, folder…
new Famix
PL/pgSQL meta-model
● Julien Delplanque
● multiple inheritances
e.g. Table: ColumnsContainer, AbstractType, StructuralEntity
AbstractType EntityInNamespaceColumnsContainer TReferenceContainer
TType
TTable
SQLAbstractType
TCheckConstraint
TStoredProcedureTView
TDerivedTable
TParameter
TLocalVariableTCursorParameter
TTrigger
String firingAction
String when
TClause
TAlias
TReference
Entity
BehaviouralEntity / SourcedEntity
String sourceCode
StructuralEntity / NamedEntity
String name
CRUDQuery / TCrudQuery
Reference
Parameter
LocalVariableCursorParameter
Alias
Clause
SourceAnchor / TSourceAnchor
Number lineBegin
Number lineEnd
Number columnBegin
Number columnEnd
Constraint / TConstraint
QueryContainer / TQueryContainer
Namespace / TNamespaceTable
Column / TColumn
Type
Trigger
SelectQuery / TSelectQueryInsertQuery UpdateQuery / TUpdateQueryDeleteQuery
TableReference / TTableReferenceViewReference / TViewReferenceDerivedTableReference / TDerivedTableReferenceParameterAccess / TParameterAccess CursorParameterAccess / TCursorParameterAccess
ColumnReference / TColumnReference
TypeReference / TTypeReference
CursorReference / TCursorReference StoredProcedureCall / TStoredProcedureCall
LocalVariableAccess / TLocalVariableAccess
AliasAccess / TAliasAccess
WithClause WhereClause ReturningClause OnConflictClause SetClause FromClause SelectClauseGroupByClause HavingClause OrderByClause JoinClause UnionClause IntersectClause ExceptClause ValuesClause UsingClause IntoClause LimitClause
CheckConstraintPrimaryKeyConstraint ForeignKeyConstraint / TForeignKeyConstraintNotNullConstraint UniqueConstraint
View
DerivedTable
StoredProcedure
Cursor / TCursor
TriggerStoredProcedure / TTriggerStoredProcedure
parameter
accesses *
type
localVariables *
derivedTable
references *
localVariable
accesses *
returnType
storedProceduresReturning *
cursor
references * parameters *
storedProcedure
columnsReferenced *
triggerStoredProceduresReferencing
arguments *
storedProcedureContainer
derivedTablesDefined *
parentQuery query
derivedTableDefining
triggers *
table
sourceAnchor
behaviouralEntity
superTable
subTables *
parameter
accesses *
localVariables *
storedProcedure
parameters *
cursor
updateQueries *
table
query
viewDefining
constraints *
table
storedProceduresCalled *
checkConstraintsCalling *
type
columns *
type
cursorParameters *
storedProcedure
calls *
type
references *
references *
container
aliases *
clause
table
references *
storedProcedure
triggers *
alias
accesses *
clauses *
query
referencedColumns *
foreignKeyConstraintsReferencing *
view
references *
column
references *
type
parameters *
namespace
entities *
queries *
container
columns *
columnsContainer
columns *
constraints *
new Famix
FAST
● Benoît Verhaeghe
● AST-level metamodel
● Java
TEntityMetaLevelDependency TDependencyQueries
Entity
JavaInitializersStatement Expression ScopableEntity VariableEntity NamedEntity JavaVariableDeclarator JavaElsePartStatement JavaThenPartStatement JavaConditionStatement JavaIncrementorsStatement JavaBodyStatement
Literal VariableExpression BehaviouralEntity StatementJavaAssignementExpression JavaFieldAccess JavaInfixOperation JavaMethodInvocation
BooleanLiteral CharacterLiteral NullPointerLiteral StringLiteral NamedBehaviouralEntity ExpressionStatement ReturnStatement StatementBlock JavaBreakStatement JavaCaseStatement JavaContinueStatement JavaDoStatementJavaFloatLiteral JavaForStatementJavaIdentifier JavaIfStatementJavaIntegerLiteral JavaSeparator JavaSwitchStatementJavaThis JavaVarDeclStatement JavaWhileStatement
JavaCharacterLiteral JavaMethodEntityJavaNullLiteral JavaStringLiteral
new Famix
FAST
● Benoît Verhaeghe
● AST-level metamodel
● Java
TEntityMetaLevelDependency TDependencyQueries
Entity
JavaInitializersStatement Expression ScopableEntity VariableEntity NamedEntity JavaVariableDeclarator JavaElsePartStatement JavaThenPartStatement JavaConditionStatement JavaIncrementorsStatement JavaBodyStatement
Literal VariableExpression BehaviouralEntity StatementJavaAssignementExpression JavaFieldAccess JavaInfixOperation JavaMethodInvocation
BooleanLiteral CharacterLiteral NullPointerLiteral StringLiteral NamedBehaviouralEntity ExpressionStatement ReturnStatement StatementBlock JavaBreakStatement JavaCaseStatement JavaContinueStatement JavaDoStatementJavaFloatLiteral JavaForStatementJavaIdentifier JavaIfStatementJavaIntegerLiteral JavaSeparator JavaSwitchStatementJavaThis JavaVarDeclStatement JavaWhileStatement
JavaCharacterLiteral JavaMethodEntityJavaNullLiteral JavaStringLiteral
new Famix
Old FAMIX compatibility metamodel
Entity
SourceAnchor SourceLanguage / TSourceLanguage SourcedEntity Exception / TException
Association Comment / TComment NamedEntitySourceTextAnchor / TWithImmediateSource AbstractFileAnchor / TFileAnchor MultipleFileAnchor AnnotationInstance AnnotationInstanceAttributeCSourceLanguage CustomSourceLanguage / TNamed CaughtException / TCaughtException DeclaredException / TDeclaredExceptionJavaSourceLanguagePharoAnchor PreprocessorStatementSmalltalkSourceLanguage ThrownException / TThrownExceptionUnknownSourceLanguage
AbstractFile / TFileSystemEntityFileAnchor / TFileNavigation IndexedFileAnchor / TIndexedFileNavigation Access / TAccessCppSourceLanguage ContainerEntityInclude / TFileInclude Inheritance Invocation LeafEntity PreprocessorDefine / TPreprocessorIfdef PreprocessorIfdefReference / TReference TraitUsage / TTraitUsage
File / TFile Folder / TFolder BehaviouralEntityDereferencedInvocation / TDereferencedInvocation ScopingEntity StructuralEntityType
AnnotationType / TAnnotationType AttributeCFile / TWithFileInclude Class Enum / TWithEnumValues EnumValue / TEnumValueFunction GlobalVariable ImplicitVariable / TImplicitVariable LocalVariable / TLocalVariableMethod Module Namespace / TNamespace Package / TPackage Parameter / TParameterParameterType ParameterizedType PrimitiveType TypeAlias / TTypeAlias UnknownVariableTrait / TTrait
AnnotationTypeAttributeCompilationUnit Header / THeader ParameterizableClass / TWithParameterizedTypes
new Famix
DEMO
new Famix
Generator problem
When you generate code, how to enable 
manual code modifications or extensions and 
still be able to modify definition of the 
generator and support re­generation of it?
new Famix
Ring 2
● Generators to not generate code directly but
create a Ring model
● this model is then applied on the image with
respect to its current content
● BONUS:
● fast and easy-to-write tests
● browse the model with Calypso
new Famix
Generated methods
tAccess withTesting.
● automatic testing methods (e.g. #isAccess)
in the root entities of the meta-model
● annotations...
● containment navigation utility methods
belongsTo / belongsTo:
● primary container
● used by (Moose-Query)
new Famix
Importing contex
● cherry picking on models during import
● dependencies aware
● automatic
builder generateImportingContext: true.
user: context importMethod
importer: context shouldImportMethod
customization: #requires:
new Famix
Extensions
Problem:Problem: We want provide some utility methods
or metrics that depend the meta-model structure
example:
numberOfPrivateMethods
● on entity that owns methods
TWithMethods
● methods must support modifiers
TWithModifiers
TMethod
TWithMethods
numberOfPrivateMethods
numberOfPublicMethods
TWithModifiers
JavaMethod
JavaClass
*
new Famix
Conditional traits
● traits that are automatically used by entities that
pass a condition
TMethod
TWithMethods
TWithModifiers
conditional trait
numberOfPrivateMethods
numberOfPublicMethods
JavaMethod
JavaClass
*
new Famix
Conditional traits
●
Advantage:Advantage: we can provide clean meta-models with rich
functionality and tools support without making meta-
model generation more complex for the user
●
Disadvantage:Disadvantage: more traits in the class definition, a lot of
small traits
What if we want to know number of private
methods for a package?
● more complex conditions (roots, common superclasses)
● Moose-Query
Git
● All Moose platform packages managed by Git
● Iceberg, Tonel
● Reproducible builds, CI
https://github.com/moosetechnology/Moose
https://github.com/pavel-krivanek/Moose
Summary
● Custom meta-models composition
● Groups of stateful traits
● Relations using slots
● DSL for meta-model description
● Basic language infrastructure generators
● Ring meta-model for code generation
● old FAMIX compatibility
● Importing contexts
● Conditional traits
● Git migration

Weitere ähnliche Inhalte

Was ist angesagt?

Clojure talk at Münster JUG
Clojure talk at Münster JUGClojure talk at Münster JUG
Clojure talk at Münster JUGAlex Ott
 
Overview Of .Net 4.0 Sanjay Vyas
Overview Of .Net 4.0   Sanjay VyasOverview Of .Net 4.0   Sanjay Vyas
Overview Of .Net 4.0 Sanjay Vyasrsnarayanan
 
Functional programming with Java 8
Functional programming with Java 8Functional programming with Java 8
Functional programming with Java 8Talha Ocakçı
 
Embrace HTTP with ASP.NET Web API
Embrace HTTP with ASP.NET Web APIEmbrace HTTP with ASP.NET Web API
Embrace HTTP with ASP.NET Web APIFilip W
 
Method Handles in Java
Method Handles in JavaMethod Handles in Java
Method Handles in Javahendersk
 
Java SE 9 modules - an introduction (July 2018)
Java SE 9 modules - an introduction (July 2018)Java SE 9 modules - an introduction (July 2018)
Java SE 9 modules - an introduction (July 2018)Stephen Colebourne
 
Testing untestable code - PHPBNL11
Testing untestable code - PHPBNL11Testing untestable code - PHPBNL11
Testing untestable code - PHPBNL11Stephan Hochdörfer
 
Functional programming with Java 8
Functional programming with Java 8Functional programming with Java 8
Functional programming with Java 8LivePerson
 
Java 8 selected updates
Java 8 selected updatesJava 8 selected updates
Java 8 selected updatesVinay H G
 
Functional programming principles and Java 8
Functional programming principles and Java 8Functional programming principles and Java 8
Functional programming principles and Java 8Dragos Balan
 
Zend%20Certification%20REVIEW%20Document
Zend%20Certification%20REVIEW%20DocumentZend%20Certification%20REVIEW%20Document
Zend%20Certification%20REVIEW%20Documenttutorialsruby
 
Testing untestable code - phpconpl11
Testing untestable code - phpconpl11Testing untestable code - phpconpl11
Testing untestable code - phpconpl11Stephan Hochdörfer
 
Clojure and The Robot Apocalypse
Clojure and The Robot ApocalypseClojure and The Robot Apocalypse
Clojure and The Robot Apocalypseelliando dias
 
Java 8 - A step closer to Parallelism
Java 8 - A step closer to ParallelismJava 8 - A step closer to Parallelism
Java 8 - A step closer to Parallelismjbugkorea
 

Was ist angesagt? (19)

Clojure talk at Münster JUG
Clojure talk at Münster JUGClojure talk at Münster JUG
Clojure talk at Münster JUG
 
Traits composition
Traits compositionTraits composition
Traits composition
 
Overview Of .Net 4.0 Sanjay Vyas
Overview Of .Net 4.0   Sanjay VyasOverview Of .Net 4.0   Sanjay Vyas
Overview Of .Net 4.0 Sanjay Vyas
 
Functional programming with Java 8
Functional programming with Java 8Functional programming with Java 8
Functional programming with Java 8
 
Embrace HTTP with ASP.NET Web API
Embrace HTTP with ASP.NET Web APIEmbrace HTTP with ASP.NET Web API
Embrace HTTP with ASP.NET Web API
 
JAVA PROGRAMMING- Exception handling - Multithreading
JAVA PROGRAMMING- Exception handling - MultithreadingJAVA PROGRAMMING- Exception handling - Multithreading
JAVA PROGRAMMING- Exception handling - Multithreading
 
Whats new in Java 7
Whats new in Java 7Whats new in Java 7
Whats new in Java 7
 
Method Handles in Java
Method Handles in JavaMethod Handles in Java
Method Handles in Java
 
Code generating beans in Java
Code generating beans in JavaCode generating beans in Java
Code generating beans in Java
 
Java SE 9 modules - an introduction (July 2018)
Java SE 9 modules - an introduction (July 2018)Java SE 9 modules - an introduction (July 2018)
Java SE 9 modules - an introduction (July 2018)
 
Testing untestable code - PHPBNL11
Testing untestable code - PHPBNL11Testing untestable code - PHPBNL11
Testing untestable code - PHPBNL11
 
Functional programming with Java 8
Functional programming with Java 8Functional programming with Java 8
Functional programming with Java 8
 
Java 8 selected updates
Java 8 selected updatesJava 8 selected updates
Java 8 selected updates
 
Functional programming principles and Java 8
Functional programming principles and Java 8Functional programming principles and Java 8
Functional programming principles and Java 8
 
Zend%20Certification%20REVIEW%20Document
Zend%20Certification%20REVIEW%20DocumentZend%20Certification%20REVIEW%20Document
Zend%20Certification%20REVIEW%20Document
 
Testing untestable code - phpconpl11
Testing untestable code - phpconpl11Testing untestable code - phpconpl11
Testing untestable code - phpconpl11
 
Viva file
Viva fileViva file
Viva file
 
Clojure and The Robot Apocalypse
Clojure and The Robot ApocalypseClojure and The Robot Apocalypse
Clojure and The Robot Apocalypse
 
Java 8 - A step closer to Parallelism
Java 8 - A step closer to ParallelismJava 8 - A step closer to Parallelism
Java 8 - A step closer to Parallelism
 

Ähnlich wie Moose Meta-Modeling Infrastructure

Moldable meta-models for Moose
Moldable meta-models for MooseMoldable meta-models for Moose
Moldable meta-models for MooseESUG
 
Java, Ruby & Rails
Java, Ruby & RailsJava, Ruby & Rails
Java, Ruby & RailsPeter Lind
 
Xopus Application Framework
Xopus Application FrameworkXopus Application Framework
Xopus Application FrameworkJady Yang
 
Model-Driven Software Development - Strategies for Design & Implementation of...
Model-Driven Software Development - Strategies for Design & Implementation of...Model-Driven Software Development - Strategies for Design & Implementation of...
Model-Driven Software Development - Strategies for Design & Implementation of...Eelco Visser
 
Strategies for Design & Implementation of Domain-Specific Languages
Strategies for Design & Implementation of Domain-Specific LanguagesStrategies for Design & Implementation of Domain-Specific Languages
Strategies for Design & Implementation of Domain-Specific LanguagesEelco Visser
 
Apache Wicket Web Framework
Apache Wicket Web FrameworkApache Wicket Web Framework
Apache Wicket Web FrameworkLuther Baker
 
Working with XSLT, XPath and ECMA Scripts: Make It Simpler with Novell Identi...
Working with XSLT, XPath and ECMA Scripts: Make It Simpler with Novell Identi...Working with XSLT, XPath and ECMA Scripts: Make It Simpler with Novell Identi...
Working with XSLT, XPath and ECMA Scripts: Make It Simpler with Novell Identi...Novell
 
Enterprise Java Web Application Frameworks Sample Stack Implementation
Enterprise Java Web Application Frameworks   Sample Stack ImplementationEnterprise Java Web Application Frameworks   Sample Stack Implementation
Enterprise Java Web Application Frameworks Sample Stack ImplementationMert Çalışkan
 
Javascript fundamentals and not
Javascript fundamentals and notJavascript fundamentals and not
Javascript fundamentals and notSalvatore Fazio
 
Scala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologistScala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologistpmanvi
 
Javatraining
JavatrainingJavatraining
Javatrainingducat1989
 
walkmod - JUG talk
walkmod - JUG talkwalkmod - JUG talk
walkmod - JUG talkwalkmod
 
Swift Micro-services and AWS Technologies
Swift Micro-services and AWS TechnologiesSwift Micro-services and AWS Technologies
Swift Micro-services and AWS TechnologiesSimonPilkington8
 
Java 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx FranceJava 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx FranceTrisha Gee
 
SCWCD : Thread safe servlets : CHAP : 8
SCWCD : Thread safe servlets : CHAP : 8SCWCD : Thread safe servlets : CHAP : 8
SCWCD : Thread safe servlets : CHAP : 8Ben Abdallah Helmi
 

Ähnlich wie Moose Meta-Modeling Infrastructure (20)

Moldable meta-models for Moose
Moldable meta-models for MooseMoldable meta-models for Moose
Moldable meta-models for Moose
 
Module Ninja .JS
Module Ninja .JSModule Ninja .JS
Module Ninja .JS
 
Java, Ruby & Rails
Java, Ruby & RailsJava, Ruby & Rails
Java, Ruby & Rails
 
Xopus Application Framework
Xopus Application FrameworkXopus Application Framework
Xopus Application Framework
 
Model-Driven Software Development - Strategies for Design & Implementation of...
Model-Driven Software Development - Strategies for Design & Implementation of...Model-Driven Software Development - Strategies for Design & Implementation of...
Model-Driven Software Development - Strategies for Design & Implementation of...
 
Strategies for Design & Implementation of Domain-Specific Languages
Strategies for Design & Implementation of Domain-Specific LanguagesStrategies for Design & Implementation of Domain-Specific Languages
Strategies for Design & Implementation of Domain-Specific Languages
 
DSLs in JavaScript
DSLs in JavaScriptDSLs in JavaScript
DSLs in JavaScript
 
Apache Wicket Web Framework
Apache Wicket Web FrameworkApache Wicket Web Framework
Apache Wicket Web Framework
 
Working with XSLT, XPath and ECMA Scripts: Make It Simpler with Novell Identi...
Working with XSLT, XPath and ECMA Scripts: Make It Simpler with Novell Identi...Working with XSLT, XPath and ECMA Scripts: Make It Simpler with Novell Identi...
Working with XSLT, XPath and ECMA Scripts: Make It Simpler with Novell Identi...
 
Enterprise Java Web Application Frameworks Sample Stack Implementation
Enterprise Java Web Application Frameworks   Sample Stack ImplementationEnterprise Java Web Application Frameworks   Sample Stack Implementation
Enterprise Java Web Application Frameworks Sample Stack Implementation
 
Javascript fundamentals and not
Javascript fundamentals and notJavascript fundamentals and not
Javascript fundamentals and not
 
Scala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologistScala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologist
 
Javatraining
JavatrainingJavatraining
Javatraining
 
Variables in Pharo
Variables in PharoVariables in Pharo
Variables in Pharo
 
walkmod - JUG talk
walkmod - JUG talkwalkmod - JUG talk
walkmod - JUG talk
 
Swift Micro-services and AWS Technologies
Swift Micro-services and AWS TechnologiesSwift Micro-services and AWS Technologies
Swift Micro-services and AWS Technologies
 
Java training
Java trainingJava training
Java training
 
Java 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx FranceJava 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx France
 
SCWCD : Thread safe servlets : CHAP : 8
SCWCD : Thread safe servlets : CHAP : 8SCWCD : Thread safe servlets : CHAP : 8
SCWCD : Thread safe servlets : CHAP : 8
 
Eureka moment
Eureka momentEureka moment
Eureka moment
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

Moose Meta-Modeling Infrastructure

  • 1. Pavel Krivanek, Inria Nord Europe, RMoD
  • 2. Moose ● platform for software and data analysis ● language independent meta-modeling toolkit A platform for the development of exploratory environments for any language
  • 3. FAMIX ● the basic meta-model for Moose ● language independent ● needs to cover several programming paradigms ● uniforms representation of procedural and object-oriented languages
  • 4. FAMIX issues ● impossible to uniform all languages ● one language implementation can have different meta-models ● SQL? DSLs? Structured data? ● AST-level meta-models? ● need of custom extensions ● multiple inheritance
  • 5. new Famix Standalone meta-models Old Famix: CppEntity CppBehavioural CppMethod CppFunction CppClass CEntity CFunction JavaEntity JavaMethod JavaClass FAMIXEntity FAMIXBehavioural FAMIXMethod FAMIXFunction FAMIXClass New Famix:
  • 6. new Famix Meta-model composition ● Famix = collection of trait groups ● relations ● useful messages, metrics, tools support... Access Accessible WithAccesses * accesses accessor incomingAccesses * variable
  • 7. new Famix Meta-model composition ● meta-model entities use common traits TAccess TAccessible TWithAccesses JavaAccess JavaLocalVariable JavaMethod **
  • 8. new Famix Relations ● realized using slotsslots ● automatic relation management Trait named: #TAccess slots: { #accessor => FMOne type: #TWithAccesses opposite: #accesses. #variable => FMOne type: #TAccessible opposite: #incomingAccesses } Trait named: #TAccessible slots: { #incomingAccesses => FMMany type: #TAccess opposite: #variable } Trait named: #TWithAccesses slots: { #accesses => FMMany type: #TAccess opposite: #accessor } Access Accessible WithAccesses * accesses accessor incomingAccesses * variable
  • 9. new Famix Stateful traits ● New feature of Pharo 7 ● by Pablo Tesone ● separate ESUG 2018 talk – do not miss it! ● traits can provide instance variables ● image-side enhancement, no extra VM support ● loadable library (kernel without traits support) ● realized using custom Metaclasses
  • 10. new Famix How to create meta-models? By hand? FAMIXSourcedEntity subclass: #FAMIXNamedEntity uses: FamixTInvocationsReceiver + FamixTNamed + FamixTPackageable + FamixTPossibleStub + FamixTWithAnnotationInstances + FamixTWithModifiers + TDependencyQueries + TEntityMetaLevelDependency... ● complex class definitions ● need to write some manual methods ● annotations for FAME ● accessors ● additional containment definitions for Moose-Query ● testing methods...
  • 11. new Famix Meta-model builder ● Smalltalk-based DSL for meta-models description behaviouralEntity := builder newClassNamed: #BehaviouralEntity. function := builder newClassNamed: #Function. behaviouralEntity <|-- function. function --|> #TFunction (namedEntity property: #name type: #String) comment: 'This is a comment'.
  • 12. new Famix Meta-model builder - relations ● new Famix meta-model is described using DSL class -* method. ((tAccess property: #accessor) comment: 'Behavioural entity making the access to the variable'; source) *- ((tWithAccesses property: #accesses) comment: 'Accesses to variables made by this behaviour').
  • 13. new Famix Meta-model generators ● Most meta-models share the same basic infrastructure ● entity, namedEntity, sourceLanguage, association, sourced entity, comment... ● own meta-model generator as subclass of a predefined one ● FamixBasicInfrastructureGenerator ● FamixFileBasedLanguageGenerator ● + file, fileAnchor, folder…
  • 14. new Famix PL/pgSQL meta-model ● Julien Delplanque ● multiple inheritances e.g. Table: ColumnsContainer, AbstractType, StructuralEntity AbstractType EntityInNamespaceColumnsContainer TReferenceContainer TType TTable SQLAbstractType TCheckConstraint TStoredProcedureTView TDerivedTable TParameter TLocalVariableTCursorParameter TTrigger String firingAction String when TClause TAlias TReference Entity BehaviouralEntity / SourcedEntity String sourceCode StructuralEntity / NamedEntity String name CRUDQuery / TCrudQuery Reference Parameter LocalVariableCursorParameter Alias Clause SourceAnchor / TSourceAnchor Number lineBegin Number lineEnd Number columnBegin Number columnEnd Constraint / TConstraint QueryContainer / TQueryContainer Namespace / TNamespaceTable Column / TColumn Type Trigger SelectQuery / TSelectQueryInsertQuery UpdateQuery / TUpdateQueryDeleteQuery TableReference / TTableReferenceViewReference / TViewReferenceDerivedTableReference / TDerivedTableReferenceParameterAccess / TParameterAccess CursorParameterAccess / TCursorParameterAccess ColumnReference / TColumnReference TypeReference / TTypeReference CursorReference / TCursorReference StoredProcedureCall / TStoredProcedureCall LocalVariableAccess / TLocalVariableAccess AliasAccess / TAliasAccess WithClause WhereClause ReturningClause OnConflictClause SetClause FromClause SelectClauseGroupByClause HavingClause OrderByClause JoinClause UnionClause IntersectClause ExceptClause ValuesClause UsingClause IntoClause LimitClause CheckConstraintPrimaryKeyConstraint ForeignKeyConstraint / TForeignKeyConstraintNotNullConstraint UniqueConstraint View DerivedTable StoredProcedure Cursor / TCursor TriggerStoredProcedure / TTriggerStoredProcedure parameter accesses * type localVariables * derivedTable references * localVariable accesses * returnType storedProceduresReturning * cursor references * parameters * storedProcedure columnsReferenced * triggerStoredProceduresReferencing arguments * storedProcedureContainer derivedTablesDefined * parentQuery query derivedTableDefining triggers * table sourceAnchor behaviouralEntity superTable subTables * parameter accesses * localVariables * storedProcedure parameters * cursor updateQueries * table query viewDefining constraints * table storedProceduresCalled * checkConstraintsCalling * type columns * type cursorParameters * storedProcedure calls * type references * references * container aliases * clause table references * storedProcedure triggers * alias accesses * clauses * query referencedColumns * foreignKeyConstraintsReferencing * view references * column references * type parameters * namespace entities * queries * container columns * columnsContainer columns * constraints *
  • 15. new Famix FAST ● Benoît Verhaeghe ● AST-level metamodel ● Java TEntityMetaLevelDependency TDependencyQueries Entity JavaInitializersStatement Expression ScopableEntity VariableEntity NamedEntity JavaVariableDeclarator JavaElsePartStatement JavaThenPartStatement JavaConditionStatement JavaIncrementorsStatement JavaBodyStatement Literal VariableExpression BehaviouralEntity StatementJavaAssignementExpression JavaFieldAccess JavaInfixOperation JavaMethodInvocation BooleanLiteral CharacterLiteral NullPointerLiteral StringLiteral NamedBehaviouralEntity ExpressionStatement ReturnStatement StatementBlock JavaBreakStatement JavaCaseStatement JavaContinueStatement JavaDoStatementJavaFloatLiteral JavaForStatementJavaIdentifier JavaIfStatementJavaIntegerLiteral JavaSeparator JavaSwitchStatementJavaThis JavaVarDeclStatement JavaWhileStatement JavaCharacterLiteral JavaMethodEntityJavaNullLiteral JavaStringLiteral
  • 16. new Famix FAST ● Benoît Verhaeghe ● AST-level metamodel ● Java TEntityMetaLevelDependency TDependencyQueries Entity JavaInitializersStatement Expression ScopableEntity VariableEntity NamedEntity JavaVariableDeclarator JavaElsePartStatement JavaThenPartStatement JavaConditionStatement JavaIncrementorsStatement JavaBodyStatement Literal VariableExpression BehaviouralEntity StatementJavaAssignementExpression JavaFieldAccess JavaInfixOperation JavaMethodInvocation BooleanLiteral CharacterLiteral NullPointerLiteral StringLiteral NamedBehaviouralEntity ExpressionStatement ReturnStatement StatementBlock JavaBreakStatement JavaCaseStatement JavaContinueStatement JavaDoStatementJavaFloatLiteral JavaForStatementJavaIdentifier JavaIfStatementJavaIntegerLiteral JavaSeparator JavaSwitchStatementJavaThis JavaVarDeclStatement JavaWhileStatement JavaCharacterLiteral JavaMethodEntityJavaNullLiteral JavaStringLiteral
  • 17. new Famix Old FAMIX compatibility metamodel Entity SourceAnchor SourceLanguage / TSourceLanguage SourcedEntity Exception / TException Association Comment / TComment NamedEntitySourceTextAnchor / TWithImmediateSource AbstractFileAnchor / TFileAnchor MultipleFileAnchor AnnotationInstance AnnotationInstanceAttributeCSourceLanguage CustomSourceLanguage / TNamed CaughtException / TCaughtException DeclaredException / TDeclaredExceptionJavaSourceLanguagePharoAnchor PreprocessorStatementSmalltalkSourceLanguage ThrownException / TThrownExceptionUnknownSourceLanguage AbstractFile / TFileSystemEntityFileAnchor / TFileNavigation IndexedFileAnchor / TIndexedFileNavigation Access / TAccessCppSourceLanguage ContainerEntityInclude / TFileInclude Inheritance Invocation LeafEntity PreprocessorDefine / TPreprocessorIfdef PreprocessorIfdefReference / TReference TraitUsage / TTraitUsage File / TFile Folder / TFolder BehaviouralEntityDereferencedInvocation / TDereferencedInvocation ScopingEntity StructuralEntityType AnnotationType / TAnnotationType AttributeCFile / TWithFileInclude Class Enum / TWithEnumValues EnumValue / TEnumValueFunction GlobalVariable ImplicitVariable / TImplicitVariable LocalVariable / TLocalVariableMethod Module Namespace / TNamespace Package / TPackage Parameter / TParameterParameterType ParameterizedType PrimitiveType TypeAlias / TTypeAlias UnknownVariableTrait / TTrait AnnotationTypeAttributeCompilationUnit Header / THeader ParameterizableClass / TWithParameterizedTypes
  • 20. new Famix Ring 2 ● Generators to not generate code directly but create a Ring model ● this model is then applied on the image with respect to its current content ● BONUS: ● fast and easy-to-write tests ● browse the model with Calypso
  • 21. new Famix Generated methods tAccess withTesting. ● automatic testing methods (e.g. #isAccess) in the root entities of the meta-model ● annotations... ● containment navigation utility methods belongsTo / belongsTo: ● primary container ● used by (Moose-Query)
  • 22. new Famix Importing contex ● cherry picking on models during import ● dependencies aware ● automatic builder generateImportingContext: true. user: context importMethod importer: context shouldImportMethod customization: #requires:
  • 23. new Famix Extensions Problem:Problem: We want provide some utility methods or metrics that depend the meta-model structure example: numberOfPrivateMethods ● on entity that owns methods TWithMethods ● methods must support modifiers TWithModifiers TMethod TWithMethods numberOfPrivateMethods numberOfPublicMethods TWithModifiers JavaMethod JavaClass *
  • 24. new Famix Conditional traits ● traits that are automatically used by entities that pass a condition TMethod TWithMethods TWithModifiers conditional trait numberOfPrivateMethods numberOfPublicMethods JavaMethod JavaClass *
  • 25. new Famix Conditional traits ● Advantage:Advantage: we can provide clean meta-models with rich functionality and tools support without making meta- model generation more complex for the user ● Disadvantage:Disadvantage: more traits in the class definition, a lot of small traits What if we want to know number of private methods for a package? ● more complex conditions (roots, common superclasses) ● Moose-Query
  • 26. Git ● All Moose platform packages managed by Git ● Iceberg, Tonel ● Reproducible builds, CI https://github.com/moosetechnology/Moose https://github.com/pavel-krivanek/Moose
  • 27. Summary ● Custom meta-models composition ● Groups of stateful traits ● Relations using slots ● DSL for meta-model description ● Basic language infrastructure generators ● Ring meta-model for code generation ● old FAMIX compatibility ● Importing contexts ● Conditional traits ● Git migration