1 GNU CHILL: A Complete CHILL Implementation
3 CHILL (the CCITT High Level Language) is a strongly-typed, block
4 structured language designed primarily for the implementation of large
5 and complex embedded systems. Tens of millions of lines of CHILL code
6 exist, and about 15,000 programmers world-wide use CHILL. Many
7 central-office telephone switching systems use CHILL for their control
12 - enhance reliability and run time efficiency by means of extensive
13 compile time checking;
14 - provide sufficient flexibility and power to encompass the required
15 range of applications and to exploit a variety of hardware;
16 _ provide facilities that encourage piecewise and modular development
18 - cater to real-time implementations by providing built-in concurrency
19 and time supervision primitives;
20 - permit the generation of highly efficient object code;
21 - facilitate ease of use and a short learning curve.
23 CHILL is specified in the "Blue Book":
24 CCITT High Level Language (CHILL) Recommendation Z.200
25 ISO/IEC 9496, Geneva 1989 ISBN 92-61-03801-8
27 Cygnus Support has completed the first level implementation of the
28 GNU CHILL compiler. Our compiler now supports the core features of
29 the CHILL language. Our goal is a fully retargetable, complete
30 implementation of the Z.200 specification. The next phase of
31 implementation will include:
33 . a minimal real-time kernel for demonstration use
34 . more rigorous type checking
35 . retargetable input/output
36 . interprocess communications
37 . fully compliant exception handling.
39 The State of the Implementation
41 The GNU CHILL compiler is in early beta state, performing correct
42 compilation and execution of correctly coded programs. Like most
43 CHILL compilers, the GNU compiler implements a large subset of the
44 language (as described below).
46 Since it uses the same compiler back-ends as the GNU C and C++
47 compilers, GNU CHILL is almost instantly available on all
48 platforms supported by GNU C, including the following:
50 m680xx, i960, i80x86, AMD29K, R3000, R4000, SPARClite,
51 Hitachi H8 and SH families, Z8001/2
53 It has been specifically tested under SunOS on SPARCs and under
56 All of the GCC optimizations apply to CHILL as well, including
57 function inlining, dead code elimination, jump-to-jump elimination,
58 cross-jumping (tail-merging), constant propagation, common
59 subexpression elimination, loop-invariant code motion, strength
60 reduction, loop unrolling, induction variable elimination, flow
61 analysis (copy propagation, dead store elimination and elimination
62 of unreachable code), dataflow-driven instruction scheduling, and
65 I/O statements are parsed. The anticipated timeframe for I/O code
66 generation is Q1 1994.
70 The multi-tasking functions require a small real time kernel.
71 A free implementation of such a kernel is not yet available.
72 We plan to offer a productized P-threads interface in Q2 1994.
73 Other runtime functions involving strings and powersets are
76 GDB, the GNU Debugger, has been modified to provide simple CHILL
77 support. Some CHILL expressions are not yet recognized.
79 For those who aren't familiar with CHILL, here's a small but
80 useful example program:
83 -- Convert binary integers to decimal-coded ASCII string
87 -- include declarations so we can output the test results
88 <> USE_SEIZE_FILE 'chprintf.grt' <>
91 -- create a new name for the CHAR array mode
92 SYNMODE dec_string = CHAR (6) VARYING;
94 int_to_dec_char: PROC (decimal_num INT IN)
97 DCL neg_num BOOL := FALSE; -- save sign of parameter
98 DCL out_string dec_string;
100 IF decimal_num < 0 THEN -- positive numbers are easier
101 decimal_num := -decimal_num;
105 IF decimal_num = 0 THEN
106 out_string := '0'; /* handle zero */
109 DO WHILE decimal_num /= 0; -- loop until number is zero
110 -- concatenate a new digit in front of the output string
111 out_string := CHAR (ABS (decimal_num REM D'10) + H'30)
113 decimal_num := decimal_num / D'10;
116 -- prepend a hyphen for numbers < zero
117 out_string := '-' // out_string; -- restore sign
120 RESULT out_string; -- remember result
122 decimal_num := 0; -- reset for next call
128 /* Try some test cases */
129 chprintf (int_to_dec_char (123456), 0);
132 chprintf (int_to_dec_char (-654321), 0);
135 chprintf (int_to_dec_char (0), 0);
142 GNU CHILL currently supports the following features. This outline
143 generally follows the structure of the Blue Book specification:
145 CCITT High Level Language (CHILL) Recommendation Z.200
146 ISO/IEC 9496, Geneva 1989 ISBN 92-61-03801-8
152 integer, boolean, character, real
153 multiple integer/real precisions (an extension)
154 set modes, range modes
162 (no input/output modes yet)
163 (no timing modes yet)
168 VARYING string/array modes
169 (type-checking is not fully rigorous yet)
176 the standard operators
180 if .. then .. else .. fi
190 start/stop/continue process
196 fully compiled, but exceptions aren't
197 generated in all of the required situations
202 Inter-process communications
203 delay/delay case actions
204 send signal/receive case actions
205 send buffer/receive case actions
207 Multi-module programming
208 Seize/grant processing
209 multiple modules per source file
214 This list is included as an invitation. We'd appreciate hearing
215 of CHILL-related documents (with ISBN if possible) which aren't
216 described here. We're particularly interested in getting copies
217 of other conference Proceedings.
219 CCITT High Level Language (CHILL) Recommendation Z.200
220 ISO/IEC 9496, Geneva 1989 ISBN 92-61-03801-8
221 (The "blue book". The formal language definition; mostly a
222 language-lawyer's document, but more readable than most.)
224 Study Group X - Report R 34
225 This is the May 1992 revision of Z.200.
227 An Analytic Description of CHILL, the CCITT high-level
228 language, Branquart, Louis & Wodon, Springer-Verlag 1981
232 CCITT, Geneva 1986 ISBN 92-61-02601-X
233 (Most readable, but doesn't cover the whole language).
235 Introduction to CHILL
236 CCITT, Geneva 1983 ISBN 92-61-017771-1
238 CHILL CCITT High Level Language
239 Proceedings of the 5th CHILL Conference
240 North-Holland, 1991 ISBN 0 444 88904 3
242 Introduction to the CHILL programming Language
243 TELEBRAS, Campinas, Brazil 1990
245 CHILL: A Self-Instruction Manual
246 Telecommunication Institute - PITTC
247 Available from KVATRO A/S, N-7005 Trondheim, Norway
248 Phone: +47 7 52 00 90
249 (Great discussion of novelty.)
251 Some of these documents are available from Global Engineering
252 Documents, in Irvine, CA, USA. +1 714 261 1455.