Proceedings of the 10th ACM Symposium on Dynamic Languages 2014
DOI: 10.1145/2661088.2661092
|View full text |Cite
|
Sign up to set email alerts
|

Contracts for domain-specific languages in Ruby

Abstract: This paper concerns object-oriented embedded DSLs, which are popular in the Ruby community but have received little attention in the research literature. Ruby DSLs implement language keywords as implicit method calls to self; language structure is enforced by adjusting which object is bound to self in different scopes. While Ruby DSLs are powerful and elegant, they suffer from a lack of specification. In this paper, we introduce contracts for Ruby DSLs, which allow us to attribute blame appropriately when ther… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1
1

Citation Types

0
5
0

Year Published

2016
2016
2021
2021

Publication Types

Select...
3
3

Relationship

4
2

Authors

Journals

citations
Cited by 6 publications
(5 citation statements)
references
References 28 publications
0
5
0
Order By: Relevance
“…Also, Hummingbird currently assumes the self inside a code block is the same as in the enclosing method body. This assumption holds in our experiments, but it can be violated using instance eval and instance exec [33]. In the future, we plan to address this limitation by allowing the programmer to annotate the self type of code blocks.…”
Section: Methodsmentioning
confidence: 99%
See 2 more Smart Citations
“…Also, Hummingbird currently assumes the self inside a code block is the same as in the enclosing method body. This assumption holds in our experiments, but it can be violated using instance eval and instance exec [33]. In the future, we plan to address this limitation by allowing the programmer to annotate the self type of code blocks.…”
Section: Methodsmentioning
confidence: 99%
“…The code on lines 9-19 of Figure 1 accomplishes this. Hummingbird is built on RDL, a Ruby contract system for specifying pre-and postconditions [26,33]. The precondition is specified via a code block-an anonymous function (i.e., a lambda) delimited by do.…”
Section: Rails Associationsmentioning
confidence: 99%
See 1 more Smart Citation
“…One idea for generating training data would be run Ruby programs and document the observed runtime method types. Though Strickland et al [2014] found that such types are often specific to a single run of a program and thus may miss possible types, it is possible this approach would be sufficient for a training dataset and it is worth exploring in the future.…”
Section: Implementing the Deepsim Networkmentioning
confidence: 99%
“…We use the Ruby Intermediate Language [8,13] to parse input Ruby files and translate them to simplified control-flow graphs. We use RDL [26,33], a Ruby contract system, to intercept method calls and to represent and store method type signatures at run time. Hummingbird supports an extensive set of typing features, including union types, intersection types, code blocks (anonymous functions), generics, modules, and type casts, among others.…”
Section: Introductionmentioning
confidence: 99%