sliceEntities :: ParsedModules -> (Entity -> Bool) -> (Entity -> Bool) -> ([Entity],Int,Int)
sliceEntities ms isSlice excludeSlice = (map snd lslice,cc,length loops)
    where
    start_lnodes = filter (isSlice . snd) lnodes
    mns = Map.keys ms
    g::AGr Entity CallType = efilter (\(_,_,e) -> e == NormalCall) $ graph $ graphData $ collapsedHData $ codeToGraph mns ms
    lnodes = labNodes g
    slice = accessibleFrom g (map fst start_lnodes)
    lslice = filter (not . excludeSlice . snd) $ map (\i -> (i,fromJust $ lab g i)) slice
    subg = subgraph (map fst lslice) g
    cc = cyclomaticComplexityGr subg
    loops = subloops subg
sliceEntities :: ParsedModules -> (Entity -> Bool) -> (Entity -> Bool) -> ([Entity],Int,Int)
sliceEntities ms isSlice excludeSlice = (map snd lslice,cc,length loops)
    where
    start_lnodes = filter (isSlice . snd) lnodes
    mns = Map.keys ms
    g::AGr Entity CallType = efilter (\(_,_,e) -> e == NormalCall) $ graph $ graphData $ collapsedHData $ codeToGraph mns ms
    lnodes = labNodes g
    slice = accessibleFrom g (map fst start_lnodes)
    lslice = filter (not . excludeSlice . snd) $ map (\i -> (i,fromJust $ lab g i)) slice
    subg = subgraph (map fst lslice) g
    cc = cyclomaticComplexityGr subg
    loops = subloops subg
sliceEntities ms isSlice excludeSlice = (map snd lslice,cc,length loops)
    where
    start_lnodes = filter (isSlice . snd) lnodes
    mns = Map.keys ms
    g::AGr Entity CallType = efilter (\(_,_,e) -> e == NormalCall) $ graph $ graphData $ collapsedHData $ codeToGraph mns ms
    lnodes = labNodes g
    slice = accessibleFrom g (map fst start_lnodes)
    lslice = filter (not . excludeSlice . snd) $ map (\i -> (i,fromJust $ lab g i)) slice
    subg = subgraph (map fst lslice) g
    cc = cyclomaticComplexityGr subg
    loops = subloops subg