Brain-Flak is a minimalistic, stack-based, Turing complete, esoteric programming language.
A big concern among Brain-Flak enthusiasts is a concept informally called "stack cleanliness".
The basic idea for stack cleanliness is that only certain values on the stack will be edited and all other values will remain unchanged
Given an input arity (a tuple of positions on the active and inactive stack before the program runs), and an output arity (another tuple of the same sort after the program runs) and a function that maps between the two, a program is is considered stack clean iff it performs the function, ends on the stack it started, and the values on the stack that are not in the input remain the same regardless of the conditions of the stack.
The question is: Given a program that is known to halt for all input, a function and the two required arity tuples, is stack cleanliness computable?