-
Notifications
You must be signed in to change notification settings - Fork 1
/
yals.h
78 lines (49 loc) · 2.27 KB
/
yals.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
68
69
70
71
72
73
74
75
76
77
78
/*-------------------------------------------------------------------------*/
/* Copyright 2021 xnfSAT Authors */
/*-------------------------------------------------------------------------*/
#ifndef LIBYALS_H_INCLUDED
#define LIBYALS_H_INCLUDED
/*------------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
/*------------------------------------------------------------------------*/
typedef struct Yals Yals;
/*------------------------------------------------------------------------*/
Yals * yals_new ();
void yals_del (Yals *);
/*------------------------------------------------------------------------*/
typedef void * (*YalsMalloc)(void*,size_t);
typedef void * (*YalsRealloc)(void*,void*,size_t,size_t);
typedef void (*YalsFree)(void*,void*,size_t);
Yals * yals_new_with_mem_mgr (void*, YalsMalloc, YalsRealloc, YalsFree);
/*------------------------------------------------------------------------*/
void yals_srand (Yals *, unsigned long long seed);
int yals_setopt (Yals *, const char * name, int val);
void yals_setprefix (Yals *, const char *);
void yals_setout (Yals *, FILE *);
void yals_setphase (Yals *, int lit);
void yals_setflipslimit (Yals *, long long);
void yals_setmemslimit (Yals *, long long);
int yals_getopt (Yals *, const char * name);
void yals_usage (Yals *);
void yals_showopts (Yals *);
/*------------------------------------------------------------------------*/
void yals_begin_xor_clause(Yals *);
void yals_add (Yals *, int lit);
int yals_sat (Yals *);
/*------------------------------------------------------------------------*/
long long yals_flips (Yals *);
long long yals_mems (Yals *);
int yals_minimum (Yals *);
int yals_lkhd (Yals *);
int yals_deref (Yals *, int lit);
const int * yals_minlits (Yals *);
/*------------------------------------------------------------------------*/
void yals_stats (Yals *);
/*------------------------------------------------------------------------*/
void yals_seterm (Yals *, int (*term)(void*), void*);
void yals_setime (Yals *, double (*time)(void));
void yals_setmsglock (Yals *,
void (*lock)(void*), void (*unlock)(void*), void*);
/*------------------------------------------------------------------------*/
#endif