Jonas Barklund

Learn More
Programs operating on inductively deened data structures, such as lists, are naturally deened by recur-sive programs, while programs operating onìndexable' data structures, such as arrays, are naturally deened by iterative programs. It has recently been shown how many recursive programs can be transformed or compiled to iterative programs operating on(More)
The only means for repetition in most logic programming languages, including Prolog, is recursion. Definite iteration is introduced in logic programming languages through the bounded quantification construct. Firstly, it is claimed that this construct is often, though not always, more natural than recursion for expressing relations that involve repetition.(More)
In this review of metaprogramming in logic we pay equal attention to theoretical and practical issues: the contents range from mathematical and logical preliminaries to implementation and applications in, e.g., software engineering and knowledge representation. The area is one in rapid development but we have emphasized such issues that are likely to be(More)
We have extended D. H. D. Warren's abstract machine for sequential Prolog with parallel instructions that implement bounded quantifications, an extension to Prolog proposed by Barklund and Bevemyr. These instructions are intended for parallel computers supporting the data parallel programming model. Luther, an emulator for the sequential abstract machine(More)
D We present an application of metaprogramming in logic that, unlike most metaprogramming applications, is not primarily concerned with controlling the execution of logic programs. Metalevel computation is used to define theories from schemata that were either given explicitly or obtained by abstraction from other theories. Our main application is a(More)
The expressiveness of the declarative language G odel can be improved by adding to it bounded quanti cations, i.e., quanti cations over nite domains, and arrays. Many problems can be expressed more concisely using bounded quanti cations than using recursion. Arrays are natural for many applications, e.g., in scienti c computing, and are conveniently used(More)
It is proposed to add bounded quantiications to Prolog. The main reason is one of natural expression, many algorithms are expressed more elegantly in a declarative way using bounded quantiications than using existing means, i.e., recursion. In particular this is true for numerical algorithms, an area where Prolog has been virtually unsuccessful so far.(More)
A theory system is a collection of interdependent theories, some if which stand in a meta/object relationship, forming an arbitrary number of meta-levels. The main thesis of this chapter is that theory systems constitute a suitable formalism for constructing advanced applications in reasoning and software engineering. The Alloy language for deening theory(More)
We present a new algorithm for garbage collection of the term stack in David H. D. Warren's abstract Prolog machine (WAM). The algorithm exploits the possibilities of using a large address space, with special attention paid to virtual memory behaviour. The time required for the algorithm depends linearly on the size of the areas in which garbage is(More)