LogicKit:将逻辑编程引入swift

Dimitri Racordon, Didier Buchs
{"title":"LogicKit:将逻辑编程引入swift","authors":"Dimitri Racordon, Didier Buchs","doi":"10.1145/3397537.3399575","DOIUrl":null,"url":null,"abstract":"A new trend in programming languages is to merge multiple paradigms, rather than focusing on one as it was customary in the past. Most modern languages provide native support for imperative and functional programming, object-orientation and even concurrency. The typical mechanism used to blend heterogeneous language concepts is to rely on functions. Functions are a very well understood, usually offer an excellent abstraction over diverging models of computation, but are unsuitable to interface logic programming, unfortunately. Embedding a full logic programming language into a host is also unsatisfactory, as it impedes the ability to make data flow from one paradigm to the other. As an answer to these issues, we propose LogicKit, a library that aims to bridge the gap between logic programming and other traditional paradigms. LogicKit is a Prolog-inspired language that blends seamlessly into Swift. Predicates are first-class objects in the host language and data can flow in and out of a logic program, without the need for any data serialization/parsing. Our framework is distributed in the form of a Swift library that can be imported in any Swift project effortlessly. We elaborate on our motivation for developing LogicKit and present the library by the means of examples.","PeriodicalId":373173,"journal":{"name":"Companion Proceedings of the 4th International Conference on Art, Science, and Engineering of Programming","volume":"29 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-03-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"LogicKit: bringing logic programming to swift\",\"authors\":\"Dimitri Racordon, Didier Buchs\",\"doi\":\"10.1145/3397537.3399575\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"A new trend in programming languages is to merge multiple paradigms, rather than focusing on one as it was customary in the past. Most modern languages provide native support for imperative and functional programming, object-orientation and even concurrency. The typical mechanism used to blend heterogeneous language concepts is to rely on functions. Functions are a very well understood, usually offer an excellent abstraction over diverging models of computation, but are unsuitable to interface logic programming, unfortunately. Embedding a full logic programming language into a host is also unsatisfactory, as it impedes the ability to make data flow from one paradigm to the other. As an answer to these issues, we propose LogicKit, a library that aims to bridge the gap between logic programming and other traditional paradigms. LogicKit is a Prolog-inspired language that blends seamlessly into Swift. Predicates are first-class objects in the host language and data can flow in and out of a logic program, without the need for any data serialization/parsing. Our framework is distributed in the form of a Swift library that can be imported in any Swift project effortlessly. We elaborate on our motivation for developing LogicKit and present the library by the means of examples.\",\"PeriodicalId\":373173,\"journal\":{\"name\":\"Companion Proceedings of the 4th International Conference on Art, Science, and Engineering of Programming\",\"volume\":\"29 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-03-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Companion Proceedings of the 4th International Conference on Art, Science, and Engineering of Programming\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3397537.3399575\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Companion Proceedings of the 4th International Conference on Art, Science, and Engineering of Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3397537.3399575","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

摘要

编程语言的一个新趋势是合并多个范式,而不是像过去习惯的那样专注于一个范式。大多数现代语言都提供了对命令式和函数式编程、面向对象甚至并发性的本地支持。用于混合异类语言概念的典型机制是依赖函数。函数是一种很容易理解的方法,通常为计算的发散模型提供了一个很好的抽象,但不幸的是,它不适合接口逻辑编程。将完整的逻辑编程语言嵌入到主机中也不能令人满意,因为它阻碍了数据从一种范式流向另一种范式的能力。作为这些问题的答案,我们提出了LogicKit,一个旨在弥合逻辑编程和其他传统范式之间差距的库。LogicKit是一种受prolog启发的语言,可以无缝地融入Swift。谓词是宿主语言中的一等对象,数据可以进出逻辑程序,而不需要任何数据序列化/解析。我们的框架以Swift库的形式发布,可以毫不费力地导入到任何Swift项目中。我们详细阐述了开发LogicKit的动机,并通过示例介绍了该库。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
LogicKit: bringing logic programming to swift
A new trend in programming languages is to merge multiple paradigms, rather than focusing on one as it was customary in the past. Most modern languages provide native support for imperative and functional programming, object-orientation and even concurrency. The typical mechanism used to blend heterogeneous language concepts is to rely on functions. Functions are a very well understood, usually offer an excellent abstraction over diverging models of computation, but are unsuitable to interface logic programming, unfortunately. Embedding a full logic programming language into a host is also unsatisfactory, as it impedes the ability to make data flow from one paradigm to the other. As an answer to these issues, we propose LogicKit, a library that aims to bridge the gap between logic programming and other traditional paradigms. LogicKit is a Prolog-inspired language that blends seamlessly into Swift. Predicates are first-class objects in the host language and data can flow in and out of a logic program, without the need for any data serialization/parsing. Our framework is distributed in the form of a Swift library that can be imported in any Swift project effortlessly. We elaborate on our motivation for developing LogicKit and present the library by the means of examples.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信