This book constitutes the refereed proceedings of the 21st Brazilian Symposium on Formal Methods, SBMF 2018, which took place in …