I want to solve a problem for which a score function has been implemented in Prolog. Would it possible to call Prolog (or another language) from a MiniZinc script in the case an optimization function is defined in another language?
For instance, MiniZinc can easily be called from python through the package MiniZinc Python. Would there exist an interface to do the opposite (call Python from MiniZinc)?
There is currently no foreign function interface in MiniZinc. So it is currently not possible to use functionality from an other language, like Prolog, in MiniZinc.
Different from exposing MiniZinc to a programming language, integrating other languages into MiniZinc might not be as easy. The problem is that all parts of a MiniZinc instance needs to either be resolved by the compiler or be transformed to a solver-level construct. This means that a computation on parameter values is probably relatively easy to do in another language: MiniZinc could just call a compiled version of the computation. Transformations of variables, on the other hand, would require a strict MiniZinc API to perform them. You could compare such an interface to how you can use CPython in C: it would be more like writing a MiniZinc module in another language.