Natlog: Embedding Logic Programming into the Python Deep-Learning Ecosystem

08/30/2023
by   Paul Tarau, et al.
0

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 neural network configuration and training.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/17/2021

Natlog: a Lightweight Logic Programming Language with a Neuro-symbolic Touch

We introduce Natlog, a lightweight Logic Programming language, sharing P...
research
11/05/2020

ARGG-HDL: A High Level Python Based Object-Oriented HDL Framework

We present a High-Level Python-based Hardware Description Language (ARGG...
research
05/07/2023

Egg-smol Python: A Pythonic Library for E-graphs

E-graphs have emerged as a versatile data structure with applications in...
research
09/12/2016

Devito: Towards a generic Finite Difference DSL using Symbolic Python

Domain specific languages (DSL) have been used in a variety of fields to...
research
07/26/2019

Lazy Stream Programming in Prolog

In recent years, stream processing has become a prominent approach for i...
research
06/20/2020

fault: A Python Embedded Domain-Specific Language For Metaprogramming Portable Hardware Verification Components

While hardware generators have drastically improved design productivity,...
research
01/16/2022

Social Networks as a Collective Intelligence: An Examination of the Python Ecosystem

The Python ecosystem represents a global, data rich, technology-enabled ...

Please sign up or login with your details

Forgot password? Click here to reset