Joelbyte / verdi-neruda

Interpreters interpreting interpreters interpreting...
8 stars 1 forks source link

Depth and inference counters #2

Closed Joelbyte closed 14 years ago

Joelbyte commented 14 years ago

It is currently not possible to count inferences or stack depth without using the underlying Prolog system. Each interpreter should be augmented with this functionality since it improves portability and gives better metrics in some cases.

Joelbyte commented 14 years ago

Inference counting is now implemented in some interpreters. It is done with the help of a global counter object. The reasons are twofold:

1.) Since we want to count both failed and "sucessfull" inferences. Otherwise it would be hard to implement in the depth-first interpreters since failed inferences would be lost in backtracking. 2.) No need to augment the prove predicates with an additional argument.

The shell also needs to be augmented with an additional dispatch that benchmarks an interpreter with this metric.

Joelbyte commented 14 years ago

Only the bottom-up interpreter remaining now!

Joelbyte commented 14 years ago

Done.