adapted front-end function all_partitions_alg