|
|
My Diploma
(written in German) Examples
for the application of Typical |
Extension of a type concept
for Prolog in order to support module oriented programming and software
engineering in the Artificial Intelligence (AI)
There
has been extensive research on the topic of types in logic programming, see
e.g. the collection of papers in [5]. While there are many motivations for
introducing types (naturalness of the representation, efficiency when using
types as active constraints, etc.) the software engineering point of view
seems to be the most prominent one: The aim is to detect as many programming errors
as possible by static program analysis before running the program. However,
approaches to typing logic programs often exclude various difficult-to-type
features of Standard Prolog. The aim of the TYPICAL system [3, 4] -developed
by the research group Praktische
Informatik VIII, Prof. Christoph Beierle, Department of Computer Science,
University of Hagen, Germany - is a pragmatic approach to type checking
Prolog programs without restricting the scope of the language. The Typical system checks
Standard Prolog programs that are extended with type declarations and has
been applied successfully to e.g. its own source code of about 4000 lines of
Prolog code. The type-annotations are semantically neutral. Additional
features of specific Prolog systems like SICStus Prolog can be handled via
type libraries. The approach allows more precise type annotations based on
type constraints and a better suited notion of well-typing in the presence of
type parameters ('type consistency'). It supports subtyping and parametric
polymorphism. TYPICAL was designed,
implemented and maintained until release 0.4999 by Gregor Meyer within the
Project CTL ('Compilation of typed logics'), funded by the German Research
Association (Deutsche Forschungsgemeinschaft) in the research program Deduction. In my
diploma [2], I extended the Typical system with a module concept, an improved
user interface, and error handling (version 0.51). In my thesis and later on
as a research assistant, I enhanced the system with a concept of meta-typing.
The actual version 0.6 offers now meta-types for handling Prolog
meta-programming techniques. The predicates assert/1, retract/1, sort/3,
map/3, and foldl/4 are some examples of such meta-predicates. [2] R. Kloos. Extension of a type-concept for Prolog for the support of modular software development and meta-programming in AI. Diplomarbeit, University of Hagen (FernUniversitaet Hagen), 1998. (in German). [3] G. Meyer. On Types and Type Consistency in Logic Programming. PhD thesis,
FernUniversitat Hagen, Germany, 1999. [4] G.
Meyer and C. Beierle. Dimensions of types in logic programming. In W. Bibel
and P. H. Schmitt, editors, Automated Deduction - A Basis for Applications, chapter 10. Kluwer Academic
Publishers, [5] F.
Pfenning, editor. Types in Logic Programming. Logic Programming Series. The
MIT Press, 1992. |