University of Sheffield

Reusable Model Design Languages

Model specification, model transformation and code generation

ReMoDeL Models

Historically, ReMoDeL was conceived as a set of high-level languages for expressing designs and programs. The core concepts of these languages were defined in a set of related metamodels. The current version ReMoDeL v3 specifies metamodels and model transformations in a bespoke concept modelling language, with Java readers, writers and compilers that convert these into executable Java libraries and transformation programs. Specifications are declarative and all transformations are pure functional mappings.

Reusable pieces of design

ReMoDeL Version 3

ReMoDeL v3 provides a simple declarative language for specifying metamodels and model transformations. The language is influenced by object-oriented and pure functional programming styles, with mapping and filtering styles taken from the Object Constraint Language (OCL). The following documents provide an introduction to ReMoDeL v3 by example, using simple models of trees and graphs.

ReMoDeL v3 Models, Metamodels and Transformations
A. J. H. Simons. ReMoDeL Explained (rev 2.2): an introduction to ReMoDeL by example. Technical Report, 25 January, University of Sheffield (2023). Open Access Version.
A. J. H. Simons. ReMoDeL Compiled (rev 2.2): the cross-compilation of ReMoDeL to Java by example. Technical Report, 25 January, University of Sheffield (2023). Open Access Version.
A. J. H. Simons. ReMoDeL Data Refinement (rev 1.0): data transformations in ReMoDeL, Part 1. Technical Report, 25 July, University of Sheffield (2022). Open Access Version.
A. J. H. Simons. ReMoDeL Data Refinement (rev 1.0): data transformations in ReMoDeL, Part 2. Technical Report, 31 July, University of Sheffield (2022). Open Access Version.

ReMoDeL Version 1

ReMoDeL v1 specified a set of metamodels, initially focusing on core programming and database concepts. These were released as public XML specifications. Model transformations were imperative Java programs that manipulated the XML DOM-tree structures directly, which represented instances of these metamodels. The last versions of each of these specifications is given below, for historic interest.

ReMoDeL v1 Metamodel Specifications
A. J. H. Simons. ReMoDeL PKG: Package and Namespace Model Specification, Technical Report, University of Sheffield (2011). Open Access Version.
A. J. H. Simons. ReMoDeL FUN: Functional Programming Model Specification, Technical Report, University of Sheffield (2011). Open Access Version.
A. J. H. Simons. ReMoDeL OOP: Object-Oriented Programming Model Specification, Technical Report, University of Sheffield (2012). Open Access Version.
A. J. H. Simons, A. F. Subahi and M. Ram. ReMoDeL DBQ: Database and Query Model, White Paper, University of Sheffield (2010). Open Access Version.
A. J. H. Simons. ReMoDeL Standard Library: Core and Util Library for all Translations, White Paper, University of Sheffield (2010). Open Access Version.
A. J. H. Simons. ReMoDeL C++: Translation Strategy for the C++ Programming Language, White Paper, University of Sheffield (2009). Open Access Version.

For historic interest, the following table gives some early examples of translation from the metamodel ReMoDeL OOP into semantically-equivalent software systems across multiple programming languages as different as Eiffel, C++, C# and Java. The semantic equivalence was a big deal, given the memory issues of C++.

Code Generation from ReModeL OOP to Java and C++
List of ReMoDeL OOP examples:
  • The Greeter program , the equivalent of a Hello World minimal example.
  • The People package , the equivalent of a class library package with inheritance.
  • The Finance package , introducing dependency, assertions and recovery from failure.
  • The Sorting package , introducing generic collections and detailed algorithms.
List of Java translations of the OOP examples:
  • The Greeter program , the translation of the Hello World minimal example.
  • The Person class , the parent class in the example.people package.
  • The Student class , the child class in the example.people package.
  • The Status enumerated type , generated as part of the example.finance package.
  • The Asset interface type , generated as part of the example.finance package.
  • The Account abstract class , generated as part of the example.finance package.
  • The SavingsAccount class , generated as part of the example.finance package.
  • The SortedVector class , the generic collection generated in the example.sorting package.
  • List of C++ translations of the OOP examples:
  • The Greeter.h, Greeter.cc, and GreeterMain.cc files, generated from the Hello World minimal example.
  • The Person.h, and Person.cc files, generated for the parent class in the People namespace.
  • The Student.h, and Student.cc files, generated for the child class in the People namespace.
  • The Status.h, and Asset.h files, generated for the enum type and interface in the Finance namespace.
  • The Account.h, and Account.cc files, generated for the abstract class in the Finance namespace.
  • The SavingsAccount.h, and SavingsAccount.cc files, generated for the concrete class in the Finance namespace.
  • The SortedVector.h, and SortedVector.cc template files, generated for the generic class in the Sorting namespace.