The sonic log is a porosity measurement tool that assesses the interval transit time of compressional sound waves traveling through geological formations, relying on the lithology, porosity, and pore fluid characteristics. It utilizes various wave types (compressional, shear, Stoneley, and mud waves) and different tool designs to overcome measurement challenges, including early tools, dual receiver tools, and borehole compensated sonic tools. Applications include determining porosity, lithology identification, and seismic data calibration, with an emphasis on the relationship between sonic transit time and formation characteristics.