a lib similar to LibStatLogic