Hostname: page-component-74656f9884-rdgjk Total loading time: 0 Render date: 2026-11-08T06:18:08.877Z Has data issue: false hasContentIssue false

Integrating Logic Rules with Everything Else, Seamlessly

Published online by Cambridge University Press:  06 July 2023

YANHONG A. LIU
Affiliation:
Stony Brook University, Stony Brook, NY 11794, USA (e-mails: liu@cs.stonybrook.edu, stoller@cs.stonybrook.edu, yittong@cs.stonybrook.edu, bolin@cs.stonybrook.edu)
SCOTT D. STOLLER
Affiliation:
Stony Brook University, Stony Brook, NY 11794, USA (e-mails: liu@cs.stonybrook.edu, stoller@cs.stonybrook.edu, yittong@cs.stonybrook.edu, bolin@cs.stonybrook.edu)
YI TONG
Affiliation:
Stony Brook University, Stony Brook, NY 11794, USA (e-mails: liu@cs.stonybrook.edu, stoller@cs.stonybrook.edu, yittong@cs.stonybrook.edu, bolin@cs.stonybrook.edu)
BO LIN
Affiliation:
Stony Brook University, Stony Brook, NY 11794, USA (e-mails: liu@cs.stonybrook.edu, stoller@cs.stonybrook.edu, yittong@cs.stonybrook.edu, bolin@cs.stonybrook.edu)
Rights & Permissions [Opens in a new window]

Abstract

This paper presents a language, Alda, that supports all of logic rules, sets, functions, updates, and objects as seamlessly integrated built-ins. The key idea is to support predicates in rules as set-valued variables that can be used and updated in any scope, and support queries using rules as either explicit or implicit automatic calls to an inference function. We have defined a formal semantics of the language, implemented a prototype compiler that builds on an object-oriented language that supports concurrent and distributed programming and on an efficient logic rule system, and successfully used the language and implementation on benchmarks and problems from a wide variety of application domains. We describe the compilation method and results of experimental evaluation.

Information

Type
Original Article
Copyright
© The Author(s), 2023. Published by Cambridge University Press
Figure 0

Fig. 1. An example program in Alda, for role-based access control (RBAC), demonstrating logic rules used with sets, functions, updates, and objects.

Figure 1

Table 1. Benchmarks from different kinds of problems. RBAC benchmarks are for different ways of using rules as at the end of Section 2.4. PA is a mixture of problems from class hierarchy analysis. Under Variants, suffixes py and da indicate using while loops like that in Section 2.3 in Python and DistAlgo, respectively, instead of using rules.