Pattern Mining for Behavioral Synthesis