addition of matched list and backlog into pattern_inference module to allow inference for more input patterns