Unix and Linux Discussions Tagged with conditional |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
9 |
2,097 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
1,050 |
Shell Programming and Scripting |
|
|
|
5 |
1,487 |
Shell Programming and Scripting |
|
|
|
7 |
2,243 |
Shell Programming and Scripting |
|
|
|
2 |
1,447 |
Shell Programming and Scripting |
|
|
|
1 |
12,632 |
Shell Programming and Scripting |
|
|
|
9 |
3,364 |
Shell Programming and Scripting |
|
|
|
3 |
1,277 |
Shell Programming and Scripting |
|
|
|
3 |
2,561 |
AIX |
|
|
|
4 |
2,630 |
Shell Programming and Scripting |
|
|
|
9 |
4,269 |
Shell Programming and Scripting |
|
|
|
11 |
4,264 |
Shell Programming and Scripting |
|
|
|
10 |
3,523 |
Shell Programming and Scripting |
|
|
|
5 |
3,103 |
Shell Programming and Scripting |
|
|
|
5 |
2,940 |
Shell Programming and Scripting |
|
|
|
3 |
2,270 |
Shell Programming and Scripting |
|
|
|
4 |
4,043 |
Shell Programming and Scripting |
|
|
|
1 |
23,111 |
Shell Programming and Scripting |
|
|
|
3 |
3,074 |
Shell Programming and Scripting |
|
|
|
12 |
8,309 |
Shell Programming and Scripting |
|
|
|
1 |
6,620 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,460 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,250 |
Shell Programming and Scripting |
|
|
|
2 |
4,170 |
Shell Programming and Scripting |
|
|
|
1 |
5,298 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
17,042 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,150 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,358 |
UNIX for Dummies Questions & Answers |
Devel::Cover::Truth_Table(3) User Contributed Perl Documentation Devel::Cover::Truth_Table(3)
NAME
Devel::Cover::Truth_Table - Truth tables for coverage objects.
VERSION
version 1.03
SYNOPSIS
use Devel::Cover::Truth_Table;
# $a || $b
my $or_tt = Devel::Cover::Truth_Table->new_primitive('or_3', 0, 1, 1);
# $c && $d
my $and_tt = Devel::Cover::Truth_Table->new_primitive('and_3', 1, 0, 1);
# merge contents of $and_tt into right column of $or_tt, to create
# $a || ($c && $d)
$or_tt->right_merge($and_tt);
# get a (sorted) textual representation
my @text = $or_tt->sort->text;
print "$_
" foreach @text;
__END__
A B C |exp|hit
--------------
0 0 X | 0 |---
0 1 0 | 0 |---
0 1 1 | 1 |+++
1 X X | 1 |+++
--------------
DESCRIPTION
This module provides methods for creating and merging conditional primitives ("$a && $b", "$c || $d", etc.) into more complex composite
expressions.
METHODS
new_primitive($op, @coverage)
Create a new truth table based on one of the built-in primitives, which are the subclasses of Devel::Cover::DB::Condition. $op is one of
the following:
and_3
"and" or "&&" with three conditional paths.
or_3
"or" or "||" with three conditional paths.
or_2
"or" or "||" with two conditional paths. (i.e., when the right hand side of the expression is a constant)
xor_4
"xor" with four conditional paths.
@coverage is a list booleans identifying which of the possible paths have been covered.
sort()
Sorts a truth table (in place) and returns the sorted object.
text()
Format a truth table to an array of strings for printing.
html()
Format a truth table in HTML.
error()
percentage()
Determines the proportion of possible conditions that have coverage.
right_merge($sub_table)
Merge entries from $sub_table into right column of table.
left_merge($sub_table)
Merge entries from $sub_table into left column of table.
SEE ALSO
Devel::Cover
BUGS
None that I'm aware of...
LICENSE
Copyright 2002 Michael Carman <mjcarman@mchsi.com>
This software is free. It is licensed under the same terms as Perl itself. The latest version should be available from: http://www.pjcj.net
perl v5.16.3 2013-05-20 Devel::Cover::Truth_Table(3)