Natlog: Embedding Logic Programming into the Python Deep-Learning Ecosystem
Paul Tarau (University of North Texas)

TL;DR
Natlog integrates logic programming into Python, enabling seamless interaction between logic constructs and Python's deep learning tools, demonstrated through applications in neural network orchestration and prompt generation.
Contribution
The paper introduces a novel approach for embedding logic programming into Python, facilitating high-level interactions and data exchanges between the two paradigms.
Findings
Effective integration of logic constructs with Python deep learning frameworks
Applications in orchestrating neural network pipelines and prompt generation
Enhanced expressiveness and flexibility in neuro-symbolic computing
Abstract
Driven by expressiveness commonalities of Python and our Python-based embedded logic-based language Natlog, we design high-level interaction patterns between equivalent language constructs and data types on the two sides. By directly connecting generators and backtracking, nested tuples and terms, coroutines and first-class logic engines, reflection and meta-interpretation, we enable logic-based language constructs to access the full power of the Python ecosystem. We show the effectiveness of our design via Natlog apps working as orchestrators for JAX and Pytorch pipelines and as DCG-driven GPT3 and DALL.E prompt generators. Keyphrases: embedding of logic programming in the Python ecosystem, high-level inter-paradigm data exchanges, coroutining with logic engines, logic-based neuro-symbolic computing, logic grammars as prompt-generators for Large Language Models, logic-based…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
