QP (Quantum Platform) Statecharts with Eclipse rather than QM - eclipse

Miro Samek's QM graphical modeling tool (http://www.state-machine.com/qm/) seems like a good tool for semi graphical editing of UML statecharts for the QP framework. I would however like to use eclipse papyrus for this task because I have some experience with it.
Does anyone feel in a position to compare papyrus to QM?
Can anyone point me to good literature on code generation from statecharts made with papyrus?

I have never used Papyrus, but I just went through a tutorial for it.
The biggest difference that I see is that Papyrus appears to be primarily a UML modeling tool. Code generation is a "side-component" (The exact term from the penultimate page of A slide-ware tutorial on Papyrus usage for starters (2010-10-01).) Here's a StackOverflow question about code generation with Papyrus... it sounds complicated. I browsed Papyrus' forum and tutorials and didn't find anything immediately helpful related to code generation.
UML is traditionally considered a design phase technology in the Waterfall software development process, so once software is modeled in UML, implementation is a separate process. Not so with QM.
QM, unlike Papyrus, is not a general UML modeling tool; it's for modeling UML Statecharts with the sole purpose of compiling them, within the tool, to traceable C or C++ code. As you know, QM is related to QP, a state machine framework. QM builds code that utilizes QP.
QM's is your modeller and IDE. Your final source code, barring external libraries, is 100% generated by QM. As you graphically develop your UML Statecharts, you're expected to write C or C++ code that runs on transitions to/from your states. When you compile, QM combines your written code with its own generated code to produce a source files that you can compile immediately without making any additional changes.

Related

Matlab moving from XUnit to Matlab 2013 unit testing

As many of you are aware as of the release of MatLab 2013a, xUnit a popular unit testing framework for MatLab is canceling further development.
Is MatLab's new and native unit testing framework comparable to xUnit? what features is it lacking when compared to xUnit? Is it better or worse than xUnit?
MATLAB xUnit has been an excellent contribution to the test focused development efforts of those writing MATLAB code. It has a solid implementation, it follows the xUnit paradigm very well, and has been invaluable as a file exchange contribution.
The MATLAB Unit Test framework has indeed learned from this submission as well as decades of requirements and test focused development for the MathWorks' internal code base. We have also learned and extended upon frameworks in other languages such as JUnit, NUnit, and python's unittest framework. As such there certainly are many more features in the R2013a-beyond framework, and it is designed to scale and extend.
There are too many other features to go into in a simple answer, but perhaps one way to describe some of the differences are that the 13a framework is what I loosely call an "xUnit 2.0" and the file exchange submissions is an "xUnit 1.0" framework. If you are familair with JUnit, this is like the difference between JUnit 3 and JUnit 4.
There are also other intangible or as yet unrealized benefits, such as:
The framework is included directly in MATLAB so you can share tests with others and know that they can run the tests even if they are not familiar with testing and do not want to download the file exchange framework.
The framework is under active development with a pipeline of additional features and capabilities in the works for future releases.
Hope that helps. I would be happy to go over any questions you have about specific functionality or features.
I don't believe MathWorks are planning at all to stop making xUnit available, so you can continue using it if you like. xUnit had not seen any large changes for quite a while in any case, and even though it won't be developed further in terms of features, it may receive an occasional fix if any are needed.
I have tried out the new framework quite a bit, but have not used it on any large projects yet. Previously I have used xUnit on large projects. However, I'm no expert on unit testing - so please read the following opinions in that context.
I'm pretty sure there's nothing you can do in xUnit that you can't do in the new framework. In general it's much more flexible and powerful than xUnit, providing additional features and a better way to organise and structure your tests. It's a lot easier to set up and tear down suites of tests, to manage and close resources (files, figure windows, database connections etc), and to carry out tricky tests such as checking that the right number of arguments are returned.
However, whereas a typical xUnit test was implemented as a fairly simple MATLAB function, tests in the new framework are typically implemented (in 13a, but see below for 13b) as classes using MATLAB's OO syntax, and if you're not comfortable with that it may seem like a big leap.
I should also add that although the documentation for the testing framework is excellent as reference material, I haven't found it to be great as a tutorial.
In 13b, the need to use classes has been offset a bit with the introduction of the functiontests command, which creates a test suite for you from a file containing tests implemented as local functions. That will make things much easier if you're not comfortable with class syntax. But I would think that if you want to take advantage of everything, you'd probably still want to use the main framework.
Hope my experience is of help - if you're lucky, perhaps #AndyCampbell will chime in...

Generate code from state diagram

I want to generate C++ code from a State Diagram (Harrel FSM) and I'm wondering whether this is possible with EA, and if, how to go about generating code.
I've followed the example at Sparx: Generate From Behavioral Models, but when I look at the generated code it consists of skeleton code that does not include any state transitions etc. I've seen an example of assumedly code generated by EA in their online help, so it does seem to be possible, but I cannot find any concrete examples of how.
Could anyone give me some direction? Thanks.
Are you able to generate behavioral code from the examples in the EAExample model?
If not, you'll need to confirm which edition of Enterprise Architect you are using. Code generation from behavioral models such as State Machines is only available in the Business and Software Engineering, Systems Engineering and Ultimate editions of EA.

Is there a visual modeling tool / language or style which supports Scala profile?

[Similarly sounding question currently active on SO is " Is there a visual modeling language or style for the functional programming paradigm? " which is different then this question because another is focusing only on Functional programming paradigm and my question is looking for a modeling tool which supports combination of Object Oriented Paradigm (which independently has many well established visual modeling UML tools) and Functional Programming Paradigm together.
Is there a visual modeling tool / language or style which supports Scala profile (provides and includes all Scala language artifacts) or can say that it supports the object oriented programming paradigm and the functional programming paradigm, together.
For an Enterprise scale Scala project, with what modeling tool - the business analyst prepare Visual Models or any other type of model(s) for Logical (conceptual) view and Development view?
The logical view is concerned with the functionality that the system provides to the end-users.
The development view illustrates a system from a programmer's perspective and is concerned with software management.
In certain circles of software development, formal modeling is a requirement, no matter how bureaucratic you consider this to be. There are several levels of involvement from different teams on the conclusion of a project and many of the people involved have no idea about the code. They don't need to have, it'd be a major hassle if that was asked of them. The formal modeling is there to assure that they'll get a better view of how things work so that they can perform their roles in the development.
(This paragraph is taken from: https://stackoverflow.com/users/166802/codnik)
Unfortunately there doesn't seem to be one available.
I have a PhD student friend who is working on formalising modelling techniques, however he is not building a PoC.

What is Eclipse Modeling Framework?

I am sorry, this might look too simple, but I am vague about what Eclipse Modeling Framework is?
Based on their website, it generates java code, based on XML specification.
I wonder if it is something like Visual Paradigm?
And does it generate code for other languages (such as PHP) or just for Java?
Thanks.
EMF is a framework that can take a model (as described in a .ecore file) and generate the supporting Java files that can be used with EMF to build, load, manipulate and save instances of that model.
That means you use EMF when you are writing a Java application and want to manipulate a model (an abstract syntax tree for a language, a model that can be displayed by your View, a domain that needs to be manipulated, etc).
There are a lot of modeling projects, and they add support for more and more functionality but most of it is based on EMF.
Basically, EMF is a framework for developing model driven development (MDD) tools.
The tools you will be interested in are in the Model To Text (M2T) section. Using tools like JET you can generate logic-containing business objects, not just simple DTOs, in any language you want. You can generate code from domain-specific languages (DSL) that you define yourself (usually in XML) or from standard modeling languages (UML or Encore).
When you have picked a modeling language, there are ways to build your models using graphical tools (GMF). In addition, EMF has the validation/translation tools you would expect.
Having tried out several of the code generation tools, I can say that it was a worthwhile experiment. However, it requires a significant investment to learn and puts you at risk of depending on one particular tool. If you find yourself in want of a code generation tool, also consider that you may have a language smell or haven't refactored out enough duplication.

What has been done in the field of versioning models?

We had a rather nice lecture about Model driven architecture by a guy from Model Labs.
One thing that got me intrigued was the version control for models ( not to be confused with different models of version control) - or the lack of thereof. By version control for models he meant a way to version XML, EMF files which preserves their semantic.
So, I'm interested in what has been done so far on that field (he mentioned something about SVN and Moodle, though I could have misheard him). The Google search yielded nothing so I'm turning to the wisdom of the Stack Overflow.
I'm looking mostly for information in the form of books, articles, links.
I don't know of a VCS alone dedicated to Model, because Model-base design is often part of a all chain of documents that need to be kept in sync.
Namely (not an exhaustive list):
requirements documents (from which you start modeling)
source code and documentations (generated and implemented from the model)
Plus, I never saw the GUI aspect fully solved in those tools (one model painstakingly organized a certain way might be versioned without layout information, and restored organized another way).
One tool I know of which covers all of those development processes is Modelio, which includes a "teamwork manager"
Another example (which I don't know as much about) would be metaCASE, which has an interesting paper "The Model Repository: More than just XML under version control", about DSM (Domain-Specific Modeling).
DSM: model-based software development approach that uses visual models as primary artifacts in the development process.
DSM raises the level of abstraction beyond normal programming languages by directly specifying the solution in a language that uses concepts and rules from the problem domain – a Domain-Specific Language (DSL).
It does summarize the problem:
There is increased awareness within the modeling arena of the need for
a central repository of system description information.
This is brought on by a growing recognition that only with a strong central repository can modeling tools be integrated, cope with large projects, provide full life-cycle support, produce complete documentation, perform system-wide validation and verification, and adequately control a project.
A full list of version control tools for models can be found here: http://modeling-languages.com/content/version-control-tools-modeling-artifacts
Check EMF framework Edapt
it provides the following features:
Edapt IDE Tooling:
Ecore Editor enhancement to create and maintain the history of an Ecore
Operation-browser to execute refactorings on an Ecore
Release Tooling to prepare a migration plugin from the Ecore history
Custom Migration Support
Edapt Runtime:
API to detect version of given model instances
API to migrate model instances with registered migration plugins