Logic-based program system for predicting drug interactions