-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutil.h
67 lines (50 loc) · 2.25 KB
/
util.h
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
This file is part of QRATPre+.
Copyright 2019
Florian Lonsing, Stanford University, USA.
Copyright 2018
Florian Lonsing, Vienna University of Technology, Austria.
QRATPre+ is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
QRATPre+ is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with QRATPre+. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QRATPREPLUS_UTIL_H_INCLUDED
#define QRATPREPLUS_UTIL_H_INCLUDED
#include <stdlib.h>
#include "qratpreplus_internals.h"
/* Macro to print message and abort. */
#define ABORT_APP(cond,msg) \
do { \
if (cond) \
{ \
fprintf (stderr, "[QRATPREPLUS] %s at line %d: %s\n", __func__, \
__LINE__, msg); \
fflush (stderr); \
abort(); \
} \
} while (0)
/* Print error message. */
void print_abort_err (char *msg, ...);
/* Print array 'lits' of literals of length 'num'. If 'print_info' is
non-zero, then print info about the qblock of each literal in the array. */
void print_lits (QRATPrePlus * qr,
FILE * out,
LitID * lits,
unsigned int num,
const int print_info);
/* Get process time. Can be used for performance statistics. */
double time_stamp ();
int exceeded_soft_time_limit (QRATPrePlus * qr);
unsigned int count_qtype_literals (QRATPrePlus * qr,
Clause * c,
QuantifierType type);
int find_literal (LitID lit, LitID * start, LitID * end);
void assert_lits_sorted (QRATPrePlus *, LitID *, LitID *);
#endif