Algebraic Rules for reasoning about BSP programs