| 205 | return true; |
| 206 | } |
| 207 | function classify(c: any, res: any) { |
| 208 | if (!res || res.status === 'error') return { v: 'error', note: res?.error }; |
| 209 | if (res.status === 'timeout') return { v: 'error', note: 'timeout' }; |
| 210 | if (res.status === 'unsolved') return { v: 'unsolved' }; |
| 211 | const vr = c.verify; |
| 212 | if (vr.kind === 'equiv' || vr.kind === 'derivcheck') { |
| 213 | if (!allClose(res.values, vr.values)) return { v: 'wrong' }; |
| 214 | if (vr.kind === 'equiv' && vr.form && !formOk(vr.form, res.text)) |
| 215 | return { v: 'partial', note: vr.form === 'polynomial' ? 'non-polynomial form' : 'not ' + vr.form }; |
| 216 | return { v: 'correct' }; |
| 217 | } |
| 218 | if (vr.kind === 'mantexp') |
| 219 | return allClose(res.values, vr.values) ? { v: 'correct' } : { v: 'wrong' }; |
| 220 | if (vr.kind === 'value') return allClose(res.values, [vr.value]) ? { v: 'correct' } : { v: 'wrong' }; |
| 221 | return { v: 'error', note: 'unknown verify' }; |
| 222 | } |
| 223 | |
| 224 | // --- run -------------------------------------------------------------------- |
| 225 | console.error('Running multi-op audit — %d cases, CE in-process + SymPy batch + Wolfram batch…', suite.cases.length); |