Code Sandwiches

dc.contributor.authorElder, Matten_US
dc.contributor.authorJackson, Steveen_US
dc.contributor.authorLiblit, Benen_US
dc.date.accessioned2012-03-15T17:23:53Z
dc.date.available2012-03-15T17:23:53Z
dc.date.created2008en_US
dc.date.issued2008en_US
dc.description.abstractA code sandwich consists of before, after, and body code. Typically, the before code makes some change, the body code works in the context of the change, and the after code undoes the change. A code sandwich must guarantee that its after code will execute if its before code has executed, even if exceptions arise. This pattern is common to many programming situations, and most modern languages have some language-level support for expressing it. We survey support for code sandwiches in several programming languages and proposed language extensions. We explain why such support can improve a program, consider related features, and discuss desirable properties that a language can provide its programmers. We relate these properties to Jyro, our code sandwich extension to Java. We examine two large, mature open-source programs, find numerous sandwich-related bugs and readability issues, and demonstrate how they might be avoided using our Jyro implementation.en_US
dc.format.mimetypeapplication/pdfen_US
dc.identifier.citationTR1647en_US
dc.identifier.urihttp://digital.library.wisc.edu/1793/60658
dc.publisherUniversity of Wisconsin-Madison Department of Computer Sciencesen_US
dc.titleCode Sandwichesen_US
dc.typeTechnical Reporten_US

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
TR1647.pdf
Size:
270.14 KB
Format:
Adobe Portable Document Format