{"title":"向编程语言中添加关系抽象","authors":"D. Wile","doi":"10.1145/99569.99833","DOIUrl":null,"url":null,"abstract":"‘The most successful formal method is abstraction. Functional abstraction, abstract data types, objectoriented type-inheritance, and built-in high-level modeling primitives, like sets, sequences, and maps (with their attendant operators), all raise the level of language with which programmers communicate and hence, promote the production of dependable, adaptable software. Relational abstraction is an abstraction mechanism that has had too little emphasis in the development of programming languages. We have found it to be a useful adjunct to the other abstraction mechanisms mentioned above; in effect,ion mechanisms mentioned above; in effect, relational access to data can be used to regularize idiosyncratic usage of abstract data types. I have designed and implemented a set of macros in Common Lisp that extends it to allow definition, update and queries of abstract relations. It is unusual in that the relations are lightweight: relations are not necessarily the repositories of ‘bulk data’, but are lised as a common abstraction of a wide variety of conventional program data structures. In this paper principles for integrating relational access into programming languages in general are put forth and demonstrated through this design. Of special interest is the ability to compile these abstractions into arbitrary data structures without fear of penalties from poor implementations or run-time overhead. *Sponsored by Defense Advanced Research Projects .\\gency, Information Science and Technology Office, ARPA Order No. 6096, issued by Defense Supply Service (Washington) under contract no. MDA903-87-C-0641 Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. @ 1990 ACM 089791.4155/90/0010-0128...$1.50 1 Abstraction Methods lLIost researchers identify formal methods with methodological support for the production of software, often independent of the programming languages used. However, linguistic support for formal methods embodied in programming language design can sometimes aid the methodologies considerably. In some sense, when a methodology is understood well enough, support for it migrates into programming languages themselves. For example, ‘top down programming’ as a methodology preceded the ‘gotoless’ languages with their enhanced support for looping and, especially, exiting control. Similarly, ‘abstracting data access’ as a methodology preceded language support for ‘abstract data types.’ The use of abstraction, “reduction to a short statement of the most important ideas,‘” is a formal method for separating concerns: people are encouraged to reason about properties made evident by abstraction before dealing with properties involving details masked by abstraction. Software development methods abstract some aspect of the programming process in order to reduce the variety and complexity of details considered by a programmer at any one time, and hence over time, the totality of the details","PeriodicalId":429108,"journal":{"name":"Formal Methods in Software Development","volume":"100 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1990-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":"{\"title\":\"Adding relational abstraction to programming languages\",\"authors\":\"D. Wile\",\"doi\":\"10.1145/99569.99833\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"‘The most successful formal method is abstraction. Functional abstraction, abstract data types, objectoriented type-inheritance, and built-in high-level modeling primitives, like sets, sequences, and maps (with their attendant operators), all raise the level of language with which programmers communicate and hence, promote the production of dependable, adaptable software. Relational abstraction is an abstraction mechanism that has had too little emphasis in the development of programming languages. We have found it to be a useful adjunct to the other abstraction mechanisms mentioned above; in effect,ion mechanisms mentioned above; in effect, relational access to data can be used to regularize idiosyncratic usage of abstract data types. I have designed and implemented a set of macros in Common Lisp that extends it to allow definition, update and queries of abstract relations. It is unusual in that the relations are lightweight: relations are not necessarily the repositories of ‘bulk data’, but are lised as a common abstraction of a wide variety of conventional program data structures. In this paper principles for integrating relational access into programming languages in general are put forth and demonstrated through this design. Of special interest is the ability to compile these abstractions into arbitrary data structures without fear of penalties from poor implementations or run-time overhead. *Sponsored by Defense Advanced Research Projects .\\\\gency, Information Science and Technology Office, ARPA Order No. 6096, issued by Defense Supply Service (Washington) under contract no. MDA903-87-C-0641 Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. @ 1990 ACM 089791.4155/90/0010-0128...$1.50 1 Abstraction Methods lLIost researchers identify formal methods with methodological support for the production of software, often independent of the programming languages used. However, linguistic support for formal methods embodied in programming language design can sometimes aid the methodologies considerably. In some sense, when a methodology is understood well enough, support for it migrates into programming languages themselves. For example, ‘top down programming’ as a methodology preceded the ‘gotoless’ languages with their enhanced support for looping and, especially, exiting control. Similarly, ‘abstracting data access’ as a methodology preceded language support for ‘abstract data types.’ The use of abstraction, “reduction to a short statement of the most important ideas,‘” is a formal method for separating concerns: people are encouraged to reason about properties made evident by abstraction before dealing with properties involving details masked by abstraction. Software development methods abstract some aspect of the programming process in order to reduce the variety and complexity of details considered by a programmer at any one time, and hence over time, the totality of the details\",\"PeriodicalId\":429108,\"journal\":{\"name\":\"Formal Methods in Software Development\",\"volume\":\"100 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1990-04-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"5\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Formal Methods in Software Development\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/99569.99833\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Formal Methods in Software Development","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/99569.99833","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Adding relational abstraction to programming languages
‘The most successful formal method is abstraction. Functional abstraction, abstract data types, objectoriented type-inheritance, and built-in high-level modeling primitives, like sets, sequences, and maps (with their attendant operators), all raise the level of language with which programmers communicate and hence, promote the production of dependable, adaptable software. Relational abstraction is an abstraction mechanism that has had too little emphasis in the development of programming languages. We have found it to be a useful adjunct to the other abstraction mechanisms mentioned above; in effect,ion mechanisms mentioned above; in effect, relational access to data can be used to regularize idiosyncratic usage of abstract data types. I have designed and implemented a set of macros in Common Lisp that extends it to allow definition, update and queries of abstract relations. It is unusual in that the relations are lightweight: relations are not necessarily the repositories of ‘bulk data’, but are lised as a common abstraction of a wide variety of conventional program data structures. In this paper principles for integrating relational access into programming languages in general are put forth and demonstrated through this design. Of special interest is the ability to compile these abstractions into arbitrary data structures without fear of penalties from poor implementations or run-time overhead. *Sponsored by Defense Advanced Research Projects .\gency, Information Science and Technology Office, ARPA Order No. 6096, issued by Defense Supply Service (Washington) under contract no. MDA903-87-C-0641 Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. @ 1990 ACM 089791.4155/90/0010-0128...$1.50 1 Abstraction Methods lLIost researchers identify formal methods with methodological support for the production of software, often independent of the programming languages used. However, linguistic support for formal methods embodied in programming language design can sometimes aid the methodologies considerably. In some sense, when a methodology is understood well enough, support for it migrates into programming languages themselves. For example, ‘top down programming’ as a methodology preceded the ‘gotoless’ languages with their enhanced support for looping and, especially, exiting control. Similarly, ‘abstracting data access’ as a methodology preceded language support for ‘abstract data types.’ The use of abstraction, “reduction to a short statement of the most important ideas,‘” is a formal method for separating concerns: people are encouraged to reason about properties made evident by abstraction before dealing with properties involving details masked by abstraction. Software development methods abstract some aspect of the programming process in order to reduce the variety and complexity of details considered by a programmer at any one time, and hence over time, the totality of the details