An Extensible Type System for Component-Based Design

  • Yuhong Xiong
  • Edward A. Lee
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1785)


We present the design and implementation of the type system for Ptolemy II, which is a tool for component-based heterogeneous modeling and design. This type system combines static typing with run-time type checking. It supports polymorphic typing of components, and allows automatic lossless type conversion at run-time. To achieve this, we use a lattice to model the lossless type conversion relation among types, and use inequalities defined over the type lattice to specify type constraints in components and across components. The system of inequalities can be solved efficiently, with existence and uniqueness of a solution guaranteed by fixed-point theorems. This type system increases the safety and flexibility of the design environment, promotes component reuse, and helps simplify component development and optimization. The infrastructure we have built is generic in that it is not bound to one particular type lattice. The type system can be extended in two ways: by adding more types to the lattice, or by using different lattices to model different system properties. Higher-order function types and extended types can be accommodated in this way.


Type System Type Lattice Type Resolution Type Constraint Defense Advance Research Project Agency 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    H. Abelson and G. J. Sussman, Structure and Interpretation of Computer Programs, The MIT Press, 1985.Google Scholar
  2. 2.
    F. Arbab, MANIFOLD Version 2.0, CWI, Software Engineering Cluster, Kruislaan 413, 1098 SJ Amsterdam, The Netherlands, June, 1998.Google Scholar
  3. 3.
    L. Cardelli and P. Wegner, “On Understanding Types, Data Abstraction, and Polymorphism,” ACM Computing Surveys, Vol.17, No.4, Dec. 1985.Google Scholar
  4. 4.
    B. A. Davey and H. A. Priestly, Introduction to Lattices and Order, Cambridge University Press, 1990.Google Scholar
  5. 5.
    J. Davis II, M. Goel, C. Hylands, B. Kienhuis, E. A. Lee, J. Liu, X. Liu, L. Muliadi, S. Neuendorffer, J. Reekie, N. Smyth, J. Tsay and Y. Xiong, Overview of the Ptolemy Project, ERL Technical Report UCB/ERL No. M99/37, Dept. EECS, University of California, Berkeley, CA 94720, July 1999. ( Scholar
  6. 6.
    Y-C. Fuh and P. Mishra, “Type Inference with Subtypes,” Second European Symposium on Programming, Nancy, France, 1988.Google Scholar
  7. 7.
    A. Girault, B. Lee, and E. A. Lee, “Hierarchical Finite State Machines with Multiple Concurrency Models,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, Vol.18, No.6, June 1999.Google Scholar
  8. 8.
    C. V. Hall, K. Hammond, S.L. Peyton Jones, and P. L. Wadler, “Type Classes in Haskell,” ACM Transactions on Programming Languages, Vol.18, No.2, Mar. 1996.Google Scholar
  9. 9.
    J. B. Hext, “Compile-Time Type-Matching,” Computer Journal, 9, 1967.Google Scholar
  10. 10.
    E. A. Lee and D. G. Messerschmitt, “Static Scheduling of Synchronous Data Flow Programs for Digital Signal Processing,” IEEE Transaction on Computer, Jan. 1987.Google Scholar
  11. 11.
    J. Liu, B. Wu, X. Liu, and E. A. Lee, “Interoperation of Heterogeneous CAD Tools in Ptolemy II,” Symposium on Design, Test, and Microfabrication of MEMS/MOEMS, Paris, France, Mar. 1999.Google Scholar
  12. 12.
    R. Milner, “A Theory of Type Polymorphism in Programming,” Journal of Computer and System Sciences, 17, pp. 384–375, 1978.CrossRefMathSciNetGoogle Scholar
  13. 13.
    J. C. Mitchell, Foundations for Programming Languages, The MIT Press, 1998.Google Scholar
  14. 14.
    M. Odersky, “Challenges in Type Systems Research,” ACM Computing Surveys, Vol.28, No.4es, 1996.Google Scholar
  15. 15.
    J. Rehof and T. Mogensen, “Tractable Constraints in Finite Semilattices,” Third International Static Analysis Symposium, LNCS 1145, Springer, Sept., 1996.Google Scholar
  16. 16.
    J. D. Ullman, Elements of ML Programming, Prentice Hall, 1998.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • Yuhong Xiong
  • Edward A. Lee

There are no affiliations available

Personalised recommendations