Bruno Sofiato, F. Siqueira, Ricardo Luis de Azevedo da Rocha
{"title":"Towards an order-aware object comparison","authors":"Bruno Sofiato, F. Siqueira, Ricardo Luis de Azevedo da Rocha","doi":"10.1145/3427081.3427090","DOIUrl":null,"url":null,"abstract":"As several studies show, code that compares objects is a known source of bugs in object-oriented languages. One of the causes is that multiple methods handle comparison. Another cause is more insidious and has its roots in how these languages control method invocation. Both the literature and the industry have proposals to deal with the problem. They either enforce hard constraints or do not handle all situations. Moreover, none of them deal with the ordering aspect of comparison. We propose a declarative approach to object comparison that handles ordering, and is language agnostic. We created a prototype in Java and evaluated its impacts on the software quality of applications in the DaCapo benchmark suite. The benefits were measured based on the ISO/IEC 25010 product quality model. Results suggest that the overall quality of the software improved, despite the deterioration of performance.","PeriodicalId":350427,"journal":{"name":"Proceedings of the 24th Brazilian Symposium on Context-Oriented Programming and Advanced Modularity","volume":"84 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-10-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 24th Brazilian Symposium on Context-Oriented Programming and Advanced Modularity","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3427081.3427090","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
As several studies show, code that compares objects is a known source of bugs in object-oriented languages. One of the causes is that multiple methods handle comparison. Another cause is more insidious and has its roots in how these languages control method invocation. Both the literature and the industry have proposals to deal with the problem. They either enforce hard constraints or do not handle all situations. Moreover, none of them deal with the ordering aspect of comparison. We propose a declarative approach to object comparison that handles ordering, and is language agnostic. We created a prototype in Java and evaluated its impacts on the software quality of applications in the DaCapo benchmark suite. The benefits were measured based on the ISO/IEC 25010 product quality model. Results suggest that the overall quality of the software improved, despite the deterioration of performance.