add core functon: generate svg for FSM
merge