Preview

Modeling and Analysis of Information Systems

Advanced search

A Recursive Inclusion Checker for Recursively Defined Subtypes

https://doi.org/10.18255/1818-1015-2021-4-414-433

Abstract

We present a tableaux procedure that checks logical relations between recursively defined subtypes of recursively defined types and apply this procedure to the problem of resolving ambiguous names in a programming language. This work is part of a project to design a new programming language suitable for efficient implementation of logic. Logical formulas are tree-like structures with many constructors having different arities and argument types. Algorithms that use these structures must perform case analysis on the constructors, and access subtrees whose type and existence depend on the constructor used. In many programming languages, case analysis is handled by matching, but we want to take a different approach, based on recursively defined subtypes. Instead of matching a tree against different constructors, we will classify it by using a set of disjoint subtypes. Subtypes are more general than structural forms based on constructors, we expect that they can be implemented more efficiently, and in addition can be used in static type checking. This makes it possible to use recursively defined subtypes as preconditions or postconditions of functions. We define the types and the subtypes (which we will call adjectives), define their semantics, and give a tableaux-based inclusion checker for adjectives. We show how to use this inclusion checker for resolving ambiguous field references in declarations of adjectives. The same procedure can be used for resolving ambiguous function calls.

About the Author

Hans De Nivelle
Nazarbayev University
Kazakhstan


References

1. Y. Minsky, A. Madhavapeddy, and J. Hickey, Real World OCaml (functional programming for the masses). O'Reilly, 2013.

2. G. Hutton, Programming in Haskell (second edition). Cambridge University Press, 2016.

3. M. Odersky, L. Spoon, and B. Venners, Programming in Scala Third Edition. Artima Press, 2007-2016.

4. P. Rondon, M. Kawaguchi, and R. Jhala, “Liquid Types,” in Programming Language Design and Implementation (PLDI), 2009, pp. 159-169.

5. R. Jhala and N. Vazou, “Refinement Types: A Tutorial,” Foundations and Trends in Programming Languages, vol. 6, no. 3-4, pp. 159-317, 2021, doi: 10.1561/2500000032.

6. S. Klabnik and C. Nichols, The Rust Programming Language. No Starch Press, 2019.

7. Michael Gelfond and Vladimar Lifschitz, “The Stable Model Semantics for Logic Programming,” in Fifth International Conference and Symposium on Logic Programming, 1988, pp. 1070-1080.

8. G. S. Tseytin, “On the complexity of Derivation in the Propositional Calculus,” in Studies in Constructive Mathematics and Mathematical Logic, Part II, 1970, pp. 115-125.


Review

For citations:


De Nivelle H. A Recursive Inclusion Checker for Recursively Defined Subtypes. Modeling and Analysis of Information Systems. 2021;28(4):414-433. (In Russ.) https://doi.org/10.18255/1818-1015-2021-4-414-433

Views: 492


Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


ISSN 1818-1015 (Print)
ISSN 2313-5417 (Online)