An Algebraic Semantics of Logic Programs as Structured Transition Systems