Boost logo

Boost :

From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2019-10-22 22:42:00


On Tue, Oct 22, 2019 at 3:13 PM Robert Ramey via Boost <
boost_at_[hidden]> wrote:

> Now this particular case - providing a provable correct parser for a
> simple language - IS a toy problem.

It does not follow that the only valid reason to do it is to play games.

> Implementing a parser derived from
> a formal grammar CAN be done quite easily with boost spirit - if only
> for the the testing portion of the project. (Of course if spirit were
> used in the main product, much less testing would be required!).
>
> both Vinnies method and your method create huge amount of extra work for
> various persons involved in the process. I'm not over thinking it,
> you're not thinking big enough. It's not just use cranking up some code
> it's sucking in all the other participants to do our work for us.
>

I get your point that it's easier to reason about correctness if you can
trust the individual components. This reflects a "white box testing"
mentality. But if Spirit is bug-free, logically it does not follow that a
library that uses it has better chance of being bug-free, compared to a
library that does not. Either way, you ought to test, ignoring any and all
knowledge of its internals.

Consider also even if using tested components can get you to bug-free
implementation quicker (which isn't proven in this case), on balance it is
better if you don't depend on another library. I'd be surprised if you
think otherwise.


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