From 66d94f2dc027ea4a13b122cee4741132c1a0cc02 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Fri, 3 Nov 2023 10:54:27 +0100 Subject: [PATCH] bugfixes --- .../rascalmpl/library/lang/rascal/matching/Fingerprint.rsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/rascalmpl/library/lang/rascal/matching/Fingerprint.rsc b/src/org/rascalmpl/library/lang/rascal/matching/Fingerprint.rsc index e7d0ec9c891..4f7afe99d87 100644 --- a/src/org/rascalmpl/library/lang/rascal/matching/Fingerprint.rsc +++ b/src/org/rascalmpl/library/lang/rascal/matching/Fingerprint.rsc @@ -83,13 +83,13 @@ To complete the function for the other kinds of trees, even though less importan implement a sensible encoding that follows the contract and tries to differentiate as much as possible between different values. } int concreteFingerprint(appl(Production p, list[Tree] _)) = concreteFingerprint(p); -int concreteFingerprint(amb({appl(prod(Symbol s, _, _), list[Tree] _), _})) = internalHashcode("appl") + 43 * internalHashcode(t) +int concreteFingerprint(amb({appl(prod(Symbol s, _, _), list[Tree] _), _})) = internalHashcode("amb") + 43 * internalHashcode(t) when label(_, Symbol t) := s || Symbol t := s; int concreteFingerprint(char(int ch)) = internalHashcode("char") + internalHashcode(ch); int concreteFingerprint(cycle(Symbol s, int _)) = internalHashcode("cycle") + 13 * internalHashcode(s); @synopsis{Compute a fingerprint for a match pattern with this outermost production rule} -int concreteFingerprint(Production p) = 3568542 + 41 * internalHashcode(p); +int concreteFingerprint(Production p) = internalHashcode("appl") + 41 * internalHashcode(p); @synopsis{These two implementations are intentional clones.} test bool concreteFingerprintAlignment(Tree x) = concreteFingerprint(x) == internalConcreteFingerprint(x);