Type Checking by Domain Analysis in Ampersand
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.
KeywordsType System Type Error Domain Analysis Relation Algebra Error Message
Unable to display preview. Download preview PDF.
- 1.The Business Rules Group: Business rules manifesto – the principles of rule independence (2003). http://www.BusinessRulesGroup.org
- 3.Maddux, R.: Relation Algebras. Studies in Logic and the Foundations of Mathematics, vol. 150. Elsevier Science (2006)Google Scholar
- 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.Wells, J.B.: The undecidability of mitchell’s subtyping relationship. Technical report, Boston University Computer Science Department (1995)Google Scholar
- 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