Static Region Analysis for Mercury

  • Quan Phan
  • Gerda Janssens
Conference paper

DOI: 10.1007/978-3-540-74610-2_22

Part of the Lecture Notes in Computer Science book series (LNCS, volume 4670)
Cite this paper as:
Phan Q., Janssens G. (2007) Static Region Analysis for Mercury. In: Dahl V., Niemelä I. (eds) Logic Programming. ICLP 2007. Lecture Notes in Computer Science, vol 4670. Springer, Berlin, Heidelberg

Abstract

Region-based memory management is a form of compile-time memory management, well-known from the functional programming world. This paper describes a static region analysis for the logic programming language Mercury. We use region points-to graphs to model the partitioning of the memory used by a program into separate regions. The algorithm starts with a region points-to analysis that determines the different regions in the program. We then compute the liveness of the regions by using an extended live variable analysis. Finally, a program transformation adds region annotations to the program for region support. These annotations generate data for a region simulator that generates reports on the memory behaviour of region-annotated programs. Our approach obtains good memory consumption for several benchmark programs; for some of them it achieves optimal memory management.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Quan Phan
    • 1
  • Gerda Janssens
    • 1
  1. 1.Department of Computer Science, K.U. Leuven, Celestijnenlaan, 200A, B-3001 HeverleeBelgium

Personalised recommendations