It is possible to find out the associativity and precedence of any operator ---whether it is a built-in one or a user-defined one--- with the help of current_op/3. For example, here is how to find out about +:
?- current_op(X,Y,+).produces two solutions (if we ask for a further solution after the first one is found). The first solution is the precedence and associativity for unary + (in that order) and the second is for binary +. Note that you can get all the operators currently known with the help of a failure-driven loop:X=500
Y=fx ;
X=500
Y=yfx
?- current_op(X,Y,Z),write_op(X,Y,Z),fail.You will find some strange things amongst the 45 different operator declarations.write_op(Precedence,Associativity,Operator):-
write('Operator '),write(Operator),
write(' has precedence '),write(Precedence),
write(' and associativity '),write(Associativity),
nl.