I was having some issues trying to find a closure to the DRC algorithm:

Not sure if combination of DFM TEXT and other commands can solve this?

There is one text label say("X") on each Layer1 polygon

There is one text label say ("A1") on each Layer2 polygon

Layer1 and Layer2 polygons must overlap & the string concatenation ("XA1") need to be unique in the GDS.

Example:

["X" + "A1"] ["Y" + "A1"] ["Y" + "B1"] is allowed

Multiple ["X" + "A1"] are not allowed

I was able to work out a solution using DFM PROPERTY,DFM TEXT,DFM FUNCTION and tcl macros to accomplish the task.