/* copies a transition */ internal static void copy_gtrans(GTrans from, GTrans to) { to.to = from.to; set.copy_set(from.pos, to.pos, 1); set.copy_set(from.neg, to.neg, 1); set.copy_set(from.final, to.final, 0); }
internal static GTrans emalloc_gtrans() { GTrans result = new GTrans(); result.pos = set.new_set(1); result.neg = set.new_set(1); result.final = set.new_set(0); return result; }
internal static GTrans emalloc_gtrans() { GTrans result = new GTrans(); result.pos = set.new_set(1); result.neg = set.new_set(1); result.final = set.new_set(0); return(result); }
internal static void free_gtrans(GTrans t, GTrans sentinel, int fly) { }
internal static int same_gtrans(GState a, GTrans s, GState b, GTrans t, int use_scc) { /* returns 1 if the transitions are identical */ if((s.to != t.to) || set.same_sets(s.pos, t.pos, 1) == 0 || set.same_sets(s.neg, t.neg, 1) == 0) return 0; /* transitions differ */ if(set.same_sets(s.final, t.final, 0) != 0) return 1; /* same transitions exactly */ /* next we check whether acceptance conditions may be ignored */ if( use_scc != 0 && ( set.in_set(bad_scc, a.incoming) != 0 || set.in_set(bad_scc, b.incoming) != 0 || (a.incoming != s.to.incoming) || (b.incoming != t.to.incoming) ) ) return 1; return 0; /* below is the old test to check whether acceptance conditions may be ignored */ //if(use_scc == 0) //return 0; /* transitions differ */ //if( (a.incoming == b.incoming) && (a.incoming == s.to.incoming) ) //return 0; /* same scc: acceptance conditions must be taken into account */ /* if scc(a)=scc(b)>scc(s.to) then acceptance conditions need not be taken into account */ /* if scc(a)>scc(b) and scc(a) is non-trivial then all_gtrans_match(a,b,use_scc) will fail */ /* if scc(a) is trivial then acceptance conditions of transitions from a need not be taken into account */ return 1; /* same transitions up to acceptance conditions */ }