Enum dimacs::Formula [] [src]

pub enum Formula {
    Lit(Lit),
    Paren(FormulaBox),
    Neg(FormulaBox),
    And(FormulaList),
    Or(FormulaList),
    Xor(FormulaList),
    Eq(FormulaList),
}

Represents the structure of formulas of .sat files.

Variants

A single literal. This is the leaf node type of sat formulas.

Represents (f) if f is a valid formula.

Represents -(f) if f is a valid formula. This negates the result of the inner f.

Represents *(f_1 .. f_k) if f_1, .., f_k are valid formulas. The effect is a logical and of its inner formulas.

Represents +(f_1 .. f_k) if f_1, .., f_k are valid formulas. The effect is a logical or of its inner formulas.

Represents xor(f_1 .. f_k) if f_1, .., f_k are valid formulas. The effect is a logical xor of its inner formulas.

Represents =(f_1 .. f_k) if f_1, .., f_k are valid formulas. The effect is a logical equals of its inner formulas.

Methods

impl Formula
[src]

Creates a new literal leaf formula with the given literal.

Wraps the inner formula within parentheses.

Negates the inner formula.

Creates a logical and formula of all given formulas in param.

Creates a logical or formula of all given formulas in param.

Creates a logical xor formula of all given formulas in param.

Creates a logical equality formula of all given formulas in param.

Trait Implementations

impl Debug for Formula
[src]

Formats the value using the given formatter.

impl Clone for Formula
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Formula
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Formula
[src]