Struct resolution_prover::Clause[][src]

pub struct Clause {
    pub parts: Vec<ClausePart>,
}

A proposition made up of the disjunction of possibly negated terms.

For example the proposition p \/ ~q \/ r would be represetnted as the following.

let clause = resolution_prover::Clause {
    parts: vec!(
        resolution_prover::ClausePart::Term("p".to_string()),
        resolution_prover::ClausePart::NegatedTerm("q".to_string()),
        resolution_prover::ClausePart::Term("r".to_string())
    )
};

Fields

Methods

impl Clause
[src]

Converts the given proposition into the corresponding clauses. Note that one proposition could break down into one or more clauses.

let prop1 = resolution_prover::term("hello".to_string());

let expected = vec!(resolution_prover::Clause {
    parts: vec!(
        resolution_prover::ClausePart::Term("hello".to_string())
    )
});

assert_eq!(
    resolution_prover::Clause::from_proposition(prop1),
    expected
);

Trait Implementations

impl Clone for Clause
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Clause
[src]

Formats the value using the given formatter. Read more

impl Eq for Clause
[src]

impl Hash for Clause
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for Clause
[src]

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

This method tests for !=.

Auto Trait Implementations

impl Send for Clause

impl Sync for Clause