{"title":"A parsing machine for PEGs","authors":"S. Medeiros, R. Ierusalimschy","doi":"10.1145/1408681.1408683","DOIUrl":"https://doi.org/10.1145/1408681.1408683","url":null,"abstract":"Parsing Expression Grammar (PEG) is a recognition-based foundation for describing syntax that renewed interest in top-down parsing approaches. Generally, the implementation of PEGs is based on a recursive-descent parser, or uses a memoization algorithm.\u0000 We present a new approach for implementing PEGs, based on a virtual parsing machine, which is more suitable for pattern matching. Each PEG has a corresponding program that is executed by the parsing machine, and new programs are dynamically created and composed. The virtual machine is embedded in a scripting language and used by a patternmatching tool.\u0000 We give an operational semantics of PEGs used for pattern matching, then describe our parsing machine and its semantics. We show how to transform PEGs to parsing machine programs, and give a correctness proof of our transformation.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"22 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-07-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"114643682","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pascal Costanza, Charlotte Herzeel, Jorge Vallejos, T. D'Hondt
{"title":"Filtered dispatch","authors":"Pascal Costanza, Charlotte Herzeel, Jorge Vallejos, T. D'Hondt","doi":"10.1145/1408681.1408685","DOIUrl":"https://doi.org/10.1145/1408681.1408685","url":null,"abstract":"Predicate dispatching is a generalized form of dynamic dispatch, which has strong limitations when arbitrary predicates of the underlying base language are used. Unlike classes, which enforce subset relationships between their sets of instances, arbitrary predicates generally do not designate subsets of each other, so methods whose applicability is based on predicates cannot be ordered according to their specificity in the general case. This paper introduces a decidable but expressive alternative mechanism called filtered dispatch that adds a simple preprocessing step before the actual method dispatch is performed and thus enables the use of arbitrary predicates for selecting and applying methods.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"25 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-07-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"126463881","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Gradual typing with unification-based inference","authors":"Jeremy G. Siek, Manish Vachharajani","doi":"10.1145/1408681.1408688","DOIUrl":"https://doi.org/10.1145/1408681.1408688","url":null,"abstract":"Static and dynamic type systems have well-known strengths and weaknesses. Gradual typing provides the benefits of both in a single language by giving the programmer control over which portions of the program are statically checked based on the presence or absence of type annotations. This paper studies the combination of gradual typing and unification-based type inference with the goal of developing a system that helps programmers increase the amount of static checking in their program. The key question in combining gradual typing and type inference is how should the dynamic type of a gradual system interact with the type variables of a type inference system. This paper explores the design space and shows why three straightforward approaches fail to meet our design goals. This paper presents a new type system based on the idea that a solution for a type variable should be as informative as any type that constrains the variable. The paper also develops an efficient inference algorithm and proves it sound and complete with respect to the type system.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"252 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-07-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"124165363","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Dynamic AspectJ","authors":"Ali Assaf, Jacques Noyé","doi":"10.1145/1408681.1408689","DOIUrl":"https://doi.org/10.1145/1408681.1408689","url":null,"abstract":"This paper considers the difficulties linked to the static scheduling strategy of AspectJ and shows how to overcome them by turning to a more dynamic strategy, making it possible to order, cancel, and deploy aspects at runtime. We show that this more dynamic strategy can be obtained by a minor update of the semantics of AspectJ introducing the notion of current aspect group, that is, the aspects scheduled for the current join point. We show how to reflect this change at the language level and present a prototype of the resulting AspectJ variant, Dynamic AspectJ. This prototype reuses AspectJ to perform a first step of static weaving, which we complement by a second step of dynamic weaving, implemented through a thin interpretation layer. This can be seen as an interesting example of reconciling interpreters and compilers, the dynamic and the static world.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"27 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-07-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115890032","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"The Lively Kernel: just for fun, let's take JavaScript seriously","authors":"D. Ingalls","doi":"10.1145/1408681.1408690","DOIUrl":"https://doi.org/10.1145/1408681.1408690","url":null,"abstract":"The Sun Labs Lively Kernel is a new approach to Web programming. It provides a complete platform for Web applications, including dynamic graphics, network access, and development tools, and requires nothing more than available web browsers. We call the system \"lively\" for three reasons. It comes live off a web page. There is no installation. The entire system is written in JavaScript, and it becomes active as soon as the page is loaded by a browser. It can change itself and create new content. The Lively Kernel includes a basic graphics editor that allows it to alter and create new graphical content, and also a simple IDE that allows it to alter and create new applications. It comes with a basic library of graphical and computational components, and these, as well as the kernel, can be altered and extended on the fly. It can save new artifacts, even clone itself, onto new web pages. The kernel includes WebDAV support for browsing and extending remote file systems, and thus has the ability to save its objects and \"worlds\" (applications) as new active Web pages. The Lively Kernel uses only existing Web standards. The implementation and user language is JavaScript, known by millions and supported in every browser. The graphics APIs are built upon SVG (Scalable Vector Graphics), also available in major browsers. The network protocols used are asynchronous HTTP and WebDAV. The speaker will demonstrate the Lively Kernel and discuss various aspects of JavaScript as a programming language.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"13 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-07-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129894608","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Tradeoffs in retrofitting security: an experience report","authors":"Mark S. Miller","doi":"10.1145/1297081.1297082","DOIUrl":"https://doi.org/10.1145/1297081.1297082","url":null,"abstract":"In 1973, John Reynold's and James Morris' Gedanken language retrofit object-capability security into an Algol-like base. Today, there are active projects retrofitting Java, Javascript, Python, Mozart/Oz, OCaml, Perl, and Pict. These represent a variety of approaches, with different tradeoffs regarding legacy compatibility, safety, and expressivity. In this talk I propose a taxonomy of these approaches, and discuss some of the lessons learned to date.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"226 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"117114011","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
S. Mostinckx, T. V. Cutsem, Stijn Timbermont, É. Tanter
{"title":"Mirages: behavioral intercession in a mirror-based architecture","authors":"S. Mostinckx, T. V. Cutsem, Stijn Timbermont, É. Tanter","doi":"10.1145/1297081.1297095","DOIUrl":"https://doi.org/10.1145/1297081.1297095","url":null,"abstract":"Mirror-based systems are object-oriented reflective architectures built around a set of design principles that lead to reflective APIs which foster a high degree of reusability, loose coupling with base-level objects and whose structure and design corresponds to the system being mirrored. However, support for behavioral intercession has been limited in contemporary mirror-based architectures, in spite of its many interesting applications. This is due to the fact that mirror-based architectures only support explicit reflection, while behavioral intercession requires implicit reflection. This work reconciles mirrors with behavioral intercession. We discuss the design of a mirror-based architecture with implicit mirrors that can be absorbed in the interpreter, and mirages, base objects whose semantics are defined by implicit mirrors. We describe and illustrate the integration of this reflective architecture for the distributed object-oriented programming language AmbientTalk.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"20 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127861081","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"OMeta: an object-oriented language for pattern matching","authors":"Alessandro Warth, Ian Piumarta","doi":"10.1145/1297081.1297086","DOIUrl":"https://doi.org/10.1145/1297081.1297086","url":null,"abstract":"This paper introduces OMeta, a new object-oriented language for pattern matching. OMeta is based on a variant of Parsing Expression Grammars (PEGs) [5]---a recognition-based foundation for describing syntax---which we have extended to handle arbitrary kinds of data. We show that OMeta's general-purpose pattern matching provides a natural and convenient way for programmers to implement tokenizers, parsers, visitors, and tree transformers, all of which can be extended in interesting ways using familiar object-oriented mechanisms. This makes OMeta particularly well-suited as a medium for experimenting with new designs for programming languages and extensions to existing languages.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"6 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"124419894","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Highly dynamic behaviour adaptability through prototypes with subjective multimethods","authors":"Sebastián González, K. Mens, P. Heymans","doi":"10.1145/1297081.1297094","DOIUrl":"https://doi.org/10.1145/1297081.1297094","url":null,"abstract":"With the advent of ambient intelligence and advances in mobile hardware technology, the next generation of software systems will require the ability to gracefully and dynamically adapt to changes in their surrounding environment. Contemporary languages provide no dedicated support to this end, thus requiring software developers to achieve this run-time adaptability through the use of specific design patterns and architectural solutions. As a consequence, all possible variability points of mobile systems need to be anticipated up front. Instead, we aim at solving the problem at the language level. We propose a new programming language called Ambience that provides dedicated language mechanisms to manage changing contexts and deal with run-time adaptation of mobile applications to those contexts. The language abstractions we propose are based on a prototype-based programming model that features multimethods and subjective object behaviour. We illustrate and motivate our approach by means of two running examples that were implemented in our language.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"216 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"114981905","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Dynamic ownership in a dynamic language","authors":"Donald Gordon, J. Noble","doi":"10.1145/1297081.1297090","DOIUrl":"https://doi.org/10.1145/1297081.1297090","url":null,"abstract":"Object aliasing causes as many problems in dynamic languages as it does in static languages. Most existing work on aliasing, such as ownership types, relies on static checking based on annotations and type declarations. We introduce ConstraintedJava, a scripting language based on BeanShell that provides dynamic ownership checking. Dynamic ownership provides the encapsulation benefits of static ownership types but preserves the flexibility of dynamic languages.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"37 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127569962","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}