Regular ArticleApplying Prolog programming techniques
Abstract
Much of the skill of Prolog programming comes from the ability to harness its comparatively simple syntax in sophisticated ways. It is possible to provide an account of part of the activity of Prolog programming in terms of the application of techniques—standard patterns of program development which may be applied to a variety of different programming problems. Numerous researchers have attempted to provide formal definitions of Prolog techniques but there has been little standardization of the approach and the computational use of techniques has been limited to small portions of the programming task. We demonstrate that techniques knowledge can be used to support programming in a wide variety of areas: editing, analysis, tracing, transformation and techniques acquisition. We summarize the main features of systems implemented by the authors for each of these types of activity and set these in the context of previous work, using a standard style of presentation. We claim that a techniques-based system which integrates these features would be worth more than the sum of its parts, since the same techniques knowledge can be shared by the different subsystems.
References (0)
Cited by (13)
Pitfalls of formality in early system design
2002, Science of Computer ProgrammingOne of the advantages of using formal methods in design should be that we can be precise about where our methods fail. However, it is rare to find discussions in the literature of problems in applying formal methods—particularly in the early stages of design. One reason for this is that failures are often caused by the context in which a method is applied, rather than by some purely technical limitation. Using examples from research in which I have been involved I shall describe some of the pitfalls I have encountered and which I have observed frequently in the research of others.
A visual syntax for logic and logic programming
1998, Journal of Visual Languages and ComputingIt is commonly accepted that non-logicians have difficulty in expressing themselves in first-order logic. Part of the visual language community is concerned with providing visual notations which use visual cues (‘declarative diagrams’) to make the structuring of logical expressions more intuitive. One of the more successful metaphors used in such diagrammatic languages is that of set inclusion, making use of the graphical intuitions which most of us are taught at school. Existing declarative diagrammatic languages do not make full use of such set-based intuitions. We present a more uniform use of sets which allow simple but highly expressive diagrams to be constructed from a small number of primitive components. These diagrams provide an alternative notation for a computational logic and, as we show in this paper, are the basis of a visual logic programming language. The first implementation of this language and a heterogeneous logic programming environment are also presented in this paper.
An empirical study of the LSS specification toolkit in use
1998, Journal of Systems and SoftwareThe Lightweight Specification System (LSS) toolkit assists in the development of logic programs, using a variety of high level specification methods. Many other high level specification systems impose a single, uniform view of how specification should proceed. In practice, there is normally no single understanding of how to describe specifications – there are instead a variety of different forms of description which have evolved from the work practices of various domains. Any attempt to disturb these work practices in a radical way will, naturally, meet with resistance unless those who must be educated in new methods can see clearly that they will benefit (soon) from their efforts. LSS addresses this problem by providing a collection of comparatively simple independent tools, each of which is directed at a particular community of users who might reasonably be expected to adjust to the tool without excessive effort. In this sense, LSS is lightweight – it is intended to be easy to pick up. Communication between LSS tools is achieved by using Horn Clause logic as a standard language, although users of some of the tools are buffered from the logical details by interfaces targeted at the appropriate group of users. This allows the products of specification from some of the tools to be used as the basis for more detailed specification (perhaps by other people) using other tools. This paper summarises the current LSS system and describes the results of an experiment in applying it to a substantial software engineering task: the specification of one of its own tools.
Usability analysis of visual programming environments: A 'cognitive dimensions' framework
1996, Journal of Visual Languages and ComputingThe cognitive dimensions framework is a broad-brush evaluation technique for interactive devices and for non-interactive notations. It sets out a small vocabulary of terms designed to capture the cognitively-relevant aspects of structure, and shows how they can be traded off against each other. The purpose of this paper is to propose the framework as an evaluation technique for visual programming environments. We apply it to two commercially-available dataflow languages (with further examples from other systems) and conclude that it is effective and insightful; other HCI-based evaluation techniques focus on different aspects and would make good complements. Insofar as the examples we used are representative, current VPLs are successful in achieving a good ‘closeness of match’, but designers need to consider the ‘viscosity ’ (resistance to local change) and the ‘secondary notation’ (possibility of conveying extra meaning by choice of layout, colour, etc.).
Slicing knowledge-based systems: Techniques and applications
2000, Knowledge-Based SystemsSlicing is a process for automatically obtaining subparts of a program responsible for specific computations. It has been employed within conventional procedural programming to solve a number of software development issues. We have adapted and extended slicing techniques originally proposed for procedural languages, to knowledge-based systems. Our techniques comprise a representation proposal for the successful and failed inferences performed by the system, a means to detect and represent the dependences among parts of the system, a formal definition of relevance among these parts and an algorithm proven correct to obtain executable slices of a system. We illustrate the usefulness of the slicing process with practical applications.
Rapid prototyping of large multi-agent systems through logic programming
2004, Annals of Mathematics and Artificial Intelligence