A logical solver