Multimodeling: A Preliminary Case Study
Abstract
We take a pre-existing Statecharts model of a simple traffic light controller and re-implement it in Ptolemy II. This exercise reveals that Statecharts can be usefully conceptualized as a hierarchical combination of two distinct models of computation (MoCs), finite state machines (FSMs) and synchronous/reactive (SR). Once conceptualized this way, we can add additional MoCs to the mix. We illustrate this by adding a discrete-event (DE) model of the environment in which the traffic light operates. We then construct a second model of a deployment of the system on two microcontrollers communicating wirelessly, showing that we can effectively leverage both DE and an extension in Ptolemy II that supports modeling of wireless communication networks. This exercise reveals that even though the original model was intended to be a purely functional model, it in fact imposes constraints on the implementation. The model had to be refactored to get a distributed deployment model. Finally, we show that the portions of the models defining the control logic of the lights can be shared between the functional and deployment models using actor-oriented classes. This eases maintenance of the models.
Document Details
- Document Type
- Technical Report
- Publication Date
- Jan 17, 2008
- Accession Number
- ADA519171
Entities
People
- Christopher Brooks
- Edward A. Lee
- Reinhard Van Hanxleden
- Thomas H. Feng
Organizations
- University of California, Berkeley