作者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