Browse Source

Code tidy: some return types and int/double cast issues.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@480 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 18 years ago
parent
commit
db117c74c4
  1. 2
      prism/include/hybrid.h
  2. 2
      prism/src/dd/dd_info.cc
  3. 8
      prism/src/dd/dd_matrix.cc
  4. 4
      prism/src/dv/dv.cc
  5. 2
      prism/src/hybrid/hybrid.cc

2
prism/include/hybrid.h

@ -32,7 +32,7 @@
//------------------------------------------------------------------------------
int fatal(char *s);
void fatal(char *s);
// hdd data structure definitions

2
prism/src/dd/dd_info.cc

@ -195,7 +195,7 @@ bool and_numbers)
Cudd_RecursiveDeref(ddman, tmp);
// Finally, print if there are (and possibly how many) minus infinities
if (and_numbers) {
if (count < (1<<num_vars)) fprintf(dd_out, "-inf (%.0f)", pow(2, num_vars) - count);
if (count < (1<<num_vars)) fprintf(dd_out, "-inf (%.0f)", pow(2.0, num_vars) - count);
} else {
if (min == -HUGE_VAL) fprintf(dd_out, "-inf");
}

8
prism/src/dd/dd_matrix.cc

@ -379,7 +379,7 @@ int accuracy
inputs[j] = 0;
}
length = (long)pow(2, num_vars);
length = (long)pow(2.0, num_vars);
for (i = 0; i < length; i++) {
for (j = 0; j < num_vars; j++) {
@ -443,8 +443,8 @@ int accuracy
inputs[k] = 0;
}
rows = (long)pow(2, num_rvars);
cols = (long)pow(2, num_cvars);
rows = (long)pow(2.0, num_rvars);
cols = (long)pow(2.0, num_cvars);
for (i = 0; i < rows; i++) {
for (j = 0; j < cols; j++) {
@ -511,7 +511,7 @@ int accuracy
inputs[j] = 0;
}
length = (long)pow(2, num_vars);
length = (long)pow(2.0, num_vars);
count = -1;
for (i = 0; i < length; i++) {

4
prism/src/dv/dv.cc

@ -33,7 +33,7 @@
static void mtbdd_to_double_vector_rec(DdManager *ddman, DdNode *dd, DdNode **vars, int num_vars, int level, ODDNode *odd, long o, double *res);
static DdNode *double_vector_to_mtbdd_rec(DdManager *ddman, double *vec, DdNode **vars, int num_vars, int level, ODDNode *odd, long o);
static DdNode *double_vector_to_bdd_rec(DdManager *ddman, double *vec, int rel_op, double bound1, double bound2, DdNode **vars, int num_vars, int level, ODDNode *odd, long o);
static double filter_double_vector_rec(DdManager *ddman, double *vec, DdNode *filter, DdNode **vars, int num_vars, int level, ODDNode *odd, long o);
static void filter_double_vector_rec(DdManager *ddman, double *vec, DdNode *filter, DdNode **vars, int num_vars, int level, ODDNode *odd, long o);
static double get_first_from_bdd_rec(DdManager *ddman, double *vec, DdNode *filter, DdNode **vars, int num_vars, int level, ODDNode *odd, long o);
static double min_double_vector_over_bdd_rec(DdManager *ddman, double *vec, DdNode *filter, DdNode **vars, int num_vars, int level, ODDNode *odd, long o);
static double max_double_vector_over_bdd_rec(DdManager *ddman, double *vec, DdNode *filter, DdNode **vars, int num_vars, int level, ODDNode *odd, long o);
@ -193,7 +193,7 @@ EXPORT void filter_double_vector(DdManager *ddman, double *vec, DdNode *filter,
filter_double_vector_rec(ddman, vec, filter, vars, num_vars, 0, odd, 0);
}
double filter_double_vector_rec(DdManager *ddman, double *vec, DdNode *filter, DdNode **vars, int num_vars, int level, ODDNode *odd, long o)
void filter_double_vector_rec(DdManager *ddman, double *vec, DdNode *filter, DdNode **vars, int num_vars, int level, ODDNode *odd, long o)
{
DdNode *dd;

2
prism/src/hybrid/hybrid.cc

@ -32,7 +32,7 @@
#include "PrismHybridGlob.h"
#include <math.h>
int fatal( char *s) { fprintf(stderr, "fatal...\n"); perror(s); exit(10); }
void fatal( char *s) { fprintf(stderr, "fatal...\n"); perror(s); exit(10); }
// globals (used by local functions)
static HDDMatrix *hddm;

Loading…
Cancel
Save