Friday, September 13, 2013

Generator of Acumen models comprising multiple classes

In order to support the development of Acumen source code transformations, Adam has implemented a basic generator of Acumen models (instances of the Prog type) comprising multiple Acumen classes (ClassDefs). On a high level, the algorithm works as follows:
  1. Generate list of leaf classes (containing no constructor calls or object field references) and add these to an environment (list of ClassDefs).
  2. A small, random number of times, repeat the following: generate a list of classes based on the environment, and add these to the environment.
  3. Generate a main class based on the environment and wrap it in a Prog.
Certain limitations apply to models generated by the algorithm. Significantly, constructors are only called in the private section of classes, and the right-hand sides of continuous assignments are always linear combinations of state variables (effectively making an Acumen program correspond to a system of linear ODEs at each continuous step).

Tuesday, September 3, 2013

Revision to reference semantics of continuous assingments

Adam and Kevin have been working on a revision of the reference semantics for Acumen. The revision ensures that the order in which continuous assignment statements occur in (a particular scope of) an Acumen model does not affect the simulation results. This was achieved by delaying updates to the state until after all evaluations for a particular continuous step have been performed. A consequence of this change is that the method used to solve ODEs (in particular, the transformation from higher-order ODEs to systems of first-order ODEs) introduces delays in the solutions which did not occur in the previous formulation of the reference semantics.