Thermodynamics: Logical Analysis