The document presents three declarative meta-programming techniques: meta-modelling, meta-logic programming, and explanation-based constraint programming, applied to design patterns and defects. It discusses their use in pattern description, application, and detection, highlighting advantages and drawbacks for each technique. The concluding part emphasizes the integration of these methods into the tool Ptidej for enhanced analysis and pattern identification in Java programs.