<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 15, 2014 at 11:41 AM, suyog sarda <span dir="ltr"><<a href="mailto:sardask01@gmail.com" target="_blank">sardask01@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">On Thu, Aug 14, 2014 at 4:09 AM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Even if you can't implement such an algorithm sanely, ISTM that<br>
auto-generating this code from a table (or whatever), and choosing<br>
canonical results (to avoid a fixpoint issue), rather than what seems<br>
to be hand-additions of every possible set of minimizations on three<br>
variables, is still a better solution, no?<br>
<br>
At least then you wouldn't have human errors, and a growing file that<br>
makes any of the non-trivial transforms easy to miss in the noise.<br>
<div><div><br></div></div></blockquote><div><br></div></div><div>That's what exactly i thought, basically to have auto generating minimized expression,</div><div>instead of hand writing code for every pattern.<br>
<br>Few links i found -</div><div><br></div><div><a href="http://sontrak.com/" target="_blank">http://sontrak.com/</a></div><div><br></div><div><a href="http://sourceforge.net/projects/truthtablesolve/" target="_blank">http://sourceforge.net/projects/truthtablesolve/</a></div>
<div><br></div><div>This might take much more time to implement, my <span style="font-family:arial,sans-serif;font-size:12.727272033691406px">immediate</span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"> goal is to improve matching capabilities.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div></div></div></div></blockquote><div><br></div><div>Daniel's suggestion could actually could be done pretty easily. (assume for now that we are most interested in boolean expressions over 3 variables). There are two parts:</div>
<div><br></div><div>1. Add some code that evaluates a given 3-arg boolean expression at each of the 2^3 == 8 values, creating an 8-bit index.</div><div><br></div><div>2. Create a table of 2^8 == 256 entries (not *too* much work to do by hand) which has the "preferred" representation for each boolean function of 3 variables.</div>
<div><br></div><div>Then, you just use the 8-bit index to look in the table for the "preferred" form of the expression. This approach could get a lot of "bang for your buck" without much code complexity or implementation difficulty.</div>
<div><br></div><div>The same could be done for 2-variable expressions easily (might be a good starting point). For 4-variable expressions, it might be more difficult since the table would need 2^(2^4) == 16k entries.</div>
<div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>
<span style="font-family:arial,sans-serif;font-size:12.727272033691406px"></span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Regards,</span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Suyog</span></div>
<div><br></div></div>
</div></div>
</blockquote></div><br></div></div>