CDT and Xtext, a perfect love story ?
This talk will present how we have integrated an Xtext editor in the CDT in industrial context.
Comments in C/C++ are used for developer annotations of course, for DOxygen tags to generate some documentation and in other cases they can host code for formal specification languages like ACSL (ANSI/ISO C Specification Language).
In embedded systems testing and validating code is an expensive activity. More and more industrial partners focus their research activities on the possibility for developers to validate C code without running it by static analysis.
In that purpose, ACSL can be used to describe a formal specification of pre/prost properties of functions in order to prove them or to define leaf functions not yet implemented but defined by contract.
Frama-C is a static analysis tool designed as a framework enabling different static analysis technic combinations and using ACSL as a specification language.
But Frama-C is verification tool and not a development tool and it is not possible to have completion, compilation, or syntax verification. That’s why we decided to integrate an ACSL implementation in the CDT.
We will describe in this talk the possibilities we had for comment language integration in the CDT, we will also explain why we chose to use Xtext to define our grammar, and finally we will show you our architecture which will give you the possibility to plug any Xtext language into your CDT Editor.