The Stallings construction for f.g. subgroups of free groups is
generalized by introducing the concept of Stallings section, which allows an
e¿cient computation of the core of a Schreier graph based on edge folding.
It is proved that those groups admitting Stallings sections are precisely f.g.
virtually free groups, through a constructive approach based on Bass-Serre
theory. Complexity issues and applications are also discussed.