CNF Converter/DPLL.py
def find_pure_symbol(symbols, clauses, model):
	"""Function to find if a symbol is a pure symbol and its value if it is present only a positive symbol
    or only as a negative symbol in all the clauses in a given input."""
	print symbols,clauses
	for i in range(len(symbols)):
		found_pos, found_neg = False, False
		for j in range(len(clauses)):
			if not found_pos and symbols[i] in clauses[j]:
				found_pos = True
			if not found_neg and str([NOT , symbols[i]]) in clauses[j]:
				found_neg = True
		if found_pos != found_neg: return symbols[i], found_pos
	return None, None
Function to find if a symbol is a pure symbol and its value if it is present only a positive symbol
    or only as a negative symbol in all the clauses in a given input.
Function to find if a symbol is a pure symbol and its value if it is present only a positive symbol
or only as a negative symbol in all the clauses in a given input.
Function to find if a symbol is a pure symbol and its value if it is present only a positive symbol or only as a negative symbol in all the clauses in a given input .
def find_pure_symbol(symbols, clauses, model):
	print symbols,clauses
	for i in range(len(symbols)):
		found_pos, found_neg = False, False
		for j in range(len(clauses)):
			if not found_pos and symbols[i] in clauses[j]:
				found_pos = True
			if not found_neg and str([NOT , symbols[i]]) in clauses[j]:
				found_neg = True
		if found_pos != found_neg: return symbols[i], found_pos
	return None, None
def find_pure_symbol ( symbols , clauses , model ) : print symbols , clauses for i in range ( len ( symbols ) ) : found_pos , found_neg = False , False for j in range ( len ( clauses ) ) : if not found_pos and symbols [ i ] in clauses [ j ] : found_pos = True if not found_neg and str ( [ NOT , symbols [ i ] ] ) in clauses [ j ] : found_neg = True if found_pos != found_neg : return symbols [ i ] , found_pos return None , None
Function to find if a symbol is a pure symbol and its value if it is present only a positive symbol
or only as a negative symbol in all the clauses in a given input.
Function to find if a symbol is a pure symbol and its value if it is present only a positive symbol or only as a negative symbol in all the clauses in a given input .
"""Function to find if a symbol is a pure symbol and its value if it is present only a positive symbol
    or only as a negative symbol in all the clauses in a given input."""
symbols
clauses
model