scholarly journals Applicative bidirectional programming

Author(s):  
KAZUTAKA MATSUDA ◽  
MENG WANG

AbstractA 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 Voigtländer's semantic bidirectionalization, creating a new programming style that is able to obtain benefits from both.

1991 ◽  
Vol 1 (4) ◽  
pp. 459-494 ◽  
Author(s):  
Hanne Riis Nielson ◽  
Flemming Nielson

AbstractTraditional functional languages do not have an explicit distinction between binding times. It arises implicitly, however, as one typically instantiates a higher-order function with the arguments that are known, whereas the unknown arguments remain to be taken as parameters. The distinction between ‘known’ and ‘unknown’ is closely related to the distinction between binding times like ‘compile-time’ and ‘run-time’. This leads to the use of a combination of polymorphic type inference and binding time analysis for obtaining the required information about which arguments are known.Following the current trend in the implementation of functional languages we then transform the run-time level of the program (not the compile-time level) into categorical combinators. At this stage we have a natural distinction between two kinds of program transformations: partial evaluation, which involves the compile-time level of our notation, and algebraic transformations (i.e., the application of algebraic laws), which involves the run-time level of our notation.By reinterpreting the combinators in suitable ways we obtain specifications of abstract interpretations (or data flow analyses). In particular, the use of combinators makes it possible to use a general framework for specifying both forward and backward analyses. The results of these analyses will be used to enable program transformations that are not applicable under all circumstances.Finally, the combinators can also be reinterpreted to specify code generation for various (abstract) machines. To improve the efficiency of the code generated, one may apply abstract interpretations to collect extra information for guiding the code generation. Peephole optimizations may be used to improve the code at the lowest level.


1999 ◽  
Vol 9 (5) ◽  
pp. 527-564 ◽  
Author(s):  
P. RONDOGIANNIS ◽  
W. W. WADGE

In this paper we demonstrate that a broad class of higher-order functional programs can be transformed into semantically equivalent multidimensional intensional programs that contain only nullary variable definitions. The proposed algorithm systematically eliminates user-defined functions from the source program, by appropriately introducing context manipulation (i.e. intensional) operators. The transformation takes place in M steps, where M is the order of the initial functional program. During each step the order of the program is reduced by one, and the final outcome of the algorithm is an M-dimensional intensional program of order zero. As the resulting intensional code can be executed in a purely tagged-dataflow way, the proposed approach offers a promising new technique for the implementation of higher-order functional languages.


2012 ◽  
Vol 22 (3) ◽  
pp. 275-299
Author(s):  
AKIMASA MORIHATA ◽  
KAZUHIKO KAKEHI ◽  
ZHENJIANG HU ◽  
MASATO TAKEICHI

AbstractFunctional languages are suitable for transformational developments of programs. However, accumulative functions, or in particular tail-recursive functions, are known to be less suitable for manipulation. In this paper, we propose a program transformation named “IO swapping” that swaps call-time and return-time computations. It moves computations in accumulative parameters to results and thereby enables interesting transformations. We demonstrate effectiveness of IO swapping by several applications: deforestation, higher order removal, program inversion, and manipulation of circular programs.


1994 ◽  
Vol 13 (471) ◽  
Author(s):  
Peter Ørbæk

Action Semantics is a new and interesting foundation for semantics based compiler generation. In this paper we present several analyses of actions, and apply them in a compiler generator capable of generating efficient, optimizing compilers for procedural and functional languages with higher order recursive functions. The automatically generated compilers produce code that is comparable with code produced by handwritten compilers.


2021 ◽  
pp. 57-64
Author(s):  
Mila Mojsilović

By redefining the notion of fragmentarity and existing theoretical conceptions, from romantic fascination with ruins to the contemporary position of variability, the paper places incompleteness as the essential potentiality of form, imagination and contingency in a way that opens new spacetime categories. In the paper, fragmentation is understood as a model for interpreting reality and for examining the capacity of architectural incompleteness. Setting complexity as the context, change as the method and variability as the model for understanding the architectural contemporaries within its reality, spatial and temporal uncertainty become characteristics of the fragmentation and destabilization of relations - their reflection. This way of structuring order out of chaos, or destabilizing order for the purpose of new structures, is the complexity of a higher order. The uncaptured nature of all things, in distracting the new, transports its own limitations, thematized through places of change, separation and path - specific singularities, allowing flexibility through imperfection. The elusive nature of all things, in opening to the new, transcends its own limitations, thematizing itself through places of change, separation and cracking. These are specific singularities that allow flexibility through incompleteness, thus opening up towards new forms of reality, between uncertainty and indeterminacy - in the zone of their overlap, space and time become fragmented. This true spontaneity is the greatest complexity that carries within itself the power of change and essential potentiality - a meaning that is always just emerging. The question of the degree of incompleteness is in the core of the concept of openness, in which the alteration of form and geometry take place.


Sign in / Sign up

Export Citation Format

Share Document