作者goodword (佳話)
看板EE_DSnP
標題[問題] error 和 其他小問題
時間Sat Jun 6 12:13:11 2009
testcases 所提供的 error測試檔 "C17-err1.cir" :
.cir missing circuit name
.input 1GAT 2GAT 3GAT 2GAT "2GAT" redefined
6GAT 7GAT
.output 22GAT 23GAT GG "GG" undefined
1GAT 23GAT "23GAT" redefined
and 11GAT 3GAT 6GAT
and 10GAT 1GAT
3GAT JJ "JJ" undefined
inv 11GAT_B 11GAT KK "KK" undefined 、 extra input for 11GAT
and 19GAT 11GAT_B 7GAT
and 16GAT 2GAT missing input for 16GAT
or 16GAT
8GAT "16GAT" redefined
xor missing gate name
or 23GAT 16GAT 19GAT
or 22GAT 10GAT 16GAT
nand missing gate name
.end
以上右例 便是 ref 所抓出的 11 個錯誤
可是 很明顯的 用紅字標上的
8GAT 並沒有在此事先定義
所以我寫的 有多抓出這一個錯誤:
Line 13: Undefined gate "8GAT" in the circuit!!
不知道這樣可不可以?
還有 一個小問題 我拿自己的去跑 C6288.cir 好像跑不出來?
可是其他的 像是 C7552.cir 反而幾秒鐘就出來了
cirp -n 的結果也和ref一樣
不知道有沒有人遇到和我一樣的問題?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.139.164.92
※ 編輯: goodword 來自: 220.139.164.92 (06/06 12:14)
1F:→ goodword:哈哈... 跑出來了 原來是我自己的dfs沒寫好 06/06 13:38
2F:→ goodword:改了以後 就和ref差不多快了!! 06/06 13:39
3F:推 of:我也有加這個error 還有gate "_name" is defined but not used 06/06 14:03
4F:→ of:不過我猜老師的應該是在Or gate redefined的時候就檔掉了 06/06 14:04
5F:→ goodword:嗯嗯 同意樓上 06/06 14:26
6F:→ ilway25:話說我寫的會抓出14個囧... 06/06 14:54
7F:→ ilway25:PO GG 算 undefined 嗎 06/06 14:56
8F:推 ric2k1:C6288 的 reconvergence paths 非常多, DFS 沒寫好一定跑 06/06 15:31
9F:→ ric2k1:不出來~~~ 06/06 15:31
10F:推 ric2k1:Error message 抓的差不多就好了... C compiler 也無法一次 06/06 15:32
11F:→ ric2k1:所以的 errors 都抓出來 orz 06/06 15:32
12F:→ goodword:to ilway25 : PO GG undefined 這個error ref 有抓到啊 06/06 16:29
13F:→ goodword:謝謝老師回答 06/06 16:30
14F:→ ilway25:我上面寫的我看錯了= = 06/06 18:56