Title: Integrating Logic Rules with Everything Else, Seamlessly
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. more »« less
Liu, Yanhong A; Stoller, Scott D
(, Journal of Logic and Computation)
null
(Ed.)
Abstract Programming with logic for sophisticated applications must deal with recursion and negation, which together have created significant challenges in logic, leading to many different, conflicting semantics of rules. This paper describes a unified language, DA logic, for design and analysis logic, based on the unifying founded semantics and constraint semantics, that supports the power and ease of programming with different intended semantics. The key idea is to provide meta-constraints, support the use of uncertain information in the form of either undefined values or possible combinations of values and promote the use of knowledge units that can be instantiated by any new predicates, including predicates with additional arguments.
Yang, F.; Zhang, J.; Chen, Y.; and Debs, L.
(, Proceedings of the GPEA Polytechnic Summit 2022: Session Papers)
Steinmetz, A.
(Ed.)
Manual building code compliance checking is a time-consuming, labor-intensive and error-prone process. Automated logic-based reasoning is an essential step in the automation of this process. There have been previous studies using logic programming languages for automated logic-based reasoning to support automated compliance checking (ACC) of building designs with building codes. As a high-performance implementation of the standard logic programming language, B-Prolog was widely used in these studies. However, due to the support of dynamic predicates and user-defined operators, the predicates’ functions vary according to different user definitions; therefore, B-Prolog is sometimes not reliable for building code reasoning. As a more expressive, scalable, and reliable alterative to B-Prolog, Picat, a logic-based multi-paradigm programming language, provides a new and potentially more powerful platform for automated logic-based reasoning in ACC. To explore the potential value of Picat in ACC, in this study, the authors compared Picat and B-Prolog performance in automatically checking 20 requirement rules in the 2015 International Building Code. The experimental results showed that the automated checking for building codes in the B-Prolog version was faster than that in the Picat version, whereas the Picat version was more reliable than the B-Prolog version. This could be the result of B-Prolog using unifica-tion and Picat using pattern matching for indexing rules. More potential applications of Picat in ACC domain need further research. Furthermore, this schema could be used in the teaching of ACC to graduate construction students, illustrating the need to focus on the reliability, predictability and scalability of the process, in order to provide a practical solution to improving code compliance checking processes.
Liu, Yanhong A; Stoller, Scott D; Tong, Yi; Tekle, K Tuncay
(, Electronic Proceedings in Theoretical Computer Science)
Integrating logic rules with other language features is increasingly sought after for advanced applications that require knowledge-base capabilities. To address this demand, increasingly more languages and extensions for such integration have been developed. How to evaluate such languages? This paper describes a set of programming and performance benchmarks for evaluating languages supporting integrated use of rules and other features, and the results of evaluating such an integrated language together with logic languages and languages not supporting logic rules.
Mehta, Vaibhav; Loehr, Devon; Sonchack, John; Walker, David
(, Practical Aspects of Declarative Languages)
Hanus, Michael; Inclezan, Daniela
(Ed.)
The development of programmable switches such as the Intel Tofino has allowed network designers to implement a wide range of new in-network applications and network control logic. However, current switch programming languages, like P4, operate at a very low level of abstraction. This paper introduces SwitchLog, a new experimental logic programming language designed to lift the level of abstraction at which network programmers operate, while remaining amenable to efficient implementation on programmable switches. SwitchLog is inspired by previous distributed logic programming languages such as NDLog, in which programmers declare a series of facts, each located at a particular switch in the network. Logic programming rules that operate on facts at different locations implicitly generate network communication, and are updated incrementally, as packets pass through a switch. In order to ensure these updates can be implemented efficiently on switch hardware, SwitchLog imposes several restrictions on the way programmers can craft their rules. We demonstrate that SwitchLog can be used to express a variety of networking applications in a mere handful of lines of code.
Liu, Yanhong A; Stoller, Scott D
(, Journal of Logic and Computation)
null
(Ed.)
Abstract Logic rules and inference are fundamental in computer science and have been studied extensively. However, prior semantics of logic languages can have subtle implications and can disagree significantly, on even very simple programs, including in attempting to solve the well-known Russell’s paradox. These semantics are often non-intuitive and hard-to-understand when unrestricted negation is used in recursion. This paper describes a simple new semantics for logic rules, founded semantics, and its straightforward extension to another simple new semantics, constraint semantics, that unify the core of different prior semantics. The new semantics support unrestricted negation, as well as unrestricted existential and universal quantifications. They are uniquely expressive and intuitive by allowing assumptions about the predicates, rules and reasoning to be specified explicitly, as simple and precise binary choices. They are completely declarative and relate cleanly to prior semantics. In addition, founded semantics can be computed in linear time in the size of the ground program.
LIU, YANHONG A, STOLLER, SCOTT D, TONG, YI, and LIN, BO. Integrating Logic Rules with Everything Else, Seamlessly. Retrieved from https://par.nsf.gov/biblio/10508927. Theory and Practice of Logic Programming 23.4 Web. doi:10.1017/S1471068423000108.
LIU, YANHONG A, STOLLER, SCOTT D, TONG, YI, & LIN, BO. Integrating Logic Rules with Everything Else, Seamlessly. Theory and Practice of Logic Programming, 23 (4). Retrieved from https://par.nsf.gov/biblio/10508927. https://doi.org/10.1017/S1471068423000108
LIU, YANHONG A, STOLLER, SCOTT D, TONG, YI, and LIN, BO.
"Integrating Logic Rules with Everything Else, Seamlessly". Theory and Practice of Logic Programming 23 (4). Country unknown/Code not available: Cambridge University Press. https://doi.org/10.1017/S1471068423000108.https://par.nsf.gov/biblio/10508927.
@article{osti_10508927,
place = {Country unknown/Code not available},
title = {Integrating Logic Rules with Everything Else, Seamlessly},
url = {https://par.nsf.gov/biblio/10508927},
DOI = {10.1017/S1471068423000108},
abstractNote = {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.},
journal = {Theory and Practice of Logic Programming},
volume = {23},
number = {4},
publisher = {Cambridge University Press},
author = {LIU, YANHONG A and STOLLER, SCOTT D and TONG, YI and LIN, BO},
}
Warning: Leaving National Science Foundation Website
You are now leaving the National Science Foundation website to go to a non-government website.
Website:
NSF takes no responsibility for and exercises no control over the views expressed or the accuracy of
the information contained on this site. Also be aware that NSF's privacy policy does not apply to this site.