https://arxiv.org/abs/2308.15893 Skip to main content Cornell University We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate arxiv logo > cs > arXiv:2308.15893 [ ] Help | Advanced Search [All fields ] Search arXiv logo Cornell University Logo [ ] GO quick links * Login * Help Pages * About Computer Science > Programming Languages arXiv:2308.15893 (cs) [Submitted on 30 Aug 2023] Title:The Janus System: Multi-paradigm Programming in Prolog and Python Authors:Theresa Swift (Johns Hopkins Applied Physics Lab), Carl Andersen Download a PDF of the paper titled The Janus System: Multi-paradigm Programming in Prolog and Python, by Theresa Swift (Johns Hopkins Applied Physics Lab) and 1 other authors Download PDF Abstract: 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. Comments: In Proceedings ICLP 2023, arXiv:2308.14898 Subjects: Programming Languages (cs.PL); Logic in Computer Science (cs.LO) Cite as: arXiv:2308.15893 [cs.PL] (or arXiv:2308.15893v1 [cs.PL] for this version) https://doi.org/10.48550/arXiv.2308.15893 Focus to learn more arXiv-issued DOI via DataCite Journal reference: EPTCS 385, 2023, pp. 241-255 https://doi.org/10.4204/EPTCS.385.24 Related DOI: Focus to learn more DOI(s) linking to related resources Submission history From: EPTCS [view email] [via EPTCS proxy] [v1] Wed, 30 Aug 2023 09:07:05 UTC (53 KB) Full-text links: Download: * Download a PDF of the paper titled The Janus System: Multi-paradigm Programming in Prolog and Python, by Theresa Swift (Johns Hopkins Applied Physics Lab) and 1 other authors PDF * PostScript * Other formats [by-4] Current browse context: cs.PL < prev | next > new | recent | 2308 Change to browse by: cs cs.LO References & Citations * NASA ADS * Google Scholar * Semantic Scholar a export BibTeX citation Loading... BibTeX formatted citation x [loading... ] Data provided by: Bookmark BibSonomy logo Reddit logo (*) Bibliographic Tools Bibliographic and Citation Tools [ ] Bibliographic Explorer Toggle Bibliographic Explorer (What is the Explorer?) [ ] Litmaps Toggle Litmaps (What is Litmaps?) [ ] scite.ai Toggle scite Smart Citations (What are Smart Citations?) ( ) Code, Data, Media Code, Data and Media Associated with this Article [ ] Links to Code Toggle CatalyzeX Code Finder for Papers (What is CatalyzeX?) [ ] DagsHub Toggle DagsHub (What is DagsHub?) [ ] Links to Code Toggle Papers with Code (What is Papers with Code?) [ ] ScienceCast Toggle ScienceCast (What is ScienceCast?) ( ) Demos Demos [ ] Replicate Toggle Replicate (What is Replicate?) [ ] Spaces Toggle Hugging Face Spaces (What is Spaces?) ( ) Related Papers Recommenders and Search Tools [ ] Link to Influence Flower Influence Flower (What are Influence Flowers?) [ ] Connected Papers Toggle Connected Papers (What is Connected Papers?) [ ] Core recommender toggle CORE Recommender (What is CORE?) * Author * Venue * Institution * Topic ( ) About arXivLabs arXivLabs: experimental projects with community collaborators arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website. Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them. Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs. Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?) * About * Help * Click here to contact arXiv Contact * Click here to subscribe Subscribe * Copyright * Privacy Policy * Web Accessibility Assistance * arXiv Operational Status Get status notifications via email or slack