Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
The Business Rules Group: Business rules manifesto – the principles of rule independence (2003). http://www.BusinessRulesGroup.org
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)
Maddux, R.: Relation Algebras. Studies in Logic and the Foundations of Mathematics, vol. 150. Elsevier Science (2006)
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)
Milner, R.: A theory of type polymorphism in programming. Journal of Computer and System Sciences 17, 348–375 (1978)
Marlow, S., Wadler, P.: A practical subtyping system for erlang. SIGPLAN Not. 32, 136–149 (1997)
Liskov, B.H., Wing, J.M.: A behavioral notion of subtyping. ACM Transactions on Programming Languages and Systems (TOPLAS) 16, 1811–1841 (1994)
Mitchell, J.C.: Type inference with simple subtypes. Journal of Functional Programming 1, 245–285 (1991)
Amadio, R.M., Cardelli, L.: Subtyping recursive types. ACM Transactions on Programming Languages and Systems (TOPLAS) 15, 575–631 (1993)
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)
Wells, J.B.: The undecidability of mitchell’s subtyping relationship. Technical report, Boston University Computer Science Department (1995)
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)
Tomás, D., Vicedo, J.L.: Minimally supervised question classification on fine-grained taxonomies. Knowledge and Information Systems 36, 303–334 (2013)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Joosten, S.M.M., Joosten, S.J.C. (2015). Type Checking by Domain Analysis in Ampersand. In: Kahl, W., Winter, M., Oliveira, J. (eds) Relational and Algebraic Methods in Computer Science. RAMICS 2015. Lecture Notes in Computer Science(), vol 9348. Springer, Cham. https://doi.org/10.1007/978-3-319-24704-5_14
Download citation
DOI: https://doi.org/10.1007/978-3-319-24704-5_14
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-24703-8
Online ISBN: 978-3-319-24704-5
eBook Packages: Computer ScienceComputer Science (R0)