Reproduce “A Relational Solver for Constraint-based Type Inference” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Eridan Domoratskiy, Dmitry Boulytchev
A relational solver built using OCanren provides static type inference for λaMa, an untyped educational language, by extracting and solving type constraints. The system successfully infers types for complex features like polymorphism and recursion across the majority of the λaMa compiler test suite, demonstrating the applicability of relational programming to practical type system analysis.
Key insights
- Relational programming with miniKanren can be effectively applied to complex type inference problems, provided specific optimizations and extensions are implemented.
- Custom primitives and search space pruning techniques are crucial for improving the performance and scalability of miniKanren-based solvers for real-world scenarios.
- A constraint-based relational solver can function as a pragmatic static analysis tool for untyped languages, identifying potential inconsistencies without requiring a full type system.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.