1. A processor-implemented method of generating a plurality of clusters of a plurality of actions for manipulating a plurality of packets of a communication protocol, comprising: inputting a declarative description of a processor of the packets of the communication protocol, the declarative description specifying a hierarchical tree structure including a plurality of modules, the modules including a plurality of respective leaf modules for the actions for manipulating the packets of the communication protocol and a plurality of instance modules; wherein one of the instance modules is a root of the hierarchical tree structure and each of the respective leaf and instance modules other than the root is a child of one of the instance modules; inputting a constraint-specification of at least one dependent pair of the actions; for each respective leaf module, generating a cluster that includes the action of the respective leaf module; for each instance module, generating at least one cluster that collectively includes the actions in each cluster of each child of the instance module; wherein for each cluster of each child of the instance module, the actions in the cluster are included in a same one of the at least one cluster, and each dependent pair of the actions are not included in a same one of the at least one cluster; and outputting a cluster-specification of the at least one cluster of the root.
1. A processor-implemented method of generating a plurality of clusters of a plurality of actions for manipulating a plurality of packets of a communication protocol, comprising: inputting a declarative description of a processor of the packets of the communication protocol, the declarative description specifying a hierarchical tree structure including a plurality of modules, the modules including a plurality of respective leaf modules for the actions for manipulating the packets of the communication protocol and a plurality of instance modules; wherein one of the instance modules is a root of the hierarchical tree structure and each of the respective leaf and instance modules other than the root is a child of one of the instance modules; inputting a constraint-specification of at least one dependent pair of the actions; for each respective leaf module, generating a cluster that includes the action of the respective leaf module; for each instance module, generating at least one cluster that collectively includes the actions in each cluster of each child of the instance module; wherein for each cluster of each child of the instance module, the actions in the cluster are included in a same one of the at least one cluster, and each dependent pair of the actions are not included in a same one of the at least one cluster; and outputting a cluster-specification of the at least one cluster of the root. 4. The processor-implemented method of claim 1 , wherein the generating of each cluster of each instance and respective leaf module includes performing a traversal of the hierarchical tree structure, upon visiting each respective leaf module the traversal generating the cluster that includes the action of the respective leaf module, and upon visiting each instance module the traversal generating the at least one cluster of the instance module.