From: Andreas Huber (ahd6974-spamgroupstrap_at_[hidden])
Date: 2005-03-07 07:55:20


David Abrahams <dave <at> boost-consulting.com> writes:
> "Andreas Huber" <ahd6974-spamgroupstrap <at> yahoo.com> writes:
> > I don't think so. Even with Aleksey's approach, with an FSM becoming
> > sufficiently large at some stage the compiler will give up because it
> > reached its template nesting depth limit or compilation becomes
> > infeasible because it takes too long (usually because the compiler eats
> > up so much memory that there's a lot of swapping).
>
> That could happen in any program that uses templates. Or uses a
> compiler, for that matter. I believe this to be FUD, and false for
> practical sizes of FSMs.

The BitMachine example shows that at least one current compiler (MSVC7.1)
fails to compile a flat state machine having between 32 and 64 states (at the
time when the library still worked on MSVC6.5, it failed with < 16 states).
Exactly where it fails I didn't test, moreover it is a rather arificial FSM
that noone would construct in practice. Unfortunately I don't have real-world
experience with machines that large but I do have feedback that such large
FSMs exist in practice (40 states). Moreover, I expect the problem to become
worse with the use of hierarchical/orthogonal states. For me this is enough
evidence that I cannot just ignore the issue.

Maybe Darryl has more information of this.

Regards,

-- 
Andreas Huber
When replying by private email, please remove the words spam and trap
from the address shown in the header.