Skip to content

[Synth] Add folder/canonicalization to maj_inv #8918

@uenoku

Description

@uenoku

Implement local rewrite pattern based on MIG Boolean Algebra section in https://ieeexplore.ieee.org/document/7293649.

// Folder
maj_inv(x, !x, y) -> y
maj_inv(x, x, y) -> x
maj_inv(x, 0, 1) -> x

// Canonicalization
maj_inv(x, y, maj_inv(x, y, z)) ->(Distribute) maj(maj(x, y, x), maj(x, y, y), z) -> maj(x, y, z)
maj_inv(x, y, maj_inv(x, not y,z))  -> (Complementary Associativity)  maj_inv(x, y, maj_inv(x, x, z)) -> maj_inv(x, y, z)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions