Boost logo

Boost :

Subject: Re: [boost] [contract] Macro syntax?
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-04-08 02:22:51


----- Original Message -----
From: "Lorenzo Caminiti" <lorcaminiti_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, April 08, 2010 2:19 AM
Subject: Re: [boost] [contract] Macro syntax?

JContract uses Javadoc comments. Doxygen provides \pre, \post, and
\invariant tags so if a preprocessor was to extract contracts from
code comments it might make sense to use these tags... There is
already a preprocessing-based CP tool for C++ called "C^2" but I
_think_ is not maintained anymore.

If I have some free time (but not likely in the short term), I would
like look into what can be done to generate Boost.Contract code using
Boost.Wave/Spirit. However, while I recognize the ugliness of the
contract macros syntax, my goal and interest were and remain to see
how CP can be implemented within the C++ language itself (without
external preprocessing)...

Thanks,
Lorenzo
_______________________________________________

I understand your concern Lorenzo. Having CP implemented within C++ is a good goal, and I expect that you would continue polishing it.

If a preprocessing will be done I would expect however it follows the CP proposal as close as possible. This will allows to check this proposal before it can be accepted. I don't know which option will be the best, but I think that you need something that allows to analyze something more that the CP commented sentences. Maybe a C++ front-end could be used (LLVM?)

Best,
Vicente


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