root/tags/lgt2212/library/termp.lgt

Revision 365, 1.3 KB (checked in by pmoura, 6 years ago)

Changed "authors" key in info/1 directive to "author".

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1
2:- protocol(termp).
3
4
5    :- info([
6        version is 1.0,
7        author is 'Paulo Moura',
8        date is 2000/7/24,
9        comment is 'Prolog terms protocol.']).
10
11
12    :- public(ground/1).
13
14    :- mode(ground(@term), zero_or_one).
15
16    :- info(ground/1, [
17        comment is 'True if the argument is ground.',
18        argnames is ['Term']]).
19
20
21    :- public(new/1).
22
23    :- mode(new(-nonvar), zero_or_one).
24
25    :- info(new/1, [
26        comment is 'Creates a new term instance (if meaningful).',
27        argnames is ['Term']]).
28
29
30    :- public(occurs/2).
31
32    :- mode(occurs(@var, @term), zero_or_one).
33
34    :- info(occurs/2, [
35        comment is 'True if the variable occurs in the term.',
36        argnames is ['Variable', 'Term']]).
37
38
39    :- public(subsumes/2).
40
41    :- mode(subsumes(@term, @term), zero_or_one).
42
43    :- info(subsumes/2, [
44        comment is 'The first term subsumes the second term.',
45        argnames is ['General', 'Specific']]).
46
47
48    :- public(subterm/2).
49
50    :- mode(subterm(?term, +term), zero_or_more).
51
52    :- info(subterm/2, [
53        comment is 'The first term is a subterm of the second term.',
54        argnames is ['Subterm', 'Term']]).
55
56
57    :- public(valid/1).
58
59    :- mode(valid(@nonvar), zero_or_one).
60
61    :- info(valid/1, [
62        comment is 'Term is valid.',
63        argnames is ['Term']]).
64
65
66    :- public(vars/2).
67
68    :- mode(vars(@term, -list), one).
69
70    :- info(vars/2, [
71        comment is 'Returns a list of all term variables.',
72        argnames is ['Term', 'List']]).
73
74
75:- end_protocol.
Note: See TracBrowser for help on using the browser.