Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
  • Loading branch information
HansOlsson and henrikt-ma committed Nov 22, 2022
1 parent e50c3b6 commit 28509c6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions chapters/synchronous.tex
Expand Up @@ -1045,7 +1045,7 @@ \subsection{Sub-Clock Partitioning}\label{sub-clock-partitioning}
\end{example}

\begin{example}
Forbidding systems of equations involving different sub-clocks mean that the following is forbidden:
Forbidding systems of equations involving different sub-clocks means that the following is forbidden:
\begin{lstlisting}[language=modelica]
Real x=sample(time, Clock(1,100));
Real y;
Expand All @@ -1054,7 +1054,7 @@ \subsection{Sub-Clock Partitioning}\label{sub-clock-partitioning}
z=0;
\end{lstlisting}
Here \lstinline!x! and \lstinline!z! are part of one sub-clock partition and \lstinline!y! of another.
The variables \lstinline!y! and \lstinline!z! are part of a system of equations spanning two sub-clocks, that is not legal.
The variables \lstinline!y! and \lstinline!z! are part of a system of equations spanning two sub-clocks, which is not allowed.

However, it is not required that the sub-clocks can necessarily be sorted as shown by following legal example:
\begin{lstlisting}[language=modelica]
Expand All @@ -1063,8 +1063,10 @@ \subsection{Sub-Clock Partitioning}\label{sub-clock-partitioning}
Real z=subSample(y, 2)+x;
\end{lstlisting}
Here \lstinline!x! and \lstinline!z! are part of one sub-clock partition, and \lstinline!y! of another.
The equations can be sorted, but not the sub-clock partitions.
Note that systems of equations within one sub-clock are also legal.
The equations form three equation systems with one equation in each (hence trivially satisfying the requirement that only variables from one sub-clock partition are being solved).
The equation systems need to be solved in a strict order, but the first and last equation system belong to one sub-clock, while the second equation system belongs to another sub-clock.
This illustrates that there is no guarantee that the sub-clock partitions can be ordered in agreement with the equation systems.
Note that equation systems with more than one equation are also allowed in sub-clock partitions.
\end{example}

\subsection{Sub-Clock Inferencing}\label{sub-clock-inferencing}
Expand Down

0 comments on commit 28509c6

Please sign in to comment.