abc-master
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "satVec.h"
#include "satClause.h"
Go to the source code of this file.
Data Structures | |
struct | sat_solver_t |
Typedefs | |
typedef struct sat_solver_t | sat_solver |
typedef struct varinfo_t | varinfo |
Functions | |
sat_solver * | sat_solver_new (void) |
void | sat_solver_delete (sat_solver *s) |
int | sat_solver_addclause (sat_solver *s, lit *begin, lit *end) |
int | sat_solver_clause_new (sat_solver *s, lit *begin, lit *end, int learnt) |
int | sat_solver_simplify (sat_solver *s) |
int | sat_solver_solve (sat_solver *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal) |
void | sat_solver_restart (sat_solver *s) |
void | sat_solver_rollback (sat_solver *s) |
int | sat_solver_nvars (sat_solver *s) |
int | sat_solver_nclauses (sat_solver *s) |
int | sat_solver_nconflicts (sat_solver *s) |
double | sat_solver_memory (sat_solver *s) |
int | sat_solver_count_assigned (sat_solver *s) |
void | sat_solver_setnvars (sat_solver *s, int n) |
int | sat_solver_get_var_value (sat_solver *s, int v) |
void | Sat_SolverWriteDimacs (sat_solver *p, char *pFileName, lit *assumptionsBegin, lit *assumptionsEnd, int incrementVars) |
void | Sat_SolverPrintStats (FILE *pFile, sat_solver *p) |
int * | Sat_SolverGetModel (sat_solver *p, int *pVars, int nVars) |
void | Sat_SolverDoubleClauses (sat_solver *p, int iVar) |
void | Sat_SolverTraceStart (sat_solver *pSat, char *pName) |
DECLARATIONS ///. More... | |
void | Sat_SolverTraceStop (sat_solver *pSat) |
void | Sat_SolverTraceWrite (sat_solver *pSat, int *pBeg, int *pEnd, int fRoot) |
void | sat_solver_store_alloc (sat_solver *s) |
void | sat_solver_store_write (sat_solver *s, char *pFileName) |
void | sat_solver_store_free (sat_solver *s) |
void | sat_solver_store_mark_roots (sat_solver *s) |
void | sat_solver_store_mark_clauses_a (sat_solver *s) |
void * | sat_solver_store_release (sat_solver *s) |
static clause * | clause_read (sat_solver *s, cla h) |
static int | sat_solver_var_value (sat_solver *s, int v) |
static int | sat_solver_var_literal (sat_solver *s, int v) |
static void | sat_solver_act_var_clear (sat_solver *s) |
static void | sat_solver_compress (sat_solver *s) |
static int | sat_solver_final (sat_solver *s, int **ppArray) |
static abctime | sat_solver_set_runtime_limit (sat_solver *s, abctime Limit) |
static int | sat_solver_set_random (sat_solver *s, int fNotUseRandom) |
static void | sat_solver_bookmark (sat_solver *s) |
static void | sat_solver_set_pivot_variables (sat_solver *s, int *pPivots, int nPivots) |
static int | sat_solver_count_usedvars (sat_solver *s) |
static int | sat_solver_add_const (sat_solver *pSat, int iVar, int fCompl) |
static int | sat_solver_add_buffer (sat_solver *pSat, int iVarA, int iVarB, int fCompl) |
static int | sat_solver_add_buffer_enable (sat_solver *pSat, int iVarA, int iVarB, int iVarEn, int fCompl) |
static int | sat_solver_add_and (sat_solver *pSat, int iVar, int iVar0, int iVar1, int fCompl0, int fCompl1, int fCompl) |
static int | sat_solver_add_xor (sat_solver *pSat, int iVarA, int iVarB, int iVarC, int fCompl) |
static int | sat_solver_add_mux (sat_solver *pSat, int iVarC, int iVarT, int iVarE, int iVarZ) |
static int | sat_solver_add_mux41 (sat_solver *pSat, int iVarC0, int iVarC1, int iVarD0, int iVarD1, int iVarD2, int iVarD3, int iVarZ) |
static int | sat_solver_add_xor_and (sat_solver *pSat, int iVarF, int iVarA, int iVarB, int iVarC) |
static int | sat_solver_add_constraint (sat_solver *pSat, int iVar, int iVar2, int fCompl) |
typedef struct sat_solver_t sat_solver |
Definition at line 42 of file satSolver.h.
Definition at line 89 of file satSolver.h.
|
inlinestatic |
Definition at line 195 of file satSolver.h.
|
static |
Definition at line 210 of file satSolver.h.
|
inlinestatic |
Definition at line 324 of file satSolver.h.
|
inlinestatic |
Definition at line 288 of file satSolver.h.
|
inlinestatic |
Definition at line 305 of file satSolver.h.
|
inlinestatic |
Definition at line 277 of file satSolver.h.
|
inlinestatic |
Definition at line 526 of file satSolver.h.
|
inlinestatic |
Definition at line 377 of file satSolver.h.
|
inlinestatic |
Definition at line 423 of file satSolver.h.
|
inlinestatic |
Definition at line 346 of file satSolver.h.
|
inlinestatic |
Definition at line 487 of file satSolver.h.
int sat_solver_addclause | ( | sat_solver * | s, |
lit * | begin, | ||
lit * | end | ||
) |
Definition at line 1492 of file satSolver.c.
|
inlinestatic |
Definition at line 247 of file satSolver.h.
int sat_solver_clause_new | ( | sat_solver * | s, |
lit * | begin, | ||
lit * | end, | ||
int | learnt | ||
) |
Definition at line 402 of file satSolver.c.
|
static |
Definition at line 217 of file satSolver.h.
int sat_solver_count_assigned | ( | sat_solver * | s | ) |
Definition at line 609 of file satSolver.c.
|
inlinestatic |
Definition at line 265 of file satSolver.h.
void sat_solver_delete | ( | sat_solver * | s | ) |
Definition at line 1141 of file satSolver.c.
|
static |
Definition at line 227 of file satSolver.h.
int sat_solver_get_var_value | ( | sat_solver * | s, |
int | v | ||
) |
Definition at line 117 of file satSolver.c.
double sat_solver_memory | ( | sat_solver * | s | ) |
Definition at line 1236 of file satSolver.c.
int sat_solver_nclauses | ( | sat_solver * | s | ) |
Definition at line 1902 of file satSolver.c.
int sat_solver_nconflicts | ( | sat_solver * | s | ) |
Definition at line 1908 of file satSolver.c.
sat_solver* sat_solver_new | ( | void | ) |
Definition at line 1001 of file satSolver.c.
int sat_solver_nvars | ( | sat_solver * | s | ) |
Definition at line 1896 of file satSolver.c.
void sat_solver_restart | ( | sat_solver * | s | ) |
Definition at line 1186 of file satSolver.c.
void sat_solver_rollback | ( | sat_solver * | s | ) |
Definition at line 1401 of file satSolver.c.
|
inlinestatic |
Definition at line 259 of file satSolver.h.
|
static |
Definition at line 240 of file satSolver.h.
|
static |
Definition at line 233 of file satSolver.h.
void sat_solver_setnvars | ( | sat_solver * | s, |
int | n | ||
) |
Definition at line 1072 of file satSolver.c.
int sat_solver_simplify | ( | sat_solver * | s | ) |
Definition at line 1276 of file satSolver.c.
int sat_solver_solve | ( | sat_solver * | s, |
lit * | begin, | ||
lit * | end, | ||
ABC_INT64_T | nConfLimit, | ||
ABC_INT64_T | nInsLimit, | ||
ABC_INT64_T | nConfLimitGlobal, | ||
ABC_INT64_T | nInsLimitGlobal | ||
) |
Definition at line 1700 of file satSolver.c.
void sat_solver_store_alloc | ( | sat_solver * | s | ) |
Definition at line 1916 of file satSolver.c.
void sat_solver_store_free | ( | sat_solver * | s | ) |
Definition at line 1927 of file satSolver.c.
void sat_solver_store_mark_clauses_a | ( | sat_solver * | s | ) |
Definition at line 1944 of file satSolver.c.
void sat_solver_store_mark_roots | ( | sat_solver * | s | ) |
Definition at line 1939 of file satSolver.c.
void* sat_solver_store_release | ( | sat_solver * | s | ) |
Definition at line 1949 of file satSolver.c.
void sat_solver_store_write | ( | sat_solver * | s, |
char * | pFileName | ||
) |
Definition at line 1922 of file satSolver.c.
|
static |
Definition at line 205 of file satSolver.h.
|
static |
Definition at line 200 of file satSolver.h.
void Sat_SolverDoubleClauses | ( | sat_solver * | p, |
int | iVar | ||
) |
int* Sat_SolverGetModel | ( | sat_solver * | p, |
int * | pVars, | ||
int | nVars | ||
) |
Function*************************************************************
Synopsis [Returns a counter-example.]
Description []
SideEffects []
SeeAlso []
Definition at line 266 of file satUtil.c.
void Sat_SolverPrintStats | ( | FILE * | pFile, |
sat_solver * | p | ||
) |
void Sat_SolverTraceStart | ( | sat_solver * | pSat, |
char * | pName | ||
) |
DECLARATIONS ///.
CFile****************************************************************
FileName [satTrace.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [SAT sat_solver.]
Synopsis [Records the trace of SAT solving in the CNF form.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Start the trace recording.]
Description []
SideEffects []
SeeAlso []
Definition at line 53 of file satTrace.c.
void Sat_SolverTraceStop | ( | sat_solver * | pSat | ) |
Function*************************************************************
Synopsis [Stops the trace recording.]
Description []
SideEffects []
SeeAlso []
Definition at line 73 of file satTrace.c.
void Sat_SolverTraceWrite | ( | sat_solver * | pSat, |
int * | pBeg, | ||
int * | pEnd, | ||
int | fRoot | ||
) |
Function*************************************************************
Synopsis [Writes one clause into the trace file.]
Description []
SideEffects []
SeeAlso []
Definition at line 95 of file satTrace.c.
void Sat_SolverWriteDimacs | ( | sat_solver * | p, |
char * | pFileName, | ||
lit * | assumpBegin, | ||
lit * | assumpEnd, | ||
int | incrementVars | ||
) |
Function*************************************************************
Synopsis [Write the clauses in the solver into a file in DIMACS format.]
Description []
SideEffects []
SeeAlso []
Definition at line 71 of file satUtil.c.