Reorder items

This commit is contained in:
Jonas Schievink 2020-10-23 12:10:22 +02:00
parent bfe1efca26
commit dab8870f5c

View file

@ -17,6 +17,15 @@ pub struct DnfExpr {
conjunctions: Vec<Conjunction>,
}
struct Conjunction {
literals: Vec<Literal>,
}
struct Literal {
negate: bool,
var: Option<CfgAtom>, // None = Invalid
}
impl DnfExpr {
pub fn new(expr: CfgExpr) -> Self {
let builder = Builder { expr: DnfExpr { conjunctions: Vec::new() } };
@ -133,10 +142,6 @@ impl fmt::Display for DnfExpr {
}
}
struct Conjunction {
literals: Vec<Literal>,
}
impl Conjunction {
fn new(parts: Vec<CfgExpr>) -> Self {
let mut literals = Vec::new();
@ -177,11 +182,6 @@ impl fmt::Display for Conjunction {
}
}
struct Literal {
negate: bool,
var: Option<CfgAtom>, // None = Invalid
}
impl Literal {
fn new(expr: CfgExpr) -> Self {
match expr {