Home   :   Matrix Language   :   Model Examples

Model Examples




These models are best studied in the order presented as most aspects covered in earlier examples are not repeated in later examples.


The Matrix model, test scenario and generated source code files for all these examples are available on GitHub .



UML Diagram Notation Conversion


Unfortunately, the existing de facto UML notation is sub-optimal for Matrix analysis. Instead, the notation used in the Shlaer-Mellor method has been enhanced for use with the Matrix language. For completeness, the names of the Shlaer-Mellor diagrams have also been included in the table below:



Matrix Notation Executable UML Notation Shlaer-Mellor Notation
Domain Bridge Diagram (DBD) Package Diagram Domain Chart
Entity Relationship Diagram (ERD) Class Diagram Information Model
State Transition Diagram (STD) Statechart State Transition Diagram
Process Flow Diagram (PFD) Activity Diagram Action Data Flow Diagram



Tutorial Examples


Hello World! - The standard Hello World! demo that every language must have.


Ping Pong - A model that demonstrates generating and listening for events.


Zig Zag - A model that demonstrates the asynchronous creation and deletion of objects.


Banking Application - This model is taken from the book Object Lifecycles: Modeling the World in States by Sally Shlaer and Stephen J. Mellor.


Passenger Elevator - A larger model that describes a workable elevator (lift) system that employs a simplistic allocation algorithm.  An assigner entity is used to resolve any possible contention for elevators.


Windows WiX Installer - A model that generates an application's WiX installation source file in XML format. The file is processed by the WiX toolset to produce an installable MSI file for the Windows platform. This model is used to generate the installer for the Model Compiler download.


Gothic Hotel Controller - This model is based on a state machine design of an amusing but fantastical security system described by Martin Fowler in a discussion of Domain Specific Languages. The subsequent example model, Gothic Hotel is based on entities abstracted from the problem space.


Gothic Hotel - This example presents how the Gothic Hotel securty system should be analysed using entities abstracted from the problem space. The previous example model, Gothic Hotel Controller followed the original article by implementing a state machine based solution.


Petrol Station - A model that documents an experiment to convert an existing MASL model to the Matrix language. MASL is expected to become the main modeling langage for the Executable UML BrigdgePoint tool.

Copyright 2017 Dark Matter Systems Ltd. All Rights Reserved.