parameters: (cnf)
docstring: Check that a CNF formula in JSON representation is valid.
docstring_summary: Check that a CNF formula in JSON representation is valid.
docstring_tokens: Check that a CNF formula in JSON representation is valid .
function: def validate_cnf(cnf):
    """Check that a CNF formula in JSON representation is valid."""
    if 'clauses' not in cnf:
      raise ValueError('Invalid cnf: lacks "clauses"')
  
    for literal in cnf['clauses']:
      validate_literal(literal)
function_tokens: def validate_cnf ( cnf ) : if 'clauses' not in cnf : raise ValueError ( 'Invalid cnf: lacks "clauses"' ) for literal in cnf [ 'clauses' ] : validate_literal ( literal )