#title Software (old)

Make everything as simple as possible, but not simpler” (A. Einstein)

#top

Some old pieces of software I do not really use any more.

#picore

Picore stands for Python pICO REpository generator. This small tool
generates: simple model repositories, XML loader and dumper associated
with the repositories, and simple hierarchical viewer. All this
generation is based upon a meta-model definition. The underlying
meta-meta-model of picore is two concepts based: class and
attribute. Picore spirit is close to a MOF tool but without MOF
complexity. It is intended to be used for model engineering teaching
and to some point rapid prototyping.

I do not longer work on this piece of software as I now use the PyEMOF
implementation.

** Motivation

Providing the corner stones for model driven engineering experiments,
ie repositories for model definitions and transformations (see picotin
for the later). It permits to easily define meta-models and to use
repositories in python script in order to experiment model
transformations.

The second goal of picore is to be a support for model engineering
related teaching in Master degree courses.

** Specification

Picore metamodel (the meta-metamodel of picore modelling stack)
defines two concepts: Class and Attribute. This definition is similar
to Entity and Relation. Metamodels are defined as sets containing
class definitions. Classes are defined as sets containing
attributes. Attributes are defined as tuples: name, cardinality, and
type (the later being a class). A class may extend other classes, and
metamodels may extend other metamodels. Picore is defined using its
own metamodel.

The mapping rules that define repositories are the following:
– A metamodel definition is mapped to a python module named like the
metamodel and containing a python class named =model=. This class is
the basis of the repository.

- A class definition is mapped to a python class named like the class
definition, and to an operation in the model python class (mapping
of the class metamodel) named like the class with the =create_=
prefix as well as an attribute (a list) named like the class. This
attribute contains all the instance of the class created in the
repository.

- An attribute definition is mapped to an operation in the python
class (mapping of the attribute class) named like the attribute
prefixed by =add_= if the attribute cardinality is multiple or
=set_= otherwise.

Finally, picore supports metamodel refinement. This ability has been
introduced in order to support modeling processes. The following [[pubs/marvie_nebut.pdf][paper]]
(in french, sorry) presents metamodel refinement. [An example should
be added here]

** Implementation

Picore implementation is fully written in python and produces python
code. It is provided as a python module using =distutil=. To install
Picore as a module to your system just use the =setup.py= script for
building (as lambda user) and for installing (as root / admin). Then
picore is widely available on your system. (You have to install
picorine first.)

picore-3.3.1 $ python setup.py build picore-3.3.1 $ sudo python setup.py install

Warning: this code currently lacks documentation ; and is in perpetual
development form. Using existing examples I should write a
documentation soon… Some of such examples can be found in the
example folder (simple component and java metamodels as well as their
mapping using picore and a tarnsformation to map components to java,
as well as a model of the observer pattern defined using the component
metamodel). For any information just send me e-mail.

Unlike first versions of picore, metamodels are now defined as text, as
picore metamodel definition are quite complex to write as xml files
directly. The =picore= script performs both the translation from
texte to xml, and generate the repository associated with the
metamodel definition (see the readme in the archive for more details).

# a very simple metamodel definition examples $ more mm/abm2.mm metamodel abm2 class A attribute b * B class B
  1. repository generation from the metamodel abm2
    # (abm2.py module contains all the python classes
    # implementing the model repository)
    $ picore.sh mm/abm2.mm
    $ ls
    abm2.py abm2.xml comp2java.py mm/ xml/
  1. creating interactively a model containing one A and
    # two Bs (with relationships) and serializing the model
    # as an xml file (picore automatically generates a loader
    # and a dumper to xml format of models)
    $ python
    Python 2.3.3 (#1, Jan 27 2004, 17:30:54)
    >>> import abm2
    >>> model = abm2.model ()
    >>> a1 = model.create_A ()
    >>> b1 = model.create_B ()
    >>> b2 = model.create_B ()
    >>> a1.add_b (b1)
    []
    >>> a1.add_b (b2)
    []
    >>> abm2.dumper () .dump (model, ‘model.xml’)
  1. the model serialized version
    $ more model.xml









** Download

[[../download/picore-3.3.1.tar.gz][picore v3.3.1]]

[[../download/picore-2.3.0.tar.gz][picore v2.3.0]] (without refinement support)

[[software_old][Top]]

#picotin

  • Picotin

Picotin stands for PICO Transformation Infrastructure. This small
tool provides two metamodels for defining model transformations and
transformation compositions, as well as associated libraries to parse
a textual transformation definition in order to create its model and
perform its evaluation, and to model transformation composition in
order to evaluate them. Picotin relies on pciore to manage models
(picotin metamodel is defined using picore). Picotin spirit is close
to a MOF QVT tool but without its complexity. It is intended to be
used for personal experiments and for model engineering teaching.

** Motivation

Providing the second corner stone for model driven engineering
experiments, ie model transformations definition and execution. It
permits to easily define transformations and to use them together with
picore repositories.

The second goal of picotin is to be a support for model engineering
related teaching in Master degree courses.

** Implementation

Picotin implementation is fully written in python and produces python
code (in fact not much). It mostly relies on picore, that has to be
installed in order for picotin to work.

** Download

picotin v1.0.0 to be released soon…

[[software_old][Top]]