YAP 7.1.0
Declaring a type of predicate:

Detailed Description

Class Documentation

◆ dynamic/1

class dynamic/1

dynamic( + P )

Declares predicate P or list of predicates [ P1,..., Pn] as a dynamic predicate P must be written as a predicate indicator, that is in form Name/Arity or Module:Name/Arity

:- dynamic @ god/1 .

a more convenient form can be used:

:- dynamic @ son/3 , @ father/2 , @ mother/2 .

or, equivalently,

:- dynamic [son/3, @ref father/2 , @ref mother/2 ].


a predicate is assumed to be dynamic when asserted before being defined

◆ multifile/1

class multifile/1

multifile( P )

defined in the ISO standard

Declares that a predicate or several predicates may be defined throughout several files P is a collection of one or more predicate indicators:

:- multifile @ user:portray_message/2 , multifile @ message_hook/3 .
message_hook(+ Term, + Kind, + Lines)

Instructs the compiler about the declaration of a predicate P in more than one file It must appear in the first of the loaded files where the predicate is declared, and before declaration of any of its clauses

Multifile declarations must be supported by reconsult/1 and compile/1 : when a multifile predicate is reconsulted, only the clauses from the same file are removed

Since YAP4.3.0 multifile procedures can be static or dynamic