The Hybrid cc Language

Hybrid cc language is a compositional modeling language for physical systems. We started with Concurrent Constraint programming languages, which provide the fine grained concurrency desirable for compositionality. They are very expressive, being built on top of arbitrary constraint systems, and are declarative. Each program is a logical formula, facilitating reasoning about the models. For more details on cc languages, see the following papers .

cc programs are monotonic, so absence of information is not detected. However, for realtime programs, it is necessary to do this to implement, for example, timeouts. Our first solution was building Timed cc, which allowed the detection of absence of information in a time instant at the next time instant, thus giving us a synchronous reactive programming language - each time a Timed cc program receives an input it executes a cc program in conjunction with the input to get the output for that instant. Any absence of information is detected from the output, and this information could be used in the next instant.

Timed cc gives us a monotonic reactive programming language which is easy to implement, however it introduced delays between the production and detection of negative information. Our solution is Default cc, which allows the expression of default statements in a program using Reiter's default logic. We can again convert this into a synchronous reactive programming language as above - at each input we execute a Default cc program to get the output.

Then we extended the untimed Default cc over continuous time in a generic way, to get our hybrid language Hybrid cc. We extended the definition of a constraint system to include differential equations, and the inference relation to allow the solution of initial value problems. Programs now execute in alternating point and interval phases, executing a Default cc program in each phase to determine the output. In addition, the output in an interval phase contains differential equations which give the values of the continuously varying variables in the entire interval phase. An interval phase ends when a discrete change happens - this can either be caused by a discrete input from the environment or by a guard condition which was determined from the Default cc program that was executed. For the theoretical development of Hybrid cc, giving the formal operational and denotational semantics, see Computing with Continuous Change.

We have implemented an interpreter for Hybrid cc, the source code for which can be downloaded here. Several models of physical systems have been built in Hybrid cc, some examples are given here. We are also interested in enhancing its capabilities for diagnosis, controller generation, scheduling, explanation generation, design optimization and other areas.

Hybrid cc has been the combined effort of a number of people: Bjorn Carlson, Vineet Gupta, Radha Jagadeesan, Vijay Saraswat among others. Contact Vineet Gupta for more information.