stp-decorator-cast function