Program generation has seen its important role in a wide range of
software development processes, where effective calculation rules play an important role.
In this paper, we propose a more general calculation rule for
generation of efficient programs for solving maximum marking
problems. Being easy to use and implement, our new rule gives a
significant extension of the rule proposed by Sasano et. al. in
\cite{SHTO00}, allowing multiple kinds of marks as well as more general description of the property of acceptable markings.
We illustrate its effectiveness using several interesting problems.