On Wed, 2014-06-25 at 07:52 -0700, Dinh Ngoc Thi wrote:
> Dear Martin,
>
> Do you mean there are 11 features of C++ that are not yet supported in CBMC?
Not quite; what I mean is that there are some features that were added
to the C++ language in ISO/IEC 14882:2011 (informally known as "C++11")
that are not supported by CBMC at the moment. For more information on
the different versions of C++, see:
http://en.wikipedia.org/wiki/C++#Standardization
> Could you please teach me about them?
>
>
> Also if I compile successfully my C or C++ programs by using Microsoft
> Visual Studio, so can I verify them by cbmc?
Maybe. CBMC has (I believe) complete support for C99, support for the
commonly used parts of C11 and a variety of compiler specific
extensions, including some from GCC. Microsoft Visual Studio does not
fully support C99 and has some extensions. Thus there are some valid
C99 programs that you can verify with CBMC but not compile with Visual
Studio and some programs in Microsoft's extension of C that you can
compile with Visual Studio but will not parse in CBMC. If you stick to
C99 (gcc has the flag -std=c99 which can check this) then it is likely
that you can compile things in Visual Studio and verify them using CBMC.
The picture for C++ is a little more complicated. C++ is a very large
and complex language with a lot of obscure and little used features.
Writing a complete C++ front-end is a very time consuming process (note
that most compilers do not implement the full language). Thus the C++
front-end for CBMC includes the parts of C++ that are commonly used in
embedded applications plus a number of other features that particular
customers have needed for their project. We support much of the core of
C++98 and C++03 although our support for template meta-programming could
be improved. We don't support many of the new features added in C++11
as some of them are a lot of work and we have yet to find a pressing
need for them. Thus for C++ there will be more programs that compile in
Visual Studio (some of which will not be standards compliant C++) that
will not parse in CBMC.
If you are starting a new project from scratch and want to use CBMC I
would suggest using C99. If you have a program that does not parse and
you would like it to, please send us a minimal test case and we'll add
it to the todo list. If you need more prompt support for a particular
feature, contact us directly and we can probably work something out.
Does that help?
Cheers,
- Martin