In the process of incorporating subtyping in relation alge- bra, an algorithm was found to derive the subtyping relation from the program to be checked. By using domain analysis rather than type infer- ence, this algorithm offers an attractive visualization of the type deriva- tion 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.
['Stef Joosten', 'Sebastiaan J. C. Joosten']
Type checking by domain analysis in Ampersand