[ANN] DBC for C 1.3.0 released

C

Charles Mills

GEF uses the C preprocessor. DBC for C is a preprocessor. I tried
using GEF (before I began working on DBC for C) and found it too
complicated to use. DBC for C is pretty simple - all you need to do is
define a function/macro - dbc_error(const char *msg) - which gets
called whenever a contract condition is not met. See this article:
http://www.codegeneration.net/tiki-read_article.php?articleId=72
or the wiki (dbc.rubyforge.org) for more info.

One nice thing about DBC for C is it is easy to inject into existing
project or remove if it doesn't meet your needs. You can compile the
code normally or with contract checks in place... add invariants that
will be checked in through out your project... if it sounds interesting
I encourage you to check out the links above. Also there is a pretty
active mailing list for DBC for C here:
http://rubyforge.org/mail/?group_id=354
As far as I understand it, DBC for C uses comments in the header file
to genrarte contract checking code, whereas GEF hides the contracts
specification in the implementation.
That's right.... header files and .c files. Most of the DBC comment
will be in .c files, especially if you use opaque types.
With GEF contract specifications are part of your function and are
manipulated using preprocessor macros.

-Charlie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top