Wodel applied to Logic Circuits. [Logic Circuit Ecore]

[High-level change operations for Logic Circuits].

Retype a two-pinned gate as a two-pinned gate of a different type [lc]:

retype one [AND, OR] as [AND, OR] 

Swap the input pins of two different gates [lc]:

g0 = select one Gate
modify one Gate where {self <> g0} with {swapref(input, g0->input)}

Removes a NOT gate [lc]:

n0 = select one NOT where {input->src <> null and output->tar <> null}
i0 = select one InputPin in n0->output->tar
o0 = select one OutputPin in n0->input->src
modify i0 with {src = o0}
remove n0

Adds a NOT gate [lc]:

g0 = select one Gate where {input <> null and output <> null}
n1 = create NOT with {name = random-string(2, 4)}
o0 = select one OutputPin in g0->output
i0 = select one InputPin in o0->tar
create OutputPin in n1->output 
    with {name = random-string(2, 4), tar = i0}
create InputPin in n1->input 
    with {name = random-string(2, 4), src = o0}

Here you can download all these examples of Wodel applied to Logic Circuits.
Logic Circuits samples .zip
Logic Circuits samples .tar.gz

Acknowledgements

This work has been funded by the Spanish Ministry of Science (RTI2018-095255-B-I00, project "MASSIVE") and the R&D programme of Madrid (P2018/TCS-4314, project "FORTE").