Repository logo

Infoscience

  • English
  • French
Log In
Logo EPFL, École polytechnique fédérale de Lausanne

Infoscience

  • English
  • French
Log In
  1. Home
  2. Academic and Research Output
  3. Conferences, Workshops, Symposiums, and Seminars
  4. Type Checking with Rewriting Rules
 
conference paper

Type Checking with Rewriting Rules

Racordon, Dimi  
Laemmel, Ralf
•
Pereira, Juliana Alves
Show more
October 17, 2024
SLE 2024 - Proceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering, Co-located with: SPLASH 2024
17 ACM SIGPLAN International Conference on Software Language Engineering

Type classes support the implementation of highly reusable algorithms and data structures without loss of efficiency. Initially developed in Haskell, they have become central to the design of several modern programming languages, including Swift, Rust, Hylo, and Carbon. A key part of their success is the ability to express sophisticated abstractions using constraints on the types associated with their operations. However, this expressiveness invites thorny theoretical and engineering questions. In particular, the support of recursive constraints—i.e., constraints specifying that an associated type of an abstraction must be a model of that abstraction—leaves type equivalence undecidable. This paper studies a semi-decidable technique to tackle this problem that was first developed in Swift’s compiler. The core idea is to encode constraints into a term rewriting system and use normalization to answer type checking queries. We describe this approach formally through the lens of FG, a calculus originally designed to capture generic programming best practices; and discuss an implementation in the context of Hylo, a language inspired by Swift and Rust.

  • Details
  • Metrics
Type
conference paper
DOI
10.1145/3687997.3695640
Scopus ID

2-s2.0-85210834250

Author(s)
Racordon, Dimi  

École Polytechnique Fédérale de Lausanne

Editors
Laemmel, Ralf
•
Pereira, Juliana Alves
•
Mosses, Peter D.
•
Mosses, Peter D.
Date Issued

2024-10-17

Publisher

Association for Computing Machinery, Inc

Published in
SLE 2024 - Proceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering, Co-located with: SPLASH 2024
ISBN of the book

9798400711800

Start page

171

End page

183

Subjects

rewriting system

•

type checking

•

type class

Editorial or Peer reviewed

REVIEWED

Written at

EPFL

EPFL units
LAMP1  
Event nameEvent acronymEvent placeEvent date
17 ACM SIGPLAN International Conference on Software Language Engineering

Pasadena, United States

2024-10-20 - 2024-10-21

FunderFunding(s)Grant NumberGrant URL

Swiss National Science Foundation

TMAG-2_209506/1

Available on Infoscience
January 26, 2025
Use this identifier to reference this record
https://infoscience.epfl.ch/handle/20.500.14299/244766
Logo EPFL, École polytechnique fédérale de Lausanne
  • Contact
  • infoscience@epfl.ch

  • Follow us on Facebook
  • Follow us on Instagram
  • Follow us on LinkedIn
  • Follow us on X
  • Follow us on Youtube
AccessibilityLegal noticePrivacy policyCookie settingsEnd User AgreementGet helpFeedback

Infoscience is a service managed and provided by the Library and IT Services of EPFL. © EPFL, tous droits réservés