Peiye Yang , Li Zhang , Qin Li , Xiang Gao , Yilong Yang
{"title":"OCLVerifer:自动验证需求模型中的 OCL 合约","authors":"Peiye Yang , Li Zhang , Qin Li , Xiang Gao , Yilong Yang","doi":"10.1016/j.scico.2024.103197","DOIUrl":null,"url":null,"abstract":"<div><p>Object Constraint Language (OCL) is one lightweight formal specification. Integrated within the Unified Modeling Language (UML) standard, it serves as a cornerstone in requirements modeling, enjoying widespread adoption across various domains. OCL can precisely define the pre- and post-condition of system operations and system invariants. While OCL provides a simple yet expressive syntax, it lacks clarity in mapping Object-Oriented (OO) concepts, such as object states, object links, and object attributes. This ambiguity makes it challenging for OO developers to identify errors in requirements. In this paper, we propose an approach named OCLVerifier, which can automatically detect the requirements errors of OCL, such as conflict, redundancy, and failure error. OCLVerifier first transforms OO contracts and detection patterns into SMT formulas and then proves them by using a SMT solver. Finally, the results are mapped to the original OCL contracts to display detailed error type and location information. To evaluate OCLVerifier, we conducted a comprehensive evaluation of four case studies. Experimental results indicate that OCLVerifier successfully identifies 65.5% of error cases, with each identified case offering accurate error location information. Compared with human experts, OCLVerifier can reduce evaluation time by 80.8% while enhancing repair accuracy by 18%. The results are satisfactory, and the proposed approach can be further extended to the software industry for requirements verification.</p></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"240 ","pages":"Article 103197"},"PeriodicalIF":1.5000,"publicationDate":"2024-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"OCLVerifer: Automated verification of OCL contracts in requirements models\",\"authors\":\"Peiye Yang , Li Zhang , Qin Li , Xiang Gao , Yilong Yang\",\"doi\":\"10.1016/j.scico.2024.103197\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>Object Constraint Language (OCL) is one lightweight formal specification. Integrated within the Unified Modeling Language (UML) standard, it serves as a cornerstone in requirements modeling, enjoying widespread adoption across various domains. OCL can precisely define the pre- and post-condition of system operations and system invariants. While OCL provides a simple yet expressive syntax, it lacks clarity in mapping Object-Oriented (OO) concepts, such as object states, object links, and object attributes. This ambiguity makes it challenging for OO developers to identify errors in requirements. In this paper, we propose an approach named OCLVerifier, which can automatically detect the requirements errors of OCL, such as conflict, redundancy, and failure error. OCLVerifier first transforms OO contracts and detection patterns into SMT formulas and then proves them by using a SMT solver. Finally, the results are mapped to the original OCL contracts to display detailed error type and location information. To evaluate OCLVerifier, we conducted a comprehensive evaluation of four case studies. Experimental results indicate that OCLVerifier successfully identifies 65.5% of error cases, with each identified case offering accurate error location information. Compared with human experts, OCLVerifier can reduce evaluation time by 80.8% while enhancing repair accuracy by 18%. The results are satisfactory, and the proposed approach can be further extended to the software industry for requirements verification.</p></div>\",\"PeriodicalId\":49561,\"journal\":{\"name\":\"Science of Computer Programming\",\"volume\":\"240 \",\"pages\":\"Article 103197\"},\"PeriodicalIF\":1.5000,\"publicationDate\":\"2024-08-30\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Science of Computer Programming\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0167642324001205\",\"RegionNum\":4,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Science of Computer Programming","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0167642324001205","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
OCLVerifer: Automated verification of OCL contracts in requirements models
Object Constraint Language (OCL) is one lightweight formal specification. Integrated within the Unified Modeling Language (UML) standard, it serves as a cornerstone in requirements modeling, enjoying widespread adoption across various domains. OCL can precisely define the pre- and post-condition of system operations and system invariants. While OCL provides a simple yet expressive syntax, it lacks clarity in mapping Object-Oriented (OO) concepts, such as object states, object links, and object attributes. This ambiguity makes it challenging for OO developers to identify errors in requirements. In this paper, we propose an approach named OCLVerifier, which can automatically detect the requirements errors of OCL, such as conflict, redundancy, and failure error. OCLVerifier first transforms OO contracts and detection patterns into SMT formulas and then proves them by using a SMT solver. Finally, the results are mapped to the original OCL contracts to display detailed error type and location information. To evaluate OCLVerifier, we conducted a comprehensive evaluation of four case studies. Experimental results indicate that OCLVerifier successfully identifies 65.5% of error cases, with each identified case offering accurate error location information. Compared with human experts, OCLVerifier can reduce evaluation time by 80.8% while enhancing repair accuracy by 18%. The results are satisfactory, and the proposed approach can be further extended to the software industry for requirements verification.
期刊介绍:
Science of Computer Programming is dedicated to the distribution of research results in the areas of software systems development, use and maintenance, including the software aspects of hardware design.
The journal has a wide scope ranging from the many facets of methodological foundations to the details of technical issues andthe aspects of industrial practice.
The subjects of interest to SCP cover the entire spectrum of methods for the entire life cycle of software systems, including
• Requirements, specification, design, validation, verification, coding, testing, maintenance, metrics and renovation of software;
• Design, implementation and evaluation of programming languages;
• Programming environments, development tools, visualisation and animation;
• Management of the development process;
• Human factors in software, software for social interaction, software for social computing;
• Cyber physical systems, and software for the interaction between the physical and the machine;
• Software aspects of infrastructure services, system administration, and network management.