diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-10-14 08:05:26 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-10-14 08:05:26 +0000 |
commit | e491e87f14390098051ef466b6068809782eb3ab (patch) | |
tree | dcbccfff50d1b71f663581bf3c353a5e7a14fc89 /lib/sbin | |
parent | 705fe5a2d4b2945f2aa23404e1f9f34f96924e5c (diff) |
Added checks for the existence of implementations inherited from
or befriended.
Parser now understands a stagger keyword.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1019 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin')
-rw-r--r-- | lib/sbin/ImpParamConsistency.pl | 10 | ||||
-rw-r--r-- | lib/sbin/interface_parser.pl | 39 |
2 files changed, 49 insertions, 0 deletions
diff --git a/lib/sbin/ImpParamConsistency.pl b/lib/sbin/ImpParamConsistency.pl index c3871af3..9f12e1ff 100644 --- a/lib/sbin/ImpParamConsistency.pl +++ b/lib/sbin/ImpParamConsistency.pl @@ -32,6 +32,16 @@ sub CheckImpParamConsistency # Find a thorn providing this implementation ($other_thorn) = split(" ", $interface_database{"IMPLEMENTATION \U$friend\E THORNS"}); + # Check the other implementation exists. + if($other_thorn =~ m:^\s*$:) + { + print "$thorn SHARES from implementation $friend - no such implementation\n"; + + $CST_errors++; + + next; + } + # print "Other thorn is $other_thorn\n"; foreach $parameter (split(" ", $parameter_database{"\U$thorn SHARES $friend\E variables"})) diff --git a/lib/sbin/interface_parser.pl b/lib/sbin/interface_parser.pl index 22e6a24f..20b9bfab 100644 --- a/lib/sbin/interface_parser.pl +++ b/lib/sbin/interface_parser.pl @@ -188,6 +188,12 @@ sub get_implementation_friends if(! $friends{"\U$friend\E"}) { $friends{"\U$friend\E"} = 1; + if(! $interface_data{"IMPLEMENTATION \U$friend\E THORNS"}) + { + print "$implementation is friends with $friend - non-existent implementation\n"; + $CST_errors++; + next; + } %friends = &get_implementation_friends($friend, scalar(keys %friends), %friends,%interface_data); } } @@ -225,6 +231,12 @@ sub get_implementation_ancestors if(! $ancestors{"\U$ancestor\E"}) { $ancestors{"\U$ancestor\E"} = 1; + if(! $interface_data{"IMPLEMENTATION \U$ancestor\E THORNS"}) + { + print "$implementation inherits from $ancestor - non-existent implementation\n"; + $CST_errors++; + next; + } %ancestors = &get_implementation_ancestors($ancestor, scalar(keys %ancestors), %ancestors,%interface_data); } } @@ -488,6 +500,24 @@ sub check_interface_consistency { $attributes{"DIM"} = $interface_data{"\U$thorn GROUP $group\E DIM"}; } + # Check the staggering are consistant + if($attributes{"STYPE"}) + { + if($attributes{"STYPE"} ne $interface_data{"\U$thorn GROUP $group\E STYPE"}) + { + if(!$n_errors) + { + print STDERR "Inconsistent implementations of $implementation\n"; + print STDERR " Implemented by thorns " . join(" ", @thorns) . "\n"; + } + print STDERR " Group $group has inconsistent staggering type.\n"; + $n_errors++; + } + } + else + { + $attributes{"STYPE"} = $interface_data{"\U$thorn GROUP $group\E STYPE"}; + } } } } @@ -606,6 +636,10 @@ sub parse_interface_ccl { $interface_db{"\U$thorn GROUP $current_group\E DIM"} = $options{$option}; } + elsif($option =~ m:STAGGER:i) + { + $interface_db{"\U$thorn GROUP $current_group\E STYPE"} = "\U$options{$option}\E"; + } elsif($option =~ m:TYPE:i) { $interface_db{"\U$thorn GROUP $current_group\E GTYPE"} = "\U$options{$option}\E"; @@ -641,6 +675,11 @@ sub parse_interface_ccl { $interface_db{"\U$thorn GROUP $current_group\E TIMELEVELS"} = 1; } + + if(! $interface_db{"\U$thorn GROUP $current_group\E STYPE"}) + { + $interface_db{"\U$thorn GROUP $current_group\E STYPE"} = "NONE"; + } # Check that it is a known group type if($interface_db{"\U$thorn GROUP $current_group\E GTYPE"} !~ m:SCALAR|GF|ARRAY:) |