Q:

how can we write abstract algorithms?

Writing pseudo-code for algorithms is common practice in the applied mathematics literature. It is also often the case that the ideal input of an algorithm is an infinite set, for example it could be a positive-dimensional algebraic variety over $\mathbb{C}$. However practical algorithms only take as input a finite sample of this infinite ideal set. As another example, image processing algorithms take as input the pixels of a digital image, however the ideal input is a continuous object, i.e. the actual physical scene that the digital camera is attempting to capture.
So, it might be of interest, in order to understand the theoretical properties of such algorithms, to develop abstract versions of them, in the sense that their inputs and outputs are theoretical objects, not necessarily subject to computation. These algorithms might also require operations that again might not be computable, for example, we might have statements of the form "$while \, \, \, A \neq B \, \, \, do \, \, \, A \gets A\cap B$", where both $A,B$ are infinite sets. Notice that in general, if one is given $A$ and $B$, it is not possible to check the validity of the condition $A \neq B$. In fact, in general, one can not even receive either $A$ and $B$, because they are infinite! 
So my question is: is it scientifically correct to write abstract algorithms in the above sense? Have such algorithms appeared in the literature? If not, then how can one abstract an algorithmic process that operates mathematically on abstract, non-tangible objects?

A:

One way to write down algorithms that work with infinite/non-computable objects is to assume that you some kind of "oracle" that can perform the required computation. For your example, you could assume that you have some "magic" oracle function that checks whether $A \neq B$ that can somehow be invoked by your algorithm.
For more details, see, e.g., http://en.wikipedia.org/wiki/Oracle_machine.

