lean2/tests/lean/lua10.lean
Leonardo de Moura ed3cf8152b feat(lua): add for_each to expr Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-13 16:30:59 -08:00

19 lines
301 B
Text

Variables x1 x2 x3 : Bool
Definition F : Bool := x1 /\ (x2 \/ x3)
(**
local env = get_environment()
local F = env:find_object("F"):get_value()
print(F)
function expr_size(e)
local r = 0
e:for_each(function(e, offset) r = r + 1 end)
return r
end
print(expr_size(F))
**)