• DocumentCode
    921408
  • Title

    Efficient reordering of Prolog programs

  • Author

    Gooley, Markian M. ; Wah, Benjamin W.

  • Author_Institution
    Coordinated Sci. Lab., Illinois Univ., Urbana, IL, USA
  • Volume
    1
  • Issue
    4
  • fYear
    1989
  • fDate
    12/1/1989 12:00:00 AM
  • Firstpage
    470
  • Lastpage
    482
  • Abstract
    Prolog programs are often inefficient: execution corresponds to a depth-first traversal of an AND/OR graph; traversing subgraphs in another order can be less expensive. It is shown how the reordering of clauses within Prolog predicates, and especially of goals within clauses, can prevent unnecessary search. The characterization and detection of restrictions on reordering is discussed. A system of calling modes for Prolog, geared to reordering, is proposed, and ways to infer them automatically are discussed. The information needed for safe reordering is summarized, and which types can be inferred automatically and which must be provided by the user are considered. An improved method for determining a good order for the goals of Prolog clauses is presented and used as the basis for a reordering system
  • Keywords
    PROLOG; logic programming; Prolog programs reordering; clauses; depth-first traversal; predicates; traversing subgraphs; Clocks; Costs; Logic programming; Programming profession; Query processing; Runtime; Search engines; Testing; Time measurement;
  • fLanguage
    English
  • Journal_Title
    Knowledge and Data Engineering, IEEE Transactions on
  • Publisher
    ieee
  • ISSN
    1041-4347
  • Type

    jour

  • DOI
    10.1109/69.43422
  • Filename
    43422