Algebraic Interaction Theory and Cyber-Physical Systems