10 C++ translator 10 C++ translator
10.2 Activating the C++ translator 10.2 Activating the C++ translator
10.1 Introduction

10.1 Introduction

The C++ translator was developed by Univan Ahn [6].

The C++ translator is based heavily on the translator developed for the original RAISE tools by Jesper Gørtz, Jan Reher, Henrik Snog, and Eld Zierau of Cap Programator. We are grateful for their permission to reuse their work.

We use the term RSLC++ for the subset of RSL that is accepted by the the translator. RSLC++ excludes object arrays, channels, axioms, abstract types, union types, implicit value and function definitions. It only includes quantified expressions, comprehended expressions, implicit let expressions, and local expressions if they conform to the rules given below in sections 10.8.12, 10.8.7, 10.8.24, and 10.8.23. It includes overloading of names only if they conform to the rules of overloading of C++: overloaded identifiers must be the names of functions with distinguishable parameter types.

The translator has to generate some names, and these always include somewhere the string "rsl" (where some letters may be upper case). So RSLC++ does not include identifiers containing this string. Neither does it contain identifiers that are C++ keywords, nor names involving double underscores.

The term universal types is used for some generated C++ types. See section 10.12 on universal types.

10.1.1 Compilers and platforms

The translator produced code has been tested with the Free Software Foundation's GNU C++ compiler g++ version 2.95.2. It is intended to conform to the ANSI C++ standard and so should work with other compilers.

The translator has been run under Solaris, Linux and Windows 9X and NT, and the C++ output compiled and run under these operating systems.

The translator has also been used with Microsoft's Visual C++ compiler, version 6.0. This causes some difficulty, especially with the use of overloaded template functions. It is thought that most problems have been resolved.

10.1.2 Known errors and problems

The following lists mention known errors and problems and a few desirable extensions. Other problems and wishes will undoubtedly emerge from the use of the translator. It is worth noting that many of these problems also arise on manual translation from RSL to C++, and that the problems, with the exception of those concerning Int and Real, are easily avoided.
Chris George, April 17, 2008

10.1 Introduction
10 C++ translator 10 C++ translator
10.2 Activating the C++ translator 10.2 Activating the C++ translator