當我運行我現在擁有的代碼時,彈出此錯誤。 注意:我沒有編寫代碼,我只是試圖瞭解發生了什麼,以便我可以將它移植到TuLiP的更新版本。 270AttributeError:'int'對象沒有'state'屬性
Traceback (most recent call last):
File "vms5.py", line 270, in <module>
states = [aut_state.state]
AttributeError: 'int' object has no attribute 'state'
線說:
states = [aut_state.state]
我試圖尋找state
,發現這個 行249:
state = dict(temp = Tmax, w = 0, h = 0, b = Bmax, a = 0, c = 0, nw = 0)
和aut_state
在線路259和260
aut = createAut(aut_file = autfile, varnames = env_vars.keys() + sys_disc_vars.keys())
aut_state = aut.findNextAutState(current_aut_state=None, env_state=state)
與aut
47號線其他條款:
autfile = testfile+'.aut'
和線條223-234
# Check realizability
realizability = jtlvint.checkRealizability(smv_file=smvfile, spc_file=spcfile, \
aut_file=autfile, verbose=3)
# Compute an automaton
jtlvint.computeStrategy(smv_file=smvfile, spc_file=spcfile, aut_file=autfile, \
priority_kind=3, verbose=3)
aut = automaton.Automaton(autfile, [], 3)
這是在具有aut
相關條款
代碼一切
如果您想了解更多信息,請讓我知道
編輯
我試圖線270之前添加print(aut_state)
並得到-1
作爲一個答案。
你說過看看findNextAutState的代碼 - 當沒有更多的AutState時它會返回什麼。你能否澄清我應該做什麼? findNextAutState的唯一行是上面提到的260。 – NLed 2013-02-24 23:30:08
您需要使用調試器介入findeNextAutState()(和createAut())。 – Pete 2013-02-25 18:09:12