SugarTrace version 1.0.1 Core API Specification

sugartracer.decoder
Class Assignment

java.lang.Object
  extended by sugartracer.decoder.Assignment

public class Assignment
extends Object

Maintains assignment on a SAT instance under solving.


Constructor Summary
Assignment()
           
 
Method Summary
 Boolean get(int i)
          Returns the Boolean value of i-th propositional variable.
 Boolean getLit(int lit)
          Returns the Boolean value of the literal lit.
 boolean isDefined(int i)
          Returns true when i-th propositional variable is defined.
 boolean isDefinedLit(int lit)
          Returns true when the literal lit is defined.
 void set(int i, boolean val)
          Sets the value of i-th propositional variable.
 void setLit(int lit)
          Sets the value of the literal lit to be true.
 void unset(int i)
          Sets i-th propositional variable undefined.
 void unsetLit(int lit)
          Sets the literal lit undefined.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Assignment

public Assignment()
Method Detail

isDefined

public boolean isDefined(int i)
Returns true when i-th propositional variable is defined.

Parameters:
i - index of the propositional variable to be checked
Returns:
true when the propositional variable i is defined

get

public Boolean get(int i)
Returns the Boolean value of i-th propositional variable. It returns null when the value is undefined.

Parameters:
i - index of the propositional variable to be checked
Returns:
Boolean value of i-th propositional variable

set

public void set(int i,
                boolean val)
Sets the value of i-th propositional variable.

Parameters:
i - index of the propositional variable to be set
val - the value to be set

unset

public void unset(int i)
Sets i-th propositional variable undefined.

Parameters:
i - index of the propositional variable to be unset

isDefinedLit

public boolean isDefinedLit(int lit)
Returns true when the literal lit is defined.

Parameters:
lit - literal
Returns:
true when lit is defined

getLit

public Boolean getLit(int lit)
Returns the Boolean value of the literal lit.

Parameters:
lit - literal
Returns:
the Boolean value

setLit

public void setLit(int lit)
Sets the value of the literal lit to be true.

Parameters:
lit - the literal to be set

unsetLit

public void unsetLit(int lit)
Sets the literal lit undefined.

Parameters:
lit - the literal to be unset

SugarTrace version 1.0.1 Core API Specification

SugarTracer: Tracer of Sugar