Algebraic Knowledge Representation: The Unification of Procedure, Logic and Structure