adding support for querying solutions considering either only non anonymous variables, or all existing variables