External Transition Function
function ext input st s; input Real e; input Integer bag; input Integer inc; output st sout; end ext;