Friedrich Schiller University Jena, Dept. of Mathematics and Computer Science
Programming Languages and Compilers

Welcome to the     CHILL   Homepage


What is CHILL ?

CHILL (CCITT High Level Language) is a general procedural programming language which is mainly used in the field of telecommunications. As a general programming language it is by no means limited to this field. A number of CHILL programming environments are also implemented in CHILL. Some more details, especially about the early history of CHILL, can be found in a paper by K. Rekdal.

The current official definition of CHILL is the standard:

ITU-T Recommendation Z.200 (11/99)  ( pdf ,   info ) / ISO/IEC 9496:1998(E)

Informally, this version is also called CHILL2000. The paper CHILL2000 by J.F.H.Winkler gives a tutorial overview and describes the new language elements of CHILL2000.


COMPILER

There was a GNU CHILL compiler publicly available (up to 2.95.3). It was based on Z.200 (11/1988), an earlier version of the language.

A newer version of the language has been implemented at ETRI.


CHILL96

The previous version of the standard had been released in 1996. The new topics of CHILL96 were:

The examples in the last part of this page give you an impression of the new language elements.
 



Program Examples in CHILL-96 demonstrating the elements for

object-oriented programming

       Object-Orientation: Modes (types) for Simple, Sequential Stacks
  
1 /* The examples show the application of object-orientation to the well known stack data
     structure. Two different implementations of stack modes with identical interfaces are 
2    realized(Example 30). Based on these modes extended modes with an additional
3    operation (e.g. Top; Example 31) or with other properties (e.g. mutual exclusive
4    access to stacks (Example 32)) are realized. */
5       
6    SYNMODE StackMode1 = MODULE SPEC   /* --------------- Definition of the interface */
7       GRANT ElementMode, Push, Pop;                      /* Simple, sequential stack */
8       NEWMODE ElementMode = STRUCT (a INT, b BOOL);
9       Push: PROC(Elem ElementMode IN) EXCEPTIONS(Overflow) END Push;
10      Pop: PROC( ) RETURNS(ElementMode) EXCEPTIONS(Underflow) END Pop;
11      SYN Length = 10_000;
12      DCL StackData ARRAY (1:Length) ElementMode,            /* Array implementation */
13      TopOfStack RANGE(0:Length) INIT := 0;                          /* of the stack */
14   END StackMode1;
15      
16   SYNMODE StackMode1 = MODULE BODY     /* ------------------ Definition of the body */
17      Push: PROC(Elem ElementMode IN) EXCEPTIONS(Overflow)
18         IF TopOfStack = Length THEN
19            CAUSE Overflow;
20         ELSE
21            TopOfStack +:= 1;
22            StackData(TopOfStack) := Elem;
23         FI;
24      END Push;
25      Pop: PROC( ) RETURNS(ElementMode) EXCEPTIONS(Underflow)
26         IF TopOfStack = 0 THEN
27            CAUSE Underflow;
28         ELSE 
29            RESULT(StackData(TopOfStack));
30            TopOfStack -:= 1;
31         FI;
32      END Pop;
33   END StackMode1;
34      
35   MainProgram1: MODULE
36      SEIZE StackMode1;
37      DCL Stack1 StackMode1;
38      DCL Elem1 StackMode1!ElementMode;
39      Elem1 := [10, TRUE];
40      Stack1.Push(Elem1);
41      Stack1.Push( [20, FALSE] );
42   END MainProgram1;
43      
44   SYNMODE  StackMode2  =  MODULE SPEC /* -------------- Definition of the interface */
45      GRANT ElementMode, Push, Pop;                  /* Same interface as StackMode1 */
46      NEWMODE  ElementMode  =  STRUCT (a  INT, b  BOOL);
47      Push: PROC(Elem  ElementMode IN) EXCEPTIONS(Overflow) END Push;
48      Pop:   PROC( ) RETURNS(ElementMode) EXCEPTIONS(Underflow) END Pop;
49      
50      NEWMODE  ListElem  =  STRUCT(next  REF  ListElem,      /*  List implementation */
51                                   info  ElementMode);              /*  of the stack */
52      DCL  Stack   REF  ListElem  INIT := NULL;
53   END  StackMode2;
54      
55   SYNMODE  StackMode2  =  MODULE BODY    /* ---------------- Definition of the body */
56      Push: PROC(Elem  ElementMode IN) EXCEPTIONS(Overflow)
57         Stack := ALLOCATE (ListElem, [Stack, Elem]) 
58                  ON  (ALLOCATEFAIL) : CAUSE Overflow;  END;
59      END Push;
60      Pop:   PROC( ) RETURNS(ElementMode) EXCEPTIONS(Underflow)
61         DCL Temp  REF ListElem;
62         IF Stack = NULL THEN
63            CAUSE  Underflow;
64         ELSE
65            RESULT (Stack->.info);
66            Temp := Stack;
67            Stack := Stack->.next;
68            TERMINATE (Temp);
69         FI;
70      END  Pop;
71   END  StackMode2;
72      
73   MainProgram2:  MODULE  /*  ----------------  Essentially the same as MainProgram1 */
74      SEIZE StackMode2;
75      DCL Stack1  StackMode2;
76      DCL Elem1  StackMode2!ElementMode;
77      Elem1 := [10, TRUE];
78      Stack1.Push(Elem1);
79      Stack1.Push( [20, FALSE] );
80   END MainProgram2;

   =====================================================================================

31. Object-Orientation: Mode Extension: Simple, Sequential Stack with Operation “Top”
1       
2    SYNMODE  StackWithTopMode2 = MODULE  SPEC                 /*  BASED_ON  indicates */
3                                 BASED_ON  StackMode2          /*  mode derivation or */
4       GRANT Top;                                                     /*  inheritance */
5       Top: PROC( ) RETURNS (ElementMode)          /*  Top is an additional operation */
6                    EXCEPTIONS (EmptyStack) END Top;
7    END  StackWithTopMode2  ;
8       
9    SYNMODE  StackWithTopMode2  =  MODULE  BODY  BASED_ON  StackMode2
10      Top: PROC( ) RETURNS (ElementMode) EXCEPTIONS (EmptyStack)
11         IF Stack = NULL THEN
12            CAUSE  EmptyStack;
13         ELSE
14            RETURN (Stack->.info);
15         FI;
16      END  Top;
17   END  StackWithTopMode2  ;
18      
19   MainProgram3:  MODULE    /*  ---------------------  Very similar to  MainProgram2 */
20      SEIZE StackWithTopMode2;
21      DCL Stack1  StackWithTopMode2;
22      DCL Elem1  StackWithTopMode2!ElementMode;
23      Elem1 := [10, TRUE];
24      Stack1.Push(Elem1);
25      Stack1.Push( [20, FALSE] );
26      Elem1 := Stack1.Top( );
27   END MainProgram3;

   =====================================================================================

32. Object-Orientation:  Modes for Stacks with Access Synchronization

1    /* Based on the mode StackWithTopMode2 defined in example 31 the mode
2       RegionStackWithTopMode1 is defined whose objects behave like regions:
3       at any point in time at most one of the public procedures may be in execution.
4       Apart from this the behavior is essentially the same as for StackWithTopMode2:
5       erroneous use of an object causes an exception. The second mode
6       RegionStackWithTopMode2 uses the CHILL event mechanism to deal with
7       erroneous use of a stack object.                                               */
8       
9    SYNMODE  RegionStackWithTopMode1  =   REGION  SPEC   BASED_ON  StackWithTopMode2
10                                  /* Just put the base mode into a “region envelope” */
11                  /* In case of an erroneous use same behaviour as StackWithTopMode2: 
                                                                    cause an exception */
12   END  RegionStackWithTopMode1 ;
13      
14   SYNMODE  RegionStackWithTopMode1  =  REGION  BODY  BASED_ON  StackWithTopMode2
15   END  RegionStackWithTopMode1  ;
16      
17   MainProgram4:  MODULE
18      SEIZE  RegionStackWithTopMode1;
19      DCL Stack1  RegionStackWithTopMode1;
20      Producer: PROCESS ( ) ;
21         DCL Elem1  RegionStackWithTopMode1!ElementMode;
22         DO  FOR  EVER
23            /*  compute Elem1 */
24            Stack1.Push(Elem1); 
25         OD;
26      END Producer;
27      Consumer: PROCESS ( ) ;
28         DCL Elem1  RegionStackWithTopMode1!ElementMode;
29         DO  FOR  EVER
30            Elem1 :=  Stack1.Pop ( );
31            /*  process  Elem1 */
32         OD;
33      END Consumer;
34      START  Producer ( );
35      START  Consumer ( );
36   END MainProgram4;
37      
38   SYNMODE  RegionStackWithTopMode2 = REGION  SPEC  BASED_ON  StackWithTopMode2
39            /* In case of an erroneous use different behaviour as StackWithTopMode2:
40                                                             use the event mechanism */
41      GRANT Push, Pop, Top;
42      Push: PROC(Elem  ElementMode IN) REIMPLEMENT END Push;
43      Pop:  PROC( ) RETURNS (ElementMode) REIMPLEMENT END Pop;
44      Top:  PROC( ) RETURNS (ElementMode) REIMPLEMENT END Top;
45      DCL  NotEmpty,  NotFull  EVENT;
46   END  RegionStackWithTopMode2  ;
47      
48   SYNMODE  RegionStackWithTopMode2 = REGION  BODY  BASED_ON  StackWithTopMode2
49      Push: PROC(Elem  ElementMode IN) REIMPLEMENT
50         PushLoop: DO
51            BEGIN
52               StackWithTopMode2!Push(Elem);
53               EXIT PushLoop;
54            END
55            ON (Overflow): DELAY  NotFull;  END;
56         OD  PushLoop;
57         CONTINUE  NotEmpty;
58      END Push;
59      Pop: PROC( ) RETURNS(ElementMode) REIMPLEMENT
60         PopLoop: DO
61            BEGIN
62               RESULT StackWithTopMode2!Pop( );
63               EXIT PopLoop;
64            END
65            ON (Underflow): DELAY  NotEmpty;  END;
66         OD  PopLoop;
67         CONTINUE  NotFull;
68      END Pop;
69      Top: PROC( ) RETURNS (ElementMode) REIMPLEMENT
70         TopLoop: DO
71            BEGIN
72               RESULT StackWithTopMode2!Top( );
73               EXIT TopLoop;
74            END
75            ON (EmptyStack): DELAY  NotEmpty;  END;
76         OD TopLoop;
77         CONTINUE  NotFull;
78      END Top;
79   END  RegionStackWithTopMode2 ;
80      
81   MainProgram5:  MODULE   /*  ---------------- Essentially the same as MainProgram4 */
82      SEIZE  RegionStackWithTopMode2;
83      DCL Stack1  RegionStackWithTopMode2;
84      Producer: PROCESS ( ) ;
85         DCL Elem1  RegionStackWithTopMode2!ElementMode;
86         DO  FOR  EVER 
87            /*  compute Elem1 */
88            Stack1.Push(Elem1); 
89         OD;
90      END Producer;
91      Consumer: PROCESS ( ) ;
92         DCL Elem1  RegionStackWithTopMode2!ElementMode;
93         DO  FOR  EVER 
94            Elem1 := Stack1.Pop (Elem1);
95            /*  process  Elem1 */
96         OD;
97      END Consumer;
98      START  Producer ( );
99      START  Consumer ( );
100   END MainProgram5;


LITERATURE

Z.200 (11/1999)   International Telecommunication Union, ITU-T Recommendation Z-200 (11/1999), CHILL - The ITU-T Programming Language. Geneva, 2001
                          This is the official specification of CHILL

Rek 1993            Rekdal, Kristen: CHILL - the international standard language for telecommunications programming. Telektronikk 1993, 2/3, pp. 5..10
                          Overview of the early history and use of CHILL in the telecom industry.

Win 2000            Winkler, Juergen F.H.: CHILL 2000. Telektronikk 2000, 4, pp. 70..77
                          Tutorial on CHILL, especially on the object-oriented features of CHILL2000.

CHL 1997           Lee, DongGill; Lee, JoonKyung; Choi, Wan; Lee, Byung Sun; Han, Chimoon:
                          A New Integrated Software Development Environment Based on SDL, MSC, and CHILL for Large-scale Switching Systems.
                          ETRI Journal 18,4 (1997) 265..286

Pal 1991             Palma, Antonio (ed.): CHILL, CCITT high level language: proceedings of the 5th CHILL Conference, Rio de Janeiro, Brazil, 19-22 March 1990.
                          North-Holland, 1991. 978-0444889041.

PLW 1982          Branquart,P.; Louis, G.; Wodon, P.: An Analytical Description of CHILL, the CCITT High Level Language.
                          LNCS 128, Springer, Berlin etc., 1982. 978-3540111962.


Home | Comments | Jürgen Winkler: 2010Apr05, 2019Mar20.