A BOTTOM-UP POLYMORPHIC TYPE INFERENCE IN LOGIC PROGRAMMING