In reply to Etrx91:
[A1] The LRM requires that functions in constraints have no side-effects, and technically $display is a side effect.
[A2] Ordering is based on input arguments. You have broken that ordering by referencing a inside the function directly.
[A3] No. The function calls implicitly create the same ordering.
[A4] Since get_a() has no arguments, it is treated as a state variable and has no ordering.