The source code (mines.c) is here:
https://git.tartarus.org/?p=simon/puzzles.git;a=blob;f=mines...
There is code for solving a grid using deductions in this section:
https://git.tartarus.org/?p=simon/puzzles.git;a=blob;f=mines...
And below that is the code that generates grids and checks that they are solvable without taking risks.
A similar approach is used to analyse the difficulty of Sudoku games here:
http://hodoku.sourceforge.net/en/index.php
with different names for the different types of deduction.