8 Hypothesis Scope ResolvedPropositionSet Proposition DependencyMap
11 Step Action ActionPolicy Predicate Value
14 DependencyType _DependencyTree DependecySpec
15 One DependencyGroupEntry DependencyGroup
20 use Types::Standard qw(
21 ArrayRef Tuple HashRef Dict Maybe Optional slurpy Str
23 use DX::Utils qw(:event_types :dep_types);
25 foreach my $class (our @CLASSES) {
26 class_type $class => { class => 'DX::'.$class };
29 foreach my $role (our @ROLES) {
30 role_type $role => { role => 'DX::Role::'.$role };
33 class_type DictValue => { class => 'DX::Value::Dict' };
35 declare AlternativeList => as ArrayRef[Tuple[Hypothesis, Step]];
37 declare DependencyType => where {
38 foreach my $cand (EXISTENCE_OF, INDICES_OF, TYPE_OF, CONTENTS_OF) {
39 return 1 if $_ eq $cand;
44 declare EventType => where {
45 foreach my $cand (VALUE_SET, VALUE_EXISTS) {
46 return 1 if $_ eq $cand;
51 declare _DependencyTree => where { is_DependencyTree($_) };
53 declare DependencySpec => as Tuple[DependencyType, slurpy ArrayRef[Str]];
55 declare One => where { !ref($_) and $_ eq 1 };
57 declare DependencyTree => # [ \%subtree, \%existence_of, ... ]
59 Maybe[_DependencyTree],
60 (Optional[Maybe[HashRef[One]]]) x 4
63 declare DependencyGroupEntry =>
64 as Tuple[DependencyType, slurpy ArrayRef[Value|Str]];
66 declare DependencyGroup =>
67 as Tuple[Maybe[Value], slurpy ArrayRef[DependencyGroupEntry]];
69 declare DependencyGroupList => as ArrayRef[DependencyGroup];