• Home
  • Search
  • Reasonably programmable literal notation
  • Cite Icon7
  • https://doi.org/10.1145/3236801Copy DOI Icon

Reasonably programmable literal notation

Show More
  • Abstract
  • Highlights & Summary
  • PDF
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

General-purpose programming languages typically define literal notation for only a small number of common data structures, like lists. This is unsatisfying because there are many other data structures for which literal notation might be useful, e.g. finite maps, regular expressions, HTML elements, SQL queries, syntax trees for various languages and chemical structures. There may also be different implementations of each of these data structures behind a common interface that could all benefit from common literal notation. This paper introduces typed literal macros (TLMs) , which allow library providers to define new literal notation of nearly arbitrary design at any specified type or parameterized family of types. Compared to existing approaches, TLMs are uniquely reasonable . TLM clients can reason abstractly, i.e. without examining grammars or generated expansions, about types and binding. The system only needs to convey to clients, via secondary notation, the inferred segmentation of each literal body, which gives the locations and types of spliced subterms. TLM providers can reason modularly about syntactic ambiguity and expansion correctness according to clear criteria. This paper incorporates TLMs into Reason, an emerging alternative front-end for OCaml, and demonstrates, through several non-trivial case studies, how TLMs integrate with the advanced features of OCaml, including pattern matching and the module system. We also discuss optional integration with MetaOCaml, which allows TLM providers to be more confident about type correctness. Finally, we establish these abstract reasoning principles formally with a detailed type-theoretic account of expression and pattern TLMs for “core ML”.

Loading PDF

Similar Papers
  • Research Article
  • Citations4

Regular Expression Matching and Operational Semantics

  • Aug 13, 2011
  • Electronic Proceedings in Theoretical Computer Science
  • Asiri Rathnayake +1
  • Conference Article
  • Citations9

An improved algorithm for the regular expression constrained multiple sequence alignment problem

  • Oct 01, 2006
  • Abdullah N Arslan +1
  • Research Article
  • Citations39

Efficient Extensional Binary Tries

  • Jan 12, 2023
  • Journal of Automated Reasoning
  • Andrew W Appel +1
  • Book Chapter
  • Citations2

Fast Packet Pattern-Matching Algorithms

  • Jan 01, 2010
  • Fang Yu +3
  • Research Article
  • Citations90

Exploring the Frontier of Electronic Health Record Surveillance

  • Jun 01, 2013
  • Medical Care
  • Fern Fitzhenry +10
  • Conference Article

Code Generation for Abstract Data Types Based on Program Analysis

  • Aug 01, 2015
  • Li Bin +2
  • Book Chapter
  • Citations6

Dynamic Complexity of Planar 3-Connected Graph Isomorphism

  • Jan 01, 2014
  • Jenish C Mehta
  • Book Chapter
  • Citations1

Integration of Data on Substance Properties Using Big Data Technologies and Domain-Specific Ontologies

  • Jan 01, 2018
  • Adilbek Erkimbaev +3
  • Conference Article
  • Citations34

Structured and Unstructured Big Data Analytics

  • Sep 01, 2017
  • Suyash Mishra +1
  • PDF
  • Research Article
  • Citations8

FlaME: Flash Molecular Editor - a 2D structure input tool for the web

  • Feb 01, 2011
  • Journal of Cheminformatics
  • Pavel Dallakian +1
  • Conference Article
  • Citations29

RESeED: Regular Expression Search over Encrypted Data in the Cloud

  • Jun 01, 2014
  • Mohsen Amini Salehi +6
  • Research Article
  • Citations1

MWP: Multi-Window Parallel Evaluation of Regular Path Queries on Streaming Graphs

  • Mar 12, 2024
  • Proceedings of the ACM on Management of Data
  • Siyuan Zhang +4
  • Research Article
  • Citations1

МЕТОДИЧНІ АСПЕКТИ НАВЧАННЯ СТУДЕНТІВ СТВОРЕННЮ ЦИФРОВИХ ЧАСТОТНИХ СЛОВНИКІВ

  • Sep 21, 2019
  • Information Technologies and Learning Tools
  • Olga V Riezina
  • Book Chapter
  • Citations2

Tree Buffers

  • Jan 01, 2015
  • Radu Grigore +1
  • Book Chapter
  • Citations45

Safely Composable Type-Specific Languages

  • Jan 01, 2014
  • Cyrus Omar +5
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.