This example uses the cre pack (0.1.0) for the formal lease and construction stub and exit; standalone streams for ops revenue and ops expense (per guidance: individual revenue/expense items → stream).
Run
Compile:
./target/debug/cfdl compile examples/cre_developer --out /tmp/cre.ir.json --packs packs
Run base case:
./target/debug/cfdl run /tmp/cre.ir.json --out /tmp/cre.base.results.json --config examples/cre_developer/run.base.json --packs packs
Run stress case:
./target/debug/cfdl run /tmp/cre.ir.json --out /tmp/cre.stress.results.json --config examples/cre_developer/run.stress.json --packs packs
Scenario knobs
The model states its rent, operating expense and exit cap rate as assumptions, and the run configurations move them by name:
inputs.rentinputs.opexinputs.cap_rate
model.cfdl
version 0.1
model "cre-developer-example"
use pack "cre" version "0.1.0"
time calendar monthly from 2026-01 for 72
entity asset property : CRE.Asset.RealProperty
contract cre.budget_line on entity asset.property {
term 2026-01..2026-06
terms {
amount = 45000
}
}
assume rent = 25000
assume opex = 12000
assume cap_rate : rate = 0.06
contract cre.lease on entity asset.property {
term 2026-07..2031-12
terms {
rent = inputs.rent
}
}
// Ops income and expense as pack contracts, so the pack classifies them and
// the operating statement can claim them. Hand-written streams carry no
// category, and a statement folds categories rather than stream names.
contract cre.revenue_line on entity asset.property {
term 2028-01..2031-12
terms {
amount = 30000
}
}
contract cre.opex_line on entity asset.property {
term 2028-01..2031-12
terms {
amount = inputs.opex
}
}
contract cre.exit on entity asset.property {
term 2031-12..2031-12
terms {
cap_rate = inputs.cap_rate
income = 180000
}
}