Dogs indeed do not attack puppies – but they know that small dogs are not puppies, they can tell what the other dog is, puppy or aged dog, male or female, low ranked, dominant… just by the other dog’s smell and posture.
The other dog’s smell is like an identity card for them, if the small dog is a puppy dog, they will leave them alone but an adult dog may get attacked. Also, do you think these dogs cannot tell the difference between a small dog and a cat? Of course they can.
Cats do not smell like dogs. Dogs are perfectly aware of their ‘opponent’. Dogs who are socialized, won’t hurt the cat because they see the cat as member of their ‘pack’ whom they should not kill. Cats on the other hand don’t work this way, they are a lot wilder, similar to their ancestors. And if dogs see stray cats, they might even kill them as they don’t belong to their ‘pack’. Wolves also kill wolves of stranger packs. If a dog attacks or even kills another dog, they are not socialized and have dominance issues or disrespect towards their owner who can’t control them because of it. Sometimes, dogs even prey on cats, like some populations of stray dogs in Moscow.