[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automake::Conditional::invert
From: |
Raja R Harinath |
Subject: |
Re: Automake::Conditional::invert |
Date: |
Wed, 20 Nov 2002 13:23:19 -0600 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) |
Alexandre Duret-Lutz <address@hidden> writes:
> Index: automake.in
> ## ------------------------------ ##
> ## Handling the condition stack. ##
> ## ------------------------------ ##
> @@ -5957,7 +5942,7 @@
>
> $cond = "${cond}_TRUE"
> unless $cond =~ /^TRUE|FALSE$/;
> - $cond = condition_negate ($cond)
> + $cond = Automake::Conditional::condition_negate ($cond)
> if $negate;
This pattern should probably be converted to a function
make_conditional_string ($cond, $negate);
Or even 'make_conditional' and change @cond_stack to store real
A::Conditional object references.
> Index: lib/Automake/Conditional.pm
> @@ -77,6 +77,9 @@
> # $other and $cond are implied by $both.)
> @conds = Automake::Conditional::reduce ($other, $both, $cond);
>
> + # Invert a Conditional. This returns a ConditionalSet.
> + $set = $both->not;
It doesn't :-)
@either_or_neither = $both->not;
> Index: lib/Automake/ConditionalSet.pm
[snip]
> +=item C<$prod = $set1->multiply ($set2)>
> +
> +Multiply to conditional sets.
s/to/two/
> - # Generate permutations for all subconditions.
> - my @perm = $self->permutations->conds;
Can we kill $self->permutations then :-)
> [[["COND1_TRUE", "COND2_TRUE"],
> ["COND3_FALSE", "COND2_TRUE"]],
> - [["COND1_FALSE","COND2_FALSE","COND3_FALSE"],
> - ["COND1_TRUE", "COND2_FALSE","COND3_FALSE"],
> - ["COND1_FALSE","COND2_FALSE","COND3_TRUE"],
> - ["COND1_TRUE", "COND2_FALSE","COND3_TRUE"],
> - ["COND1_FALSE","COND2_TRUE", "COND3_TRUE"]]],
> + [["COND2_FALSE"],
> + ["COND2_FALSE", "COND3_TRUE"],
> + ["COND1_FALSE", "COND2_FALSE"],
Hmm... The two conditionals above are redundant with COND2_FALSE.
You may want to pass the result of A::CS::_multiply through
A::C::reduce. On further thought, maybe not: you're going to
'simplify' the set soon enough anyway.
- Hari
--
Raja R Harinath ------------------------------ address@hidden
- Automake::Conditional::simplify (Quine-McCluskey), Alexandre Duret-Lutz, 2002/11/16
- Re: Automake::Conditional::simplify (Quine-McCluskey), Raja R Harinath, 2002/11/16
- Automake::Conditional::invert, Alexandre Duret-Lutz, 2002/11/19
- Re: Automake::Conditional::invert, Raja R Harinath, 2002/11/19
- Re: Automake::Conditional::invert, Alexandre Duret-Lutz, 2002/11/20
- Re: Automake::Conditional::invert,
Raja R Harinath <=
- Re: Automake::Conditional::invert, Alexandre Duret-Lutz, 2002/11/20
- Re: Automake::Conditional::invert, Raja R Harinath, 2002/11/20
- FYI: make_conditional_string, Alexandre Duret-Lutz, 2002/11/21
FYI: simplify variable_not_always_defined_in_cond, Alexandre Duret-Lutz, 2002/11/20