return false;
}
int child = automaton.states[index].children[0];
Term[] values = value.children;
for(int i=0;i!=values.length;++i) {
Term vchild = values[i];
if(!accepts(child,automaton,vchild)) {
return false;
}
}
return true;
}
case Type.K_FUNCTION:
case Type.K_METHOD: {
int[] schildren = state.children;
Term[] vchildren = value.children;
if(schildren.length != vchildren.length) {
return false;
}
int length = schildren.length;
// First, do parameters (which are contravariant).
for(int i=2;i<length;++i) {
int schild = schildren[i];
Term vchild = vchildren[i];
if(accepts(schild,automaton,vchild)) {
return false;
}
}
// Second, do return values (which are covariant)