Analytical computation of ehrhart polynomials and its applications for embedded systems