LogicKit: bringing logic programming to swift
2020
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.
- Correction
- Source
- Cite
- Save
- Machine Reading By IdeaReader
4
References
0
Citations
NaN
KQI