public AssignmentEntry(String variable, CNFTruth truth, CNFClause clause, bool decided, int depth) { Variable = variable; Truth = truth; RelatedClause = clause; Decided = decided; Depth = depth; }
public bool Push(String var_name, bool decided, CNFClause clause, CNFTruth truth, int depth) { return(Push(new AssignmentEntry( variable: var_name, decided: decided, clause: clause, truth: truth, depth: depth))); }
private bool CompareStateToTruth(CNFStates state, CNFTruth truth) { if ((state == CNFStates.Asserted && truth == CNFTruth.True) || state == CNFStates.Negated && truth == CNFTruth.False) { return(true); } else { return(false); } }
public bool TryGetVariableValue(String var_name, out CNFTruth result) { AssignmentEntry entry; if (_assignment_index.TryGetValue(var_name, out entry)) { result = entry.Truth; return(true); } else { result = CNFTruth.Unknown; return(false); } }
public ImplicationResult(String new_variable, CNFTruth new_truth, CNFClause new_clause) { Variable = new_variable; Clause = new_clause; Truth = new_truth; }
public bool AddKnownVariable(String var_name, CNFTruth truth, CNFClause clause) { return(Push(var_name, false, clause, truth, 0)); }