File: btorutil.h

package info (click to toggle)
boolector 1.5.118.6b56be4.121013-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, stretch
  • size: 2,220 kB
  • sloc: ansic: 47,665; sh: 422; cpp: 173; makefile: 155
file content (40 lines) | stat: -rw-r--r-- 874 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*  Boolector: Satisfiablity Modulo Theories (SMT) solver.
 *
 *  Copyright (C) 2007 Robert Daniel Brummayer.
 *  Copyright (C) 2007-2012 Armin Biere.
 *
 *  All rights reserved.
 *
 *  This file is part of Boolector.
 *  See COPYING for more information on using this software.
 */


#ifndef BTORUTIL_H_INCLUDED
#define BTORUTIL_H_INCLUDED

#define BTOR_HAVE_GETRUSAGE // TODO make this a configuration option

#define BTOR_MAX_UTIL(x,y) ((x) > (y) ? (x) : (y))

#define BTOR_MIN_UTIL(x,y) ((x) < (y) ? (x) : (y))

#define BTOR_AVERAGE_UTIL(a,b) ((b) ? ((double)(a))/((double)(b)) : 0.0)

int btor_is_power_of_2_util (int x);

int btor_log_2_util (int x);

int btor_pow_2_util (int x);

int btor_next_power_of_2_util (int x);

int btor_num_digits_util (int x);

#ifdef BTOR_HAVE_GETRUSAGE
double btor_time_stamp (void);
#endif

int btor_file_exists (const char *);

#endif