Let us consider a purely declarative language such as SQL, XQuery, or a logic language like Prolog, or a purely functional language without variable mutability.
Considering that the interpreter or compiler for a such language is free of bugs and can check every type errors, could a program written in such language have a side effects which leads to an unwanted behaviour(s) or eventually a runtime error?
a:-a.
(prolog infinite loop)