{"title":"在移动应用开发中更有效地使用断言","authors":"Yoonsik Cheon","doi":"10.1109/PIC53636.2021.9687079","DOIUrl":null,"url":null,"abstract":"It is a good programming practice to include runtime checks called assertions in the code to check assumptions and invariants. Assertions are said to be often most effective when they encode design decisions and constraints. In this paper, we show our preliminary work on translating design constraints to assertions for mobile apps. Design properties and constraints are specified formally in the Object Constraint Language (OCL) and translated to executable assertions written in Dart, the language of the Flutter cross-platform framework. We consider various language and platform-specific features of OCL, Dart, and Flutter. In our approach, assertions are enabled only in debug mode and removed from the production code. It is important to reduce the memory footprint of a mobile app as the memory on a mobile device is a limited resource.","PeriodicalId":297239,"journal":{"name":"2021 IEEE International Conference on Progress in Informatics and Computing (PIC)","volume":"51 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-12-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Toward More Effective Use of Assertions for Mobile App Development\",\"authors\":\"Yoonsik Cheon\",\"doi\":\"10.1109/PIC53636.2021.9687079\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"It is a good programming practice to include runtime checks called assertions in the code to check assumptions and invariants. Assertions are said to be often most effective when they encode design decisions and constraints. In this paper, we show our preliminary work on translating design constraints to assertions for mobile apps. Design properties and constraints are specified formally in the Object Constraint Language (OCL) and translated to executable assertions written in Dart, the language of the Flutter cross-platform framework. We consider various language and platform-specific features of OCL, Dart, and Flutter. In our approach, assertions are enabled only in debug mode and removed from the production code. It is important to reduce the memory footprint of a mobile app as the memory on a mobile device is a limited resource.\",\"PeriodicalId\":297239,\"journal\":{\"name\":\"2021 IEEE International Conference on Progress in Informatics and Computing (PIC)\",\"volume\":\"51 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2021-12-17\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2021 IEEE International Conference on Progress in Informatics and Computing (PIC)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/PIC53636.2021.9687079\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 IEEE International Conference on Progress in Informatics and Computing (PIC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/PIC53636.2021.9687079","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Toward More Effective Use of Assertions for Mobile App Development
It is a good programming practice to include runtime checks called assertions in the code to check assumptions and invariants. Assertions are said to be often most effective when they encode design decisions and constraints. In this paper, we show our preliminary work on translating design constraints to assertions for mobile apps. Design properties and constraints are specified formally in the Object Constraint Language (OCL) and translated to executable assertions written in Dart, the language of the Flutter cross-platform framework. We consider various language and platform-specific features of OCL, Dart, and Flutter. In our approach, assertions are enabled only in debug mode and removed from the production code. It is important to reduce the memory footprint of a mobile app as the memory on a mobile device is a limited resource.