src/LearnIt/MatchInfo.cpp
// Check for cycles: infinite loops are not a good thing.

Check for cycles: infinite loops are not a good thing.
Check for cycles : infinite loops are not a good thing .
BOOST_FOREACH(PropPathLink link, pathToHere) {
		if (link.prop == prop) {
			SessionLogger::info("LEARNIT") << "Cycle detected: ";
			BOOST_FOREACH(PropPathLink l, pathToHere) {
				SessionLogger::info("LEARNIT") << l.prop->getPredHead()->toTextString()
					<< L" " << l.role << L" -> ";
			}
			SessionLogger::info("LEARNIT") << prop->getPredHead()->toTextString() << std::endl;
			return;
		}
	}
BOOST_FOREACH ( PropPathLink link , pathToHere ) { if ( link . prop == prop ) { SessionLogger :: info ( " " ) << " " ; BOOST_FOREACH ( PropPathLink l , pathToHere ) { SessionLogger :: info ( " " ) << l . prop -> getPredHead ( ) -> toTextString ( ) << L" " << l . role << L" " ; } SessionLogger :: info ( " " ) << prop -> getPredHead ( ) -> toTextString ( ) << std :: endl ; return ; } }
Check for cycles: infinite loops are not a good thing.
Check for cycles : infinite loops are not a good thing .