An expert system for control chart pattern recognition