From triple(patterns/paths) to quad(patterns/paths)