Optimization of Mercury programs (1998)
| Citations: | 4 - 0 self |
BibTeX
@TECHREPORT{Taylor98optimizationof,
author = {Simon Taylor and Supervisor Dr. Zoltan Somogyi},
title = {Optimization of Mercury programs},
institution = {},
year = {1998}
}
OpenURL
Abstract
The pure logic programming language Mercury is very well suited to the development of sophisticated program transformations due to its clean semantics and strong type, mode and determinism systems. We describe the design and implementation of some of the high-level optimization passes of the Mercury compiler, including deforestation, constraint propagation and type specialization. Mercury's mode system allows programmers to specify when a data structure can have only one reference. We present the implementation of an optimization pass to exploit this information to reuse dead cells or insert calls to place them on a free list. Contents 1 Introduction 1 2 Mercury 1 2.1 Super-homogeneous form : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 2.2 Quantification : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 2.3 Type checking : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 2.4 Mode analysis : : : : : : : : :...







