0

I'm wondering if anyone is aware of a formal mathematical name for what in programming is typically called short-circuit evaluation?

It is common with many operations, that the value of one operand (once established) fully determines the result. For example, where a=b*c, if we know c=0 then a=0, regardless of the value of b. It's extremely common in practice for people to recognise shortcuts like this.

In Boolean logic, there are operators which do not have this property, for example the XOR operator, where the result is never implied by the value of only one operand.

I'm wondering specifically whether there is a pithy name for this property, by analogy with properties like associativity and commutativity.

I've seen the method described as "partial evaluation", but I'm not sure whether the capability of the operator to bear partial evaluation or not would be described as the operator's "evaluativity", and my suspicion is not.

Steve
  • 141
  • If I understand correctly, you want a word for a function where some restriction to a slice of the domain (where some but not all of the variables have fixed values) is constant. I really doubt there is a word for that. And if there is, I doubt it's well-known enough that you could save time by using it rather than explaining short-circuit evaluation and saying your function "has a short-circuit evaluation case" or something. – Mark S. Apr 15 '20 at 11:53
  • @MarkS, whether there is another word is exactly my question. I'd be surprised if there is no formal analysis and terminology dealing with short-circuit evaluation, because it permits certain kinds of algebraic rearrangement. – Steve Apr 15 '20 at 12:56
  • And just doing some more searching and reading, even a research paper describes "short-circuit evaluation" as a "folk term"! – Steve Apr 15 '20 at 12:58

0 Answers0