Hygienic Source-Code Generation Using Functors

01/04/2018
by   Karl Crary, et al.
0

Existing source-code-generating tools such as Lex and Yacc suffer from practical inconveniences because they use disembodied code to implement actions. To prevent this problem, such tools could generate closed functors that are then instantiated by the programmer with appropriate action code. This results in all code being type checked in its appropriate context, and it assists the type checker in localizing errors correctly. We have implemented a lexer generator and parser generator based on this technique for Standard ML, OCaml, and Haskell.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/01/2017

Detecting Disguised Plagiarism

Source code plagiarism detection is a problem that has been addressed se...
research
06/06/2020

Replacements and Replaceables: Making the Case for Code Variants

There are often multiple ways to implement the same requirement in sourc...
research
08/13/2022

BenchPress: A Deep Active Benchmark Generator

We develop BenchPress, the first ML benchmark generator for compilers th...
research
09/26/2022

Towards Data-driven GIM tools: Two Prototypes

Here we describe two approaches to improve group information management ...
research
05/24/2022

A Proof-Generating C Code Generator for ACL2 Based on a Shallow Embedding of C in ACL2

This paper describes a C code generator for ACL2 that recognizes ACL2 re...
research
05/06/2020

TAG : Type Auxiliary Guiding for Code Comment Generation

Existing leading code comment generation approaches with the structure-t...
research
08/11/2023

A Uniform Representation of Classical and Quantum Source Code for Static Code Analysis

The emergence of quantum computing raises the question of how to identif...

Please sign up or login with your details

Forgot password? Click here to reset