I will discuss generalizations of the notion of a holonomic modules and of the Bernstein inequality to filtered algebras whose associated graded have finitely many symplectic leaves in their spectra.