Boost logo

Boost :

From: Andreas Huber (ah2003_at_[hidden])
Date: 2004-08-30 06:39:15


Hi Thomas

> The rationale document for boost::fsm states that the library should meet a
> number of requirements, numbered from 1 to 9. Especially, the sixth
requirement
> says "support the development of arbitrarily large and complex state
machines.".
>
> Ok, this may be good - I guess it is in fact good. But I'm a bit anxious that
> this implies that the library is therefore not suitable for enviroments where
> no unnecessary overhead is acceptable, like in many embedded applications.

I think it is virtually impossible to write a non-trivial library which incurs
*no* overhead in all possible applications. While I tried hard to make the
library as resource preserving as possible there undoubtedly are situations in
which it will perform worse than equivalent hand-written code. How much worse
and whether that will ever be noticeable to the "end-user" really depends on
your application.

> However, the seventh requirement indicates that my worries are unjustified
> since it reads: "allow the user to customize all resource management so that
> the library could be used for applications with hard real-time requirements".

IMHO hard real-time requirements are pretty much orthogonal to space/time
requirements. Hard real-time simply means that you can calculate/measure upper
limits for each and every operation the library performs. So, this requirement
was in no way intended to make a statement on how fast the library should be or
how small the memory footprint of FSMs should be.

> And further down the Rationale document one can read a section on the
Resource
> usage of Memory which looks good.

If these measurements look good to you then I'd encourage you to give it a try.

> So, just to be sure, is boost::fsm suitable for the development of embedded
> applications where constraints such as memory footprint is an issue?
> (Hopefully, someone can answer this based on the experience of using the
> library or by knowing the code - not by reading the documentation (like me ).

I very much believe that boost::fsm is suitable for many embedded applications
running in confined environments but there definitely are applications for
which the library is too heavy-weight. Whether or not it is suitable for your
particular application can only be answered if you provide me with some
hardware data (memory, type of CPU, processor speed, etc.) and roughly what
functionality you want to implement and the space/time requirements you need to
satisfy. If you prefer you can send me this information by private email.

HTH & Regards,

Andreas


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk