Est. 1992 Advanced

GNUCHILL

GNU CHILL, the free compiler for the CCITT's telecom language CHILL: begun by Per Bothner at Cygnus Support in November 1992, donated to GCC in 1998, shipped in GCC 2.95, and removed in 2002.

Created by Per Bothner, with Bill Cox, Wilfried Moser, Michael Tiemann and David Brolley (Cygnus Support)

Paradigm Procedural, concurrent
Typing Static, Strong
First Appeared 1992
Latest Version GCC 2.95.3 (16 March 2001), the last GCC release to include it

GNU CHILL (written GNUCHILL in its own manual) is the free compiler for CHILL, the CCITT High Level Language that the international telephone standards body designed for programming telephone exchanges. Cygnus Support began it in November 1992 as a front end for the GNU C Compiler. That gave a language that had only ever had in-house and commercial compilers access to every processor GCC supported. Cygnus donated it to GCC in 1998, and it shipped in the GCC 2.95 series from 1999 to 2001. GCC removed it in 2002, because nobody was willing to update it. It was the only free CHILL compiler known to have been widely distributed.

The language itself, its standardisation and its use in switching systems are covered on the CHILL/2 page. This page covers the GNU implementation.

History & Origins

Cygnus and CHILL

By the early 1990s CHILL, standardised as Recommendation Z.200 in 1980, was well established in telecommunications and ran exchanges such as Siemens EWSD, Alcatel System 12 and NTT’s D70. But it had almost no presence in the United States, and compilers were mostly built in-house by the switch manufacturers or sold by specialist vendors.

Cygnus Support, the Californian company founded to sell support for GNU software, took on CHILL as a commercial job. The compiler’s README says that GNU CHILL “was primarily written by Per Bothner, along with Bill Cox, Wilfried Moser, Michael Tiemann, and David Brolley.” The ChangeLog backs this up and shows the division of work. The earliest dated entry is by Per Bothner on 10 November 1992, implementing tuples, initialisation and IF expressions in a yacc grammar (chill.y). Of the roughly 1,000 dated entries, Bill Cox wrote about 460 and Bothner about 310. Wilfried Moser did much of the run-time library, libchill, which has its own ChangeLog starting in January 1993.

Development peaked in 1993, with about 475 front-end ChangeLog entries that year, and then tapered off: about 260 in 1994, 110 in 1995, 35 in 1996 and two in 1997.

The brochure

The source tree kept a short product brochure, “GNU CHILL: A Complete CHILL Implementation”. It is undated, but it is written in the name of Cygnus Support and gives “Q1 1994” and “Q2 1994” as future targets, so it dates from before 1994. It describes the compiler as being in “early beta state, performing correct compilation and execution of correctly coded programs”, and says that “like most CHILL compilers” it implemented a large subset of the language. Its goal was “a fully retargetable, complete implementation of the Z.200 specification”, followed by a minimal real-time kernel, more rigorous type checking, input/output and inter-process communication.

The brochure also lists GCC back ends that GNU CHILL was “almost instantly available” on, including the m680x0, i960, x86, AMD 29K, MIPS R3000/R4000, SPARClite, Hitachi H8 and SH, and Z8001/2. It is careful to say that the compiler had been tested only under SunOS on SPARC and SCO Unix on the 80386. The list describes what GCC could target, not what Cygnus verified.

Donation to GCC

On 29 August 1998 the GCC project announced that “Cygnus has donated the Chill front end to GCC”. The release notes were unusually frank:

  • The implementation “mostly follows the 1988 version of the language, with some backwards compatibility options for the 1984 version, and some other extensions. However, it does not implement all of the features of any standard.”
  • “The GNU Chill implementation is not being actively developed. Cygnus has one customer we are maintaining Chill for, but we are not planning on putting major work into Chill.”
  • “This Net release is for educational purposes (as an example of a different Gcc front-end), and for those who find it useful. It is an unsupported hacker release.”
  • Only native builds were supported. Cross-compilers ran into problems with the directory structure and the setjmp-based exception handling.

The release came too late for EGCS 1.1 (based on a June 1998 snapshot), and the EGCS 1.1.2 sources contain no Chill directory. The first GCC release to include it was GCC 2.95 in July 1999, which had a separate gcc-chill tarball alongside the C, C++, Fortran, Objective-C and Java ones.

Design

GNU CHILL was a GCC front end in the same way as g77 or the early g++. It parsed CHILL into GCC’s tree representation and used the same back ends and optimiser as the C compiler. The brochure lists the optimisations that therefore applied to CHILL, including inlining, common subexpression elimination, loop-invariant code motion, strength reduction and loop unrolling. No benchmarks against other CHILL compilers were published.

The run-time library, libchill, provided the string, powerset, I/O and exception support that CHILL needs. Concurrency was the weakest part of the implementation. The README says the run-time file rts.c contains “a poor main’s [sic] implementation of Chill “processes” (threads)” that was used only for testing, and that “our customer uses a different implementation for production work.” The Guide to GNU Chill notes that “the support for synchronization modes and concurrent execution is slightly non-standard.”

Compiler options

The Guide to GNU Chill (by William Cox, Per Bothner and Wilfried Moser) documents CHILL-specific options to gcc. Files ending in .ch were treated as CHILL automatically.

OptionEffect
-lang-chillTreat the following file as CHILL even without the .ch extension
-flocal-loop-counterDeclare DO FOR loop counters implicitly, as Z.200 requires (the default)
-fignore-caseConvert all identifiers to lower case, which makes C run-time libraries usable
-fno-runtime-checkingTurn off the run-time validity checks that Z.200 requires (on by default)
-fgrant-onlyStop after writing the grant file, without generating code
-fold-stringUse the CHILL 1984 string semantics (indexing a string yields a one-character slice)
-I seize_pathAdd a directory to search for seize files

Separate compilation with grant files

CHILL modules export names with GRANT and import them with SEIZE. GNU CHILL implemented this with grant files. When a source file grants anything, the compiler writes a .grt file containing the granted modes and locations. Another source file names it in a USE_SEIZE_FILE directive and then seizes what it needs:

<> USE_SEIZE_FILE "foo.grt" <>
SEIZE bar;

To avoid unnecessary make activity, the compiler did not rewrite a grant file if the new one would be identical. The manual calls grant files a GNU-specific enhancement and promised a “more Blue Book-conforming” mechanism using remote spec modules in a future release.

GNU extensions

The Guide lists several extensions to the standard:

  • Multiple precisions: several integer and real precisions, and signed and unsigned integer variants.
  • DESCR: a built-in that returns a pointer to a STRUCT (addr PTR, length ULONG) describing any location or string. It was meant for system-call style interfaces that CHILL’s strict typing makes awkward.
  • LENGTH on the left-hand side of an assignment to change the length of a VARYING string.
  • Compiler directives such as ALL_STATIC_ON/ALL_STATIC_OFF, RANGE_ON/RANGE_OFF, PROCESS_TYPE, SIGNAL_CODE and default send priorities for signals and buffers.

What was missing

The Guide is equally direct about the gaps compared with Z.200 (1988). ROW modes and dynamic modes were not implemented, so DYNAMIC had no meaning for access and text modes. Layout keywords (PACK, POS, NOPACK, STEP) were ignored, as was FORBID in a GRANT. Bit-string slices and reach-bound initialisations were missing. Exceptions were implemented but “not generated in all of the required situations.” The manual’s statement that a CASE selector list allowed only one expression appears to be out of date: the ChangeLog records David Brolley adding multi-dimensional CASE actions and expressions in February 1998.

An Example

The brochure includes a small program that converts integers to decimal strings. This is an abridged version. It uses chprintf, a GNU CHILL test helper seized from a grant file, rather than standard CHILL I/O:

vary1: MODULE

  <> USE_SEIZE_FILE 'chprintf.grt' <>
  SEIZE chprintf;

  SYNMODE dec_string = CHAR (6) VARYING;

  int_to_dec_char: PROC (decimal_num INT IN)
                   RETURNS (dec_string);
    DCL neg_num BOOL := FALSE;
    DCL out_string dec_string;

    IF decimal_num < 0 THEN
      decimal_num := -decimal_num;
      neg_num := TRUE;
    FI

    IF decimal_num = 0 THEN
      out_string := '0';
    ELSE
      out_string := '';
      DO WHILE decimal_num /= 0;
        out_string := CHAR (ABS (decimal_num REM D'10) + H'30)
                      // out_string;
        decimal_num := decimal_num / D'10;
      OD;
      IF neg_num THEN
        out_string := '-' // out_string;
      FI;
    FI;
    RESULT out_string;
  END int_to_dec_char;

  chprintf (int_to_dec_char (-654321), 0);
  chprintf ("^J", 0);

END vary1;

The example shows typical CHILL notation: SYNMODE for a type synonym, CHAR (6) VARYING for a bounded variable-length string, // for concatenation, based literals such as D'10 and H'30, RESULT to set a procedure’s return value, and keywords spelled backwards (FI, OD) to close blocks.

Decline and Removal

GNU CHILL entered GCC just as GCC’s internals were changing quickly. On 1 October 2000 Mark Mitchell told the GCC list that the Steering Committee had decided to disable the Chill front end. It was the only front end not using GCC’s garbage-collection machinery, and it depended on obstack code that was being removed from the middle end. No files were deleted: a one-line configure change simply stopped the directory from being built, and volunteers were invited to update it.

Nobody did. In February 2001 Gerald Pfeifer wondered whether Chill should be taken out of the tree altogether, since there was “apparently no interest at all in this.” Joseph Myers pointed out that the garbage-collection conversion was listed as a project, that it was mostly mechanical, and that a volunteer would probably need Red Hat (which had acquired Cygnus) to get its customer’s permission to release the Chill test suite. GCC 2.95.3, released on 16 March 2001, was the last release to contain GNU CHILL. The GCC 3.0 caveats say that “the Chill compiler is not included in GCC 3.0, because of the lack of a volunteer to convert it to use garbage collection.”

On 15 April 2002 Mark Mitchell committed “Remove Chill front end”, deleting gcc/ch, libchill, the driver entries and the documentation (SVN r52327). Two months later, on 17 June 2002, GDB administrator Andrew Cagney announced that GDB intended to follow suit and remove its CHILL debugging support.

Current Relevance

GNU CHILL is historical. No maintained free CHILL compiler is known, and there is no official container image. The source survives in GCC 2.95.x archives on the GNU FTP mirrors (gcc-chill-2.95.3.tar.gz), and the Guide to GNU Chill is still online in the GCC 2.95.3 documentation. Building it today would mean building GCC 2.95.3 itself, which modern toolchains do not compile without effort. No evidence of a revival or a port to a current GCC was found.

Why It Matters

GNU CHILL was the free-software world’s one serious encounter with a language that was important in telecommunications and almost unknown outside it. It shows how far GCC’s design reached in the early 1990s: a small team at Cygnus could put a large, Algol-like, concurrent language with its own module system onto the same back end as C and get every GCC target and optimisation with it.

Its history is also a clear example of what happens to a GCC front end without maintainers. It was written for a paying customer, released as an “unsupported hacker release” when the work wound down, and dropped three years later when GCC’s internals moved on. The customer’s own production process kernel and test suite were never made public, so the code that GCC carried was never the complete system that was actually used in production.

Sources and Caveats

  • Year. 1992 is the date of the earliest ChangeLog entry (10 November 1992, Per Bothner) in gcc/ch/ChangeLog in the GCC 2.95.3 sources. Work may have started a little earlier, but no earlier dated record was found. The first public release was the 1998 donation, and the first release in an official GCC was 2.95 in 1999.
  • ChangeLog counts are tallies of dated entry headers in the GCC 2.95.3 copies of gcc/ch/ChangeLog and libchill/ChangeLog. They count entries, not lines of code.
  • The brochure (gcc/ch/chill.brochure) is undated. “Before 1994” is inferred from its forward-looking 1994 dates and its use of the name Cygnus Support. Its claims of “tens of millions of lines” of CHILL code and “about 15,000 programmers” are Cygnus’s marketing figures and are not verified here.
  • The customer that Cygnus maintained GNU CHILL for is not named in any source consulted, and this page does not guess.
  • Platform list. The architectures named above are those the brochure says GCC supported. Only SunOS/SPARC and SCO Unix/i386 testing is claimed.
  • FreeBSD ports. The RTEMS cross-compiler ports, CHILL included, were added on 10 July 2000 (the mips-rtems-chill variant was reinstated on 19 December 2000), and removed on 13 February 2003, per the FreeBSD ports commit history.
  • Removal dates come from the GCC mailing-list archives (1 October 2000, 1 February 2001), the GCC 3.0 caveats page, the GCC releases page, and the removal commit as mirrored on GitHub (gcc-mirror/gcc 07cdae9, 15 April 2002). The GDB date is Andrew Cagney’s 17 June 2002 message to the gdb list. When the GDB code was finally deleted was not verified.

Timeline

1980
The CCITT approves CHILL, the CCITT High Level Language, as Recommendation Z.200 in November 1980
1988
Z.200 (11/88) is published. This is the edition of CHILL that GNU CHILL mostly follows
1992
On 10 November 1992 Per Bothner at Cygnus Support makes the earliest entry in the GNU CHILL ChangeLog, working on the parser, tuples and range checking for a CHILL front end to GCC
1993
The busiest year of development: the front-end ChangeLog has about 475 dated entries for 1993, most of them by Bill Cox and Per Bothner, and the libchill run-time library ChangeLog begins
1998
On 29 August 1998 Cygnus announces that it has donated the Chill front end to GCC, calling it "an unsupported hacker release" released for educational purposes
1999
GCC 2.95 (July 1999) is the first GCC release to ship the Chill front end, with a separate gcc-chill-2.95 source tarball
2000
On 1 October 2000 Mark Mitchell announces that the GCC Steering Committee has disabled the Chill front end, because it is the only front end that does not use GCC's garbage collector and no maintainer will convert it
2001
GCC 2.95.3 (16 March 2001) is the last release to include GNU CHILL. GCC 3.0 (18 June 2001) leaves it out
2002
Mark Mitchell removes the gcc/ch and libchill directories from the GCC source tree on 15 April 2002. On 17 June 2002 GDB announces that it will remove its CHILL debugging support too

Notable Uses & Legacy

Cygnus's telecom customer

The 1998 release notes say Cygnus maintained GNU CHILL for a single customer, who used its own process implementation for production work rather than the test-only one in the public run-time. The customer is never named

GCC as a teaching example

Cygnus released the front end 'for educational purposes (as an example of a different Gcc front-end)'. It shows how a large, non-C-family language with built-in concurrency was mapped onto GCC's back end

Linux distributions

Distributions packaged the compiler while GCC shipped it. Debian 2.2 'potato' had a chill package built from GCC 2.95.2 (2.95.2-13.1 in the archived release), and Ubuntu carried an obsolete chill dependency package (2.95.4) as late as Dapper

RTEMS cross-compilers on FreeBSD

The FreeBSD ports tree carried CHILL-gcc ports for the RTEMS real-time operating system (mips-rtems-chill and siblings) from July 2000 until 13 February 2003, when they were removed with the commit message 'GCC 3.2.1 no longer supports the "chill" language'

GDB

Cygnus modified the GNU Debugger to give simple CHILL support, according to the compiler's brochure. GDB kept CHILL debugging support until it was obsoleted in 2002, after GCC had dropped the compiler

Language Influence

Influenced By

CHILL

Running Today

Run examples using the official Docker image:

docker pull
Last updated: