Ideally this class should require only `toGraph`, `initial`, and `final` functions.
Ideally this class should require only
toGraph,initial, andfinalfunctions.