18.1 Unix and Linux18.1 Unix and Linux
18 Installation 18 Installation
18.2 Windows

18.2 Windows

There is a minimal version of emacs, version 19.34, supplied with rsltc. This was copied from the DJGPP distribution (http://www.delorie.com/djgpp/). It is better to get a full version of the latest version emacs from DJGPP, or from http://www.gnu.org/software/emacs/emacs.html. You can get it precompiled for Windows.

rsltc comes as a zip file rsltc.zip.

You need WinZip or equivalent to unpack the zip files. The dos tool pkunzip can be used with the -d option but you will afterwards need to correct the following file names in gnu\emacs\lisp, because the base names will have been truncated to 8 characters:

backquote.elc
case-table.elc
cc-compat.elc
dired-aux.elc
help-macro.elc

If you have a directory c:\raise you might want to rename it or vary the instructions below to avoid the possibility of overwriting files in it.

Extract rsltc.zip into c:, using the "Use folder names" option. This will create a directory c:\raise.

If you don't already have emacs:

If you already have emacs, or have installed a version from elsewhere:

18.2.1 SML

Install SML from the self-installing package from http://www.smlnj.org. We assume below that you have installed it in C:/sml as suggested.

In Windows 9X, include in autoexec.bat

SET RSLML_PATH=c:\raise\sml

In Windows NT, or later versions, get your system administrator to set this variable.

Make a folder c:\raise\sml and copy the files rslml.sml and rslml.cm from rsltc.zip file to there.

18.2.2 C++

The files

RSL_comp.h
RSL_list.cc
RSL_list.h
RSL_map.cc
RSL_map.h
RSL_prod.h
RSL_set.cc
RSL_set.h
RSL_text.h
RSL_typs.cc
RSL_typs.h
cpp_RSL.cc
cpp_RSL.h
cpp_io.cc
cpp_io.h
cpp_list.cc
cpp_list.h
cpp_map.h
cpp_set.cc
cpp_set.h
should be placed in a directory, and the file rslcomp.bat edited to set CPP_DIR to that directory.

Put rslcomp.bat somewhere on your path.

rslcomp.bat assumes that you are using the DJGPP (http://www.delorie.com/djgpp/) port of g++ (called gxx). If your C++ compiler is called something else rslcomp.bat is easy to change.

The translator output has been tested using DJGPP and also the Cygwin port of GNU tools to Windows:
http://sources.redhat.com/cygwin/.

If you are using Cygwin with emacs 20 you might like to use the Cygwin bash shell within emacs. You should add to your _emacs file the following (taken from the Cygwin FAQ):

;; This assumes that Cygwin is installed in C:\cygwin (the
;; default) and that C:\cygwin\bin is not already in your
;; Windows Path (it generally should not be).
;;
(setq exec-path (cons "C:/cygwin/bin" exec-path))
(setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
;;
;; NT-emacs assumes a Windows command shell, which you change
;; here.
;;
(setq process-coding-system-alist '(("bash" . undecided-unix)))
(setq w32-quote-process-args ?\")
(setq shell-file-name "bash")
(setenv "SHELL" shell-file-name) 
(setq explicit-shell-file-name shell-file-name) 
;;
;; This removes unsightly ^M characters that would otherwise
;; appear in the output of java applications.
;;
(add-hook 'comint-output-filter-functions
          'comint-strip-ctrl-m)

You should also change the definition of rsltc-command in rsltc.el to "/cygdrive/c/raise/rsl/rsltc", and change vcg-command similarly.

Limited tests have been done using Microsoft's Visual C++ compiler. The translator's output needs to be different, making much less use of templates. If you use this compiler you should use the rsltc option -cpp instead of -c++. The C++ output file will have extension .cpp instead of .cc. You can select this option in emacs by using the RSL menu item Translate to Visual C++.

We would be interested to hear of people using the translator with other C++ compilers.

18.2.3 VCG

VCG is installed from two zip files supplied with rsltc: vcg_p1.zip and vcg_p2.zip. Unpack them in that order using WinZip or pkunzip -d and just follow the instructions in the readme file in the first. You can place vcg where you like, but unless you unpack the two zip files into C:\raise you will need to edit the definition of vcg-command in rsltc.el in site-lisp.

18.2.4 UML2RSL

See section 12.4.


Chris George, April 17, 2008

18.2 Windows
18.1 Unix and Linux18.1 Unix and Linux
18 Installation 18 Installation