Satisfaction of polynomial constraints over finite domains using function values