Fixed all warnings
This commit is contained in:
parent
f0503c0a86
commit
42f2334450
|
@ -146,7 +146,6 @@ int get_sym_id(char *s) /* finds the id of a predicate, or attributes one */
|
||||||
ATrans *boolean(Node *p) /* computes the transitions to boolean nodes -> next & init */
|
ATrans *boolean(Node *p) /* computes the transitions to boolean nodes -> next & init */
|
||||||
{
|
{
|
||||||
ATrans *t1, *t2, *lft, *rgt, *result = (ATrans *)0;
|
ATrans *t1, *t2, *lft, *rgt, *result = (ATrans *)0;
|
||||||
int id;
|
|
||||||
switch(p->ntyp) {
|
switch(p->ntyp) {
|
||||||
case TRUE:
|
case TRUE:
|
||||||
result = emalloc_atrans();
|
result = emalloc_atrans();
|
||||||
|
@ -433,8 +432,8 @@ void mk_alternating(Node *p) /* generates an alternating automaton for p */
|
||||||
if(tl_stats) {
|
if(tl_stats) {
|
||||||
getrusage(RUSAGE_SELF, &tr_fin);
|
getrusage(RUSAGE_SELF, &tr_fin);
|
||||||
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
||||||
fprintf(tl_out, "\nBuilding and simplification of the alternating automaton: %i.%06is",
|
fprintf(tl_out, "\nBuilding and simplification of the alternating automaton: %lli.%06is",
|
||||||
t_diff.tv_sec, t_diff.tv_usec);
|
(long long int)t_diff.tv_sec, t_diff.tv_usec);
|
||||||
fprintf(tl_out, "\n%i states, %i transitions\n", astate_count, atrans_count);
|
fprintf(tl_out, "\n%i states, %i transitions\n", astate_count, atrans_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
buchi.c
15
buchi.c
|
@ -110,8 +110,8 @@ int simplify_btrans() /* simplifies the transitions */
|
||||||
if(tl_stats) {
|
if(tl_stats) {
|
||||||
getrusage(RUSAGE_SELF, &tr_fin);
|
getrusage(RUSAGE_SELF, &tr_fin);
|
||||||
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
||||||
fprintf(tl_out, "\nSimplification of the Buchi automaton - transitions: %i.%06is",
|
fprintf(tl_out, "\nSimplification of the Buchi automaton - transitions: %lli.%06is",
|
||||||
t_diff.tv_sec, t_diff.tv_usec);
|
(long long int)t_diff.tv_sec, t_diff.tv_usec);
|
||||||
fprintf(tl_out, "\n%i transitions removed\n", changed);
|
fprintf(tl_out, "\n%i transitions removed\n", changed);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,6 @@ void remove_btrans(BState *to)
|
||||||
{ /* redirects transitions before removing a state from the automaton */
|
{ /* redirects transitions before removing a state from the automaton */
|
||||||
BState *s;
|
BState *s;
|
||||||
BTrans *t;
|
BTrans *t;
|
||||||
int i;
|
|
||||||
for (s = bstates->nxt; s != bstates; s = s->nxt)
|
for (s = bstates->nxt; s != bstates; s = s->nxt)
|
||||||
for (t = s->trans->nxt; t != s->trans; t = t->nxt)
|
for (t = s->trans->nxt; t != s->trans; t = t->nxt)
|
||||||
if (t->to == to) { /* transition to a state with no transitions */
|
if (t->to == to) { /* transition to a state with no transitions */
|
||||||
|
@ -225,8 +224,8 @@ int simplify_bstates() /* eliminates redundant states */
|
||||||
if(tl_stats) {
|
if(tl_stats) {
|
||||||
getrusage(RUSAGE_SELF, &tr_fin);
|
getrusage(RUSAGE_SELF, &tr_fin);
|
||||||
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
||||||
fprintf(tl_out, "\nSimplification of the Buchi automaton - states: %i.%06is",
|
fprintf(tl_out, "\nSimplification of the Buchi automaton - states: %lli.%06is",
|
||||||
t_diff.tv_sec, t_diff.tv_usec);
|
(long long int)t_diff.tv_sec, t_diff.tv_usec);
|
||||||
fprintf(tl_out, "\n%i states removed\n", changed);
|
fprintf(tl_out, "\n%i states removed\n", changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -465,7 +464,7 @@ void print_buchi(BState *s) /* dumps the Buchi automaton */
|
||||||
void print_spin_buchi() {
|
void print_spin_buchi() {
|
||||||
BTrans *t;
|
BTrans *t;
|
||||||
BState *s;
|
BState *s;
|
||||||
int accept_all = 0, init_count = 0;
|
int accept_all = 0;
|
||||||
if(bstates->nxt == bstates) { /* empty automaton */
|
if(bstates->nxt == bstates) { /* empty automaton */
|
||||||
fprintf(tl_out, "never { /* ");
|
fprintf(tl_out, "never { /* ");
|
||||||
put_uform();
|
put_uform();
|
||||||
|
@ -620,8 +619,8 @@ void mk_buchi()
|
||||||
if(tl_stats) {
|
if(tl_stats) {
|
||||||
getrusage(RUSAGE_SELF, &tr_fin);
|
getrusage(RUSAGE_SELF, &tr_fin);
|
||||||
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
||||||
fprintf(tl_out, "\nBuilding the Buchi automaton : %i.%06is",
|
fprintf(tl_out, "\nBuilding the Buchi automaton : %lli.%06is",
|
||||||
t_diff.tv_sec, t_diff.tv_usec);
|
(long long int)t_diff.tv_sec, t_diff.tv_usec);
|
||||||
fprintf(tl_out, "\n%i states, %i transitions\n", bstate_count, btrans_count);
|
fprintf(tl_out, "\n%i states, %i transitions\n", bstate_count, btrans_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
3
cache.c
3
cache.c
|
@ -78,7 +78,8 @@ cached(Node *n)
|
||||||
Node *m;
|
Node *m;
|
||||||
|
|
||||||
if (!n) return n;
|
if (!n) return n;
|
||||||
if (m = in_cache(n))
|
m = in_cache(n);
|
||||||
|
if (m)
|
||||||
return m;
|
return m;
|
||||||
|
|
||||||
Caches++;
|
Caches++;
|
||||||
|
|
|
@ -151,8 +151,8 @@ int simplify_gtrans() /* simplifies the transitions */
|
||||||
if(tl_stats) {
|
if(tl_stats) {
|
||||||
getrusage(RUSAGE_SELF, &tr_fin);
|
getrusage(RUSAGE_SELF, &tr_fin);
|
||||||
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
||||||
fprintf(tl_out, "\nSimplification of the generalized Buchi automaton - transitions: %i.%06is",
|
fprintf(tl_out, "\nSimplification of the generalized Buchi automaton - transitions: %lli.%06is",
|
||||||
t_diff.tv_sec, t_diff.tv_usec);
|
(long long int)t_diff.tv_sec, t_diff.tv_usec);
|
||||||
fprintf(tl_out, "\n%i transitions removed\n", changed);
|
fprintf(tl_out, "\n%i transitions removed\n", changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,8 +244,8 @@ int simplify_gstates() /* eliminates redundant states */
|
||||||
if(tl_stats) {
|
if(tl_stats) {
|
||||||
getrusage(RUSAGE_SELF, &tr_fin);
|
getrusage(RUSAGE_SELF, &tr_fin);
|
||||||
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
||||||
fprintf(tl_out, "\nSimplification of the generalized Buchi automaton - states: %i.%06is",
|
fprintf(tl_out, "\nSimplification of the generalized Buchi automaton - states: %lli.%06is",
|
||||||
t_diff.tv_sec, t_diff.tv_usec);
|
(long long int)t_diff.tv_sec, t_diff.tv_usec);
|
||||||
fprintf(tl_out, "\n%i states removed\n", changed);
|
fprintf(tl_out, "\n%i states removed\n", changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,8 +389,7 @@ GState *find_gstate(int *set, GState *s)
|
||||||
void make_gtrans(GState *s) { /* creates all the transitions from a state */
|
void make_gtrans(GState *s) { /* creates all the transitions from a state */
|
||||||
int i, *list, state_trans = 0, trans_exist = 1;
|
int i, *list, state_trans = 0, trans_exist = 1;
|
||||||
GState *s1;
|
GState *s1;
|
||||||
GTrans *t;
|
ATrans *t1;
|
||||||
ATrans *t1, *free;
|
|
||||||
AProd *prod = (AProd *)tl_emalloc(sizeof(AProd)); /* initialization */
|
AProd *prod = (AProd *)tl_emalloc(sizeof(AProd)); /* initialization */
|
||||||
prod->nxt = prod;
|
prod->nxt = prod;
|
||||||
prod->prv = prod;
|
prod->prv = prod;
|
||||||
|
@ -570,7 +569,6 @@ void mk_generalized()
|
||||||
{ /* generates a generalized Buchi automaton from the alternating automaton */
|
{ /* generates a generalized Buchi automaton from the alternating automaton */
|
||||||
ATrans *t;
|
ATrans *t;
|
||||||
GState *s;
|
GState *s;
|
||||||
int i;
|
|
||||||
|
|
||||||
if(tl_stats) getrusage(RUSAGE_SELF, &tr_debut);
|
if(tl_stats) getrusage(RUSAGE_SELF, &tr_debut);
|
||||||
|
|
||||||
|
@ -618,13 +616,13 @@ void mk_generalized()
|
||||||
if(tl_stats) {
|
if(tl_stats) {
|
||||||
getrusage(RUSAGE_SELF, &tr_fin);
|
getrusage(RUSAGE_SELF, &tr_fin);
|
||||||
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
timeval_subtract (&t_diff, &tr_fin.ru_utime, &tr_debut.ru_utime);
|
||||||
fprintf(tl_out, "\nBuilding the generalized Buchi automaton : %i.%06is",
|
fprintf(tl_out, "\nBuilding the generalized Buchi automaton : %lli.%06is",
|
||||||
t_diff.tv_sec, t_diff.tv_usec);
|
(long long int)t_diff.tv_sec, t_diff.tv_usec);
|
||||||
fprintf(tl_out, "\n%i states, %i transitions\n", gstate_count, gtrans_count);
|
fprintf(tl_out, "\n%i states, %i transitions\n", gstate_count, gtrans_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
tfree(gstack);
|
tfree(gstack);
|
||||||
/*for(i = 0; i < node_id; i++) /* frees the data from the alternating automaton */
|
/*for(i = 0; i < node_id; i++) / * frees the data from the alternating automaton */
|
||||||
/*free_atrans(transition[i], 1);*/
|
/*free_atrans(transition[i], 1);*/
|
||||||
free_all_atrans();
|
free_all_atrans();
|
||||||
tfree(transition);
|
tfree(transition);
|
||||||
|
|
1
ltl2ba.h
1
ltl2ba.h
|
@ -186,7 +186,6 @@ void a_stats(void);
|
||||||
void addtrans(Graph *, char *, Node *, char *);
|
void addtrans(Graph *, char *, Node *, char *);
|
||||||
void cache_stats(void);
|
void cache_stats(void);
|
||||||
void dump(Node *);
|
void dump(Node *);
|
||||||
void exit(int);
|
|
||||||
void Fatal(char *, char *);
|
void Fatal(char *, char *);
|
||||||
void fatal(char *, char *);
|
void fatal(char *, char *);
|
||||||
void fsm_print(void);
|
void fsm_print(void);
|
||||||
|
|
3
rewrt.c
3
rewrt.c
|
@ -60,7 +60,8 @@ canonical(Node *n)
|
||||||
{ Node *m; /* assumes input is right_linked */
|
{ Node *m; /* assumes input is right_linked */
|
||||||
|
|
||||||
if (!n) return n;
|
if (!n) return n;
|
||||||
if (m = in_cache(n))
|
m = in_cache(n);
|
||||||
|
if (m)
|
||||||
return m;
|
return m;
|
||||||
|
|
||||||
n->rgt = canonical(n->rgt);
|
n->rgt = canonical(n->rgt);
|
||||||
|
|
4
util.c
4
util.c
|
@ -67,9 +67,9 @@ non_fatal(char *s1, char *s2)
|
||||||
|
|
||||||
printf("ltl2ba: ");
|
printf("ltl2ba: ");
|
||||||
if (s2)
|
if (s2)
|
||||||
printf(s1, s2);
|
fprintf(stdout, s1, s2);
|
||||||
else
|
else
|
||||||
printf(s1);
|
fputs(s1, stdout);
|
||||||
if (tl_yychar != -1 && tl_yychar != 0)
|
if (tl_yychar != -1 && tl_yychar != 0)
|
||||||
{ printf(", saw '");
|
{ printf(", saw '");
|
||||||
tl_explain(tl_yychar);
|
tl_explain(tl_yychar);
|
||||||
|
|
Loading…
Reference in a new issue