Context. Features and styles inspired by functional programming have grown in popularity in the world of object-orientedprogramming. Immutability is a core concept of functional programming, which brings advantages t...
详细信息
the proceedings contain 7 papers. the topics discussed include: towards object-centric time-traveling debuggers;using moose platform for the implementation of a software product line according to model-based delta-ori...
the proceedings contain 7 papers. the topics discussed include: towards object-centric time-traveling debuggers;using moose platform for the implementation of a software product line according to model-based delta-orientedprogramming;transformation-based refactorings: a first analysis;design principles for a high-performance Smalltalk;how fast is AI in Pharo? benchmarking linear regression;and can we automatically generate class comments in Pharo?.
Context. Features and styles inspired by functional programming have grown in popularity in the world of object-orientedprogramming. Immutability is a core concept of functional programming, which brings advantages t...
详细信息
ISBN:
(纸本)9798400700408
Context. Features and styles inspired by functional programming have grown in popularity in the world of object-orientedprogramming. Immutability is a core concept of functional programming, which brings advantages to software development. However, introducing immutability in object-orientedprogramming presents some challenges. Problem. One of these challenges is method overriding. When inheriting non-destructive mutators (methods used on immutable objects which return a new object instead of modifying the receiver), a naive approach generates code duplication and has scalability issues. Contribution. We analyse an example of this overriding problem and propose a solution in a new design pattern based on the factory method pattern. We also discuss the advantages and limitations of this pattern, as well as implementations in Clojure, Java, and Kotlin. We also identify and discuss the language features that mostly affect the implementation of this pattern. Conclusion. Our proposed design pattern helps mitigate some of the code duplication and scalability problems of a naive approach. However, the inclusion of a functional updating language feature is required to completely remove the scalability issues.
the proceedings contain 27 papers. the topics discussed include: state-sensitive points-to analysis for the dynamic behavior of JavaScript objects;self-inferencing reflection resolution for java;constructing call grap...
ISBN:
(纸本)9783662442012
the proceedings contain 27 papers. the topics discussed include: state-sensitive points-to analysis for the dynamic behavior of JavaScript objects;self-inferencing reflection resolution for java;constructing call graphs of scala programs;finding reference-counting errors in python/C programs with affine analysis;safely composable type-specific languages;graceful dialects;structuring documentation to support state search: a laboratory experiment about protocol programming;reusable concurrent data types;infrastructure-free logging and replay of concurrent execution on multiple cores;sound and complete subtyping between co-inductive types for object-oriented languages;spores: a type-based foundation for closures in the age of concurrency and distribution;rely-guarantee protocols;and stream processing with a spreadsheet.
Structural subtyping is an important notion for effective static type analysis;it can be defined either axiomatically by a collection of subtyping rules, or by means of set inclusion between type interpretations, foll...
详细信息
ISBN:
(纸本)9783662442029;9783662442012
Structural subtyping is an important notion for effective static type analysis;it can be defined either axiomatically by a collection of subtyping rules, or by means of set inclusion between type interpretations, following the more intuitive approach of semantic subtyping, which allows simpler proofs of the expected properties of the subtyping relation. In object-orientedprogramming, recursive types are typically interpreted inductively;however, cyclic objects can be represented more precisely by coinductive types. We study semantic subtyping between coinductive types with records and unions, which are particularly interesting for object-orientedprogramming, and develop and implement a sound and complete top-down direct and effective algorithm for deciding it. To our knowledge, this is the first proposal for a sound and complete top-down direct algorithm for semantic subtyping between coinductive types.
programming languages are enormously diverse, both in their essential concepts and in their accidental aspects. this creates a problem when teaching programming. To let students experience the diversity of essential c...
详细信息
ISBN:
(纸本)9783662442029;9783662442012
programming languages are enormously diverse, both in their essential concepts and in their accidental aspects. this creates a problem when teaching programming. To let students experience the diversity of essential concepts, the students must also be exposed to an overwhelming variety of accidental and irrelevant detail: the accidental differences between the languages are likely to obscure the teaching point. the dialect system of the Grace programming language allows instructors to tailor and vary the language to suit their courses, while staying within the same stylistic, syntactic and semantic framework, as well as permitting authors to define advanced internal domain-specific languages. the dialect system achieves this power though a combination of well-known language features: lexical nesting, lambda expressions, multi-part method names, optional typing, and plug-gable checkers. Grace's approach to dialects is validated by a series of case studies, including both extensions and restrictions of the base language.
Constraints provide a useful technique for ensuring that desired properties hold in an application. As a result, they have been used in a wide range of applications, including graphical layout, simulation, scheduling,...
详细信息
ISBN:
(纸本)9783662442029;9783662442012
Constraints provide a useful technique for ensuring that desired properties hold in an application. As a result, they have been used in a wide range of applications, including graphical layout, simulation, scheduling, and problem-solving. We describe the design and implementation of an object Constraint programming language, an object-oriented language that cleanly integrates constraints withthe underlying language in a way that respects encapsulation and standard object-orientedprogramming techniques, and that runs in browser-based applications. Prior work on object Constraint programming languages has relied on modifying the underlying Virtual Machine, but that is not an option for web-based applications, which have become increasingly prominent. In this paper, we present an approach to implementing object Constraint programming without Virtual Machine support, along with an implementation as a JavaScript extension. We demonstrate the resulting language, Babelsberg/JS, on a number of applications and provide performance measurements. Programs without constraints in Babelsberg/JS run at the same speed as pure JavaScript versions, while programs that do have constraints can still be run efficiently. Our design and implementation also incorporate incremental re-solving to support interaction, as well as a cooperating solvers architecture that allows multiple solvers to work together to solve more difficult problems.
the goal of this paper is to design an easy type-safe metapro- gramming API for Scala to capture generative metapro- gramming tasks that depend on existing definitions to gen- erate others, by writing meta-code as clo...
详细信息
ISBN:
(纸本)9781450328685
the goal of this paper is to design an easy type-safe metapro- gramming API for Scala to capture generative metapro- gramming tasks that depend on existing definitions to gen- erate others, by writing meta-code as close as possible to regular Scala code. MorphScala, is a simple domain specific language based on the for-comprehension syntax, that introduces the class morphing metaprogramming technique to the Scala program- ming language. Class morphing is a avor of compile time reection (CTR) over fields or methods of classes and inter- faces. the enabling technologies for MorphScala are Scala macros and quasiquotes that provide a powerful API for compile- time transformations.
the proceedings contain 9 papers. the topics discussed include: ScalaDyno: making name resolution and type checking fault-tolerant;accelerating parser combinators with macros;MorphScala: safe class morphing with macro...
ISBN:
(纸本)9781450328685
the proceedings contain 9 papers. the topics discussed include: ScalaDyno: making name resolution and type checking fault-tolerant;accelerating parser combinators with macros;MorphScala: safe class morphing with macros;typecasting actors: from akka to TAkka;type-directed language extension for effectual computations;SciFe: scala framework for efficient enumeration of data structures w/invariants;containers and aggregates, mutators and isolates for reactive programming;real-time collaborative scala development with clide;and towards virtual traits in scala.
Program transformations in terms of abstract syntax trees compromise referential integrity by introducing variable capture. Variable capture occurs when in the generated program a variable declaration accidentally sha...
详细信息
ISBN:
(纸本)9783662442029;9783662442012
Program transformations in terms of abstract syntax trees compromise referential integrity by introducing variable capture. Variable capture occurs when in the generated program a variable declaration accidentally shadows the intended target of a variable reference. Existing transformation systems either do not guarantee the avoidance of variable capture or impair the implementation of transformations. We present an algorithm called name-fix that automatically eliminates variable capture from a generated program by systematically renaming variables. name-fix is guided by a graph representation of the binding structure of a program, and requires name-resolution algorithms for the source language and the target language of a transformation. name-fix is generic and works for arbitrary transformations in any transformation system that supports origin tracking for names. We verify the correctness of name-fix and identify an interesting class of transformations for which name-fix provides hygiene. We demonstrate the applicability of name-fix for implementing capture-avoiding substitution, inlining, lambda lifting, and compilers for two domain-specific languages.
暂无评论