@@ -590,6 +590,14 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
590590 /** Gets the AST node with which this control flow node is associated. */
591591 abstract AstNode getAstNode ( ) ;
592592
593+ /**
594+ * INTERNAL: Do not use.
595+ *
596+ * Gets a tag such that the pair `(getAstNode(), getIdTag())` uniquely
597+ * identifies this node.
598+ */
599+ abstract string getIdTag ( ) ;
600+
593601 /** Gets a textual representation of this node. */
594602 abstract string toString ( ) ;
595603
@@ -606,6 +614,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
606614
607615 override AstNode getAstNode ( ) { result = n }
608616
617+ override string getIdTag ( ) { result = "before" }
618+
609619 override string toString ( ) {
610620 if postOrInOrder ( n ) then result = "Before " + n .toString ( ) else result = n .toString ( )
611621 }
@@ -618,6 +628,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
618628
619629 override AstNode getAstNode ( ) { result = n }
620630
631+ override string getIdTag ( ) { result = "ast" }
632+
621633 override string toString ( ) { result = n .toString ( ) }
622634 }
623635
@@ -629,6 +641,12 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
629641
630642 override AstNode getAstNode ( ) { result = n }
631643
644+ override string getIdTag ( ) {
645+ t .getValue ( ) = true and result = "after-true"
646+ or
647+ t .getValue ( ) = false and result = "after-false"
648+ }
649+
632650 override string toString ( ) { result = "After " + n .toString ( ) + " [" + t .toString ( ) + "]" }
633651 }
634652
@@ -639,6 +657,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
639657
640658 override AstNode getAstNode ( ) { result = n }
641659
660+ override string getIdTag ( ) { result = "after" }
661+
642662 override string toString ( ) { result = "After " + n .toString ( ) }
643663 }
644664
@@ -652,6 +672,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
652672
653673 NormalSuccessor getSuccessorType ( ) { additionalNode ( n , tag , result ) }
654674
675+ override string getIdTag ( ) { result = "add. " + tag }
676+
655677 override string toString ( ) { result = tag + " " + n .toString ( ) }
656678 }
657679
@@ -664,6 +686,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
664686
665687 override AstNode getAstNode ( ) { result = c }
666688
689+ override string getIdTag ( ) { result = "entry" }
690+
667691 override string toString ( ) { result = "Entry" }
668692 }
669693
@@ -678,6 +702,12 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
678702
679703 override AstNode getAstNode ( ) { result = c }
680704
705+ override string getIdTag ( ) {
706+ normal = true and result = "exit-normal"
707+ or
708+ normal = false and result = "exit-exc"
709+ }
710+
681711 override string toString ( ) {
682712 normal = true and result = "Normal Exit"
683713 or
@@ -705,6 +735,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
705735
706736 override AstNode getAstNode ( ) { result = c }
707737
738+ override string getIdTag ( ) { result = "exit" }
739+
708740 override string toString ( ) { result = "Exit" }
709741 }
710742
0 commit comments