Skip to main content
Unit & Dynamic Typing in Hybrid Systems Modeling with CHARON
Departmental Papers (CIS)
  • Madhukar Anand, University of Pennsylvania
  • Insup Lee, University of Pennsylvania
  • George Pappas, University of Pennsylvania
  • Oleg Sokolsky, University of Pennsylvania
Date of this Version
Document Type
Conference Paper
Copyright 2006 IEEE. Reprinted from the IEEE International Symposium on Computer-Aided Control Systems Design (CACSD 2006).

This material is posted here with permission of the IEEE. Such permission of the IEEE does not in any way imply IEEE endorsement of any of the University of Pennsylvania's products or services. Internal or personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution must be obtained from the IEEE by writing to By choosing to view this document, you agree to all provisions of the copyright laws protecting it.

In scientific applications, dimensional analysis forms a basis for catching errors as it introduces a type-discipline into the equations and formulae. Dimensions in physical quantities are measured via their standard units. However, many programming and modeling tools provide limited support for incorporating these units into the variables. Thus, it is quite difficult for a programmer to ensure dimensional consistency in the code. Different existing standards for units further complicates this problem and an incautious use could cause inconsistencies, often with catastrophic results. In this paper, we propose an extension of the basic type system in CHARON, a language for modeling of hybrid systems, to include Unit and Dynamic data types. Through a combination of indirect user-guided annotations and typeinference, we address the problem of ensuring both dimensional consistency, and consistency with respect to different unitsystems. Further, we also introduce dynamic data typing, that allows programmers to specify entities that bind at runtime. Such abstractions are particularly useful to program controllers for dynamic environments. We illustrate these benefits with an example on mobile robots.
Citation Information
Madhukar Anand, Insup Lee, George Pappas and Oleg Sokolsky. "Unit & Dynamic Typing in Hybrid Systems Modeling with CHARON" (2006)
Available at: