MRG: an integrated multifunctional reasoning system