Graph protocol, immutable default implementation and basic graph theory algorithms