Show simple item record

dc.contributor.authorRayside, Derek
dc.contributor.authorBenjamin, Zev
dc.contributor.authorSingh, Rishabh
dc.contributor.authorNear, Joseph Paul
dc.contributor.authorMilicevic, Aleksandar
dc.contributor.authorJackson, Daniel
dc.date.accessioned2010-02-11T13:29:09Z
dc.date.available2010-02-11T13:29:09Z
dc.date.issued2009-05
dc.identifier.urihttp://hdl.handle.net/1721.1/51695
dc.description.abstractIn an object-oriented language such as Java, every class requires implementations of two special methods, one for determining equality and one for computing hash codes. Although the specification of these methods is usually straightforward, they can be hard to code (due to subclassing, delegation, cyclic references, and other factors) and often harbor subtle faults. A technique is presented that simplifies this task. Instead of writing code for the methods, the programmer gives, as a brief annotation, an abstraction function that defines an abstract view of an object's representation, and sometimes an additional observer in the form of an iterator method. Equality and hash codes are then computed in library code that uses reflection to read the annotations. Experiments on a variety of programs suggest that, in comparison to writing the methods by hand, our technique requires less text from the programmer and results in methods that are more often correct.en
dc.description.sponsorshipNational Science Foundationen
dc.language.isoen_US
dc.publisherInstitute of Electrical and Electronics Engineersen
dc.relation.isversionofhttp://dx.doi.org/10.1109/ICSE.2009.5070534en
dc.rightsAttribution-Noncommercial-Share Alike 3.0 Unporteden
dc.rights.urihttp://creativecommons.org/licenses/by-nc-sa/3.0/en
dc.sourceauthor/dept web pageen
dc.titleEquality and Hashing for (almost) Free: Generating Implementations from Abstraction Functionsen
dc.typeArticleen
dc.identifier.citationEquality and hashing for (almost) free: Generating implementations from abstraction functions Rayside, D.; Benjamin, Z.; Singh, R.; Near, J.P.; Milicevic, A.; Jackson, D.; Software Engineering, 2009. ICSE 2009. IEEE 31st International Conference on 16-24 May 2009 Page(s):342 - 352en
dc.contributor.departmentMassachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratoryen_US
dc.contributor.departmentMassachusetts Institute of Technology. Department of Electrical Engineering and Computer Scienceen_US
dc.contributor.approverJackson, Daniel
dc.contributor.mitauthorRayside, Derek
dc.contributor.mitauthorBenjamin, Zev
dc.contributor.mitauthorSingh, Rishabh
dc.contributor.mitauthorNear, Joseph Paul
dc.contributor.mitauthorMilicevic, Aleksandar
dc.contributor.mitauthorJackson, Daniel
dc.relation.journalIEEE 31st International Conference on Software Engineeringen
dc.eprint.versionAuthor's final manuscript
dc.type.urihttp://purl.org/eprint/type/ConferencePaperen
eprint.statushttp://purl.org/eprint/status/PeerRevieweden
eprint.grantNumber0541183en
dspace.orderedauthorsRayside, Derek; Benjamin, Zev; Singh, Rishabh; Near, Joseph P.; Milicevic, Aleksandar; Jackson, Danielen
dc.identifier.orcidhttps://orcid.org/0000-0003-4864-078X
mit.licenseOPEN_ACCESS_POLICYen
mit.metadata.statusComplete


Files in this item

Thumbnail

This item appears in the following Collection(s)

Show simple item record