[ The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

library(scattered)

Allow a source file to contain non-consecutive clauses

Predicates

discontiguous(?)
No description available
end_compile_file(?, ?, ?)
No description available
non_consecutive_handler(?, ?, ?)
No description available
scattered(?)
No description available
scattered_body(?, ?)
No description available
start_compile_file(?, ?, ?)
No description available

Other Exports

export op(1000, fy, scattered)

Description

The ECLiPSe compiler does not allow the clauses for static predicates being non-consecutive, i.e. interleaved with clauses for other predicates. The event 134 "procedure clauses are not consecutive" is raised in such a case. This library provides a means to handle such programs. When compiling from a file, it is enough just to load the library before the compilation. It redefines that handler for the event 134 in such a way that the procedures with non-consecutive procedures are recompiled in one chunk after encountering the end of file.

When not compiling from a file, the non-consecutive clauses have to be declared using the directive scattered/1. This declaration has to precede any clauses of the predicate.

    :- lib(scattered).
    :- scattered p/3, q/1.
    
Note that this applies to predicates whose clauses are non-consecutive, but in a single file. Predicates that are spread over multiple files still have to be declared as dynamic.

About


Generated from scattered.eci on Wed May 15 03:41:02 2002