We consider P systems that assigns storage costs per step to membranes,
and execution costs to rules. We present an abstract syntax of the new class of membrane
systems, and then deal with costs by extending the operational semantics of P systems
with promoters, inhibitors and registers.We use Priced-Timed Maude to implement the P
systems with costs. By using such a rewriting engine which corresponds to the semantics
of membrane systems with costs, we are able to prove the operational correctness of this
implementation. Based on such an operational correspondence, we can analyze properly
the evolutions of the P systems with costs, and verify several reachability properties,
including the cost of computations that reach a given membrane con guration. This
approach opens the way to various optimization problems related to membrane systems,
problems making sense in a bio-inspired model which now can be veri ed by using a
complex software platform