Towards a logical analysis of the immune response