scholarly journals Generalized evidence passing for effect handlers: efficient compilation of effect handlers to C

2021 ◽  
Vol 5 (ICFP) ◽  
pp. 1-30
Author(s):  
Ningning Xie ◽  
Daan Leijen

This paper studies compilation techniques for algebraic effect handlers. In particular, we present a sequence of refinements of algebraic effects, going via multi-prompt delimited control, _generalized evidence passing_, yield bubbling, and finally a monadic translation into plain lambda calculus which can be compiled efficiently to many target platforms. Along the way we explore various interesting points in the design space. We provide two implementations of our techniques, one as a library in Haskell, and one as a C backend for the Koka programming language. We show that our techniques are effective, by comparing against three other best-in-class implementations of effect handlers: multi-core OCaml, the _Ev.Eff_ Haskell library, and the libhandler C library. We hope this work can serve as a basis for future designs and implementations of algebraic effects.

2003 ◽  
Vol 10 (25) ◽  
Author(s):  
Dariusz Biernacki ◽  
Olivier Danvy

Starting from a continuation-based interpreter for a simple logic programming language, propositional Prolog with cut, we derive the corresponding logic engine in the form of an abstract machine. The derivation originates in previous work (our article at PPDP 2003) where it was applied to the lambda-calculus. The key transformation here is Reynolds's defunctionalization that transforms a tail-recursive, continuation-passing interpreter into a transition system, i.e., an abstract machine. Similar denotational and operational semantics were studied by de Bruin and de Vink in previous work (their article at TAPSOFT 1989), and we compare their study with our derivation. Additionally, we present a direct-style interpreter of propositional Prolog expressed with control operators for delimited continuations.<br /><br />Superseded by BRICS-RS-04-5.


2017 ◽  
Vol 32 (2) ◽  
pp. 84-111
Author(s):  
H Nooshin ◽  
R Kamyab ◽  
OA Samavati

The term ‘scallop form’ is used to refer to a structural form, such as a dome, that has ‘arched’ sectors. Thus, in addition to the general ‘curviance’ of the dome, the sectors are separately arched. The term ‘curviance’ means ‘the way a form is curved’. Also, the term ‘scallop’ refers to the marine creature scallop whose shell has arched ribs. Scallop forms constitute a wide range of spatial structural forms that can provide efficient structural solutions. The form processing programming language ‘Formian’ includes capabilities that allow the geometry of various types of scallop domes to be generated conveniently (visit Formexia.com ). Also, the new version of the language, namely, Formian-K has extended the scalloping facilities of the language to include scallop barrel vaults. The objective of this article is to explore the range of possible scallop forms and to explain how these forms may be generated using the ‘scalloping functions’ of the Formian language. This article contains many practical examples, in terms of which the generation of forms is discussed. This article is meant to be a practical manual for generation of scallop forms. However, to understand all the details of the operations, it is expected that the article is studied together with the necessary background material.


Cybernetics ◽  
1984 ◽  
Vol 19 (3) ◽  
pp. 325-333
Author(s):  
V. N. Domrachev ◽  
Yu. V. Kapitonova ◽  
L. G. Samoilenko

2000 ◽  
Vol 10 (3) ◽  
pp. 321-359 ◽  
Author(s):  
ANDREW M. PITTS

Studies of the mathematical properties of impredicative polymorphic types have for the most part focused on the polymorphic lambda calculus of Girard–Reynolds, which is a calculus of total polymorphic functions. This paper considers polymorphic types from a functional programming perspective, where the partialness arising from the presence of fixpoint recursion complicates the nature of potentially infinite (‘lazy’) data types. An approach to Reynolds' notion of relational parametricity is developed that works directly on the syntax of a programming language, using a novel closure operator to relate operational behaviour to parametricity properties of types. Working with an extension of Plotkin's PCF with ∀-types, lazy lists and existential types, we show by example how the resulting logical relation can be used to prove properties of polymorphic types up to operational equivalence.


2019 ◽  
Vol 3 (2) ◽  
pp. 249-255
Author(s):  
Wilda Aluf

The development of technology information and communication has a positive impact in the way of accessible information as we need. Companies should apply this information system in their activities to win the competition. One of the parts to which the system information is considered applicable is in the system of remuneration. Though the implementation of remuneration information system, it is expected to enable to handle the remuneration transaction in the way that it can run well and be done in minimal errors. This research aims at developing a remuneration information system that includes data processing of the employee’s salary and the report. The tools that are used to perform the analysis and the design is Data Flow Diagram (DFD) while the programming language used to design the system is PHP and MySQL. The result of this research is a computerized remuneration information system that can be used to conclude that the proposed system can effectively meet what the management of a company wants.


2004 ◽  
Vol 11 (5) ◽  
Author(s):  
Dariusz Biernacki ◽  
Olivier Danvy

Starting from a continuation-based interpreter for a simple logic programming language, propositional Prolog with cut, we derive the corresponding logic engine in the form of an abstract machine. The derivation originates in previous work (our article at PPDP 2003) where it was applied to the lambda-calculus. The key transformation here is Reynolds's defunctionalization that transforms a tail-recursive, continuation-passing interpreter into a transition system, i.e., an abstract machine. Similar denotational and operational semantics were studied by de Bruin and de Vink (their article at TAPSOFT 1989), and we compare their study with our derivation. Additionally, we present a direct-style interpreter of propositional Prolog expressed with control operators for delimited continuations.


2021 ◽  
Vol 9 ◽  
Author(s):  
Andrea Rau

Data collected in very large quantities are called big data, and big data has changed the way we think about and answer questions in many different fields, like weather forecasting and biology. With all this information available, we need computers to help us store, process, analyze, and understand it. Data science combines tools from fields like statistics, mathematics, and computer science to find interesting patterns in big data. Data scientists write step-by-step instructions called algorithms to teach computers how to learn from data. To help computers understand these instructions, algorithms must be translated from the original question asked by a data scientist into a programming language—and the results must be translated back, so that humans can understand them. That means that data scientists are data detectives, programmers, and translators all in one!


2002 ◽  
Vol 12 (02) ◽  
pp. 229-246 ◽  
Author(s):  
JÖRG FISCHER ◽  
SERGEI GORLATCH

Dijkstra's famous thesis "goto considered harmful", which paved the way for structured programming, was formally substantiated by the result of Böhm and Jacopini on the Turing universality of the three well-known basic programming constructs. We argue for a similar ideal in parallel programming — "send-receive considered harmful" — i.e. abandoning explicit send-receive statements between processors and expressing programs using a restricted set of parallel constructs. We deal with recursive patterns of parallelism, represented formally as morphisms in a suitable calculus. The aim of this paper is to study the expressive power of two morphisms – catamorphisms and anamorphisms. For a restricted program calculus based on these morphisms, we constructively prove two formal results, whose pragmatic message is: (1) A programming language based on catamorphisms is computationally equivalent to the class of primitive recursive functions; (2) A programming language based on both catamorphisms and anamorphisms is equivalent to the class of partial recursive functions and is therefore Turing-universal. We present a case study on numerical integration, demonstrating the expressive power of ana- and catamorphisms for parallel programming.


2011 ◽  
Vol 5 (S8) ◽  
Author(s):  
Robert Puskeiler ◽  
Jan Kreuzmann ◽  
Caroline Schuster ◽  
Katharina Didzus ◽  
Nicole Bartsch ◽  
...  

Sign in / Sign up

Export Citation Format

Share Document