Results 1 - 10
of
15
Bidirectional Transformations: A Cross-Discipline Perspective GRACE meeting notes, state of the art, and outlook
"... was held in December 2008 near Tokyo, Japan. The meeting brought together researchers and practitioners from a variety of subdisciplines of computer science to share research efforts and help create a new community. In this report, we survey the state of the art and summarize the technical presentat ..."
Abstract
-
Cited by 72 (23 self)
- Add to MetaCart
(Show Context)
was held in December 2008 near Tokyo, Japan. The meeting brought together researchers and practitioners from a variety of subdisciplines of computer science to share research efforts and help create a new community. In this report, we survey the state of the art and summarize the technical presentations delivered at the meeting. We also describe some insights gathered from our discussions and introduce a new effort to establish a benchmark for bidirectional transformations. 1
Languages as libraries
, 2011
"... Programming language design benefits from constructs for extending the syntax and semantics of a host language. While C’s stringbased macros empower programmers to introduce notational shorthands, the parser-level macros of Lisp encourage experimentation with domain-specific languages. The Scheme pr ..."
Abstract
-
Cited by 41 (5 self)
- Add to MetaCart
Programming language design benefits from constructs for extending the syntax and semantics of a host language. While C’s stringbased macros empower programmers to introduce notational shorthands, the parser-level macros of Lisp encourage experimentation with domain-specific languages. The Scheme programming language improves on Lisp with macros that respect lexical scope. The design of Racket—a descendant of Scheme—goes even further with the introduction of a full-fledged interface to the static semantics of the language. A Racket extension programmer can thus add constructs that are indistinguishable from “native ” notation, large and complex embedded domain-specific languages, and even optimizing transformations for the compiler backend. This power to experiment with language design has been used to create a series of sub-languages for programming with first-class classes and modules, numerous languages for implementing the Racket system, and the creation of a complete and fully integrated typed sister language to Racket’s untyped base language. This paper explains Racket’s language extension API via an implementation of a small typed sister language. The new language provides a rich type system that accommodates the idioms of untyped Racket. Furthermore, modules in this typed language can safely exchange values with untyped modules. Last but not least, the implementation includes a type-based optimizer that achieves promising speedups. Although these extensions are complex, their Racket implementation is just a library, like any other library, requiring no changes to the Racket implementation.
Debugging Hygienic Macros
, 2009
"... Over the past two decades, Scheme macros have evolved into a powerful API for the compiler front-end. Like Lisp macros, their predecessors, Scheme macros expand source programs into a small core language; unlike Lisp systems, Scheme macro expanders preserve lexical scoping, and advanced Scheme macro ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
Over the past two decades, Scheme macros have evolved into a powerful API for the compiler front-end. Like Lisp macros, their predecessors, Scheme macros expand source programs into a small core language; unlike Lisp systems, Scheme macro expanders preserve lexical scoping, and advanced Scheme macro systems handle other important properties such as source location. Using such macros, Scheme programmers now routinely develop the ultimate abstraction: embedded domain-specific programming languages. Unfortunately, a typical Scheme programming environment provides little support for macro development. This lack makes it difficult for programmers to debug their macros and for novices to study the behavior of macros. In response, we have developed a stepping debugger specialized to the concerns of macro expansion. This debugger presents the macro expansion process as a linear rewriting sequence of annotated terms; it graphically illustrates the binding structure of the program as expansion reveals it; and it adapts to the programmer’s level of abstraction, hiding details of syntactic forms that the programmer considers built-in.
Measuring the effectiveness of error messages designed for novice programmers
- In Proceedings of the 42nd ACM Technical Symposium on Computer Science Education. SIGCSE ’11. ACM
"... Good error messages are critical for novice programmers. Many projects attempt to rewrite expert-level error messages in terms suitable for novices. DrScheme's language levels provide a powerful alternative through which error messages are customized to pedagogically-inspired language subsets. ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
Good error messages are critical for novice programmers. Many projects attempt to rewrite expert-level error messages in terms suitable for novices. DrScheme's language levels provide a powerful alternative through which error messages are customized to pedagogically-inspired language subsets. Despite this, many novices still struggle to work effectively with DrScheme's error messages. To better understand why, we have begun using human-factors research methods to explore the effectiveness of DrScheme's error messages. Unlike existing work in this area, we study messages at a fine-grained level by analyzing the edits students make in response to various classes of errors. Our results point to several shortcomings in DrScheme's current treatment of errors; many of these should apply to other languages. This paper describes our methodology, presents initial findings, and recommends new approaches to presenting errors to novices.
BStreams that compose using macros that oblige
- in Proc. Workshop Partial Eval. Progr. Manipul. (PEPM), 2012
"... Since the end of frequency scaling, the programming languages community has started to embrace multi-core and even distributed systems. One paradigm that lends itself well to distribution is stream processing. In stream processing, an application consists of a directed graph of streams and operators ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
(Show Context)
Since the end of frequency scaling, the programming languages community has started to embrace multi-core and even distributed systems. One paradigm that lends itself well to distribution is stream processing. In stream processing, an application consists of a directed graph of streams and operators, where streams are infinite sequences of data items, and operators fire in infinite loops to process data. This model directly exposes parallelism, requires no shared memory, and is a good match for several emerging application domains. Unfortunately, streaming languages have so far been lacking in abstraction. This paper introduces higher-order composite operators, which encapsulate stream subgraphs, and contracts, which specify pre- and post-conditions for composites. Composites are expanded at compile time, in a manner similar to macros. Their contractual obligations are also checked at compile-time. We build on existing work on macros and contracts to implement higherorder composites. The user-visible language features provide a consistent look-and-feel for the streaming language, whereas the underlying implementation provides high-quality static error messages and prevents accidental name capture.
Growing a Language in Pattern Calculus
"... Pattern calculus treats all computation as pattern matching, which is, in turn, central to the implementation of programming languages. Hence, its realisation in the general-purpose language bondi provides a natural host in which to develop domain-specific languages (DSLs). bondi is a strongly typed ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Pattern calculus treats all computation as pattern matching, which is, in turn, central to the implementation of programming languages. Hence, its realisation in the general-purpose language bondi provides a natural host in which to develop domain-specific languages (DSLs). bondi is a strongly typed language that supports mixing of all the programming styles required for language implementation, including imperative programming (for handling input streams), functional programming (for transforming abstract syntax trees), generic queries (for performing traversals) and object-orientation (for growing DSLs). The approach is illustrated by growing a small combinatory language in which each language feature, i.e. each production of each grammar, is isolated within a single object-oriented class that captures the rules for parsing, type inference, evaluation and printing. Further, growth is used to support lambda-abstraction and pattern matching, providing good evidence that this combinatory language could grow to support all of bondi. 1
Taming macros
, 2004
"... Scheme includes a simple yet powerful macro mechanism. Using macros, programmers can easily extend the language with new kinds of expressions and definitions, thus abstracting over recurring syntactic patterns. As with every other powerful language mechanism, programmers can also easily misuse mac ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Scheme includes a simple yet powerful macro mechanism. Using macros, programmers can easily extend the language with new kinds of expressions and definitions, thus abstracting over recurring syntactic patterns. As with every other powerful language mechanism, programmers can also easily misuse macros and, to this day, broken macro definitions or macro uses pose complex debugging problems to programmers at all levels of experience. In this paper, we present a type system for taming Scheme-like macros. Specifically, we formulate a small model that captures the essential properties of Scheme-style macros. For this model, we formulate a novel type system to eliminate some of these problems, prove its soundness, and validate its pragmatic usefulness.
Honu: A Syntactically Extensible Language
"... Honu is a new language that fuses traditional algebraic notation (e.g., infix binary operators) with Scheme-style language extensibility. A key element of Honu’s design is an enforestation parsing step, which converts a flat stream of tokens into an S-expressionlike tree, in addition to the initial ..."
Abstract
- Add to MetaCart
(Show Context)
Honu is a new language that fuses traditional algebraic notation (e.g., infix binary operators) with Scheme-style language extensibility. A key element of Honu’s design is an enforestation parsing step, which converts a flat stream of tokens into an S-expressionlike tree, in addition to the initial “read ” phase of parsing and interleaved with the “macro-expand ” phase. We present the design of Honu, explain its parsing and macro-extension algorithm, and show example syntactic extensions. 1.
PLT @ Northeastern University
"... Abstract. Pattern matching is a widely used technique in functional languages, especially those in the ML and Haskell traditions, where it is at the core of the semantics. In languages in the Lisp tradition, in contrast, pattern matching it typically provided by libraries built with macros. We prese ..."
Abstract
- Add to MetaCart
(Show Context)
Abstract. Pattern matching is a widely used technique in functional languages, especially those in the ML and Haskell traditions, where it is at the core of the semantics. In languages in the Lisp tradition, in contrast, pattern matching it typically provided by libraries built with macros. We present match, a sophisticated pattern matcher for Racket, implemented as language extension. using macros. The system supports novel and widely-useful pattern-matching forms, and is itself extensible. The extensibility of match is implemented via a general technique for creating extensible language extensions. 1 Extending Pattern Matching The following Racket 1 [12] program finds the magnitude of a complex number, represented in either Cartesian or polar form as a 3-element list, using the first element as a type tag: (define (magnitude n) (cond [(eq? (first n) ’cart) (sqrt (+ (sqr (second n)) (sqr (third n))))]