fourth iteration of algebrasp (an algebra generator and solver written in answer set prolog)