package at.ac.tuwien.dbai.alternation.examples;
import java.util.Map;
import java.util.Set;

cyclic atm Horn2(int goal, Map<Integer, Set<Set<Integer>>> rules) {
int head=goal;
Set<Integer> body;

state head{
    exists{
            for(Set<Integer> rule: rules.get(head)){
                body{
                    head=0;
                    body=rule;
                }
            }
    }
}

state body {
    forall{
        for(Integer literal: body){
            head{
                head=literal;
                body=null;
            }
        }
    }
}


}