/****************************************************************************1Copyright (c) 2006 - 2015, Armin Biere, Johannes Kepler University.23Permission is hereby granted, free of charge, to any person obtaining a copy4of this software and associated documentation files (the "Software"), to5deal in the Software without restriction, including without limitation the6rights to use, copy, modify, merge, publish, distribute, sublicense, and/or7sell copies of the Software, and to permit persons to whom the Software is8furnished to do so, subject to the following conditions:910The above copyright notice and this permission notice shall be included in11all copies or substantial portions of the Software.1213THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE16AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER17LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING18FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS19IN THE SOFTWARE.20****************************************************************************/2122#ifndef picosat_h_INCLUDED23#define picosat_h_INCLUDED2425/*------------------------------------------------------------------------*/2627#include <stdlib.h>28#include <stdio.h>29#include <stddef.h>3031/*------------------------------------------------------------------------*/32/* The following macros allows for users to distiguish between different33* versions of the API. The first 'PICOSAT_REENTRANT_API' is defined for34* the new reentrant API which allows to generate multiple instances of35* PicoSAT in one process. The second 'PICOSAT_API_VERSION' defines the36* (smallest) version of PicoSAT to which this API conforms.37*/38#define PICOSAT_REENTRANT_API39#define PICOSAT_API_VERSION 953 /* API version */4041/*------------------------------------------------------------------------*/42/* These are the return values for 'picosat_sat' as for instance43* standardized by the output format of the SAT competition.44*/45#define PICOSAT_UNKNOWN 046#define PICOSAT_SATISFIABLE 1047#define PICOSAT_UNSATISFIABLE 204849/*------------------------------------------------------------------------*/5051typedef struct PicoSAT PicoSAT;5253/*------------------------------------------------------------------------*/5455const char *picosat_version (void);56const char *picosat_config (void);57const char *picosat_copyright (void);5859/*------------------------------------------------------------------------*/60/* You can make PicoSAT use an external memory manager instead of the one61* provided by LIBC. But then you need to call these three function before62* 'picosat_init'. The memory manager functions here all have an additional63* first argument which is a pointer to the memory manager, but otherwise64* are supposed to work as their LIBC counter parts 'malloc', 'realloc' and65* 'free'. As exception the 'resize' and 'delete' function have as third66* argument the number of bytes of the block given as second argument.67*/6869typedef void * (*picosat_malloc)(void *, size_t);70typedef void * (*picosat_realloc)(void*, void *, size_t, size_t);71typedef void (*picosat_free)(void*, void*, size_t);7273/*------------------------------------------------------------------------*/7475PicoSAT * picosat_init (void); /* constructor */7677PicoSAT * picosat_minit (void * state,78picosat_malloc,79picosat_realloc,80picosat_free);8182void picosat_reset (PicoSAT *); /* destructor */8384/*------------------------------------------------------------------------*/85/* The following five functions are essentially parameters to 'init', and86* thus should be called right after 'picosat_init' before doing anything87* else. You should not call any of them after adding a literal.88*/8990/* Set output file, default is 'stdout'.91*/92void picosat_set_output (PicoSAT *, FILE *);9394/* Measure all time spent in all calls in the solver. By default only the95* time spent in 'picosat_sat' is measured. Enabling this function might96* for instance triple the time needed to add large CNFs, since every call97* to 'picosat_add' will trigger a call to 'getrusage'.98*/99void picosat_measure_all_calls (PicoSAT *);100101/* Set the prefix used for printing verbose messages and statistics.102* Default is "c ".103*/104void picosat_set_prefix (PicoSAT *, const char *);105106/* Set verbosity level. A verbosity level of 1 and above prints more and107* more detailed progress reports on the output file, set by108* 'picosat_set_output'. Verbose messages are prefixed with the string set109* by 'picosat_set_prefix'.110*/111void picosat_set_verbosity (PicoSAT *, int new_verbosity_level);112113/* Disable/Enable all pre-processing, currently only failed literal probing.114*115* new_plain_value != 0 only 'plain' solving, so no preprocessing116* new_plain_value == 0 allow preprocessing117*/118void picosat_set_plain (PicoSAT *, int new_plain_value);119120/* Set default initial phase:121*122* 0 = false123* 1 = true124* 2 = Jeroslow-Wang (default)125* 3 = random initial phase126*127* After a variable has been assigned the first time, it will always128* be assigned the previous value if it is picked as decision variable.129* The initial assignment can be chosen with this function.130*/131void picosat_set_global_default_phase (PicoSAT *, int);132133/* Set next/initial phase of a particular variable if picked as decision134* variable. Second argument 'phase' has the following meaning:135*136* negative = next value if picked as decision variable is false137*138* positive = next value if picked as decision variable is true139*140* 0 = use global default phase as next value and141* assume 'lit' was never assigned142*143* Again if 'lit' is assigned afterwards through a forced assignment,144* then this forced assignment is the next phase if this variable is145* used as decision variable.146*/147void picosat_set_default_phase_lit (PicoSAT *, int lit, int phase);148149/* You can reset all phases by the following function.150*/151void picosat_reset_phases (PicoSAT *);152153/* Scores can be erased as well. Note, however, that even after erasing154* scores and phases, learned clauses are kept. In addition head tail155* pointers for literals are not moved either. So expect a difference156* between calling the solver in incremental mode or with a fresh copy of157* the CNF.158*/159void picosat_reset_scores (PicoSAT *);160161/* Reset assignment if in SAT state and then remove the given percentage of162* less active (large) learned clauses. If you specify 100% all large163* learned clauses are removed.164*/165void picosat_remove_learned (PicoSAT *, unsigned percentage);166167/* Set some variables to be more important than others. These variables are168* always used as decisions before other variables are used. Dually there169* is a set of variables that is used last. The default is170* to mark all variables as being indifferent only.171*/172void picosat_set_more_important_lit (PicoSAT *, int lit);173void picosat_set_less_important_lit (PicoSAT *, int lit);174175/* Allows to print to internal 'out' file from client.176*/177void picosat_message (PicoSAT *, int verbosity_level, const char * fmt, ...);178179/* Set a seed for the random number generator. The random number generator180* is currently just used for generating random decisions. In our181* experiments having random decisions did not really help on industrial182* examples, but was rather helpful to randomize the solver in order to183* do proper benchmarking of different internal parameter sets.184*/185void picosat_set_seed (PicoSAT *, unsigned random_number_generator_seed);186187/* If you ever want to extract cores or proof traces with the current188* instance of PicoSAT initialized with 'picosat_init', then make sure to189* call 'picosat_enable_trace_generation' right after 'picosat_init'. This190* is not necessary if you only use 'picosat_set_incremental_rup_file'.191*192* NOTE, trace generation code is not necessarily included, e.g. if you193* configure PicoSAT with full optimzation as './configure.sh -O' or with194195* you do not get any results by trying to generate traces.196*197* The return value is non-zero if code for generating traces is included198* and it is zero if traces can not be generated.199*/200int picosat_enable_trace_generation (PicoSAT *);201202/* You can dump proof traces in RUP format incrementally even without203* keeping the proof trace in memory. The advantage is a reduction of204* memory usage, but the dumped clauses do not necessarily belong to the205* clausal core. Beside the file the additional parameters denotes the206* maximal number of variables and the number of original clauses.207*/208void picosat_set_incremental_rup_file (PicoSAT *, FILE * file, int m, int n);209210/* Save original clauses for 'picosat_deref_partial'. See comments to that211* function further down.212*/213void picosat_save_original_clauses (PicoSAT *);214215/* Add a call back which is checked regularly to notify the SAT solver216* to terminate earlier. This is useful for setting external time limits217* or terminate early in say a portfolio style parallel SAT solver.218*/219void picosat_set_interrupt (PicoSAT *,220void * external_state,221int (*interrupted)(void * external_state));222223/*------------------------------------------------------------------------*/224/* This function returns the next available unused variable index and225* allocates a variable for it even though this variable does not occur as226* assumption, nor in a clause or any other constraints. In future calls to227* 'picosat_sat', 'picosat_deref' and particularly for 'picosat_changed',228* this variable is treated as if it had been used.229*/230int picosat_inc_max_var (PicoSAT *);231232/*------------------------------------------------------------------------*/233/* Push and pop semantics for PicoSAT. 'picosat_push' opens up a new234* context. All clauses added in this context are attached to it and235* discarded when the context is closed with 'picosat_pop'. It is also236* possible to nest contexts.237*238* The current implementation uses a new internal variable for each context.239* However, the indices for these internal variables are shared with240* ordinary external variables. This means that after any call to241* 'picosat_push', new variable indices should be obtained with242* 'picosat_inc_max_var' and not just by incrementing the largest variable243* index used so far.244*245* The return value is the index of the literal that assumes this context.246* This literal can only be used for 'picosat_failed_context' otherwise247* it will lead to an API usage error.248*/249int picosat_push (PicoSAT *);250251/* This is as 'picosat_failed_assumption', but only for internal variables252* generated by 'picosat_push'.253*/254int picosat_failed_context (PicoSAT *, int lit);255256/* Returns the literal that assumes the current context or zero if the257* outer context has been reached.258*/259int picosat_context (PicoSAT *);260261/* Closes the current context and recycles the literal generated for262* assuming this context. The return value is the literal for the new263* outer context or zero if the outer most context has been reached.264*/265int picosat_pop (PicoSAT *);266267/* Force immmediate removal of all satisfied clauses and clauses that are268* added or generated in closed contexts. This function is called269* internally if enough units are learned or after a certain number of270* contexts have been closed. This number is fixed at compile time271* and defined as MAXCILS in 'picosat.c'.272*273* Note that learned clauses which only involve outer contexts are kept.274*/275void picosat_simplify (PicoSAT *);276277/*------------------------------------------------------------------------*/278/* If you know a good estimate on how many variables you are going to use279* then calling this function before adding literals will result in less280* resizing of the variable table. But this is just a minor optimization.281* Beside exactly allocating enough variables it has the same effect as282* calling 'picosat_inc_max_var'.283*/284void picosat_adjust (PicoSAT *, int max_idx);285286/*------------------------------------------------------------------------*/287/* Statistics.288*/289int picosat_variables (PicoSAT *); /* p cnf <m> n */290int picosat_added_original_clauses (PicoSAT *); /* p cnf m <n> */291size_t picosat_max_bytes_allocated (PicoSAT *);292double picosat_time_stamp (void); /* ... in process */293void picosat_stats (PicoSAT *); /* > output file */294unsigned long long picosat_propagations (PicoSAT *); /* #propagations */295unsigned long long picosat_decisions (PicoSAT *); /* #decisions */296unsigned long long picosat_visits (PicoSAT *); /* #visits */297298/* The time spent in calls to the library or in 'picosat_sat' respectively.299* The former is returned if, right after initialization300* 'picosat_measure_all_calls' is called.301*/302double picosat_seconds (PicoSAT *);303304/*------------------------------------------------------------------------*/305/* Add a literal of the next clause. A zero terminates the clause. The306* solver is incremental. Adding a new literal will reset the previous307* assignment. The return value is the original clause index to which308* this literal respectively the trailing zero belong starting at 0.309*/310int picosat_add (PicoSAT *, int lit);311312/* As the previous function, but allows to add a full clause at once with an313* at compiled time known size. The list of argument literals has to be314* terminated with a zero literal. Literals beyond the first zero literal315* are discarded.316*/317int picosat_add_arg (PicoSAT *, ...);318319/* As the previous function but with an at compile time unknown size.320*/321int picosat_add_lits (PicoSAT *, int * lits);322323/* Print the CNF to the given file in DIMACS format.324*/325void picosat_print (PicoSAT *, FILE *);326327/* You can add arbitrary many assumptions before the next 'picosat_sat'328* call. This is similar to the using assumptions in MiniSAT, except that329* for PicoSAT you do not have to collect all your assumptions in a vector330* yourself. In PicoSAT you can add one after the other, to be used in the331* next call to 'picosat_sat'.332*333* These assumptions can be interpreted as adding unit clauses with those334* assumptions as literals. However these assumption clauses are only valid335* for exactly the next call to 'picosat_sat', and will be removed336* afterwards, e.g. in following future calls to 'picosat_sat' after the337* next 'picosat_sat' call, unless they are assumed again trough338* 'picosat_assume'.339*340* More precisely, assumptions actually remain valid even after the next341* call to 'picosat_sat' has returned. Valid means they remain 'assumed'342* internally until a call to 'picosat_add', 'picosat_assume', or a second343* 'picosat_sat', following the first 'picosat_sat'. The reason for keeping344* them valid is to allow 'picosat_failed_assumption' to return correct345* values.346*347* Example:348*349* picosat_assume (1); // assume unit clause '1 0'350* picosat_assume (-2); // additionally assume clause '-2 0'351* res = picosat_sat (1000); // assumes 1 and -2 to hold352* // 1000 decisions max.353*354* if (res == PICOSAT_UNSATISFIABLE)355* {356* if (picosat_failed_assumption (1))357* // unit clause '1 0' was necessary to derive UNSAT358*359* if (picosat_failed_assumption (-2))360* // unit clause '-2 0' was necessary to derive UNSAT361*362* // at least one but also both could be necessary363*364* picosat_assume (17); // previous assumptions are removed365* // now assume unit clause '17 0' for366* // the next call to 'picosat_sat'367*368* // adding a new clause, actually the first literal of369* // a clause would also make the assumptions used in the previous370* // call to 'picosat_sat' invalid.371*372* // The first two assumptions above are not assumed anymore. Only373* // the assumptions, since the last call to 'picosat_sat' returned374* // are assumed, e.g. the unit clause '17 0'.375*376* res = picosat_sat (-1);377* }378* else if (res == PICOSAT_SATISFIABLE)379* {380* // now the assignment is valid and we can call 'picosat_deref'381*382* assert (picosat_deref (1) == 1));383* assert (picosat_deref (-2) == 1));384*385* val = picosat_deref (15);386*387* // previous two assumptions are still valid388*389* // would become invalid if 'picosat_add' or 'picosat_assume' is390* // called here, but we immediately call 'picosat_sat'. Now when391* // entering 'picosat_sat' the solver knows that the previous call392* // returned SAT and it can safely reset the previous assumptions393*394* res = picosat_sat (-1);395* }396* else397* {398* assert (res == PICOSAT_UNKNOWN);399*400* // assumptions valid, but assignment invalid401* // except for top level assigned literals which402* // necessarily need to have this value if the formula is SAT403*404* // as above the solver nows that the previous call returned UNKWOWN405* // and will before doing anything else reset assumptions406*407* picosat_sat (-1);408* }409*/410void picosat_assume (PicoSAT *, int lit);411412/*------------------------------------------------------------------------*/413/* This is an experimental feature for handling 'all different constraints'414* (ADC). Currently only one global ADC can be handled. The bit-width of415* all the bit-vectors entered in this ADC (stored in 'all different416* objects' or ADOs) has to be identical.417*418* TODO: also handle top level assigned literals here.419*/420void picosat_add_ado_lit (PicoSAT *, int);421422/*------------------------------------------------------------------------*/423/* Call the main SAT routine. A negative decision limit sets no limit on424* the number of decisions. The return values are as above, e.g.425* 'PICOSAT_UNSATISFIABLE', 'PICOSAT_SATISFIABLE', or 'PICOSAT_UNKNOWN'.426*/427int picosat_sat (PicoSAT *, int decision_limit);428429/* As alternative to a decision limit you can use the number of propagations430* as limit. This is more linearly related to execution time. This has to431* be called after 'picosat_init' and before 'picosat_sat'.432*/433void picosat_set_propagation_limit (PicoSAT *, unsigned long long limit);434435/* Return last result of calling 'picosat_sat' or '0' if not called.436*/437int picosat_res (PicoSAT *);438439/* After 'picosat_sat' was called and returned 'PICOSAT_SATISFIABLE', then440* the satisfying assignment can be obtained by 'dereferencing' literals.441* The value of the literal is return as '1' for 'true', '-1' for 'false'442* and '0' for an unknown value.443*/444int picosat_deref (PicoSAT *, int lit);445446/* Same as before but just returns true resp. false if the literals is447* forced to this assignment at the top level. This function does not448* require that 'picosat_sat' was called and also does not internally reset449* incremental usage.450*/451int picosat_deref_toplevel (PicoSAT *, int lit);452453/* After 'picosat_sat' was called and returned 'PICOSAT_SATISFIABLE' a454* partial satisfying assignment can be obtained as well. It satisfies all455* original clauses. The value of the literal is return as '1' for 'true',456* '-1' for 'false' and '0' for an unknown value. In order to make this457* work all original clauses have to be saved internally, which has to be458* enabled by 'picosat_save_original_clauses' right after initialization.459*/460int picosat_deref_partial (PicoSAT *, int lit);461462/* Returns non zero if the CNF is unsatisfiable because an empty clause was463* added or derived.464*/465int picosat_inconsistent (PicoSAT *);466467/* Returns non zero if the literal is a failed assumption, which is defined468* as an assumption used to derive unsatisfiability. This is as accurate as469* generating core literals, but still of course is an overapproximation of470* the set of assumptions really necessary. The technique does not need471* clausal core generation nor tracing to be enabled and thus can be much472* more effective. The function can only be called as long the current473* assumptions are valid. See 'picosat_assume' for more details.474*/475int picosat_failed_assumption (PicoSAT *, int lit);476477/* Returns a zero terminated list of failed assumption in the last call to478* 'picosat_sat'. The pointer is valid until the next call to479* 'picosat_sat' or 'picosat_failed_assumptions'. It only makes sense if the480* last call to 'picosat_sat' returned 'PICOSAT_UNSATISFIABLE'.481*/482const int * picosat_failed_assumptions (PicoSAT *);483484/* Returns a zero terminated minimized list of failed assumption for the last485* call to 'picosat_sat'. The pointer is valid until the next call to this486* function or 'picosat_sat' or 'picosat_mus_assumptions'. It only makes sense487* if the last call to 'picosat_sat' returned 'PICOSAT_UNSATISFIABLE'.488*489* The call back function is called for all successful simplification490* attempts. The first argument of the call back function is the state491* given as first argument to 'picosat_mus_assumptions'. The second492* argument to the call back function is the new reduced list of failed493* assumptions.494*495* This function will call 'picosat_assume' and 'picosat_sat' internally but496* before returning reestablish a proper UNSAT state, e.g.497* 'picosat_failed_assumption' will work afterwards as expected.498*499* The last argument if non zero fixes assumptions. In particular, if an500* assumption can not be removed it is permanently assigned true, otherwise501* if it turns out to be redundant it is permanently assumed to be false.502*/503const int * picosat_mus_assumptions (PicoSAT *, void *,504void(*)(void*,const int*),int);505506/* Compute one maximal subset of satisfiable assumptions. You need to set507* the assumptions, call 'picosat_sat' and check for 'picosat_inconsistent',508* before calling this function. The result is a zero terminated array of509* assumptions that consistently can be asserted at the same time. Before510* returing the library 'reassumes' all assumptions.511*512* It could be beneficial to set the default phase of assumptions513* to true (positive). This can speed up the computation.514*/515const int * picosat_maximal_satisfiable_subset_of_assumptions (PicoSAT *);516517/* This function assumes that you have set up all assumptions with518* 'picosat_assume'. Then it calls 'picosat_sat' internally unless the519* formula is already inconsistent without assumptions, i.e. it contains520* the empty clause. After that it extracts a maximal satisfiable subset of521* assumptions.522*523* The result is a zero terminated maximal subset of consistent assumptions524* or a zero pointer if the formula contains the empty clause and thus no525* more maximal consistent subsets of assumptions can be extracted. In the526* first case, before returning, a blocking clause is added, that rules out527* the result for the next call.528*529* NOTE: adding the blocking clause changes the CNF.530*531* So the following idiom532*533* const int * mss;534* picosat_assume (a1);535* picosat_assume (a2);536* picosat_assume (a3);537* picosat_assume (a4);538* while ((mss = picosat_next_maximal_satisfiable_subset_of_assumptions ()))539* process_mss (mss);540*541* can be used to iterate over all maximal consistent subsets of542* the set of assumptions {a1,a2,a3,a4}.543*544* It could be beneficial to set the default phase of assumptions545* to true (positive). This might speed up the computation.546*/547const int *548picosat_next_maximal_satisfiable_subset_of_assumptions (PicoSAT *);549550/* Similarly we can iterate over all minimal correcting assumption sets.551* See the CAMUS literature [M. Liffiton, K. Sakallah JAR 2008].552*553* The result contains each assumed literal only once, even if it554* was assumed multiple times (in contrast to the maximal consistent555* subset functions above).556*557* It could be beneficial to set the default phase of assumptions558* to true (positive). This might speed up the computation.559*/560const int *561picosat_next_minimal_correcting_subset_of_assumptions (PicoSAT *);562563/* Compute the union of all minmal correcting sets, which is called564* the 'high level union of all minimal unsatisfiable subset sets'565* or 'HUMUS' in our papers.566*567* It uses 'picosat_next_minimal_correcting_subset_of_assumptions' and568* the same notes and advices apply. In particular, this implies that569* after calling the function once, the current CNF becomes inconsistent,570* and PicoSAT has to be reset. So even this function internally uses571* PicoSAT incrementally, it can not be used incrementally itself at this572* point.573*574* The 'callback' can be used for progress logging and is called after575* each extracted minimal correcting set if non zero. The 'nhumus'576* parameter of 'callback' denotes the number of assumptions found to be577* part of the HUMUS sofar.578*/579const int *580picosat_humus (PicoSAT *,581void (*callback)(void * state, int nmcs, int nhumus),582void * state);583584/*------------------------------------------------------------------------*/585/* Assume that a previous call to 'picosat_sat' in incremental usage,586* returned 'SATISFIABLE'. Then a couple of clauses and optionally new587* variables were added (a new variable is a variable that has an index588* larger then the maximum variable added so far). The next call to589* 'picosat_sat' also returns 'SATISFIABLE'. If this function590* 'picosat_changed' returns '0', then the assignment to the old variables591* is guaranteed to not have changed. Otherwise it might have changed.592*593* The return value to this function is only valid until new clauses are594* added through 'picosat_add', an assumption is made through595* 'picosat_assume', or again 'picosat_sat' is called. This is the same596* assumption as for 'picosat_deref'.597*598* TODO currently this function might also return a non zero value even if599* the old assignment did not change, because it only checks whether the600* assignment of at least one old variable was flipped at least once during601* the search. In principle it should be possible to be exact in the other602* direction as well by using a counter of variables that have an odd number603* of flips. But this is not implemented yet.604*/605int picosat_changed (PicoSAT *);606607/*------------------------------------------------------------------------*/608/* The following six functions internally extract the variable and clausal609* core and thus require trace generation to be enabled with610* 'picosat_enable_trace_generation' right after calling 'picosat_init'.611*612* TODO: using these functions in incremental mode with failed assumptions613* has only been tested for 'picosat_corelit' thoroughly. The others614* probably only work in non-incremental mode or without using615* 'picosat_assume'.616*/617618/* This function determines whether the i'th added original clause is in the619* core. The 'i' is the return value of 'picosat_add', which starts at zero620* and is incremented by one after a original clause is added (that is after621* 'picosat_add (0)'). For the index 'i' the following has to hold:622*623* 0 <= i < picosat_added_original_clauses ()624*/625int picosat_coreclause (PicoSAT *, int i);626627/* This function gives access to the variable core, which is made up of the628* variables that were resolved in deriving the empty clause.629*/630int picosat_corelit (PicoSAT *, int lit);631632/* Write the clauses that were used in deriving the empty clause to a file633* in DIMACS format.634*/635void picosat_write_clausal_core (PicoSAT *, FILE * core_file);636637/* Write a proof trace in TraceCheck format to a file.638*/639void picosat_write_compact_trace (PicoSAT *, FILE * trace_file);640void picosat_write_extended_trace (PicoSAT *, FILE * trace_file);641642/* Write a RUP trace to a file. This trace file contains only the learned643* core clauses while this is not necessarily the case for the RUP file644* obtained with 'picosat_set_incremental_rup_file'.645*/646void picosat_write_rup_trace (PicoSAT *, FILE * trace_file);647648/*------------------------------------------------------------------------*/649/* Keeping the proof trace around is not necessary if an over-approximation650* of the core is enough. A literal is 'used' if it was involved in a651* resolution to derive a learned clause. The core literals are necessarily652* a subset of the 'used' literals.653*/654655int picosat_usedlit (PicoSAT *, int lit);656/*------------------------------------------------------------------------*/657#endif658659660