private void funcExpectedOut(Statement s, List<Statement> succ) {
        if(succ == null)
            return;
        //expectedOut.put(s, new LinkedList<Statement>());

        List<Statement> f = new LinkedList<Statement>();
        if(expectedIn.get(succ.get(0)) != null)
            f.addAll(expectedIn.get(succ.get(0)));
        else
            return;
        if(f == null)       //if f is empty, then intersection is empty
            return;
        succ. remove(0);
        if(succ.isEmpty()) {    //if succ is now empty, then it consisted of only f and intersection equals to f
            expectedOut.put(s, new LinkedList<Statement>());
            expectedOut.get(s).addAll(f);
        } else {
            List<Statement> elementsToRemove = new LinkedList<Statement>();

            List <Statement> result = new LinkedList<Statement>();
            result.addAll(f);      //now result contains all statements from expectedIn for f
            for(Statement l: succ) {        //want to compare all in expectedIn for succ
                List<Statement> outNext = expectedIn.get(l);
                if(outNext == null)
                    return;
                for(Statement r: result) {
                    boolean ok = false;
                    for (Statement out : outNext)
                        if (compareExpressions(out, r))
                            ok = true;
                    if (!ok)
                        elementsToRemove.add(r);
                        //result.remove(r);
                }
            }
            for(Statement r: elementsToRemove)
                result.remove(r);
            expectedOut.put(s, result);
        }
    }