Advertisement

Using prolog for constructing geometric objects defined by constraints

  • Beat Brüderlin
Automatic Programming I
Part of the Lecture Notes in Computer Science book series (LNCS, volume 204)

Abstract

Efficient algorithmic solutions are known for many problems in geometric modeling. Most algorithms are best implemented in a procedural programming language. For other problems, especially in interactive programs, no procedures may be found easily, but we may formulate the knowledge of our problem in a descriptive way with facts and ruies. Prolog is an appropriate language for finding solutions in the latter case. On the other hand, Prolog does not support efficiently the writing of procedures and arithmetic, which are still essential for solving geometrical problems.

We describe how a geometrical construction problem may be solved with Prolog. For computations such as line intersections, or for graphic display, we use the procedural programming language Modula-2. In order to combine the two languages we designed an interface language ‘logula’. An easy-to-use notation allows an application programmer to add new ‘built-in’ predicates, which are implemented as Modula-2 procedures.

Keywords and phrases

Logic programming for geometric modeling language to language interface Prolog Modula-2 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [Clock., Mell./81]
    W.F. Clocksin, C.S. Mellish, Programming in Prolog. Springer-Verlag Berlin, Heidelberg, NewYork, 1981.Google Scholar
  2. [InterFace/84]
    IF/Prolog User's C-interface Manual Version 1.0 edited by Preben Folkjaer, Ute Leibrandt, Lawrence Bernhard, InterFace Computer GmbH München.Google Scholar
  3. [Schorn, Schulz/84]
    Peter Schorn, Thomas Schulz Manual for ‘Lilith-Prolog’ and ‘Logula’ Semesterarbeit, Institut für Informatik ETH Zürich, 1984Google Scholar
  4. [Szuba/84]
    Tadeusz Szuba, PC-PROLOG for process control applications. Angewandte Informatik 4/84.Google Scholar
  5. [Wirth/81]
    N. Wirth, The Personal Computer Lilith. ETH Report No., 40 Eidgenössische Technische Hochschule, Institut für Informatik, ETH Zürich, 1981Google Scholar
  6. [Wirth/83]
    Niklaus Wirth Programming in Modula-2 Springer-Verlag Berlin, Heidelberg, NewYork, 1983.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1985

Authors and Affiliations

  • Beat Brüderlin
    • 1
  1. 1.Institut für Informatik, ETH ZürichZürichSwitzerland

Personalised recommendations