Modularity is a key issue in the design of modern programming language
s. When designing modular features for declarative languages in genera
l, and for logic programming languages in particular, the challenge li
es in avoiding the superimposition of a complex syntactic and semantic
structure over the simple structure of the basic language. The modula
r framework defined here for logic programming consists of a small num
ber of operations over modules which are (meta-) logically defined and
semantically justified in terms of the basic logic programming semant
ics. The operations enjoy a number of algebraic properties, thus yield
ing an algebra of modules. Despite its simplicity, the suite of operat
ions is shown capable of capturing the core features of modularization
: information hiding, import/export relationships, and construction of
module hierarchies. A metalevel implementation and a compilation-orie
nted implementation of the operations are provided and proved sound wi
th respect to the semantics. The compilation-oriented implementation i
s based on manipulation of name spaces and provides the basis for an e
fficient implementation.