{"title":"COP:一种集成命令式编程和声明式编程的简单方法","authors":"Charles-Antoine Brunet, R. Gonzalez Rubio","doi":"10.1109/CCECE.1995.526606","DOIUrl":null,"url":null,"abstract":"The paper proposes how to integrate two languages, C++ and Prolog, into one. The resulting language is COP (C++ Or Prolog). The motivation behind this work was to offer in one language two programming styles in order to simplify program writing. For example, an application programmer can use the COP language when it is necessary to program in a procedural or object oriented way (C++) and also with rules (Prolog). Our feeling is that a programmer could benefit from our approach because he or she has the choice to use a programming style adapted to the application needs. We present the COP language. In COP, we try to respect the syntax, the semantics and the philosophies of C++ and Prolog. We define how the two languages can work together. Our approach is to add some features allowing C++ to call Prolog goals. We give all the details that a COP programmer must know in order to use the language; that was possible because we kept our design as simple as we could.","PeriodicalId":158581,"journal":{"name":"Proceedings 1995 Canadian Conference on Electrical and Computer Engineering","volume":"14 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1995-09-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"COP: a simple way to integrate imperative programming and declarative programming\",\"authors\":\"Charles-Antoine Brunet, R. Gonzalez Rubio\",\"doi\":\"10.1109/CCECE.1995.526606\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The paper proposes how to integrate two languages, C++ and Prolog, into one. The resulting language is COP (C++ Or Prolog). The motivation behind this work was to offer in one language two programming styles in order to simplify program writing. For example, an application programmer can use the COP language when it is necessary to program in a procedural or object oriented way (C++) and also with rules (Prolog). Our feeling is that a programmer could benefit from our approach because he or she has the choice to use a programming style adapted to the application needs. We present the COP language. In COP, we try to respect the syntax, the semantics and the philosophies of C++ and Prolog. We define how the two languages can work together. Our approach is to add some features allowing C++ to call Prolog goals. We give all the details that a COP programmer must know in order to use the language; that was possible because we kept our design as simple as we could.\",\"PeriodicalId\":158581,\"journal\":{\"name\":\"Proceedings 1995 Canadian Conference on Electrical and Computer Engineering\",\"volume\":\"14 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1995-09-05\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings 1995 Canadian Conference on Electrical and Computer Engineering\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/CCECE.1995.526606\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings 1995 Canadian Conference on Electrical and Computer Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CCECE.1995.526606","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
COP: a simple way to integrate imperative programming and declarative programming
The paper proposes how to integrate two languages, C++ and Prolog, into one. The resulting language is COP (C++ Or Prolog). The motivation behind this work was to offer in one language two programming styles in order to simplify program writing. For example, an application programmer can use the COP language when it is necessary to program in a procedural or object oriented way (C++) and also with rules (Prolog). Our feeling is that a programmer could benefit from our approach because he or she has the choice to use a programming style adapted to the application needs. We present the COP language. In COP, we try to respect the syntax, the semantics and the philosophies of C++ and Prolog. We define how the two languages can work together. Our approach is to add some features allowing C++ to call Prolog goals. We give all the details that a COP programmer must know in order to use the language; that was possible because we kept our design as simple as we could.