Let P be a lattice polytope and lying in $ N \times {1} \subset N \times \mathbb{R}$. Let $\sigma$ be the cone over this polytope and $X_\sigma$ be the corresponding toric variety, which is an affine,Gorenstein, toric variety.

Is there a simple algorithm for computing the ring of global sections of the structure sheaf on X_{\sigma}? I would like the presentation in terms of generators and relations if possible. If this is not possible in general, I would be happy if this is possible under some nice, fairly general situation. Thank you for your help.

I suppose a different version of this question is: Are there computer programs which are freely available and which can make these computations quickly?