The Janus System: Multi-paradigm Programming in Prolog and Python

08/30/2023
by   Theresa Swift, et al.
0

Python and Prolog express different programming paradigms, with different strengths. Python is wildly popular because it is well-structured, easy to use, and mixes well with thousands of scientific and machine learning programs written in C. Prolog's logic-based approach provides powerful reasoning capabilities, especially when combined with constraint evaluation, probabilistic reasoning, well-founded negation, and other advances. Both languages have commonalities as well: both are usually written in C, both are dynamically typed, and both use data structures based on a small number of recursive types. This paper describes the design and implementation of Janus, a system that tightly combines Prolog and Python into a single process. Janus bi-translates data structures and offers performance of many hundreds of thousands of round-trip inter-language calls per second. Although Janus is still new, it has been used in commercial applications including natural language processing, visual query answering and robotic automation. Janus was developed for XSB, but porting Janus code to a second Prolog has been straightforward, indicating that Janus is a tool that other Prologs may easily adopt.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/15/2020

Monads and "do" notation in the Wolfram Language

This paper describes a categorical interpretation of the Wolfram Languag...
research
10/30/2018

BCL: A Cross-Platform Distributed Container Library

One-sided communication is a useful paradigm for irregular parallel appl...
research
09/19/2019

On the Design, Implementation, and Use of Laziness in R

The R programming language has been lazy for over twenty-five years. Thi...
research
08/28/2018

Language Interoperability in Control Network Programming

Control Network Programming (CNP) is a programming paradigm which is bei...
research
01/05/2023

Serenity: Library Based Python Code Analysis for Code Completion and Automated Machine Learning

Dynamically typed languages such as Python have become very popular. Amo...
research
07/01/2016

Massively parallel implementation in Python of a pseudo-spectral DNS code for turbulent flows

Direct Numerical Simulations (DNS) of the Navier Stokes equations is a v...
research
06/28/2022

Gradual Soundness: Lessons from Static Python

Context: Gradually-typed languages allow typed and untyped code to inter...

Please sign up or login with your details

Forgot password? Click here to reset