\chapter{State}
  \section{Introduction}
    Provide some examples

  \section{Approaches to state}
    Explain impact of state (or rather, temporal behaviour) on function signature.
    \subsection{Stream arguments and results}
    \subsection{Explicit state arguments and results}
  \section{Explicit state specification}
    Note about semantic correctness of top level state.

    Note about automatic ``down-pushing'' of state.

    Note about explicit state specification as the best solution.

    Note about substates

    Note about conditions on state variables and checking them.

  \section{Explicit state implementation}
    Note about ignoring (sub)state components.

    Note about extracting the state value from the return value.

  \section{Initial state}
    How to specify the initial state? Cannot be done inside a hardware
    function, since the initial state is its own state argument for the first
    call (unless you add an explicit, synchronous reset port).

    External init state is natural for simulation.

    External init state works for hardware generation as well.

    Implementation issues: state splitting, linking input to output state,
    checking usage constraints on state variables.
