In this paper, we introduce languages as first-class citizens as a sub-paradigm of language-oriented programming. In this approach, language definitions are in the context of a general purpose programming language wit...
详细信息
ISBN:
(纸本)9781450360296
In this paper, we introduce languages as first-class citizens as a sub-paradigm of language-oriented programming. In this approach, language definitions are in the context of a general purpose programming language withthe same status as any other expression. In particular, language definitions are elevated to be run-time values, that can be assigned to variables, passed to functions, returned by functions, and inserted into lists, to name a few possibilities. this approach offers flexible features in the run-time creation and modification of languages, and may promote new idioms in language-oriented programming. As a proof of concept, we have designed and implemented LANG-N-PLAY, a functional language with languages as first-class citizens. We present the features of LANG-N-PLAY with an example, and show that they naturally enable dynamic programming scenarios.
this paper proposes a concurrency model for JavaScript withthread-like abstractions and cooperative cancellation. JavaScript uses an event-driven model, where an active computation runs until it completes or blocks f...
详细信息
ISBN:
(纸本)9781450391115
this paper proposes a concurrency model for JavaScript withthread-like abstractions and cooperative cancellation. JavaScript uses an event-driven model, where an active computation runs until it completes or blocks for an event while concurrent computations wait for other events as callbacks. Withthe introduction of Promises, the control flow of callbacks can be written in a more direct style. However, the event-based model is still a source of confusion with regard to execution order, race conditions, and termination. the thread model is a familiar concept to programmers and can help reduce concurrency errors in JavaScript programs. this work is a library-based design, which uses an abstraction based on the reader monad to pass a thread ID through a thread's computation. A thread can be cancelled, paused, and resumed with its thread ID. this design allows hierarchical cancellation where a child thread is cancelled if its parent is cancelled. It also defines synchronization primitives to protect shared states. A formal semantics is included to give a precise definition of the proposed model.
An interactive graphical environment for supporting the development and use of Haskell applications programs is described. the environment, named Vital, is particularly intended for supporting the open-ended, incremen...
详细信息
An interactive graphical environment for supporting the development and use of Haskell applications programs is described. the environment, named Vital, is particularly intended for supporting the open-ended, incremental development style often preferred by non-specialist users in which successive steps of program development are motivated and informed by results so far obtained. Significant features of Vital include: the graphical display of data structures in a format defined by a datatype-indexed stylesheet, the way that evaluation of (possibly infinite) values is demand-driven by the action of the user scrolling around an unbounded workspace, and support for copy-and-paste graphical editing of data structures. this latter allows, for example, the user to modify a complex data structure by point-and-click operations, or to create (by functional evaluation) a regular data structure and then edit values or expressions into it: the effect of each editing operation is immediately reflected in the Haskell program source code.
To improve the quality of type error messages in functionalprogramming languages, we propose four techniques which influence the behaviour of constraint-based type inference processes. these techniques take the form ...
详细信息
ISBN:
(纸本)9781581137569
To improve the quality of type error messages in functionalprogramming languages, we propose four techniques which influence the behaviour of constraint-based type inference processes. these techniques take the form of externally supplied type inference directives, precluding the need to make any changes to the compiler. A second advantage is that the directives are automatically checked for soundness with respect to the underlying type system. We show how the techniques can be used to improve the type error messages reported for a combinator library. More specifically, how they can help to generate error messages which are conceptually closer to the domain for which the library was developed. the techniques have all been incorporated in the Helium compiler, which implements a large subset of Haskell.
the proceedings contain 9 papers. the topics discussed include: the behavior of gradual types: a user study;a trustworthy mechanized formalization of R;Log++ logging for a cloud-native world;HorseIR: bringing array pr...
ISBN:
(纸本)9781450360302
the proceedings contain 9 papers. the topics discussed include: the behavior of gradual types: a user study;a trustworthy mechanized formalization of R;Log++ logging for a cloud-native world;HorseIR: bringing array programming languages together with database query processing;JavaScript AOT compilation;query-based object-oriented programming: a declarative web of objects;self-contained development environments;and numerical computing on the web: benchmarking for the future.
Combining type theory, language design, and empirical work, we present techniques for computing with large and dynamically changing datasets. Based on lambda calculus, our techniques are suitable for expressing a dive...
详细信息
ISBN:
(纸本)9781450328739
Combining type theory, language design, and empirical work, we present techniques for computing with large and dynamically changing datasets. Based on lambda calculus, our techniques are suitable for expressing a diverse set of algorithms on large datasets and, via self-adjusting computation, enable computations to respond automatically to changes in their data. To improve the scalability of self-adjusting computation, we present a type system for precise dependency tracking that minimizes the time and space for storing dependency metadata. the type system eliminates an important assumption of prior work that can lead to recording spurious dependencies. We present a type-directed translation algorithm that generates correct self-adjusting programs without relying on this assumption. We then show a probabilistic-chunking technique to further decrease space usage by controlling the fundamental space-time tradeoff in self-adjusting computation. We implement and evaluate these techniques, showing promising results on challenging benchmarks involving large graphs.
this work presents the concept of MorphLang, a functional reactive programming language tailored for shape-changeable computers, which are built using wirelessly interconnected chiplets. MorphLang simplifies the progr...
详细信息
ISBN:
(纸本)9798400703843
this work presents the concept of MorphLang, a functional reactive programming language tailored for shape-changeable computers, which are built using wirelessly interconnected chiplets. MorphLang simplifies the programming process for these systems by concentrating on the basic behaviors of individual nodes and their asynchronous communication. the language allows for compilation into binary or Arduino formats, and programs can be transmitted to each node either wirelessly or through physical connections.
We present a dependently typed assembly language (DTAL) in which the type system supports the use of a restricted form of dependent types, reaping some benefits of dependent types at the assembly level. DTAL improves ...
详细信息
ISBN:
(纸本)9781581134155
We present a dependently typed assembly language (DTAL) in which the type system supports the use of a restricted form of dependent types, reaping some benefits of dependent types at the assembly level. DTAL improves upon TAL, enabling certain important compiler optimizations such as run-time array bound check elimination and tag check elimination. Also, DTAL formally addresses the issue of representing sum types at assembly level, making it suitable for handling not only datatypes in ML but also dependent datatypes in Dependent ML (DML).
A major problem for writing extensible software arises when recursively defined datatypes and operations on these types have to be extended simultaneously without modifying existing code. this paper introduces Extensi...
详细信息
ISBN:
(纸本)9781581134155
A major problem for writing extensible software arises when recursively defined datatypes and operations on these types have to be extended simultaneously without modifying existing code. this paper introduces Extensible Algebraic Datatypes with Defaults which promote a simple programming pattern to solve this well known problem. We show that it is possible to encode extensible algebraic datatypes in an object-oriented language, using a new design pattern for extensible visitors. Extensible algebraic datatypes have been successfully applied in the implementation of an extensible Java compiler. Our technique allows for the reuse of existing components in compiler extensions without the need for any adaptations.
functional Reactive programming (FRP) provides a method for programming continuous, reactive systems by utilizing signal functions that, abstractly, transform continuous input signals into continuous output signals. T...
详细信息
ISBN:
(纸本)9781450328739
functional Reactive programming (FRP) provides a method for programming continuous, reactive systems by utilizing signal functions that, abstractly, transform continuous input signals into continuous output signals. these signals may also be streams of events, and indeed, by allowing signal functions themselves to be the values carried by these events (in essence, signals of signal functions), one can conveniently make discrete changes in program behavior by "switching" into and out of these signal functions. this higher-order notion of switching is common among many FRP systems, in particular those based on arrows, such as Yampa. Although convenient, the power of switching is often an overkill and can pose problems for certain types of program optimization (such as causal commutative arrows [14]), as it causes the structure of the program to change dynamically at run-time. Without a notion of just-in-time compilation or related idea, which itself is beset with problems, such optimizations are not possible at compile time. this paper introduces two new ideas that obviate, in a predominance of cases, the need for switching. the first is a noninterference law for arrows with choice that allows an arrowized FRP program to dynamically alter its own structure (within statically limited bounds) as well as abandon unused streams. the other idea is a notion of a settable signal function that allows a signal function to capture its present state and later be restarted from some previous state. Withthese two features, canonical uses of higher-order switchers can be replaced with a suitable first-order design, thus enabling a broader range of static optimizations.
暂无评论