OptiLog: A Framework for SAT-based Systems