Soft Constraints Priority Order

Hi everybody,

I was reading thorugh a paper on Soft Constraints in SystemVerilog, and this was what the PDF has said about the priorities of soft constraints:

Mantis 2987 proposal [3] to SV-EC IEEE 1800 committee defines the priorities of soft constraints:

  • Constraint expressions that appear later in the same construct (constraint block, class, or struct) have
    higher priority.
  • Constraint expressions in out-of-body constraint blocks whose prototypes appear later in the class have
    higher priority.
  • Constraints in contained objects (rand class handles) have lower priority than all constraints in the container object (class or struct).
  • Constraints in objects whose handles appear later in the container object have higher priority
  • Constraints in derived classes have higher priority than all constraints in their super classes
  • Constraints within inline constraint blocks have higher priority than constraints in the class being randomized.
  • Latter iterations within a foreach constraint have higher priority than former iterations

Based on these set of definitions, I have tried to understand the following lines of code:

According to the author of the guide, it is said the the following is the priority order:

Can someone define or summarize which rule has the highest priority of soft constraints?

Also, what is p3.a2, p3.a1, p2.a2, etc represent?

Thank you!

Sangwoo