METRICS FOR FORMAL STRUCTURES, WITH AN APPLICATION TO KRIPKE MODELS AND THEIR DYNAMICS