Sorry for the cross-post.

Does anyone (CS majors, especially) know how to prune
logical branches 
programmatically (and how difficult is the task)? For
example, if I have

(HIGRADE = None)
OR (
        HIGRADE <> DONTKNOW
        AND (HIGRADE <> REFUSAL)
        AND (HIGRADE.ORD <= 12)
        AND (
                        (HIGRADE.ORD <> 12) OR (COMPGRD <> Yes)
        AND (
                        (HIGRADE.ORD <> 12) OR (COMPGRD = Yes) OR (GOSCHOL
=
Yes)
                 )
        AND (
                        (HIGRADE.ORD > 12) OR (GOSCHOL = Yes)
                )
        )

By reasoning, I can reduce this to the equivalent

(HIGRADE = None)
OR (
        HIGRADE.ORD <= 12th grade
        AND (
                (HIGRADE.ORD < 12 grade) OR (COMPGRD <> Yes)
                )
        AND (GOSCHOL = Yes)

by noting that some of the overlapping conditions are
redundant. But how 
would I do this programmically and what's the
approach? (I assume that 
optimizing compilers might do something like this to
prune unused program 
branches). I know a little about compilers, lexers,
parsers, symbol tables, etc. but not too much....
References greatly appreciated


=====
I-Lin Kuo
Macromedia CF5 Advanced Developer
Sun Certified Java 2 Programmer

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to