We consider the problem of enumerating RNA secondary structures that obey a set of structural constraints arising due to the bio-chemical properties of the sugar-phosphate backbone of the strands. The enumeration problem is cast into a framework involving context-free attribute grammars, where the grammars are used to obtain a closed-form expression for the q-generating functions of the constrained objects via the Delest-Fedou "attribute grammar" method. This approach can be viewed as an extension of the paradigm of constrained coding, which was so far used to operates on constraints represented by regular, rather than context-free languages.
展开▼