CU Arcadia Project: Adatcl

Latest Version: adatcl2.1

Location:

The following pointers are symbolic links to the latest ``official'' version.

Description:

This adatcl package provides access to tcl thru Ada. It is possible to run tcl programs and to write Ada procedures that define new tcl procedures using tcl_createcmd. The program tcltest.a demonstrates use of most tcl features and implements some of the example commands from section III of the draft of the tcl book.

I assume that the user is familiar both with Ada and with Tcl, hence, I assume that the example program, tcltest.a, provides an adequate base level of usage documentation.

There are of course a variety of caveats and limits on all this. In particular, you should be warned that this package seriously abuses C-Ada interoperability. Specifically:

  1. This package is heavily dependent on the features of the Gnat and SunAda compilers. In particular:
    1. It uses 'address to access the address of the contents of a string.
    2. It used pragma import (or interface_name) to access C library routines (see the cunix package).
  2. This package makes many assumptions about compatibility between Ada and C:
    1. It assumes that top level procedures in packages can be called from C code correctly when passed integers and pointers. This is the hidden assumption behind the ability to define new commands from Ada procedures.
    2. It uses unchecked_conversion and unchecked deallocation.
  3. In an attempt to provide correct operation under Ada concurrent execution, all calls to C code are surrounded by calls to a mutex package. For Gnat, this is a noop, but when Gnat supports protected types, this will change. There may be problems with mutual exclusion access to malloc that are not correctly handled. For SunAda, mutex uses the v_i_sema package. Additionally, malloc can be handled correctly. See the makescript file to see what needs to be done.
  4. This package avoids the use of exceptions. Its style could be improved significantly if that were changed.
  5. The tcltest.a program exercises most of the features of Tcl. The file tested has an exclamation point next to features for which no current exercise exists in tcltest.a

Installation:

Change Notes

Note that the revision level is encoded as a letter within parentheses.

Version 2.0 -> Version 2.1

Version 1.0 (aka 7.4)-> Version 2.0

Contact and Bug Reports:

Dennis Heimbigner (dennis@cs.colorado.edu)