1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
:- protocol(hierarchyp).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2000/7/24,
comment is 'Common hierarchy protocol for prototype and class hierarchies.']).
:- public(ancestor/1).
:- mode(ancestor(?object), zero_or_more).
:- info(ancestor/1, [
comment is 'Returns, by backtracking, all object ancestors.',
argnames is ['Ancestor']]).
:- public(ancestors/1).
:- mode(ancestors(-list), one).
:- info(ancestors/1, [
comment is 'List of all object ancestors.',
argnames is ['Ancestors']]).
:- public(leaf/1).
:- mode(leaf(?object), zero_or_more).
:- info(leaf/1, [
comment is 'Returns, by backtracking, all object leaves.',
argnames is ['Leaf']]).
:- public(leaves/1).
:- mode(leaves(-list), one).
:- info(leaves/1, [
comment is 'List of all object leaves.',
argnames is ['Leaves']]).
:- public(descendant/1).
:- mode(descendant(?object), zero_or_more).
:- info(descendant/1, [
comment is 'Returns, by backtracking, all object descendants.',
argnames is ['Descendant']]).
:- public(descendants/1).
:- mode(descendants(-list), one).
:- info(descendants/1, [
comment is 'List of all object descendants.',
argnames is ['Descendants']]).
:- end_protocol.
|