This page presents Wodel examples for finite automata. The corresponding metamodel is available here: Finite Automata Ecore.
Mutations that change the accepted language
Creates a transition [ctr]:
create Transition with {symbol = one Symbol}
Creates a final state [cfs]:
s = create State with {isFinal = true}
create Transition with {tar = s, symbol = one Symbol}
Creates a state connected to the existing automaton [ccs]:
s = create State with {name = random-string(1, 4)}
t = create Transition with {tar = s, symbol = one Symbol}
Deletes a transition [dtr]:
remove one Transition
Deletes a state and its incident transitions [dst]:
remove one State where {isInitial = false}
remove all Transition where {src = null}
remove all Transition where {tar = null}
Changes the symbol of a transition [mst]:
modify target symbol from one Transition to other Symbol
Changes a final state into a non-final state [mfs]:
modify one State where {isFinal = true} with {reverse(isFinal)}
Replaces the initial state with a different state [mis]:
s0 = modify one State where {isInitial = true} with {isInitial = false}
s1 = modify one State where {self <> s0} with {isInitial = true}
Reverses the direction of a transition [sdt]:
modify one Transition with {swapref(src, tar)}
Swaps the symbols of two sibling transitions [sst]:
t = select one Transition
modify one Transition where {self <> t and src = t->src} with {swapref(symbol, t->symbol)}
Redirects a transition to a newly created final state [rts]:
s = create State with {name = 'f', isFinal = true}
modify target tar from one Transition to s
Adds a new transition and changes the initial state [ctr_mis]:
s0 = modify one State where {isInitial = true} with {reverse(isInitial)}
s1 = modify one State where {self <> s0} with {isInitial = true}
create Transition with {src = s1, tar = s0, symbol = one Symbol}
Mutations that make the automaton non-deterministic
Creates a lambda transition [clt]:
create Transition
Creates another transition with the same symbol from a state to a different target state [cst]:
t = select one Transition where {symbol <> null}
create Transition with {src = t->src, symbol = t->symbol, tar = one State where {self <> t->tar}}
Download all the Wodel examples for finite automata here.
DFA samples (ZIP)
DFA samples (TAR.GZ)
Acknowledgements
This work was funded by the Spanish Ministry of Science through project “MASSIVE” (RTI2018-095255-B-I00), and by the R&D programme of the Madrid Region through project “FORTE” (P2018/TCS-4314).
