An expert system for the diagnosis and rehabilitation of building structures