featureToPropositionalLogic :: T.Tree (Feature a) -> [FeatureExpression]
featureToPropositionalLogic ftree =
    let f  = fnode ftree
        cs = children ftree
    in (
        case gCardinality f of
             (Cardinality 0 0)  -> [(ref f) |=> (ref c) | c <- cs, fCardinality c == mandatory]
             (Cardinality 1 1) -> [(ref f) |=> (foldOr [xor x (L.delete x cs) | x <- cs])]
             (Cardinality 1 _) -> [(ref f) |=> (foldOr [ref x | x <- cs])]
    ) ++ [(ref c) |=> (ref f) | c <- cs]
featureToPropositionalLogic :: T.Tree (Feature a) -> [FeatureExpression]
featureToPropositionalLogic ftree =
    let f  = fnode ftree
        cs = children ftree
    in (
        case gCardinality f of
             (Cardinality 0 0)  -> [(ref f) |=> (ref c) | c <- cs, fCardinality c == mandatory]
             (Cardinality 1 1) -> [(ref f) |=> (foldOr [xor x (L.delete x cs) | x <- cs])]
             (Cardinality 1 _) -> [(ref f) |=> (foldOr [ref x | x <- cs])]
    ) ++ [(ref c) |=> (ref f) | c <- cs]
featureToPropositionalLogic ftree =
    let f  = fnode ftree
        cs = children ftree
    in (
        case gCardinality f of
             (Cardinality 0 0)  -> [(ref f) |=> (ref c) | c <- cs, fCardinality c == mandatory]
             (Cardinality 1 1) -> [(ref f) |=> (foldOr [xor x (L.delete x cs) | x <- cs])]
             (Cardinality 1 _) -> [(ref f) |=> (foldOr [ref x | x <- cs])]
    ) ++ [(ref c) |=> (ref f) | c <- cs]