This is something I've had to run into when DM-ing. One of my characters has a -1 strength is a small character, and is a rogue. The -1 strength means that when attacking with his dagger, he often has to use the rule that makes the damage 1 instead of 0 (I believe DR always happens at the end of the calculation). I call this "normalization" for my purposes.
I've often wondered (since this affects combat) whether the sneak attack damage is added to the melee damage (which would change whether or not the attack has to be "normalized"). When does a critical hit take effect? I'm pretty sure sneak attack damage isn't multiplied by that. What about if the character is being inspired? The text says that it adds +1 to all melee damage rolls so that seems like it would affect the initial roll (and thus affect the "normalization"). What about if the weapon is enchanted?
I'm mostly looking for an algorithm that can tell me what happens when in the calculations.