Machine type : state

In XLIA, the lower-level machines that make up the "states" in which the state-machines can find themselves are modeled by "state" machines.

In other words, the "state" component is a particular machine, specialized to model in a simplified way the states, be they basic or composite, of a "statemachine" machine.

One of the difference, as we'll see, with "statemachine" syntax lies in the possibility of omitting the name of sections.

Declaring states

The general syntax to declare a state is the following (see BNF syntax) :

There are many variations and different uses, some very specific, a short overview would be :

Basic state behaviors

The main keyword to use is "state". Here is a basic declaration within an xlia file :

We can specify a certain behavior for the state with flags as shown above. According to their behaviors, we can separate states into three main factions :

Basic States

A basic state is the only kind of state in which a "statemachine" ("or" moc) can be after a computation step (i.e. evaluation or initialization step).

A basic state does not contain any sub-states.

Pseudo States

Pseudo states are unstable states in which a "state-machines" cannot stay after a computation step.

A pseudo state does not contain any sub-states.

Composite States

A composite state has sub-states. Those can be either basic states and pseudo states. A composite state has no direct notion of being a simple or a pseudo state. The parent statemachine is considered to be in the current sub-state of the composite state.

A state will be a composite state if we declare other states within its body. However, we also need to specify a flag for the inner concurrency of the sub-states.

Quick overview of the flag keywords

In this part, we'll have a quick overview of the most common flags per category.

Common 'Basic State' flags :

Common 'Pseudo State' flags :

Composite state flag :

Body of the state

States and what they do is mainly defined by what is written in their body. Unlike other machines, we don't declare state sub-components in sections introduced by a "@XXX:" keyword.

For the "state" type of machine, the most common components we can find in the body are :

Uses of the state

As we've explained, machines of type "state" can be used to model several different things. In the links below, we'll give example and focus on specifics concerning those uses :