Commit 4aa409cc authored by SPARSA ROYCHOWDHURY's avatar SPARSA ROYCHOWDHURY

25/10/2017:

1. Coding is Done.
2. Timed Automata Tested
3. Timed Push Down automata good example needed and hopefully it will work.

Sparsa Roychowdhury
parent 04d3e929
......@@ -20,7 +20,7 @@
1 1
2 3 0 1 0
1 0 0 1 0
1 0 0 1 1
0
3 4 0 0 0
......@@ -31,4 +31,4 @@
0
4 4 0 0 0
2 1 1 0 2 0
2 1 1 0 2 1
......@@ -142,6 +142,10 @@ stateGCPP* stateGCPP::reduceShuffle(stateGCPP* s2) {
{
map_p2[i] = map_p1[map1[i]];
}
else if (i == L2 -1)
{
map_p2[i] = map_p1[P-1];
}
else
{
map_p2[i] = index;
......@@ -173,7 +177,7 @@ stateGCPP* stateGCPP::reduceShuffle(stateGCPP* s2) {
if(storage_matrix[map_p2[i]][map_p2[j]] > s2->r_matrix[i][j])
storage_matrix[map_p2[i]][map_p2[j]] = s2->r_matrix[i][j];
}
print_r_matrix(storage_matrix,points_before_reduce);
pairWiseTightestRelation(storage_matrix,(points_before_reduce));
char map[count];
......@@ -213,6 +217,7 @@ stateGCPP* stateGCPP::reduceShuffle(stateGCPP* s2) {
//copy the point L, doing it separately because of the flag variable which is not applicable for L-th point
vs->del[L-1] = del[L-1];
vs->w[L-1] = w[L-1];
map[L-1] = map_p1[L-1];
// for(int i = 0 ; i < L ;i++)
// {
// vs->r_matrix[vs->P-1][i] = r_matrix[P-1][i];
......@@ -296,7 +301,10 @@ stateGCPP* stateGCPP::reduceShuffle(stateGCPP* s2) {
{
vs->r_matrix[i][j] = storage_matrix[map[i]][map[j]];
}
//print_r_matrix(storage_matrix,points_before_reduce);
print_r_matrix(vs->r_matrix,vs->P);
pairWiseTightestRelation(vs->r_matrix,vs->P);
print_r_matrix(vs->r_matrix,vs->P);
delete_r_matrix(storage_matrix,points_before_reduce);
return vs;
}
......@@ -1702,10 +1710,13 @@ stateGCPP* stateGCPP::reduce2(char dn,char wn,short* clockDis,bool* clockAcc,sho
char count = 0; // #points in new state
//char i; // looper
/////
bool popflag; // 1 iff there is pop at the new transition 'dn'
bool pushAtL = isPush( del[L-1] );
short dis, dis_l = 1;
int openl, openu;
openl = transitions[dn].openl;
openu = transitions[dn].openu;
popflag = isPop(dn);
relation ** store_matrix = allocate_r_matrix(P+1);
for(char i = 0; i < P-1; i++)
......@@ -1760,7 +1771,7 @@ stateGCPP* stateGCPP::reduce2(char dn,char wn,short* clockDis,bool* clockAcc,sho
}
}
if(aclr)
if(aclr && popflag && pushAtL)
{
short dis = dlr + mod(wn - w[P-1],M);
char t = L-1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment