Relations, Constraints and Abstractions: Using the Tools of Logic Programming in the Security Industry