Andreas Hamfelt
Uppsala University
Network
Latest external collaboration on country level. Dive into details by clicking on the dots.
Publication
Featured researches published by Andreas Hamfelt.
logic-based program synthesis and transformation | 2004
David A. Basin; Yves Deville; Pierre Flener; Andreas Hamfelt; Jørgen Fischer Nilsson
Since the early days of programming and automated reasoning, researchers have developed methods for systematically constructing programs from their specifications. Especially the last decade has seen a flurry of activities including the advent of specialized conferences, such as LOPSTR, covering the synthesis of programs in computational logic. In this paper we analyze and compare three state-of-the-art methods for synthesizing recursive programs in computational logic. The three approaches are constructive/deductive synthesis, schema-guided synthesis, and inductive synthesis. Our comparison is carried out in a systematic way where, for each approach, we describe the key ideas and synthesize a common running example. In doing so, we explore the synergies between the approaches, which we believe are necessary in order to achieve progress over the next decade in this field.
Artificial Intelligence and Law | 1995
Andreas Hamfelt
A representation methodology for knowledge allowing multiple interpretations is described. It is based on the following conception of legal knowledge and its open texture. Since indeterminate, legal knowledge must be adapted to fit the circumstances of the cases to which it is applied. Whether a certain adaptation is lawful or not is measured by metaknowledge. But as this too is indeterminate, its adaptation to the case must be measured by metametaknowledge, etc. This hierarchical model of law is quite well-established and may serve well as a basis for a legal knowledge system. To account for the indeterminacy of law such a system should support the construction of different arguments for and against various interpretations of legal sources. However, automatizing this reasoning fully is unsound since it would imply a restriction to arguments defending interpretations anticipated at programming time. Therefore, the system must be interactive and the users knowledge be furnished in a principled way. Contrary to the widespread opinion that classical logic is inadequate for representing open-textured knowledge, the framework outlined herein is given a formalization in first order logic.
New Generation Computing | 1997
Andreas Hamfelt; Jørgen Fischer Nilsson
This paper outlines a logic programming methodology which applies standardized logic program recursion forms afforded by a system of general purpose recursion schemes. The recursion schemes are conceived of as quasi higher-order predicates which accept predicate arguments, thereby representing parameterized program modules. This use of higher-order predicates is analogous to higher-order functionals in functional programming. However, these quasi higher-order predicates are handled by a metalogic programming technique within ordinary logic programming.Some of the proposed recursion operators are actualizations of mathematical induction principles (e.g. structural induction as generalization of primitive recursion). Others are heuristic schemes for commonly occurring recursive program forms. The intention is to handle all recursions in logic programs through the given repertoire of higher-order predicates.We carry out a pragmatic feasibility study of the proposed recursion operators with respect to the corpus of common textbook logic programs.This pragmatic investigation is accompanied with an analysis of the theoretical expressivity. The main theoretical results concerning computability are(1)Primitive recursive functions can be re-expressed in logic programming by predicates defined solely by non-recursive clauses augmented with afold recursion predicate akin to the fold operators in functional programming.(2)General recursive functions can be re-expressed likewise sincefold allows re-expression of alinrec recursion predicate facilitating linear, unbounded recursion.
international conference on artificial intelligence and law | 2005
Andreas Hamfelt; Jenny Eriksson; Jørgen Fischer Nilsson
We outline an approach to logical analysis and formalization of legal argumentation and dispute as game trees, wellknown in AI, using metalogic programming. The argument/counter-argument dialectic is facilitated through defeasible reasoning, and the applied principles are sought demonstrated by unravelling of a legal case within statutory law.
database and expert systems applications | 1990
Andreas Hamfelt; Jonas Barklund
We propose an architecture for building expert systems in which the main subsystems are distinct but communicating programs: a Prolog inference engine, a multimedia interface tool and a data base management system. We have used this architecture for constructing a legal expert system for labour law.
Journal of Logic Programming | 1994
Jonas Barklund; Andreas Hamfelt
Abstract 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 representation of legal knowledge in a metalogic programming language. We argue that legal knowledge is multilayered and therefore a single level representation language lacks the needed expressiveness. We show that legal rules can be partitioned into primary, secondary, tertiary, quaternary, and higher level rules. Our classification enables us to define a multilevel model of legal knowledge and a one-to-one correspondence with levels of metaprogramming in logic. We show that this framework has a potential for capturing important legal interpretation principles such as analogia legis, lex specialis legi generali derogat, etc. We have a running example from commercial law that utilizes rules up to the tertiary level, emphasizing analogia legis. The example is expressed in a multilevel metalogic programming language that provides a naming convention and employs reflection between levels.
logic-based program synthesis and transformation | 1998
Andreas Hamfelt; Jørgen Fischer Nilsson
Based on a variable-free combinatory form of definite clause logic programs we outline a methodology and supporting program environment CombInduce for inducing well-moded logic programs from examples. The combinators comprise fold combinators for recursion on lists. The combinator form is distinguished by enabling piecewise composition of semantically meaningful program elements according to the compositional semantics principle. The principle of combining programs from combinators admits induction of programs without appealing to most-specific-generalization and predicate invention in contrast to prevailing ILP approaches. Moreover, the combinator form avoids confusing object and metavariables in the applied metalogic program environment. In addition useful algebraic rewriting rules can be formulated conveniently with the combinators.
Expert Systems With Applications | 1992
Jonas Barklund; Andreas Hamfelt; Jan Wünsche
Abstract A practical legal knowledge system must be versatile and capable of supporting many fundamentally different aspects of the lawyers work. In this paper a general framework for building knowledge systems from distinct but communicating modules is proposed. There are currently three different kinds of modules: computation, data storage, and environmental interaction. These modules include inference engines, database managers, and hypertext. Several strategies for coupling these modules are discussed. This framework is used to construct expert systems for two distinct domains: a legal expert system for labour law and a real-time expert system for process control in a pulp plant. The legal application shows that this system can be used to construct an “intelligent library”, guiding the user to relevant documents, rather than merely retrieving documents on request.
International Journal of Human-computer Studies \/ International Journal of Man-machine Studies | 1999
Anneli Edman; Andreas Hamfelt
Hypermedia systems and knowledge systems can be viewed as flip-sides of the same coin. The former are designed to convey information and the latter to solve problems; developments beyond the basic techniques of each system type requires techniques from the other type. In this paper, we introduce the concept of knowledge-based or intelligent hypermedia and analyse various constellations of merged hypermedia and knowledge systems. A hypermedia system deals with informal and formalized theories and the relations between and within these. Therefore, the corner stones of our analysis are the very basic notions involved in formalizing domain knowledge: an informal domain theory, a formal object theory axiomatizing the informal theory and a metatheory analysing the properties and interrelations between and within these. We integrate these notions into a system architecture which is to serve as a programmable system schema for supporting the composition of actual intelligent hypermedia systems. Programming in the large is supported by the schema which defines the overall system structure whereas programming in the small is supported by knowledge modelling techniques. The application of the system architecture is illustrated by the construction of an interactive diagnosis system which involves knowledge-based reasoning both for navigation in hyperspace and problem-solving within the domain.
international conference on artificial intelligence and law | 2007
Jenny Eriksson Lundström; Andreas Hamfelt; Jørgen Fischer Nilsson
In legal settings the admissibility of any speech act could be contested (cf. rule-scepticism, a view of legal positivism [5]). Thus all arguments, including rules, should initially be considered unascertained as to their acceptability and meaning for a given legal dispute. Only after considering the circumstances of the particular dispute, either explicitly or implicitly inferred from the utterances of the parties or lack of such, the acceptability of a rule and its impact are to be determined. Using metalogic, we construct a theory of legally acceptable and meaningful jurisprudence by requiring all rules of a resulting theory at level i to be assessed by a theory of legally acceptable metarules at the adjacent higher level i+1.