Four hours should be fine in BOS.
By way of comparison, American Airlines publishes a 1.5 hour minimum connection time for international-to-domestic connections in BOS (
http://flyerguide.com/wiki/index.php...ting_Times_(AA),
http://www.flyertalk.com/forum/ameri...solidated.html ).
AA have to land in terminal E (all AA international arrivals), clear customs and recheck bags, take a shuttle to terminal B (all AA domestic departures), re-clear security, and get to the gate.
Things should be a little faster for you, since Terminal E serves both Air France intl arrivals and Southwest domestic departures.
The only thing to be wary of is that if you have purchased two separate tickets, and something goes awry with your Air France flight (weather, mechanical, or crew delay or cancellation), Air France may not feel any obligation to get you to anywhere but BOS.
By way of contrast, if you had a single ticket from CDG->BWI (connecting in BOS), and your CDG-BOS were severely delayed, you might be able to sweet-talk Air France into rerouting you on AF or another carrier from CDG-IAD. This will be a little harder (not impossible) now.
Certainly Southwest will take care of you at BOS no matter what; "delayed inbound flights" are not an unusual thing for US carriers. And you've picked a good carrier and route -- there are plenty of BOS-BWI shuttles on Southwest, and if you're traveling on a weekday there are even two more at 7 o'clock that you can count on as backup.