An algebraic approach to problem solution and problem semantics