Casually stated, syntactic garbage is data that "cannot" be reached, and semantic garbage is data that "will not" be reached. More precisely, syntactic garbage is data that is unreachable due to the reference graph (there is no path to it), which can be determined by many algorithms, as discussed in Tracing garbage collection, and only requires analyzing the data, not the code. Semantic garbage is data that will not be accessed, either because it is unreachable (hence also syntactic garbage), or is reachable but will not be accessed; this latter requires analysis of the code, and is in general an undecidable problem.