add basic semiring and matrix semiring interfaces