Are there any declarative way to describe patterns in DAG?

Hello all,

I’m working on some DAG to DAG transformations and would like to know are there any declarative way to describe pattern in DAG? Ideally I’d like to use something like AST matchers in clang. I haven’t found any mention of ‘DAG matchers’ and suppose they aren’t exist. But if there exist at least a few functions which helps to describe some aspects of DAG in declarative style or any attempts to implement matches please do let me know. Thank you.