Time for Fun3: Pre-compiling Rules into a High-Level Imperative Language for Top-Down Reasoning

Research output: Contribution to book/Conference proceedings/Anthology/ReportConference contributionContributedpeer-review

Contributors

Abstract

Semantic Web (SW) rule languages, such as Notation3 (N3), add declarative programming abilities to the SW platform. To execute rule-based programs, instead of building complex abstract machines, an option is to translate the program into an imperative language; in that case, the latter’s compiler or interpreter can simply be used to execute the program. We propose a challenge to implement top-down reasoners by pre-compiling rules into a modern imperative language. The features of these languages, e.g., functions as first-class citizens and co-routining, and their extensive libraries, can simplify such a translation. Tackling this challenge can yield development simplicity, compared to typical abstract machine implementations; and integrated logic and imperative environments, as translated code can be directly called from other imperative code. We propose one solution to this challenge, called fun3, which pre-compiles N3 rules into Python functions. We provide initial performance results that show the feasibility of solving this challenge while not overly sacrificing performance.

Details

Original languageEnglish
Title of host publicationCEUR Workshop Proceedings
Volume4083
Publication statusPublished - 2025
Peer-reviewedYes

Publication series

SeriesCEUR Workshop Proceedings
ISSN1613-0073

Conference

Title9th International Joint Conference on Rules and Reasoning
Abbreviated titleRuleML+RR 2025
Conference number9
Descriptionpart of the event “Declarative AI: Rules, Reasoning, Decisions, and Explanations” and is co-located with DecisionCAMP 2025 and the Reasoning Web Summer School 2025
Duration22 - 24 September 2025
Website
LocationKadir Has University
CityIstanbul
CountryTurkey

Keywords

ASJC Scopus subject areas

Keywords

  • Code translation, Notation3, Rules, Semantic Web, Top-down reasoning