scryer-prolog icon indicating copy to clipboard operation
scryer-prolog copied to clipboard

time/1 with number of inferences

Open UWN opened this issue 4 years ago • 4 comments

Currently time/1 only shows

% CPU time: 13.900 seconds

Ideally, also the number of inferences would be ideal. Often time complexity then becomes much easier to estimate.

UWN avatar Aug 24 '21 21:08 UWN

On the WAM level, is the number of inferences equivalent to the number of call and execute instructions that have been interpreted?

triska avatar Feb 18 '23 18:02 triska

More or less, built-in calls need to be added, probably.

A property, that I would love to be observed exactly is that failure-slices do indeed have less or equal as many inferences as the original program.

UWN avatar Feb 19 '23 09:02 UWN

There is already call_with_inference_limit/3, so it should not be that difficult.

UWN avatar Aug 24 '23 07:08 UWN

I have filed #1999 for this. However, it does not yet show the inferences when the goal fails. Would it still be useful to add it like this?

triska avatar Sep 05 '23 19:09 triska