Compiled Form of Arithmetic Expressions in Prolog