我在VDM ++工具箱精简版上做VDM ++,下面是我的示例代码:
select t.*
from terms t
where t.price = (
select min(t2.price)
from terms t2
where t2.d_start = t.d_start
and t2.d_end = t.d_end
and t2.departure_from = t.departure_from
)
order by t.d_start;
我试图运行代码。成功创建对象但是当我运行print getsubj(10,2)时,它返回错误运行时错误120:未知状态组件 有人可以帮我提前谢谢你
答案 0 :(得分:1)
在Overture / VDMJ中,此规范提供了两种类型检查错误。这些不出现在VDMTools中吗?
Error 3247: Symbol 'subjpersem' is not an updatable variable in 'Course' (test.vpp) at line 9:5
Error 3027: Operation returns unexpected type in 'Course' (test.vpp) at line 7:8
Actual: ()
Expected: study
Type checked 1 class in 0.119 secs. Found 2 type errors