SWI-Prolog Did You Know Did you know? SWI-Prolog can lazily parse a file Search Documentation:
Predicate open_memory_file/4