lean2/tests/lua/jst1.lua
Leonardo de Moura 3e1fd06903 refactor(kernel/expr): remove 'null' expression, and operator bool for expression
After this commit, a value of type 'expr' cannot be a reference to nullptr.
This commit also fixes several bugs due to the use of 'null' expressions.

TODO: do the same for kernel objects, sexprs, etc.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-07 23:21:10 -08:00

11 lines
287 B
Lua

local j1 = mk_assumption_justification(1)
local j2 = mk_assumption_justification(2)
assert(is_justification(j1))
assert(j1:depends_on(j1))
assert(not j1:depends_on(j2))
for c in j1:children() do
assert(false)
end
assert(not j2:has_children())
print(j1)
assert(not j1:get_main_expr())