First presented at CALECO
In this and the following section, we develop some simple examples. Please note that these are not intended as realistic business models: we keep them simple so that they are easy to follow and do not occupy too much space. Please note also that the syntax is relatively unimportant. The version of MM we show below has a syntax which some might regard as over-fond of punctuation: we have chosen it because of its similarity to certain mathematical notations. It would be easy to make it resemble Visual Basic, for example, if that is what users prefer.
We start by describing a company:
object company { < incomings:real outgoings:real profit :real > profit[t] = incomings[t] - outgoings[t] }
The notation should be clear. The company's attributes are
incomings
, outgoings
, and profit
.
Each attribute
is given a type --- real
in this case --- to tell the compiler
what kinds of value it can hold.
The attributes
are related by the equation. This states that
at any time t
, the profit at that time is equal to the
incomings at t
minus the outgoings at t
. The notation
is similar to how one would write it in symbolic logic: