Delphi programs (strictly speaking, BDS 2006 programs) are composed of many different types of files.
An item in the list that has a nested item participates in a source-to-product
relationship, so a Unit contains source code and is compiled to a CompiledUnit,
which contains the corresponding binary code.
DelphiProjectGroup (.bdsgroup) - a grouping of DelphiProjectsDelphiProject (.bdsproj) - a project definition, points to one of
Program/Library/PackageDelphiCompilerFlags (.cfg) - contains the flags passed to DCC32.EXEProgram (.dpr) - a program entry point for an executable program
CompiledProgram (.exe)Library (.dpr) - a program entry point for a dynamically linked library
CompiledLibrary (.dll)Package (.dpk) - a program entry point for a special library
CompiledPackage (.bpl, .dcp)CompiledControlPanel (.cpl)CompiledActiveXControl (.ocx)Unit (.pas) - a source code module
CompiledUnit (.dcu)Form (.dfm) - contains the definition of a gui formResource (.res, .*) - a binary resource (not code), like the program iconFileInclude (.inc) - source code snippet included into the current fileBinaryObject (.obj) - binary code that can be linked into a Delphi programThe full definition is found in delpy/model.py.
The source code of a Delphi program is composed of:
Program (alternatively, a Library or Package)UnitsFormsResourcesBinaryObjects (less common)The Program file contains the source code executed immediately upon running
the program, and Units contain additional source code.
To compile a program, then, we need to:
Units (written to disk as intermediate CompiledUnit
files),Program file, andForms, Resources and
BinaryObjects into a CompiledProgram.However, in all but trivial cases there is also a DelphiProject
file, which contains crucial metadata used in compilation, such as:
DelphiCompilerFlags)CompiledProgram, where to
output the CompiledUnits etc.A program graph is a graph that contains all the sources
(whether source code, or binary files like Resources) of a program.
The root of the graph is either the program entry point (Program/Library/Package),
which refers to Units (which in turn refer to more Units and so on) or a
DelphiProject (if present).

Here we see the graph of a simple program. The program has one form
(Gui.dfm), one resource file (PriceCheck.res) and six Units.
The arrows represent a dependency relationship, so in order to compile
SocketMarshall.pas you first need to compile SocketTypes.pas.