In software testing we solve different kind of errors. What are interaction related error in software testing? Interaction means relationship between functions, module or components.
From my point of view, Formal definition means define some term in a way that can be understandable to everybody. Its not just a brief description but include some mathematical term. Take a look in the following example:
System: A software system S is a procedural system containing one or more functions, S = {f1, f2…fn} communicating with each other.
Function: A function can be described as a group of statements containing a relation between a set of inputs i.e. {i1, i2…in} and a possible output o.
As u can see the formal definition of System and Function. Formal means a Standard way to describe something.
You can define the errors formally as the following:
Given a function F and a set of input I which belong to a domain D in such that the inputs in I will yield a definite one to one mapping to the answers set A (i.e., outputs) once feeding into F.
To test:
Define a finite set of I' which is a subset of I and a set A' which is a subset of A that all members in I' and A' are one to one, and feed I' into F one by one. Compare the results with the set A'. Since all members of A' and I' have one to one relationship via F, anything produces from member in I' through F that is not in A' is an error.
I believe this is the underlined principle of unit testing (e.g., JUnit, CPPTest, etc.) (without all the formal stuffs, of course :-) ).