Is there a multidimensional integrate-function?

Right. We’re not going to include any copylefted code in Stan. It would be nice if we had an easy user plug-in mechanism so you could easily add it yourself, but we’re not there yet.

It is absolutely not legal to relicense GPL code as BSD. That’s the whole point of GPL—it has copyleft and can’t be loosened.

Stan’s license is BSD-3. That’s compatible with GPL meaning you can release a GPL package that includes GPL and BSD-3 code. But the copyleft drags everything down (see the link the wikipedia article above).

Exactly. Same with GPL3. You can even set up your extension on a server and sell the service. The AGPL is even more restrictive and closes the server gap so you can’t even do that.