Added expressivity compatible with your ideas: [Extensional Higher Order Prolog](https://billwadge.wordpress.com/2016/01/18/extensional-higher-order-prolog/) by Bill Wadge. There is also a very short paper specifically about datalog: [Kountouriotis, Vassilis, Panos Rondogiannis, and William W. Wadge. "Extensional higher-order datalog." Proceedings of the 12th International Conference on Logic for Programming, Artificial Intelligence and Reasoning (Short Paper). 2005.](https://scholar.google.com/scholar?hl=en&q=Extensional+Higher-Order+Datalog) PS: Datafun should be now on this ever growing [list](https://en.wikipedia.org/wiki/Datalog).
Added expressivity compatible with your ideas:
Extensional Higher Order Prolog by Bill Wadge.
There is also a very short paper specifically about datalog:
Kountouriotis, Vassilis, Panos Rondogiannis, and William W. Wadge. "Extensional higher-order datalog." Proceedings of the 12th International Conference on Logic for Programming, Artificial Intelligence and Reasoning (Short Paper). 2005.
PS:
Datafun should be now on this ever growing list.