Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/1294917.1294920acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
Article

A type-level approach to component prototyping

Published: 03 September 2007 Publication History

Abstract

Algebraic theories for modeling components and their interactions offer abstraction over the specifics of component states and interfaces. For example, such theories deal with forms of sequential composition of two components in a manner independent of the type of data stored in the states of the components, and independent of the number and types of methods offered by the interfaces of the combinators. General purpose programming languages do not offer this level of abstraction, which implies that a gap must be bridged when turning component models into implementations.
In this paper, we present an approach to prototyping of component-based systems that employs so-called type-level programming (or compile-time computation) to bridge the gap between abstract component models and their type-safe implementation in a functional programming language. We demonstrate our approach using Barbosa's model of components as generalized Mealy machines. For this model, we develop a combinator library in Haskell, which uses type-level programming with two effects. Firstly, wiring between components is computed during compilation. Secondly, the well-formedness of the component compositions is guarded by Haskell's strong type system.

References

[1]
B. Alarcon and S. Lucas. Crossing the Rubicon: from Haskell to .NET through COM. ERCIM News, 63:51--52, October 2005.
[2]
F. Arbab. Abstract Behaviour Types: a Foundation model for components and their composition. In F. S. de Boer, M. Bonsangue, S. Graf, and W.-P. de Roever, editors, Proc. First International Symposium on Formal Methods for Components and Objects (FMCO'02), pages 33--70. Springer Lect. Notes Comp. Sci. (2852), 2003.
[3]
L. S. Barbosa. Towards a Calculus of State-based Software Components. Journal of Universal Computer Science, 9(8):891--909, August 2003.
[4]
L. S. Barbosa. A Perspective on Component Refinement. In F. S. de Boer, M. Bonsangue, S. Graf, and W.-P. de Roever, editors, FMCO'04, Third International Symposium on Formal Methods for Components and Objects -- Revised Lectures, pages 23--48. Springer Lect. Notes Comp. Sci. (3657), 2005.
[5]
L. S. Barbosa and J. N. Oliveira. State-based Components Made Generic. In H. P. Gumm, editor, CMCS'03, Elect. Notes in Theor. Comp. Sci., volume 82.1. Elsevier, 2003.
[6]
L. S. Barbosa and J. N. Oliveira. Transposing Partial Components: an Exercise on Coalgebraic Refinement. Theor. Comp. Sci., 365(1-2):2--22, 2006.
[7]
M. A. Barbosa and L. S. Barbosa. A Relational Model for Component Interconnection. Journal of Universal Computer Science, 10(7):808--823, 2004.
[8]
A. Bois, P. Trinder, and H. Loidl. mHaskell: Mobile computation in a purely functional language. Journal of Universal Computer Science, 11(7):1234--1254, 2005.
[9]
K. Brockschmidt. Inside OLE (2nd ed.). Microsoft Press, Redmond, WA, USA, 1995.
[10]
F. H. Carvalho and R. D. Lins. Topological Skeletons in Haskell#. In Proc. of IPDPS'03, International Parallel and Distributed Processing Symposium. IEEE Press, 2003.
[11]
D. Gelernter and N. Carrier. Coordination Languages and their significance. Communication of the ACM, 2(35):97--107, February 1992.
[12]
R. Grimes. Profissional DCOM Programming. Wrox Press, 1997.
[13]
T. Hallgren. Fun with Functional Dependencies. In Proc. of the Joint CS/CE Winter Meeting, pages 135--145, 2001. Dept. of Computing Science, Chalmers, Göteborg, Sweden.
[14]
R. Hinze. Formatting: a class act. J. Funct. Program., 13(5):935--944, 2003.
[15]
M. P. Jones. Functional Programming with Overloading and Higher-Order Polymorphism. In Advanced Functional Programming, pages 97--136, 1995.
[16]
S. L. P. Jones. Haskell 98: Language and libraries. J. Funct. Program., 13(1):1--255, 2003.
[17]
S. P. Jones, A. Gordon, and S. Finne. Concurrent Haskell. In Proc. of POPL'96: The 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 295--308, St. Petersburg Beach, Florida, 21--24 1996.
[18]
O. Kiselyov and R. Lämmel. Haskell's overlooked object system. Draft of 10 September 2005, 2005.
[19]
O. Kiselyov, R. Lämmel, and K. Schupke. Strongly typed heterogeneous collections. In Haskell '04: Proceedings of the ACM SIGPLAN workshop on Haskell, pages 96--107. ACM Press, 2004.
[20]
O. Kiselyov and C. Shan. Functional pearl: implicit configurations-or, type classes reflect the values of types. In Haskell '04: Proceedings of the 2004 ACM SIGPLAN workshop on Haskell, pages 33--44, New York, NY, USA, 2004. ACM Press.
[21]
A. Kock. Strong Functors and Monoidal Monads. Archiv für Mathematik, 23:113--120, 1972.
[22]
D. Leijen, E. Meijer, and J. Hook. Haskell as an Automated Controller. In S. D. Swierstra, P. R. Henriques, and J. N. Oliveira, editors, Third International Summer School on Advanced Functional Programming, Braga, pages 268--289. Springer Lect. Notes Comp. Sci. (1608), September 1998.
[23]
V. Matena and B. Stearns. Applying Entreprise JavaBeans: Component-Based Development for the J2EE Platform. Addison-Wesley, 2000.
[24]
C. McBride. Faking it -- Simulating dependent types in Haskell. J. Funct. Program., 12(5):375--392, 2002.
[25]
G. H. Mealy. A Method for Synthesizing Sequential Circuits. Bell Systems Techn. Jour., 34(5):1045--1079, 1955.
[26]
S. Meng and L. S. Barbosa. Components as coalgebras: The refinement dimension. Theor. Comp. Sci., 351:276--294, 2005.
[27]
R. Milner. Communication and Concurrency. Series in Computer Science. Prentice-Hall International, 1989.
[28]
O. Nierstrasz and F. Achermann. A Calculus for Modeling Software Components. In F. S. de Boer, M. Bonsangue, S. Graf, and W.-P. de Roever, editors, Proc. First International Symposium on Formal Methods for Components and Objects (FMCO'02), pages 339--360. Springer Lect. Notes Comp. Sci. (2852), 2003.
[29]
O. Nierstrasz and L. Dami. Component-oriented software technology. In O. Nierstrasz and D. Tsichritzis, editors, Object-Oriented Software Composition, pages 3--28. Prentice-Hall International, 1995.
[30]
S. Oaks and H. Wong. Jini in a Nutshell. O'Reilly and Associates, 2000.
[31]
G. Papadopoulos and F. Arbab. Coordination Models and Languages. In Advances in Computers -- The Engineering of Large Systems, volume 46, pages 329--400. Centrum voor Wiskunde en Informatica (CWI), 1998.
[32]
D. Parnas. Information Distribution Aspects of Design Methodology. In Information Processing '72, pages 339--344. North-Holland, 1972.
[33]
S. Peyton Jones, E. Meijer, and D. Leijen. Scripting COM components from Haskell. In Fifth International Conference on Software Reuse (ICSR'98), Victoria, B.C., Canada, Junho 1998. IEEE Computer Society Press.
[34]
J. Rutten. Universal coalgebra: A theory of systems. Theor. Comp. Sci., 249(1):3--80, 2000. (Revised version of CWI Techn. Rep. CS-R9652, 1996).
[35]
J.-G. Schneider and O. Nierstrasz. Components, Scripts, Glue. In L. Barroca, J. Hall, and P. Hall, editors, Software Architectures -- Advances and Applications, pages 13--25. Springer-Verlag, 1999.
[36]
R. Siegel. CORBA: Fundamentals and Programming. John Wiley & Sons Inc, 1997.
[37]
A. Silva and J. Visser. Strong types for relational databases. In Haskell '06: Proceedings of the 2006 ACM SIGPLAN workshop on Haskell, pages 25--36, New York, NY, USA, 2006. ACM Press.
[38]
C. Szyperski. Component Software, Beyond Object-Oriented Programming. Addison-Wesley, 1998.
[39]
P. Wadler and K. Weihe. Component-Based Programming Under Different Paradigms. Technical report, Dagstuhl Seminar 99081, February 1999.

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
SYANCO '07: International workshop on Synthesis and analysis of component connectors: in conjunction with the 6th ESEC/FSE joint meeting
September 2007
39 pages
ISBN:9781595937209
DOI:10.1145/1294917
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 03 September 2007

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Haskell
  2. coalgebra
  3. combinator library
  4. mealy machine
  5. type-level programming

Qualifiers

  • Article

Conference

ESEC/FSE07
Sponsor:

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 152
    Total Downloads
  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 21 Sep 2024

Other Metrics

Citations

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media