/* // /// FILE: README.user_manual /// /// DESCRIPTION: This file describes how to compile and run a chaims megaprogram /// /// AUTHOR: Woody Pollack /// CREATED: 6/22/98 whp /// MODIFIED: 6/23/98 whp // */ How to Run the compiler =============================================================================== In order to compile and run a chaims megaprogram, you must first write one. Please see /db/d8/ftp/www/CHAIMS/Compiler/MEGAPROGRAMS/ for some example megaprograms. Once you have done this, you must make sure all megamodules you will be using in your chaims program have information stored in the repository. See README.repository about how to add this information. Once this is done, you are ready to compile. (make sure /db/d8/ftp/www/CHAIMS/Compiler) is in your path. chaimsCompiler ex: running this from the Compiler directory chaimsCompiler MEGAPROGRAMS/babydemo.chaims will compile the babydemo The compiler does not generate any executable code. It just generates client files. Once your client file(s) have been generated, you must compile them using whichever compiler you would like. Currently, the step after running the chaimsCompiler involves the most work by the megaprogrammer (aside from coding the megaprogram). The megaprogrammer must make sure all stubs needed by the generated client (all stubs for the megamodules that will be used) are linked into the client. So, for example, if you write a megaprogram that uses the io module and the CHAIMSRAP module, you must make sure you have io.[h,o] and CHAIMSRAP.[h,o]. When linking the generated client, you must also make sure to link gen_lib.o9 and typeMod.o into your client. These files can be found at /db/d8/ftp/www/CHAIMS/Wrappers/GenericType/ A future version of the compiler will automate this compile/link step. Current Problems with the compiler ============================================================================= * The main issue I am working on is that of using multiple modules in your megaprogram that use different distribution protocols. If you write a megaprogram that uses only CORBA megamodules (regardless of the ORB they use), the compiler will succeeed. However, if you write a megaprogram that uses 2 different protocols (say 1 CORBA module and 1 JAVA module), the compiler will not generate correct client files. It will currently generate both a C++ (for CORBA) client and a JAVA (for RMI) client, but the 2 will not interact with one another, and neither will necessarily compile. * Another issue with the compiler is that of error checking. The compiler currently does some error (syntax) checking but is by no means complete. This is a lower priority problem, as currently, the only users are those with better understanding of CHAIMS and therefore, they can (hopefully) determine errors on their own.