/*********************************************************************
; Copyright 2004, Hantao Zhang (HZ).  All rights reserved. 
; By using this software the USER indicates that he or she has read, 
; understood and will comply with the following:
;
; --- HZ hereby grants USER nonexclusive permission to use, copy and/or
; modify this software for internal, noncommercial, research purposes only.
; Any distribution, including commercial sale or license, of this software,
; copies of the software, its associated documentation and/or modifications
; of either is strictly prohibited without the prior consent of HZ.  Title
; to copyright to this software and its associated documentation shall at
; all times remain with HZ.  Appropriate copyright notice shall be placed
; on all software copies, and a complete copy of this notice shall be
; included in all copies of the associated documentation.  No right is
; granted to use in advertising, publicity or otherwise any trademark,
; service mark, or the name of HZ.  Software and/or its associated
; documentation identified as "confidential," if any, will be protected
; from unauthorized use/disclosure with the same degree of care USER
; regularly employs to safeguard its own such information.
;
; --- This software and any associated documentation is provided "as is," and
; HZ MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
; THOSE OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR THAT
; USE OF THE SOFTWARE, MODIFICATIONS, OR ASSOCIATED DOCUMENTATION WILL
; NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER INTELLECTUAL
; PROPERTY RIGHTS OF A THIRD PARTY.  HZ, the University of Iowa,
; its Regents, officers, and employees shall not be liable under any
; circumstances for any direct, indirect, special, incidental, or
; consequential damages with respect to any claim by USER or any third
; party on account of or arising from the use, or inability to use, this
; software or its associated documentation, even if HZ has been advised
; of the possibility of those damages.
*********************************************************************/
#include "common.h"
#include "satbox.h"

#define var_order(i) i
#define value_of_var(i) DC
#define weight_of_var(i) i
#define weight_of_lit(i) i
#define weight_new_val(i) i
#define weight_add(i,w) i=w
#define weight_add1(i) i=1

int var_order_satbox(i) int i; { return var_order(i); }

int var_weight_satbox(i) int i; { return weight_of_var(i); }
void set_var_weight_satbox(i,w) int i,w; { weight_of_var(i) = w; }
void add_var_weight_satbox(i,w) int i,w; { weight_of_var(i) += w; }

int lit_weight_satbox(i) int i; { return weight_of_lit(i); }
void set_lit_weight_satbox(i,w) int i,w; { weight_of_lit(i) = w; }
void add_lit_weight_satbox(i,w) int i,w; { weight_of_lit(i) += w; }

int lit_weight_new_satbox(i) int i; { return weight_new_val(i); }
void set_lit_weight_new_satbox(i,w) int i,w; { weight_new_val(i) = w; }
void add_lit_weight_new_satbox(i,w) int i,w; { weight_add(i, w); }
#ifndef SATBOX_LIBRARY_ONLY
void weight_add1_satbox(ks) int ks; { weight_add1(ks); }
#endif

int basic_strategy_satbox() { printf("basic\n"); return 0; }
int weight_strategy_satbox() { printf("weight\n"); return 0; }

int insert_unit_cl_satbox (i, sign)  int i, sign; { return make_lit(i, sign); }

int collect_best_keys (best_keys, max)
     int best_keys[], max;
{
  best_keys[0] = max;
  return max;
}

void sblit_add_watched_satbox (int sblit) {};
