That really depends on how you've implemented litStatus(), clauseStatus(),
and checkAssignment(). Your checkAssignment() function will not always
need to examine all the cluases, and your clauseStatus() function will not
always need to examine every literal in the clause. Also remember that
your linked lists have the clauses stored in the opposite order to that
in which thay appear in the .cnf file.
If you're not sure if your program is operating correctly, try tracing it
through by hand, or stepping through it with gdb.
Alexander
Post by Arshad ShahzadWhen i print the values of all the literals that are being passed in the
the function litstatus i come up the the following results.(according to
cnf.1)
4
4
3
3
-4
-4
But is'nt it suppose to give me
1
2
4
-1
3
0
(You should never be passing 0 in as a literal to litStatus().)
Post by Arshad Shahzad2
-3
-4
cus these are all the literals appearing in cnf.1
thanks