Language constructs for programming context-dependent computation are required in recent software development, where context information influences program behavior, whose description is often scattered around several...
详细信息
ISBN:
(纸本)9781450340335
Language constructs for programming context-dependent computation are required in recent software development, where context information influences program behavior, whose description is often scattered around several modules as conditional expressions. the Context-Oriented programming (COP) community has revealed that context-dependent computations should be modularized into partially defined methods, those partial methods should be adaptable at run-time, and a method dispatching mechanism should take context information into account. Such language constructs enhance modularity of a program. Although contexts are usually reactively changeable, many existing COP approaches do not consider the relation between contexts and reactive information. In this paper, we develop a Scala library for context-dependent computations, based on the idea of contexts as reactive values, which are well studied in the field of functional Reactive programming. We also show that dynamic binding is useful to control how reactive values influence context dependent functions;it provides context caching to prevent unexpected reactions.
the proceedings contain 44 papers. the topics discussed include: tool support for component-based semantics;development environment for literal inter-language use case driven modularization;dynamic software evolution ...
ISBN:
(纸本)9781450340335
the proceedings contain 44 papers. the topics discussed include: tool support for component-based semantics;development environment for literal inter-language use case driven modularization;dynamic software evolution through interpreter adaptation;selective process instrumentation in virtual machine;language oriented modularity: from theory to practice;the modularity of object propositions;reactive object queries: consistent views in object-oriented languages;reactive programming with reactive variables;toward a new constraint imperative programming language for interactive graphics;Emfrp: a functional reactive programming language for small-scale embedded systems;and a library-based approach to context-dependent computation with reactive values: suppressing reactions of context-dependent functions using dynamic binding.
functional languages have been used with great success in the domain of web programming. the use of reactive programming approaches to deal with time-varying data reduces the need for callbacks, and allows web applica...
详细信息
ISBN:
(纸本)9781450340335
functional languages have been used with great success in the domain of web programming. the use of reactive programming approaches to deal with time-varying data reduces the need for callbacks, and allows web applications to be written in a more declarative style. In spite of advances in functional reactive web programming, various issues remain with integrating reactive data into web pages. Portions of presentation-layer code are typically written in the functional language and imperatively added to a container section on a page, fragmenting design and requiring developers to work around the lack of proper and safe integration between the data, client and server tiers of their applications. In this paper, we investigate the use of F# compile-time metaprogramming techniques to enable developing type-safe, reactive client-server applications with seamless server-side persistence using WebSharper, a mature F# web framework. Next to the two-way binding between client-side data models and their corresponding presentation, the reactive data models in our work can also express the details of server-side persistence and synchronization, using a modular approach and a strongly-typed communication channel over web sockets with communicating agents between the two tiers. the work presented also enables using annotated HTML markup templates, translated by an F# type provider to our statically-typed reactive data models. this way, the design artifacts can be externalized into native HTML that designers can easily work with, and markup changes are checked against the F# code base at compile time. We demonstrate the combination of these techniques with a data-aware single-page client-server chat application, expressed entirely in F#. We find that type safety, the uniform F# programming model, and the reactive design around data binding, synchronization, and persistence greatly enhances developer productivity.
Generational garbage collectors are among the most popular garbage collectors used in programming language runtime systems. their performance depends heavily on choosing the appropriate size of the area where new obje...
详细信息
ISBN:
(纸本)9781450342414
Generational garbage collectors are among the most popular garbage collectors used in programming language runtime systems. their performance depends heavily on choosing the appropriate size of the area where new objects are allocated (the nursery). In imperative languages, it is usual to make the nursery as large as possible, within the limits imposed by the heap size. functional languages, however, have quite different memory behaviour. In this paper, we study the effect that the nursery size has on the performance of lazy functional programs, through the interplay between cache locality and the frequency of collections. We demonstrate that, in contrast with imperative programs, having large nurseries is not always the best solution. Based on these results, we propose two novel algorithms for dynamic nursery resizing that aim to achieve a compromise between good cache locality and the frequency of garbage collections. We present an implementation of these algorithms in the state-of-the-art GHC compiler for the functional language Haskell, and evaluate them using an extensive benchmark suite. In the best case, we demonstrate a reduction in total execution times of up to 88.5%, or an 8.7 overall speedup, compared to using the production GHC garbage collector. On average, our technique gives an improvement of 9.3% in overall performance across a standard suite of 63 benchmarks for the production GHC compiler.
Production systems use forward chaining to perform the reasoning, in this case - matching rules with facts. the Rete algorithm is an effective forward chaining realization. Withthe growing popularity of functional pr...
详细信息
ISBN:
(纸本)9783319393841
Production systems use forward chaining to perform the reasoning, in this case - matching rules with facts. the Rete algorithm is an effective forward chaining realization. Withthe growing popularity of functionalprogramming style, questions arise, how well suitable the style is for implementing complex algorithms in the Artificial Intelligence, like Rete. We present selected implementation details of our custom realization of the algorithm in purely functionalprogramming language Haskell. this paper also discusses usability and usefulness of some advanced means of expression, that are common in functional style, for performing the task.
the vertex-centric programming model, known as "think like a vertex", is being used more and more to support various big graph processing methods through iterative super steps that execute in parallel a user...
详细信息
the vertex-centric programming model, known as "think like a vertex", is being used more and more to support various big graph processing methods through iterative super steps that execute in parallel a user-defined vertex program over each vertex of a graph. However, the imperative and message-passing style of existing systems makes defining a vertex program unintuitive. In this paper, we show that one can benefit more from "thinking like a vertex" by "Behaving like a function" rather than "Acting like a procedure" with full use of side effects and explicit control of message passing, state, and termination. We propose a functional approach to vertex-centric graph processing in which the computation at every vertex is abstracted as a higher-order function and present Fregel, a new domain-specific language. Fregel has clear functional semantics, supports declarative description of vertex computation, and can be automatically translated into Pregel, an emerging imperative-style distributed graph processing framework, and thereby achieve promising performance. Experimental results for several typical examples show the promise of this functional approach.
In a service coproduction, the relationship between stakeholders is reciprocal, and the roles of provider and recipient are not necessarily defined. this paper presents an investigation with students in order to under...
详细信息
Gamification, which is the use of game elements in nongame contexts, has been widely applied in order to persuade and engage their users with a specific purpose. since each user has different characteristics, his/her ...
详细信息
this paper presents a demo of an extension developed to support an existing programming abstraction for IoT: mT-Res. mT-Res is an extension of the T-Res programming abstraction, which allows users to write application...
详细信息
this paper presents a demo of an extension developed to support an existing programming abstraction for IoT: mT-Res. mT-Res is an extension of the T-Res programming abstraction, which allows users to write applications using a web framework independent of resources. the paper describes an automated mechanism for allocate resources to such applications and adapt to changes in those resources.
A bidirectional transformation is a pair of mappings between source and view data objects, one in each direction. When the view is modified, the source is updated accordingly with respect to some laws. One way to redu...
详细信息
ISBN:
(纸本)9781450336697
A bidirectional transformation is a pair of mappings between source and view data objects, one in each direction. When the view is modified, the source is updated accordingly with respect to some laws. One way to reduce the development and maintenance effort of bidirectional transformations is to have specialized languages in which the resulting programs are bidirectional by construction-giving rise to the paradigm of bidirectional programming. In this paper, we develop a framework for applicative-style and higher-order bidirectional programming, in which we can write bidirectional transformations as unidirectional programs in standard functional languages, opening up access to the bundle of language features previously only available to conventional unidirectional languages. Our framework essentially bridges two very different approaches of bidirectional programming, namely the lens framework and Voigtlander's semantic bidirectionalization, creating a new programming style that is able to bag benefits from both.
暂无评论