The CorbaScript Language

CorbaScript is an interpreted object-oriented scripting language dedicated to CORBA environments. Scripts (i.e. CorbaScript programs) can invoke any operation, get and set any attribute of any CORBA object. Moreover, any OMG IDL interface can be implemented by scripts. CorbaScript provides a dynamic binding to OMG IDL descriptions: no OMG IDL stub or skeleton need to be generated. OMG IDL descriptions are extracted from the Interface Repository and are made directly available to scripts. Invocations of CORBA objects are achieved by the CORBA DII mechanism. The CORBA DSI is used to implement CORBA objects with CorbaScript. Moreover scripts can invoke any world-wide CORBA object through IIOP.

CorbaScript fully hides these complex CORBA mechanisms via a simple, attractive and powerful scripting language. Finally CorbaScript is submitted to the ``OMG CORBA Scripting Language RFP'' .

Some other documents:


Availability

The CorbaScript interpreter is written in C++ and is available on most common Unix-based operating systems and Windows. Moreover, it is built to be easily ported on any ORB environment, operating system and C++ compiler.

Current tested ORBs

CorbaScript can be compiled on the following ORBs:

Current tested C++ compilers

CorbaScript can be compiled on the following C++ compilers:

Current tested configurations

Currently, CorbaScript has been successfully tested on the following configurations:

  ORB             OS              C++ Compiler                    NAME
------------------------------------------------------------------------------
MICO		  AIX	  	GNU C++ Compiler 2.7.2		MICO_AIX_GCC

MICO		  AIX		egcs 1.0.1			MICO_GENERIC

MICO		  HP-UX		egcs 1.0.1			MICO_GENERIC

MICO		  Linux		egcs 1.0.2			MICO_GENERIC

MICO		  Linux	  	GNU C++ Compiler 2.7.2		MICO_LINUX_GCC

MICO		  Solaris	egcs 1.0.1			MICO_GENERIC

MICO		  Solaris  	GNU C++ Compiler 2.7.2		MICO_SUN_GCC

MICO		  Windows 95/NT Cygnus egcs 1.1			MICO_GENERIC


OAK		  Linux		egcs				OAK_LINUX_EGCS

OAK		  Solaris	SUN C++ Compiler 4.1 and 4.2	OAK_SUN_CC

OAK		  Windows NT	Visual C++ 5.0/6.0		OAK_WIN_MSVC


OmniBroker	  AIX 4.2	AIX C Set ++ (xlC 3.1.4.6)	OB_AIX_xlC

OmniBroker	  HP-UX		aC++ A.01.00 and A.01.03	OB_HP_aCC

OmniBroker	  Linux		GNU C++ Compiler 2.7.2		OB_LINUX_GCC

OmniBroker	  Solaris	GNU C++ Compiler 2.7.2		OB_SUN_GCC272

OmniBroker	  Solaris	GNU C++ Compiler 2.8.1		OB_SUN_GCC281

OmniBroker	  Solaris	SUN C++ Compiler 4.1 and 4.2	OB_SUN_CC

OmniBroker	  IRIX SGI	SGI C++ Compiler 7.0.1 and 7.1	OB_SGI_CC

OmniBroker	  Windows 95/NT	Visual C++ 5.0/6.0		OB_WIN_MSVC


ORBacus		  HP-UX		aC++ A.01.00 and A.01.03	OB3_HP_aCC

ORBacus		  Linux		egcs 1.0.2			OB3_LINUX_EGCS

ORBacus	 	  Solaris	GNU C++ Compiler 2.7.2		OB3_SUN_GCC

ORBacus	 	  Solaris	GNU C++ Compiler 2.8.1		OB3_SUN_GCC281

ORBacus		  Solaris	SUN C++ Compiler 4.1 and 4.2	OB3_SUN_CC

ORBacus		  Windows 95/NT	Visual C++ 5.0/6.0		OB3_WIN_MSVC


Visibroker 3.3	  Solaris	SUN C++ Compiler 4.1 and 4.2	VB_SUN_CC

Visibroker 3.3	  Windows 95/NT	Visual C++ 5.0/6.0		VB_WIN_MSVC
------------------------------------------------------------------------------

Experimental ports

CorbaScript is ported on the following configurations but it does not work correctly.

  ORB		  OS		  C++ Compiler			  NAME
------------------------------------------------------------------------------
ORBacus		  AIX 4.2	AIX C Set ++ (xlC 3.1.4.6)	OB3_AIX_xlC

ORBacus		  OSF1 V4.0	DIGITAL C++ V6.0-010		OB3_OSF_cxx

Visibroker 3.2	  Solaris	SUN C++ Compiler 4.1 and 4.2	VB_SUN_CC

Visibroker 3.x	  IRIX SGI	SGI C++ Compiler 7.0.1 and 7.1	VB_SGI_CC

Visibroker 3.x    HP-UX	aC++ 	A.01.00 and A.01.03		VB_HP_aCC

Visibroker 3.2	  Windows 95/NT	Visual C++ 5.0			VB_WIN_MSVC
------------------------------------------------------------------------------

The following ports can be compiled but don't work correctly (perhaps due to the broken exception handling in GNU C++ 2.7.2).

  ORB		  OS		  C++ Compiler			  NAME
------------------------------------------------------------------------------
OmniBroker 2.0.3  HP-UX		GNU C++ Compiler 2.7.2		OB_HP_GCC

OmniBroker 2.0.3  IRIX SGI	GNU C++ Compiler 2.7.2		OB_SGI_GCC

MICO 2.0.4	  IRIX SGI	GNU C++ Compiler 2.7.2		MICO_SGI_GCC
------------------------------------------------------------------------------

Future ports

If you try to compile CorbaScript on other configurations (ORB/OS/C++ compiler), please report us any problem and/or success. In future releases, we plan to port CorbaScript on:

Please contact us for other ports on another ORB, another OS or another C++ compiler.


Downloading CorbaScript

CorbaScript is an academic project available in full source form and free of charge for any use.
Try it and give us feedback to improve it.

Click here to download CorbaScript 1.3.1 now!


The Hello Example

Imagine the following well-known OMG IDL interface:
  interface Hello {
    void hello ();
    void display (in string message);
  };
With CorbaScript, we can interactively invoke a CORBA object that implements this OMG IDL interface:
  unix_prompt> cssh
  CorbaScript 1.3.1 (May 20 1999) for ORBacus 3.1.3 for C++
  Copyright 1996-99 LIFL, France
  >>> # the `hello' variable refers to a CORBA `Hello' object.
  >>> hello = Hello("IOR:....")
  >>> # the 'hello' operation is invoked on this CORBA object.
  >>> hello.hello()
  >>> # the 'display' operation is invoked on this CORBA object.
  >>> hello.display("Hello World!")

  >>> # we obtain the CORBA Naming Service.
  >>> NS = CORBA.ORB.resolve_initial_references ("NameService")
  >>> # we resolve a name into the CORBA Naming Service.
  >>> object = NS.resolve(CosNaming.Name(CosNaming.NameComponent("anHelloObject","")))
  >>> # we can use an easier syntax because CorbaScript can automatically
  >>> # convert array values into OMG IDL sequences and structures.
  >>> object = NS.resolve ([["anHelloObject",""]])

  >>> # Now we can invoke OMG IDL Hello operations on this object.
  >>> object.display("Hello World!")
Then invoking CORBA objects becomes very simple and user-friendly with CorbaScript.

But, how could we implement the `Hello' interface with CorbaScript?

  unix_prompt> cssh
  CorbaScript 1.3.1 (May 20 1999) for ORBacus 3.1.3 for C++
  Copyright 1996-99 LIFL, France
  >>> # a script class is defined.
  >>> class HelloImpl
      {
        # This is the constructor.
        proc __HelloImpl__(self)
        {
        }
        # This is the implementation of the OMG IDL `hello' operation.
        proc hello (self)
        {
          println ("The OMG IDL `hello' operation is invoked.")
        }
        # This is the implementation of the OMG IDL `display' operation.
        proc display (self,message)
        {
          println (message)
        }
      }
  >>> # we create an HelloImpl instance.
  >>> hello = HelloImpl()
  >>> # We can locally invoke this instance.
  >>> hello.hello()
  The OMG IDL `hello' operation is invoked.
  >>> hello.display("Hello World!")
  Hello World!

  >>> # Now we connect it to the CORBA bus and fix what
  >>> # OMG IDL interface this instance implements.
  >>> CORBA.ORB.connect(hello,Hello)
  >>> # we register it into the CORBA Naming Service.
  >>> NS = CORBA.ORB.resolve_initial_references ("NameService")
  >>> NS.bind ([["anHelloObject",""]],hello._this)

  >>> # Now, this instance is an available CORBA object.
What do you think about this small example?
Could you invoke and implement CORBA objects more easily than with CorbaScript?

More complex examples are provided in the CorbaScript distribution like a CORBA Naming Service shell and a CORBA CosNaming implementation.


CorbaScript Features

The syntax of this new language looks like the C++ and Java languages but type checking is done at runtime. It reuses some interesting features of the Python and SmallTalk languages: everything is an object, source code is translated into a pseudo code executed by a Virtual Object Oriented Machine that includes a simple garbage collector. Current CorbaScript features are:

Basic Scripting Features

CORBA Scripting Features

Advanced Scripting Features


CorbaScript Demontrations

This distribution provides the following CorbaScript demonstrations:


CorbaScript Modules

In CorbaScript, any script files is potentially a module, i.e. a script which can be imported by other scripts. This distribution offers the following main useful modules: This distribution contains various other modules not presented here.


CorbaWeb Environment

What is CorbaWeb?

CorbaWeb is a powerful environment providing a generic gateway to integrate the CORBA and World Wide Web worlds. More precisily, CorbaWeb allows Web users to browse and invoke CORBA objects via their Web browsers. Then Web users interact with their CORBA objects via Web documents (MIME, HTML, forms, etc) dynamically generated on the fly. Then CorbaWeb can be seen as a generic and dynamic CORBA objects browser.

Technically, CorbaWeb is composed of two parts:

Browsing CORBA objects via CorbaWeb just needs to load OMG IDL specifications into the Interface Repository and start the HTTP server of the CorbaWeb environment.

Then users access via their browsers to the CorbaWeb servlet running into the HttpServer. Automatically, CorbaWeb generates HTML forms representing OMG IDL operations and attributes of CORBA objects accessed by users. These forms allow users to invoke operations, get and set attributes.

Moreover, the CorbaWeb administrator can provide scripts to specialize the Web representation for each CORBA object type. Some specialization scripts are already provided for the CorbaScript demonstrations. Interesting and reusable scripts allow one to browse:

Current tested configurations

As the CorbaWeb environment is fully written in CorbaScript, it could potentially work with any ORB products supported by CorbaScript.

Currently, we have only tested CorbaWeb on the following configurations:

Future releases will be tested on other configurations!


Statement Of Compliance for Year 2000

As the C++ code implementing CorbaScript never manipulates times and dates then CorbaScript is fully Year 2000 compliant.

But as CorbaScript uses an ORB product which uses an operating system then CorbaScript will perfectly work after Year 2000 as long as the used ORB and OS is compliant with the Year 2000 :-)

As CorbaWeb is fully written in CorbaScript then it is also Year 2000 compliant.


Getting Help

You should not have any problems compiling the source, but do not hesitate to send requests for assistance.

Just send an e-mail to [email protected].

There is also a CorbaScript mailing list. To subscribe, just send an e-mail to [email protected] with the command:

    SUB goode Your_Real_Name
in the body of your e-mail message.

To post a message to the mailing list, send your message as an e-mail to [email protected].

You find the latest information on CorbaScript on our Web-Site http://corbaweb.lifl.fr.

Some scientific information can be found in papers.


Comments at [email protected]