# What are the non-overlapping properties of a function?

Specifically, properties that identify preconditions over which a function can be used without resulting in undefined behavior or data races.

For example, I am familiar with 3 important properties:

My question is whether:

• is this set of properties non-overlapping and complete?
• If not, is there a set of properties that makes it non-overlapping and complete?

Note that there are environment-specific properties (e.g. thread-safe in multi-threaded environments), or programming languages (generic vs non-generic, number of arguments, etc) that are not of relevance in this context. To reason, we can think of properties of a AWS Lambda or Azure Function, where these environment-specific do not apply.

By non-overlapping I mean that no property in the set has an if and only if relationship with a subset of any other properties in the set.

By complete I mean that any other property not in the set of properties can be logically derived from the said set of properties.

New contributor
Jorge Leitao is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Please define what you mean by "non-overlapping", and please define what you mean by "complete".
– D.W.
Nov 21 at 17:38
• Thanks. Added to the question. Nov 22 at 4:29

## 1 Answer

There is no complete properties. You can always find one more. In particular, a property is just a subset of functions, and there are infinitely many functions, so there are infinitely many properties.

Assuming I have understood your definition of non-overlapping correctly, these three are non-overlapping. An idempotent function can be pure or not pure; it just must ensure that if it has any side effect (e.g., "launch the missile if it hasn't been launched yet"), then performing that side effect twice is equivalent to performing it once. A pure function can be idempotent or not idempotent; e.g., $$f(x)=0$$ is idempotent, but $$f(x)=2x$$ is not. Re-entrancy is an orthogonal consideration.