QtModeling
bringing metamodeling features
into the KDE world
Sandro Andrade
sandroandrade@kde.org
whoami
● Assistant Professor at IFBA – Brazil.
● Using KDE and Qt since 1999.
● Contributing to KDE since 2008.
● I've developed QtModeling as part of
my PhD research at UFBA.
What's QtModeling about?
● It's about dealing with software models.
Why do we need software models?
● Documentation.
● Source code generation / model-code sync.
● Architectural recovery / compliance verification.
● Model-driven QA and CI (DRY).
● Predicting / simulating quality attributes.
● Domain-Specific Languages (DSLs).
● Models@run.time.
Why do we need qtmodeling?
● Issues in scalability, performance, and standards
compliance in current UML/MOF/* JAVA-based
implementations.
● Lack of up to date C++ or Qt-based UML/MOF/*
implementations.
● We could support modeling features in QtCreator /
KDevelop and revamp Umbrello.
● We could have more model-centric processes in KDE
development workflows.
The basics about metamodeling
UML::ClassUML::Property UML::Association
MOF::Class
User
model
UML
metamodel
MOF
meta-metamodel
Qtmodeling Drivers / Rationale
● D1) It should be 100% compliant to OMG standards.
● D2) It should be metamodel-agnostic.
● D3) It should perform well for large models and
when handling multiples models simultaneously.
● D4) Models should be easily queried/changed via
scripting.
Qtmodeling Drivers / Rationale
● D1) It should be 100% compliant to OMG standards.
● D2) It should be metamodel-agnostic.
● D3) It should perform well for large models and
when handling multiples models simultaneously.
● D4) Models should be easily queried/changed via
scripting.
Perl
Template
Toolkit
OMG
spec
XMI
C++/Qt
impl
tmpl's
Qt UML
Impl
UML figures:
● 239 metaclasses
● 91.83% generated
automatically
● 300 KLOC
● A lot of dreaded
diamonds
Qtmodeling Drivers / Rationale
● D1) It should be 100% compliant to OMG standards.
● D2) It should be metamodel-agnostic.
● D3) It should perform well for large models and
when handling multiples models simultaneously.
● D4) Models should be easily queried/changed via
scripting.
1) Extensive use of Qt's introspection capabilities.
2) Modeling languages (metamodels) as Qt plugins.
3) Qt meta-object capabilities for properties' metadata
have several limitations regarding that (QTBUG-17301).
Qtmodeling Drivers / Rationale
● D1) It should be 100% compliant to OMG standards.
● D2) It should be metamodel-agnostic.
● D3) It should perform well for large models and
when handling multiples models simultaneously.
● D4) Models should be easily queried/changed via
scripting.
Already good enough, but (WIP):
1) Copy-on-Write.
2) Reduce footprint of derived union properties.
3) Shared objects when dealing with multiple models.
Qtmodeling Drivers / Rationale
● D1) It should be 100% compliant to OMG standards.
● D2) It should be metamodel-agnostic.
● D3) It should perform well for large models and
when handling multiples models simultaneously.
● D4) Models should be easily queried/changed via
scripting.
Basic QtScript code!
QtModeling's Qt5 add-ons
Qt5
QtModeling
QtModelingWidgetsUMLPlugin MOFPlugin...
DuSE tool
DuSE plugins
= run-time dependency
XMI serialization
+
Qt meta-object
extensions
New Qt models
and views for dealing
with QtModeling-based
elements
Languages'
implementation
The Duse tooldemo
So,What's next?
● We are still trying to do a release! QtModeling first,
then metamodels, then widgets …
● QML-based concrete syntax should be implemented
for most used UML constructs.
● That recurrent boring thing: “We need you!” :)
Thanks for your attention!
QtModeling
bringing metamodeling features
into the KDE world
Sandro Andrade
sandroandrade@kde.org

QtModeling - bringing metamodeling features into the KDE world

  • 1.
    QtModeling bringing metamodeling features intothe KDE world Sandro Andrade sandroandrade@kde.org
  • 2.
    whoami ● Assistant Professorat IFBA – Brazil. ● Using KDE and Qt since 1999. ● Contributing to KDE since 2008. ● I've developed QtModeling as part of my PhD research at UFBA.
  • 3.
    What's QtModeling about? ●It's about dealing with software models.
  • 4.
    Why do weneed software models? ● Documentation. ● Source code generation / model-code sync. ● Architectural recovery / compliance verification. ● Model-driven QA and CI (DRY). ● Predicting / simulating quality attributes. ● Domain-Specific Languages (DSLs). ● Models@run.time.
  • 5.
    Why do weneed qtmodeling? ● Issues in scalability, performance, and standards compliance in current UML/MOF/* JAVA-based implementations. ● Lack of up to date C++ or Qt-based UML/MOF/* implementations. ● We could support modeling features in QtCreator / KDevelop and revamp Umbrello. ● We could have more model-centric processes in KDE development workflows.
  • 6.
    The basics aboutmetamodeling UML::ClassUML::Property UML::Association MOF::Class User model UML metamodel MOF meta-metamodel
  • 7.
    Qtmodeling Drivers /Rationale ● D1) It should be 100% compliant to OMG standards. ● D2) It should be metamodel-agnostic. ● D3) It should perform well for large models and when handling multiples models simultaneously. ● D4) Models should be easily queried/changed via scripting.
  • 8.
    Qtmodeling Drivers /Rationale ● D1) It should be 100% compliant to OMG standards. ● D2) It should be metamodel-agnostic. ● D3) It should perform well for large models and when handling multiples models simultaneously. ● D4) Models should be easily queried/changed via scripting. Perl Template Toolkit OMG spec XMI C++/Qt impl tmpl's Qt UML Impl UML figures: ● 239 metaclasses ● 91.83% generated automatically ● 300 KLOC ● A lot of dreaded diamonds
  • 9.
    Qtmodeling Drivers /Rationale ● D1) It should be 100% compliant to OMG standards. ● D2) It should be metamodel-agnostic. ● D3) It should perform well for large models and when handling multiples models simultaneously. ● D4) Models should be easily queried/changed via scripting. 1) Extensive use of Qt's introspection capabilities. 2) Modeling languages (metamodels) as Qt plugins. 3) Qt meta-object capabilities for properties' metadata have several limitations regarding that (QTBUG-17301).
  • 10.
    Qtmodeling Drivers /Rationale ● D1) It should be 100% compliant to OMG standards. ● D2) It should be metamodel-agnostic. ● D3) It should perform well for large models and when handling multiples models simultaneously. ● D4) Models should be easily queried/changed via scripting. Already good enough, but (WIP): 1) Copy-on-Write. 2) Reduce footprint of derived union properties. 3) Shared objects when dealing with multiple models.
  • 11.
    Qtmodeling Drivers /Rationale ● D1) It should be 100% compliant to OMG standards. ● D2) It should be metamodel-agnostic. ● D3) It should perform well for large models and when handling multiples models simultaneously. ● D4) Models should be easily queried/changed via scripting. Basic QtScript code!
  • 12.
    QtModeling's Qt5 add-ons Qt5 QtModeling QtModelingWidgetsUMLPluginMOFPlugin... DuSE tool DuSE plugins = run-time dependency XMI serialization + Qt meta-object extensions New Qt models and views for dealing with QtModeling-based elements Languages' implementation
  • 13.
  • 14.
    So,What's next? ● Weare still trying to do a release! QtModeling first, then metamodels, then widgets … ● QML-based concrete syntax should be implemented for most used UML constructs. ● That recurrent boring thing: “We need you!” :)
  • 15.
    Thanks for yourattention! QtModeling bringing metamodeling features into the KDE world Sandro Andrade sandroandrade@kde.org