Add external function node2int. Treat actions in vm/state.cpp