function foo () { this.data=null; this.goto=null; this.act = { main: function () { log(this.data===null)}, end: function () { kill()}, } this.trans = { main:end } this.next=main } compile(foo,{verbose:1}) var ag = create('foo'); print(agent(ag)) start()