A computational approach to the theory of adjoints