Modularity and Separate Compilation in Logic Programming

03/18/2023
by   Steven Holte, et al.
0

The ability to compose code in a modular fashion is important to the construction of large programs. In the logic programming setting, it is desirable that such capabilities be realized through logic-based devices. We describe an approach for doing this here. In our scheme a module corresponds to a block of code whose external view is mediated by a signature. Thus, signatures impose a form of hiding that is explained logically via existential quantifications over predicate, function and constant names. Modules interact through the mechanism of accumulation that translates into conjoining the clauses in them while respecting the scopes of existential quantifiers introduced by signatures. We show that this simple device for statically structuring name spaces suffices for realizing features related to code scoping for which the dynamic control of predicate definitions was earlier considered necessary. The module capabilities we present have previously been implemented via the compile-time inlining of accumulated modules. This approach does not support separate compilation. We redress this situation by showing how each distinct module can be compiled separately and inlining can be realized by a later, complementary and equally efficient linking phase.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/29/2014

Generalizing Modular Logic Programs

Even though modularity has been studied extensively in conventional logi...
research
10/07/2022

Removing Qualified Names in Modular Languages

Although the notion of qualified names is popular in module systems, it ...
research
12/21/2022

Quotable Signatures for Authenticating Shared Quotes

Quotable signatures are digital signatures that allow a user to quote pa...
research
06/14/2019

Signatures in Shape Analysis: an Efficient Approach to Motion Identification

Signatures provide a succinct description of certain features of paths i...
research
12/20/2013

Abstract Modular Systems and Solvers

Integrating diverse formalisms into modular knowledge representation sys...
research
11/30/2021

Technical Report: Edge-centric Programming for IoT Applications with EdgeProg

IoT application development usually involves separate programming at the...

Please sign up or login with your details

Forgot password? Click here to reset