Type Checking by Domain Analysis in Ampersand

  • Stef M. M. JoostenEmail author
  • Sebastiaan J. C. Joosten
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9348)


In the process of incorporating subtyping in relation algebra, an algorithm was found to derive the subtyping relation from the program to be checked. By using domain analysis rather than type inference, this algorithm offers an attractive visualization of the type derivation process. This visualization can be used as a graphical proof that the type system has assigned types correctly. An implementation is linked to in this paper, written in Haskell. The algorithm has been tried and tested in Ampersand, a language that uses relation algebra for the purpose of designing information systems.


Type System Type Error Domain Analysis Relation Algebra Error Message 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    The Business Rules Group: Business rules manifesto – the principles of rule independence (2003).
  2. 2.
    Michels, G., Joosten, S., van der Woude, J., Joosten, S.: Ampersand: Applying relation algebra in practice. In: de Swart, H. (ed.) RAMICS 2011. LNCS, vol. 6663, pp. 280–293. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  3. 3.
    Maddux, R.: Relation Algebras. Studies in Logic and the Foundations of Mathematics, vol. 150. Elsevier Science (2006)Google Scholar
  4. 4.
    van der Woude, J., Joosten, S.: Relational heterogeneity relaxed by subtyping. In: de Swart, H. (ed.) RAMICS 2011. LNCS, vol. 6663, pp. 347–361. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  5. 5.
    Milner, R.: A theory of type polymorphism in programming. Journal of Computer and System Sciences 17, 348–375 (1978)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Marlow, S., Wadler, P.: A practical subtyping system for erlang. SIGPLAN Not. 32, 136–149 (1997)CrossRefGoogle Scholar
  7. 7.
    Liskov, B.H., Wing, J.M.: A behavioral notion of subtyping. ACM Transactions on Programming Languages and Systems (TOPLAS) 16, 1811–1841 (1994)CrossRefGoogle Scholar
  8. 8.
    Mitchell, J.C.: Type inference with simple subtypes. Journal of Functional Programming 1, 245–285 (1991)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Amadio, R.M., Cardelli, L.: Subtyping recursive types. ACM Transactions on Programming Languages and Systems (TOPLAS) 15, 575–631 (1993)CrossRefGoogle Scholar
  10. 10.
    Tiuryn, J., Urzyczyn, P.: The subtyping problem for second-order types is undecidable. In: IEEE Computer Society Symposium on Logic in Computer Science, pp. 74–74 (1996)Google Scholar
  11. 11.
    Wells, J.B.: The undecidability of mitchell’s subtyping relationship. Technical report, Boston University Computer Science Department (1995)Google Scholar
  12. 12.
    Lindahl, T., Sagonas, K.: Practical type inference based on success typings. In: Proceedings of the 8th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, pp. 167–178. ACM (2006)Google Scholar
  13. 13.
    Tomás, D., Vicedo, J.L.: Minimally supervised question classification on fine-grained taxonomies. Knowledge and Information Systems 36, 303–334 (2013)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Stef M. M. Joosten
    • 1
    • 2
    Email author
  • Sebastiaan J. C. Joosten
    • 3
    • 4
  1. 1.Open Universiteit NederlandHeerlenThe Netherlands
  2. 2.Ordina NVNieuwegeinThe Netherlands
  3. 3.Eindhoven University of TechnologyEindhovenThe Netherlands
  4. 4.Radboud UniversityNijmegenThe Netherlands

Personalised recommendations