On Declarative Modeling of Structured Pattern Mining