Stable, flexible, peephole pretty-printing

Stoney Jackson, Premkumar Devanbu, Kwan-Liu Ma

Research output: Contribution to journalArticle

4 Citations (Scopus)

Abstract

Programmers working on large software systems are faced with an extremely complex, information-rich environment. To help navigate through this, modern development environments allow flexible, multi-window browsing and exploration of the source code. Our focus in this paper is on pretty-printing algorithms that can display source code in useful, appealing ways in a variety of styles. Our algorithm is flexible, stable, and peephole-efficient. It is flexible in that it is capable of screen-optimized layouts that support source code visualization techniques such as fisheye views. The algorithm is peephole-efficient, in that it performs work proportional to the size of the visible window and not the size of the entire file. Finally, the algorithm is stable, in that the rendered view is identical to that which would be produced by formatting the entire file. This work has 2 benefits. First, it enables rendering of source codes in multiple fonts and font sizes at interactive speeds. Second, it also allows the use of powerful (but algorithmically more complex) visualization techniques (such as fish-eye views), again, at interactive speeds. We have built a pretty-printing plug-in for Eclipse that allows the use of sophisticated formatting techniques, including such features as multiple fonts and fish-eye views. Our incremental algorithm enables this plug-in to produce readable layouts (without ugly line-wrapping) within a wide range of window sizes, at interactive speeds.

Original languageEnglish (US)
Pages (from-to)40-51
Number of pages12
JournalScience of Computer Programming
Volume72
Issue number1-2
DOIs
StatePublished - Jun 1 2008

Fingerprint

Printing
Visualization

Keywords

  • Development environment
  • Experimental software
  • Pretty printer
  • Software visualiation

ASJC Scopus subject areas

  • Software

Cite this

Stable, flexible, peephole pretty-printing. / Jackson, Stoney; Devanbu, Premkumar; Ma, Kwan-Liu.

In: Science of Computer Programming, Vol. 72, No. 1-2, 01.06.2008, p. 40-51.

Research output: Contribution to journalArticle

Jackson, Stoney ; Devanbu, Premkumar ; Ma, Kwan-Liu. / Stable, flexible, peephole pretty-printing. In: Science of Computer Programming. 2008 ; Vol. 72, No. 1-2. pp. 40-51.
@article{e491c10e38d7417d841d3e69e8a5d8e4,
title = "Stable, flexible, peephole pretty-printing",
abstract = "Programmers working on large software systems are faced with an extremely complex, information-rich environment. To help navigate through this, modern development environments allow flexible, multi-window browsing and exploration of the source code. Our focus in this paper is on pretty-printing algorithms that can display source code in useful, appealing ways in a variety of styles. Our algorithm is flexible, stable, and peephole-efficient. It is flexible in that it is capable of screen-optimized layouts that support source code visualization techniques such as fisheye views. The algorithm is peephole-efficient, in that it performs work proportional to the size of the visible window and not the size of the entire file. Finally, the algorithm is stable, in that the rendered view is identical to that which would be produced by formatting the entire file. This work has 2 benefits. First, it enables rendering of source codes in multiple fonts and font sizes at interactive speeds. Second, it also allows the use of powerful (but algorithmically more complex) visualization techniques (such as fish-eye views), again, at interactive speeds. We have built a pretty-printing plug-in for Eclipse that allows the use of sophisticated formatting techniques, including such features as multiple fonts and fish-eye views. Our incremental algorithm enables this plug-in to produce readable layouts (without ugly line-wrapping) within a wide range of window sizes, at interactive speeds.",
keywords = "Development environment, Experimental software, Pretty printer, Software visualiation",
author = "Stoney Jackson and Premkumar Devanbu and Kwan-Liu Ma",
year = "2008",
month = "6",
day = "1",
doi = "10.1016/j.scico.2007.11.002",
language = "English (US)",
volume = "72",
pages = "40--51",
journal = "Science of Computer Programming",
issn = "0167-6423",
publisher = "Elsevier",
number = "1-2",

}

TY - JOUR

T1 - Stable, flexible, peephole pretty-printing

AU - Jackson, Stoney

AU - Devanbu, Premkumar

AU - Ma, Kwan-Liu

PY - 2008/6/1

Y1 - 2008/6/1

N2 - Programmers working on large software systems are faced with an extremely complex, information-rich environment. To help navigate through this, modern development environments allow flexible, multi-window browsing and exploration of the source code. Our focus in this paper is on pretty-printing algorithms that can display source code in useful, appealing ways in a variety of styles. Our algorithm is flexible, stable, and peephole-efficient. It is flexible in that it is capable of screen-optimized layouts that support source code visualization techniques such as fisheye views. The algorithm is peephole-efficient, in that it performs work proportional to the size of the visible window and not the size of the entire file. Finally, the algorithm is stable, in that the rendered view is identical to that which would be produced by formatting the entire file. This work has 2 benefits. First, it enables rendering of source codes in multiple fonts and font sizes at interactive speeds. Second, it also allows the use of powerful (but algorithmically more complex) visualization techniques (such as fish-eye views), again, at interactive speeds. We have built a pretty-printing plug-in for Eclipse that allows the use of sophisticated formatting techniques, including such features as multiple fonts and fish-eye views. Our incremental algorithm enables this plug-in to produce readable layouts (without ugly line-wrapping) within a wide range of window sizes, at interactive speeds.

AB - Programmers working on large software systems are faced with an extremely complex, information-rich environment. To help navigate through this, modern development environments allow flexible, multi-window browsing and exploration of the source code. Our focus in this paper is on pretty-printing algorithms that can display source code in useful, appealing ways in a variety of styles. Our algorithm is flexible, stable, and peephole-efficient. It is flexible in that it is capable of screen-optimized layouts that support source code visualization techniques such as fisheye views. The algorithm is peephole-efficient, in that it performs work proportional to the size of the visible window and not the size of the entire file. Finally, the algorithm is stable, in that the rendered view is identical to that which would be produced by formatting the entire file. This work has 2 benefits. First, it enables rendering of source codes in multiple fonts and font sizes at interactive speeds. Second, it also allows the use of powerful (but algorithmically more complex) visualization techniques (such as fish-eye views), again, at interactive speeds. We have built a pretty-printing plug-in for Eclipse that allows the use of sophisticated formatting techniques, including such features as multiple fonts and fish-eye views. Our incremental algorithm enables this plug-in to produce readable layouts (without ugly line-wrapping) within a wide range of window sizes, at interactive speeds.

KW - Development environment

KW - Experimental software

KW - Pretty printer

KW - Software visualiation

UR - http://www.scopus.com/inward/record.url?scp=45849104585&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=45849104585&partnerID=8YFLogxK

U2 - 10.1016/j.scico.2007.11.002

DO - 10.1016/j.scico.2007.11.002

M3 - Article

AN - SCOPUS:45849104585

VL - 72

SP - 40

EP - 51

JO - Science of Computer Programming

JF - Science of Computer Programming

SN - 0167-6423

IS - 1-2

ER -