lisa/src/main/java/it/unive/lisa/analysis/nonrelational/value/impl/stringgraphdomain/nodes/StringGraphNode.java
public boolean isFinite() {
		// If the current node is a leaf, it is finite: return true
		if (this.isLeaf()) return true;
		else {
			// Otherwise the node itself and all child nodes must be checked not to have backward children
			if (this.getBackwardChildren().size() > 0) {
				return false;
			} else {
				boolean response = true;
				Iterator<StringGraphNode<?>> i = this.getForwardChildren().iterator();
				while(response && i.hasNext()) {
					StringGraphNode<?> node = i.next();
					response = node.isFinite();
				}
				return response;
			}
		}
	}
/**
	 * Says if a certain node is part of an infinite loop or not. It is a recursive methods
	 * iterating over node children which complexity is O(N), where N is the number of descendent nodes.
	 *
	 * @return true if the node is not part of a infinite loop, false otherwise
	 */
Says if a certain node is part of an infinite loop or not. It is a recursive methods
iterating over node children which complexity is O(N), where N is the number of descendent nodes.

@return true if the node is not part of a infinite loop, false otherwise
Says if a certain node is part of an infinite loop or not . It is a recursive methods iterating over node children which complexity is O ( N ) where N is the number of descendent nodes . @return true if the node is not part of a infinite loop false otherwise
public boolean isFinite() {
		if (this.isLeaf()) return true;
		else {
			if (this.getBackwardChildren().size() > 0) {
				return false;
			} else {
				boolean response = true;
				Iterator<StringGraphNode<?>> i = this.getForwardChildren().iterator();
				while(response && i.hasNext()) {
					StringGraphNode<?> node = i.next();
					response = node.isFinite();
				}
				return response;
			}
		}
	}
public boolean isFinite ( ) { if ( this . isLeaf ( ) ) return true ; else { if ( this . getBackwardChildren ( ) . size ( ) > 0 ) { return false ; } else { boolean response = true ; Iterator < StringGraphNode < ? > > i = this . getForwardChildren ( ) . iterator ( ) ; while ( response && i . hasNext ( ) ) { StringGraphNode < ? > node = i . next ( ) ; response = node . isFinite ( ) ; } return response ; } } }
Says if a certain node is part of an infinite loop or not.
Says if a certain node is part of an infinite loop or not .
// If the current node is a leaf, it is finite: return true // Otherwise the node itself and all child nodes must be checked not to have backward children