summaryrefslogtreecommitdiff
path: root/lib/Kratos/DFADriver.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-09-18 15:09:30 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-09-18 15:09:30 +0200
commitd4ac9feb6829750693db69e7f45ee6a9142d84d0 (patch)
tree0ccf303551f8c5f8445d7ba7f04e5baf11c26779 /lib/Kratos/DFADriver.pm
parent56f9c1e6b2612a292b184faebac766660c5afa46 (diff)
Support specification of transitions in AspectC++ annotations
Diffstat (limited to 'lib/Kratos/DFADriver.pm')
-rw-r--r--lib/Kratos/DFADriver.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Kratos/DFADriver.pm b/lib/Kratos/DFADriver.pm
index 07f478c..deb758c 100644
--- a/lib/Kratos/DFADriver.pm
+++ b/lib/Kratos/DFADriver.pm
@@ -424,9 +424,9 @@ sub printf_parameterized {
$key, $status, $param, $std_ind_param, $std_this, $ratio,
$fline );
}
- if (exists $r_by_param->{$param}) {
- printf(" %s: spearman_r for global %s is %.3f (p = %.3f)\n",
- $key, $param, $r_by_param->{$param}, -1);
+ if ( exists $r_by_param->{$param} ) {
+ printf( " %s: spearman_r for global %s is %.3f (p = %.3f)\n",
+ $key, $param, $r_by_param->{$param}, -1 );
}
}
@@ -859,18 +859,19 @@ EOF
$buf .= "\n\t\t\\path\n";
for my $transition ( $self->model->transitions ) {
- for my $origin ( @{ $transition->{origins} } ) {
+ for my $transition_elem ( @{ $transition->{transitions} } ) {
+ my ( $origin, $destination ) = @{$transition_elem};
my @edgestyles;
if ( $transition->{level} eq 'epilogue' ) {
push( @edgestyles, 'dashed' );
}
- if ( $origin eq $transition->{destination} ) {
+ if ( $origin eq $destination ) {
push( @edgestyles, 'loop above' );
}
my $edgestyle
= @edgestyles ? '[' . join( q{,}, @edgestyles ) . ']' : q{};
$buf
- .= "\t\t ($origin) edge ${edgestyle} node {$transition->{name}} ($transition->{destination})\n";
+ .= "\t\t ($origin) edge ${edgestyle} node {$transition->{name}} ($destination)\n";
}
}
$buf .= "\t\t;\n";
@@ -992,8 +993,7 @@ sub to_test_h {
my ($self) = @_;
my $class_name = $self->{class_name};
- my $class_prefix
- = $self->repo->get_class_path_prefix( $class_name );
+ my $class_prefix = $self->repo->get_class_path_prefix($class_name);
my $buf = <<"EOF";
@@ -1138,7 +1138,7 @@ sub launchpad_connect {
$self->{port} = Device::SerialPort->new( $self->{port_file} )
or croak("Error openig serial port $self->{port_file}");
- $self->{port}->baudrate($self->{baud_rate} // 115200);
+ $self->{port}->baudrate( $self->{baud_rate} // 115200 );
$self->{port}->databits(8);
$self->{port}->parity('none');
$self->{port}->read_const_time(500);