## Removing Value Encoding using Alternative Values in Partial Evaluation of Strongly-Typed Languages (1994)

Venue: | In Nielson [?]. LNCS |

Citations: | 1 - 0 self |

### BibTeX

@INPROCEEDINGS{Bechet94removingvalue,

author = {Denis Bechet},

title = {Removing Value Encoding using Alternative Values in Partial Evaluation of Strongly-Typed Languages},

booktitle = {In Nielson [?]. LNCS},

year = {1994},

pages = {105--8},

publisher = {Springer-Verlag. LNCS}

}

### OpenURL

### Abstract

There is a main difference between a program which is interpreted by an interpreter written in a strongly-typed language and a compiled version. Such an interpreter usually uses a universal domain for the values it manipulates. A value encoding is necessary. A compiled program works directly on values. A layer of interpretation for value representation is inserted. On the other hand, a way to derive automatically a compiler from an interpreter is to use a partial evaluator applied to the interpreter and the interpreted program. This leads to a problem when we want that this technique removes all the layer of interpretation because value encoding must disappear. It is not the case for conventional partial evaluator. This paper proposes to introduce a new domain for partial evaluators called alternative values and a new algorithm of specialization (based on events) which can solve this problem of removing value encoding. We conclude by reporting a successful specialization...

### Citations

639 |
Partial Evaluation and Automatic Program Generation. Available online: http://www.itu.dk/people/sestoft/pebook
- Jones, Gomard, et al.
- 1993
(Show Context)
Citation Context ...ut an interpreter uses a data structure for environments. 3. A compiler works on typed expressions but an interpreter needs to encode the values it manipulates. In the framework of partial evaluation =-=[6, 2]-=-, a typical application consists in specializing an interpreter when the interpreted program is known. This process looks like a compilation of the interpreted program into the language in which the i... |

236 | Tutorial notes on partial evaluation
- Consel, Danvy
- 1993
(Show Context)
Citation Context ...ut an interpreter uses a data structure for environments. 3. A compiler works on typed expressions but an interpreter needs to encode the values it manipulates. In the framework of partial evaluation =-=[6, 2]-=-, a typical application consists in specializing an interpreter when the interpreted program is known. This process looks like a compilation of the interpreted program into the language in which the i... |

173 | Partial evaluation of computation process an approach to a compiler-compiler. Higher Order Symbol
- Futamura
- 1999
(Show Context)
Citation Context ...n consists in specializing an interpreter when the interpreted program is known. This process looks like a compilation of the interpreted program into the language in which the interpreter is written =-=[4, 12]-=-. If we want that this mechanism acts as a compiler, it must solve the above points. This leads to the following operations. 1. Specialization of the eval loop of the interpreter with respect to the i... |

47 |
Projection Factorisation in Partial Evaluation
- Launchbury
- 1990
(Show Context)
Citation Context ...rtially known structures [9] when environments are represented by association lists. Practically no work in the framework of partial evaluation tackles the third problem. The technique of tag removal =-=[7]-=- consists in eliminating constructors when the value associated to an expression is always built with a unique constructor. Mogensen has also introduced the notion of constructor specialization [10] a... |

45 |
Partially static structures in a self-applicable partial evaluator
- Mogensen
- 1987
(Show Context)
Citation Context ...s in two structures, one holding a list of identiers, a second holding their values). More generally, this problem has been solved by the partial evaluators that can handle partially known structures =-=[9]-=- when environments are represented by association lists. Practically no work in the framework of partial evaluation tackles the third problem. The technique of tag removal [7] consists in eliminating ... |

21 |
A Program Manipulation System Based on Partial Evaluation
- Haraldsson
- 1977
(Show Context)
Citation Context ...sibility to incorporate the unknown constant as a sub-value of a value (for instance (?; 1) is a partially static structure representing a pair whose rst component is unknown and its second is 1). In =-=[5]-=-, Haraldsson introduces a notion of alternative of values which associates dioeerent possible constants to an expression. A value is then described by a set of constants (for instance a value may be o... |

17 |
A supercompiler system based on the language Refal
- Turchin
- 1979
(Show Context)
Citation Context ...n consists in specializing an interpreter when the interpreted program is known. This process looks like a compilation of the interpreted program into the language in which the interpreter is written =-=[4, 12]-=-. If we want that this mechanism acts as a compiler, it must solve the above points. This leads to the following operations. 1. Specialization of the eval loop of the interpreter with respect to the i... |

16 |
A strongly-typed self-applicable partial evaluator
- Launchbury
- 1991
(Show Context)
Citation Context ...nto more readable data (a printer). A partial evaluator must introduce specialized representations for those intermediary data. Another reason for trying to solve this problem is due to Launchbury in =-=[8]-=- for the construction of self-applicable partial evaluators for strongly-typed languages. It is known that the self-application of a partial evaluator leads to compiler and compiler generator using th... |

16 | Constructor specialization
- Mogensen
- 1993
(Show Context)
Citation Context ...al [7] consists in eliminating constructors when the value associated to an expression is always built with a unique constructor. Mogensen has also introduced the notion of constructor specialization =-=[10]-=- and [3] has extended his technique. New types are created but their partial evaluators either creat dead code or loop too frequently. This third problem is however very important if we want to have a... |

10 |
Le langage Caml. Intereditions
- Leroy, Weis
- 1993
(Show Context)
Citation Context ...e fact that the rst parameter of f has been xed to a. For instance, f may represent the function ipowerj which takes two integers x and n and returns x n . A ML program (we use the dialect Caml-Light =-=[13]-=-) that computes such a function is: let rec power x n = if n = 0 then 1 else x * (power x (n-1)) ;; One can specialize this algorithm when n is known. For instance the cube of x is obtained for n = 3.... |

5 | K.D.: Polyvariant constructor specialisation
- Dussart, Bevers, et al.
- 1995
(Show Context)
Citation Context ...nsists in eliminating constructors when the value associated to an expression is always built with a unique constructor. Mogensen has also introduced the notion of constructor specialization [10] and =-=[3]-=- has extended his technique. New types are created but their partial evaluators either creat dead code or loop too frequently. This third problem is however very important if we want to have a residua... |

1 |
Les valeurs alternatives et la notion d'#v#nement dans l'#valuation partielle
- Bechet
- 1995
(Show Context)
Citation Context ... example. The function below append concatenates two lists: let rec append x y = match x with e :: l -? e :: append l y --- [] -? y ;; This function may be specialized when x is bound to the list v = =-=[1; 2]-=- and y is unknown. It gives three versions of append corresponding to the three lists [1; 2], [2] and []. In this case, the traditional identication based on equality between the known part of functio... |

1 |
Formal languages. Computer Science Classics
- Salomaa
(Show Context)
Citation Context ...l. To exploit the same mechanism, an equality test between alternative values must be found. But, how can this comparison be made? An equality based on structural equivalence of context-free grammars =-=[11]-=- is complex. Moreover, there is a natural order ! on grammars saying than G 1 ! G 2 if L(G 1 ) ae L(G 2 ). For instance, if a parameter is constructed with Cons A and another one with Cons A or Cons B... |