[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automake::Conditional::simplify (Quine-McCluskey)
From: |
Raja R Harinath |
Subject: |
Re: Automake::Conditional::simplify (Quine-McCluskey) |
Date: |
Sun, 17 Nov 2002 10:13:14 -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> $variable_conditions($var)
> Raja> -> sub_conditions($cond)
> Raja> -> invert
> Raja> -> simplify
> Raja> -> mult_cond($cond)
>
> Raja> Almost self-documenting :-)
>
> Sounds great. (It's what you suggested months ago, right?)
Yep. But, it is cleaner to express now, with things out of line.
> Raja> We can revisit this later, I guess. But, we may have to
> Raja> put in a warning in here if $rank >
> Raja> significant_bits_in_float.
>
> BTW, I wonder if it's even possible to use so much conditionals
> in Automake.
Exactly. I don't think it's worth it. Nesting 25 conditionals in
Makefile.am would be a nightmare.
> Calling A::CS::permutations with 25 conditionals seems somewhat
> memory-consuming. (Maybe it could help -- not in worst cases -- to
> always call A::CS::simplify before A::CS::invert)
And, you could switch to a more compact representation for
A::Conditional: move %var_rank and @rank_var from A::CS::simplify
into A::Conditional, and represent conditionals directly as bitsets.
A::C::permutations (somewhat of a misnomer) is after
all just counting from 00..0000 to 11..1111 for as many bits as there
are conditionals. So, 25 conditionals means 2^25 "permutations".
If you really want to worry about scalability, A::CS::invert would be
better written as a product-of-sums to sum-of-products converter,
rather than explicitly enumerating every truth-value candidate.
> 2002-11-17 Alexandre Duret-Lutz <address@hidden>
>
> * lib/Automake/ConditionalSet.pm (simplify): New method.
> (string): Call string for each Conditional.
> * automake.in (variable_not_always_defined_in_cond): Return
> a simplified ConditionalSet.
> (macro_define, require_variables): Adjust.
> * tests/Makefile.am (TEST): Add library3.test.
> * tests/library3.test: New file.
> * tests/pluseq9.test: Adjust.
Looks good.
- 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 <=
- 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, 2002/11/19
- 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