| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Language::Prolog::Types; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.10'; |
|
4
|
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
23511
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
40
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
29
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use Carp; |
|
|
1
|
|
|
|
|
7
|
|
|
|
1
|
|
|
|
|
270
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
require Exporter; |
|
11
|
|
|
|
|
|
|
our @ISA=qw(Exporter); |
|
12
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( is => [qw( prolog_is_term |
|
13
|
|
|
|
|
|
|
prolog_is_atom |
|
14
|
|
|
|
|
|
|
prolog_is_nil |
|
15
|
|
|
|
|
|
|
prolog_is_list |
|
16
|
|
|
|
|
|
|
prolog_is_list_or_nil |
|
17
|
|
|
|
|
|
|
prolog_is_functor |
|
18
|
|
|
|
|
|
|
prolog_is_variable |
|
19
|
|
|
|
|
|
|
prolog_is_var |
|
20
|
|
|
|
|
|
|
prolog_is_ulist |
|
21
|
|
|
|
|
|
|
prolog_is_string )], |
|
22
|
|
|
|
|
|
|
ctors => [qw( prolog_list |
|
23
|
|
|
|
|
|
|
prolog_ulist |
|
24
|
|
|
|
|
|
|
prolog_functor |
|
25
|
|
|
|
|
|
|
prolog_variable |
|
26
|
|
|
|
|
|
|
prolog_variables |
|
27
|
|
|
|
|
|
|
prolog_var |
|
28
|
|
|
|
|
|
|
prolog_vars |
|
29
|
|
|
|
|
|
|
prolog_atom |
|
30
|
|
|
|
|
|
|
prolog_nil |
|
31
|
|
|
|
|
|
|
prolog_string |
|
32
|
|
|
|
|
|
|
prolog_chain |
|
33
|
|
|
|
|
|
|
prolog_opaque )], |
|
34
|
|
|
|
|
|
|
util => [qw( prolog_list2perl_list |
|
35
|
|
|
|
|
|
|
prolog_list2perl_string )], |
|
36
|
|
|
|
|
|
|
short => [qw( isL |
|
37
|
|
|
|
|
|
|
isUL |
|
38
|
|
|
|
|
|
|
isF |
|
39
|
|
|
|
|
|
|
isV |
|
40
|
|
|
|
|
|
|
isA |
|
41
|
|
|
|
|
|
|
isN |
|
42
|
|
|
|
|
|
|
isS |
|
43
|
|
|
|
|
|
|
L |
|
44
|
|
|
|
|
|
|
UL |
|
45
|
|
|
|
|
|
|
F |
|
46
|
|
|
|
|
|
|
V |
|
47
|
|
|
|
|
|
|
Vs |
|
48
|
|
|
|
|
|
|
A |
|
49
|
|
|
|
|
|
|
N |
|
50
|
|
|
|
|
|
|
S |
|
51
|
|
|
|
|
|
|
C )] ); |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
our @EXPORT_OK=map { @{$EXPORT_TAGS{$_}} } keys(%EXPORT_TAGS); |
|
54
|
|
|
|
|
|
|
our @EXPORT=(); |
|
55
|
|
|
|
|
|
|
|
|
56
|
1
|
|
|
1
|
|
701
|
use Language::Prolog::Types::Internal; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
37
|
|
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
# ctors come from ...::Types::Factory: |
|
59
|
1
|
|
|
1
|
|
6
|
use Language::Prolog::Types::Factory; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
101
|
|
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# sets default factory to ...::Types::Internal one |
|
62
|
|
|
|
|
|
|
Language::Prolog::Types::Factory::set_factory |
|
63
|
|
|
|
|
|
|
Language::Prolog::Types::Internal->new_factory(); |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
# prolog_is_* functions come from ...::Types::Abstract: |
|
66
|
1
|
|
|
1
|
|
5
|
use Language::Prolog::Types::Abstract; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
269
|
|
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
# short aliases for constructors |
|
71
|
|
|
|
|
|
|
*L=\&prolog_list; |
|
72
|
|
|
|
|
|
|
*UL=\&prolog_ulist; |
|
73
|
|
|
|
|
|
|
*F=\&prolog_functor; |
|
74
|
|
|
|
|
|
|
*V=\&prolog_variable; |
|
75
|
|
|
|
|
|
|
*Vs=\&prolog_variables; |
|
76
|
|
|
|
|
|
|
*A=\&prolog_atom; |
|
77
|
|
|
|
|
|
|
*N=\&prolog_nil; |
|
78
|
|
|
|
|
|
|
*S=\&prolog_string; |
|
79
|
|
|
|
|
|
|
*C=\&prolog_chain; |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
# short aliases for is* functions |
|
82
|
|
|
|
|
|
|
*isL=\&prolog_is_list; |
|
83
|
|
|
|
|
|
|
*isUL=\&prolog_is_ulist; |
|
84
|
|
|
|
|
|
|
*isF=\&prolog_is_functor; |
|
85
|
|
|
|
|
|
|
*isV=\&prolog_is_variable; |
|
86
|
|
|
|
|
|
|
*isA=\&prolog_is_atom; |
|
87
|
|
|
|
|
|
|
*isN=\&prolog_is_nil; |
|
88
|
|
|
|
|
|
|
*isS=\&prolog_is_string; |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
1; |
|
92
|
|
|
|
|
|
|
__END__ |