On the notation of the hierarchy function of a state (statecharts)

20 Views Asked by At

I'm reading the prof. Harel's On the formal semantics of Statecharts. I know it might be quite difficult to answer this question without a context so I hope someone's familiar with Dr. Harel's work.

On the page 59 one reads :

a. States: the set of states, $S$, is defined together with a hierarchy function $\rho$, ...

and

The hierarchy function $\rho$ : $S \to 2^{S}$, defines for each state its substates. If $\rho(x) = \rho(y)$ then $x = y$. There exists a unique state $r \in S$ such that $\forall s\in S, r\notin\rho(s)$, $r$ is the root of the statechart. $\rho^*, \rho^+$ are extensions of $\rho$ defined by : $$ \rho^*(s) = \bigcup_{i\geq 0} \rho^i(s),\quad \rho^+(s) = \bigcup_{i\geq 1}\rho^i(s) $$

The question consists of two parts :

  1. What does $\rho^i(s)$ mean? The logical answer would be $\bigcup\{\rho( x ) | x \in \rho^{i-1}( s )\}$ i.e. the set of substates on the $i$-th level.
  2. What does $\rho^0(s)$ mean? Initially, I thought it stood for $\{s\}$ (compatible with 1.) but it leads to non-intuitive results and contradictions. For example, one reads (page 60, Notations and Definitions, b.):

b. For a set of states $X$, the Lowest Common Ancestor of $X$, denoted $LCA(X)$ is defined as follows: $LCA(X)=x$ iff

  1. $X\subseteq \rho^*(x)$
  2. $\forall s\in S\quad X\subseteq\rho^*(s)\rightarrow x\in\rho^*(s)$

It would mean then : $$ \forall s \in S\quad LCA( \{s\} ) = s $$

which is wierd but acceptable (and maybe even necessary (?) regarding the set $\{root\}$).

But along with this non-intuitive result there would be a contradiction (p.60, Notations and Definitions, g.):

Note that for every $s\in S$, {s} is a maximal orthogonal set relative to $s$.

Which is false as I can always take the set $$Y = \{s, s_1\}, \text{where } s_1\in \rho(s)\, \text{and } \psi(s) = AND$$ which would be orthogonal relative to $s$.