[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: |
Tue, 19 Nov 2002 18:32:29 -0600 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) |
Hi,
Alexandre Duret-Lutz <address@hidden> writes:
>>>> "Raja" == Raja R Harinath <address@hidden> writes:
>
> [...]
>
> Raja> If you really want to worry about scalability, A::CS::invert would be
> Raja> better written as a product-of-sums to sum-of-products converter,
> Raja> rather than explicitly enumerating every truth-value candidate.
>
> [...]
>
> Here is my proposal. make check is running.
>
> 2002-11-19 Alexandre Duret-Lutz <address@hidden>
>
> * lib/Automake/ConditionalSet.pm (conds): Use value() to simplify.
> (invert): Rewrite as a product-of-sums to sum-of-products converter.
> Suggested by Raja R Harinath.
> * lib/Automake/tests/ConditionalSet.pl (test_invert): Update.
> * automake.in (condition_negate): Move ...
> * lib/Automake/Conditional.pm (negate_condition): ... here.
Looks OK.
Noting the handling of the %res in 'invert', you might as well use the
ConditionalSet constructor. There are two slightly more primitive
operations that this can be written in terms of.
* method A::C::not which returns an ConditionalSet
* method A::CS::multiply that takes another ConditionalSet,
multiplies it with $self and returns a new ConditionalSet
$res = new A::CS A::C::TRUE;
$res = $res->multiply $cond->not
foreach $cond ($self->conds);
return $res;
It's not all that important, though. What you have is fine.
- 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
- Re: Automake::Conditional::simplify (Quine-McCluskey), Alexandre Duret-Lutz, 2002/11/17
- Re: Automake::Conditional::simplify (Quine-McCluskey), Raja R Harinath, 2002/11/17
- Re: Automake::Conditional::simplify (Quine-McCluskey), Alexandre Duret-Lutz, 2002/11/18
- Re: Automake::Conditional::simplify (Quine-McCluskey), Raja R Harinath, 2002/11/18
- Re: Automake::Conditional::simplify (Quine-McCluskey), Alexandre Duret-Lutz, 2002/11/19
- Automake::Conditional::invert, Alexandre Duret-Lutz, 2002/11/19
- 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
- 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