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. Reports, Documentation, and Standards
  4. Translation Correctness for First-Order Object-Oriented Pattern Matching
 
report

Translation Correctness for First-Order Object-Oriented Pattern Matching

Emir, Burak  
•
Ma, Qin
•
Odersky, Martin  
2007

Pattern matching makes ML programs more concise and readable, and these qualities are also sought in object-oriented settings. However, objects and classes come with open class hierarchies, extensibility requirements and the need for data abstraction, which all conflict with matching on concrete data types. Extractor-based pattern matching has been proposed to address this conflict. Extractors are user-defined methods that perform the task of value discrimination and deconstruction during pattern matching. In this paper, we give the first formalization of extractor-based matching, using a first-order object-oriented calculus. We give a direct operational semantics and prove it sound. We then present an optimizing translation to a target language without matching, and prove a correctness result stating that an expression is equivalent to its translation.

  • Files
  • Details
  • Metrics
Type
report
Author(s)
Emir, Burak  
Ma, Qin
Odersky, Martin  
Date Issued

2007

Subjects

Pattern Matching

•

Data Abstraction

•

Object-Oriented Programming

•

Functional Programming

•

Programming Languages and Constructs

•

Operational Semantics

Written at

EPFL

EPFL units
LAMP1  
Available on Infoscience
June 14, 2007
Use this identifier to reference this record
https://infoscience.epfl.ch/handle/20.500.14299/8743
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