[antlr-interest] Factorization of Logic Expressions

Nazim Oztahtaci nazim_oztahtaci at hotmail.com
Wed Mar 17 13:43:24 PDT 2010


Hello,
actually this was my first point for the project group. but they want a compressed small string. that's why I am only able to read SoP form and try to reach the original version. or at leasy I should find a simplfied or factorized version.

> Date: Wed, 17 Mar 2010 10:26:35 -0700
> From: newsreply at areeda.com
> CC: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] Factorization of Logic Expressions
> 
> This might be a bit simplistic, but why not save the original expression
> as a string?  Then you could compare that with your processed version.
> 
> Joe
> 
> Nazim Oztahtaci wrote:
> > Hello everyone,
> > I would like to thank everyone first of all during their help when I became a new member to this group. I am working on Antlr and my task since last month. I am able to parse a logic expression such as a(b+c) into a tree, then I apply Demorgan and distribution so I reach a DNF representation: ab+ac.. The operators that I support are NOT, OR, AND, >, <. Timer and IF-ELSE statements. 
> > Now Im working on factorizing the DNF formed expressions back to originial because the user of my program will be able to read output data file which has only string representation of DNF expression. So I need to factorize the DNF expression. The way I try to do is putting the expression in a matrix such as
> >  a b c
> >  1 1 X  ab
> >  1 X 1  ac
> >
> > Then reading this matrix to find the most number of 1s and then re-check these rows if there are any more subsequences and so on.. I know that I cant reach the original expression everytime for the complicated expressions. Also for the reverse Demorgan, I cant use this matrix probably. I wanted to ask users of this mail group if they have any advice to me regarding an algorithm for this problem or a new way as solution.
> >
> > I know it is a bit hard and rare problem so even no help will be available for me, I appreciate for previous helps as well.
> >
> > Thank you all and good luck everyonje with their studies
> > Nazim
> >  		 	   		  
> > _________________________________________________________________
> > Yeni Windows 7: Size en uygun bilgisayarı bulun. Daha fazla bilgi edinin.
> > http://windows.microsoft.com/shop
> >
> > List: http://www.antlr.org/mailman/listinfo/antlr-interest
> > Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
> >   
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
 		 	   		  
_________________________________________________________________
Yeni Windows 7: Gündelik işlerinizi basitleştirin. Size en uygun bilgisayarı bulun.
http://windows.microsoft.com/shop


More information about the antlr-interest mailing list