Package "resbound"
Reviews
No reviews. Create the first review!.
Details by download location
Resource bounded goals
This pack provides library(resource_bounds)
, which allows running a goal
providing limits for the wall time, CPU time and stack usage.
Examples
?- resource_bounded_call(true, 1, Status, []).
Status = true.
?- resource_bounded_call(fail, 1, Status, []).
Status = false.
?- resource_bounded_call((repeat, fail), 0.001, Status, []).
Status = timeout(cpu).
?- resource_bounded_call(sleep(20), 0.001, Status, [wall_time(1)]).
Status = timeout(wall).
?- resource_bounded_call(numlist(1, 1000000, L), 1, Status, [global(1000)]).
Status = stack_overflow(global).
Contents of pack "resbound"
Pack contains 3 files holding a total of 4.8K bytes.