Page 1 of 1

C/C++ Translator

PostPosted: Wed Jul 22, 2009 3:38 pm
by jyoung
Does a translator exsist that woudl take a set of C/C++ code and translate it to T-VEC linear form like what is done with the sl2tvec tool?

Let say I have a bunch of old models that are in C/C++ and I want to generate test vectors. What is the best way to do this? Is it possible to do this without re-creating the models in TTM?


Re: C/C++ Translator

PostPosted: Wed Jul 22, 2009 4:57 pm
by busser
We have always steered far away from supporting this type of concept. Our fundamental foundational premise is that generating tests from the code being tested is not a valid approach to verification. We normally refer to this is program-testing incest. T-VEC was initially conceived as an answer to the nearly useless structure-based testing for verification that was the basic approach of DO-178A. We began T-VEC development in about 1987 and the requirements based testing approach T-VEC was designed to support (its formal requirements model) became one of the main influences on the requirements-based testing/verification approach required by DO-178B (we were on the verification committee for DO-178B).

This being said, we have been asked for this kind of support many times. Consequently, we have done some work to provide limited support for this this kind of thing, with a limited subset of C/C++. Obviously, data types like pointers, references, etc. and OO features and other higher end aspects of C/C++ we do not support at all - they have no equivalence at the T-VEC specification file form/language. However, there is a basic set of C-language that we can possibly support. In fact, TTM statements and expression are first translated into a C-like syntax before being translated to T-VEC form. This functionality is accessible externally also. However, to this date we do not believe it has ever been used by customers.

If you would like to pursue this line of investigation more thoroughly, please contact us directly and we can then discuss what aspects of the C/C++ language would be required and what limitations etc there may be to this approach.