ml

Copyright(c) Stéphane Vialette, 2014
LicenseMIT
Maintainervialette@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred

Clause

Description

 

Synopsis

Documentation

type Clause = [Literal]

Clause type

makeClause :: [Literal] -> Clause

The makeClause function constructs a clause from a list of literals. Clauses are sorted and duplicate literals are removed. Furthermore occurrences of 0 are removed ( 0 is not a valid literal).

isEmpty :: Clause -> Bool

The isEmpty function return True is the clause contains no literal.

size :: Clause -> Int

The size function returns the number of literals in the clause.

isUnit :: Clause -> Bool

The isUnit function return True if the clause contains exactly one literal.