コード例 #1
0
ファイル: generalized.cs プロジェクト: nhannhan159/PAT
 /* 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);
 }
コード例 #2
0
ファイル: mem.cs プロジェクト: nhannhan159/PAT
        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;
        }
コード例 #3
0
ファイル: mem.cs プロジェクト: vu111293/pat-design
        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);
        }
コード例 #4
0
ファイル: mem.cs プロジェクト: nhannhan159/PAT
 internal static void free_gtrans(GTrans t, GTrans sentinel, int fly)
 {
 }
コード例 #5
0
ファイル: mem.cs プロジェクト: vu111293/pat-design
 internal static void free_gtrans(GTrans t, GTrans sentinel, int fly)
 {
 }
コード例 #6
0
ファイル: generalized.cs プロジェクト: nhannhan159/PAT
 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 */
 }