Case 994
The fullest lake gave the smallest harvest
the_fullest_lake_gave_the_smallest_harvest.eml - A fishery manager surveys a lake whose fish stock stands at 9000 tonnes, close to the 10000 it can hold, and reasons that the fuller the lake, the more fish breed, so the fullest lake supports the biggest catch the fishery can keep taking every year. What the lake can really give each year at each stock is computed below.
ok: true — round-trip fixpoint reached (python1 == python2)updated 2026-09-24
EML
eml# Self-authored for the EML case corpus (no external origin). A fishery manager
# surveys a lake whose fish stock stands at 9000 tonnes, close to the 10000 it
# can hold, and reasons that the fuller the lake, the more fish breed, so the
# fullest lake supports the biggest catch the fishery can keep taking every
# year. What the lake can really give each year at each stock is computed below.
#
# The reasoning is careful. The survey is accurate; the stock can grow at up
# to 40 percent a year when there is room; more fish really do mean more
# spawners; and the intent is exactly 'the largest catch that lasts'.
#
# A stock grows by births minus deaths, and as the lake fills, crowding cuts
# the growth: the yearly surplus is the growth rate times the stock times the
# share of room still left. At 9000 tonnes the room left is a tenth and the
# surplus is 360 tonnes a year; at 5000 it is 1000. A full lake gives nothing
# it can spare.
10000 => lake_holds_tonnes
40 => growth_rate_percent_when_there_is_room
9000 => stock_now_tonnes
5000 => half_full_stock_tonnes
2000 => low_stock_tonnes
int(growth_rate_percent_when_there_is_room * stock_now_tonnes * (lake_holds_tonnes - stock_now_tonnes) / (100 * lake_holds_tonnes)) => surplus_at_the_current_stock_tonnes
int(growth_rate_percent_when_there_is_room * half_full_stock_tonnes * (lake_holds_tonnes - half_full_stock_tonnes) / (100 * lake_holds_tonnes)) => surplus_at_half_full_tonnes
int(growth_rate_percent_when_there_is_room * low_stock_tonnes * (lake_holds_tonnes - low_stock_tonnes) / (100 * lake_holds_tonnes)) => surplus_at_the_low_stock_tonnes
int(growth_rate_percent_when_there_is_room * lake_holds_tonnes * (lake_holds_tonnes - lake_holds_tonnes) / (100 * lake_holds_tonnes)) => surplus_at_a_full_lake_tonnes
int((lake_holds_tonnes - stock_now_tonnes) * 1000 / lake_holds_tonnes) => room_left_now_per_mille
surplus_at_half_full_tonnes - surplus_at_the_current_stock_tonnes => tonnes_a_year_the_half_full_lake_adds
"lake holds : " + str(lake_holds_tonnes) + " tonnes of fish" ^0
"growth when there is room : " + str(growth_rate_percent_when_there_is_room) + " percent a year" ^0
"stock now : " + str(stock_now_tonnes) + " tonnes, room left " + str(room_left_now_per_mille) + " per mille" ^0
"" ^0
"yearly surplus, full lake : " + str(surplus_at_a_full_lake_tonnes) + " tonnes" ^0
"yearly surplus, at " + str(stock_now_tonnes) + " : " + str(surplus_at_the_current_stock_tonnes) + " tonnes" ^0
"yearly surplus, at " + str(half_full_stock_tonnes) + " : " + str(surplus_at_half_full_tonnes) + " tonnes" ^0
"yearly surplus, at " + str(low_stock_tonnes) + " : " + str(surplus_at_the_low_stock_tonnes) + " tonnes" ^0
"half full gives more by : " + str(tonnes_a_year_the_half_full_lake_adds) + " tonnes a year" ^0
"" ^0
# ---- what the manager verified ----
"the fullest-is-best reasoning" ^0
" survey : " + str(stock_now_tonnes) + " tonnes, accurate" ^0
" growth : up to " + str(growth_rate_percent_when_there_is_room) + " percent a year when there is room" ^0
" spawners : more fish, more spawners" ^0
" intent : the largest catch that lasts" ^0
" facts wrong : 0" ^0
" verdict : THE FULLEST LAKE SUPPORTS THE BIGGEST CATCH" ^0
"" ^0
" surveying the stock accurately is the part done right here," ^0
" and it is why " + str(stock_now_tonnes) + " tonnes is exactly what is in the lake" ^0
"" ^0
# ---- what a lake can spare ----
"growth needs room" ^0
" what a lasting catch can be : the yearly surplus, no more" ^0
" what the surplus is : the growth rate times the stock times the" ^0
" share of room still left" ^0
" a nearly full lake : a big stock with almost no room, " + str(room_left_now_per_mille) + " per mille," ^0
" so a surplus of " + str(surplus_at_the_current_stock_tonnes) + " tonnes" ^0
" a half-full lake : half the stock and half the room, the best" ^0
" product of the two, " + str(surplus_at_half_full_tonnes) + " tonnes" ^0
" a full lake : no room at all, a surplus of " + str(surplus_at_a_full_lake_tonnes) ^0
"" ^0
# ---- what the manager got ----
"the fishery" ^0
" believed : the most the lake can give, at its fullest" ^0
" actual : " + str(surplus_at_the_current_stock_tonnes) + " tonnes a year, where a half-full lake gives " + str(surplus_at_half_full_tonnes) ^0
" is the survey wrong : no" ^0
" do more fish mean more to catch : only while there is room;" ^0
" near the top, crowding eats the growth" ^0
"" ^0
# ---- null control ----
# The same lake judged by its yearly surplus instead of by the size of its
# stock.
360 => nc_lasting_catch_at_the_fullest_stock_tonnes
1000 => nc_lasting_catch_at_half_full_tonnes
640 => nc_tonnes_a_year_the_half_full_lake_adds
"null control - judge the lake by its surplus" ^0
" lasting catch at the fullest stock : " + str(nc_lasting_catch_at_the_fullest_stock_tonnes) + " tonnes a year" ^0
" lasting catch at half full : " + str(nc_lasting_catch_at_half_full_tonnes) + " tonnes a year" ^0
" tonnes a year the half-full lake adds : " + str(nc_tonnes_a_year_the_half_full_lake_adds) ^0
" no lake and no fish changed; the stock was valued by what it" ^0
" can spare, not by what it holds" ^0
"" ^0
# ---- the rule ----
"what an accurate survey of a nearly full lake guarantees" ^0
" the lake holds " + str(stock_now_tonnes) + " tonnes of fish : exactly" ^0
" it supports the biggest lasting catch : not addressed; the" ^0
" surplus is growth times stock times room left, " + str(surplus_at_the_current_stock_tonnes) + " tonnes" ^0
" a year at " + str(stock_now_tonnes) + " against " + str(surplus_at_half_full_tonnes) + " at half full" ^0
"" ^0
"a full larder is not a busy kitchen; what a stock can give each year is what" ^0
"it adds, and nothing adds much once there is no room left to grow into" ^0
"" ^0
"The lake holds " + str(stock_now_tonnes) + " tonnes - the survey is right. But the yearly surplus is" ^0
"growth times stock times the room left, so the nearly full lake spares " + str(surplus_at_the_current_stock_tonnes) ^0
"tonnes a year where a half-full one spares " + str(surplus_at_half_full_tonnes) + ", until the lake is valued by what it" ^0
"adds rather than by what it holds." ^0Python (deterministic transpilation)
pythonlake_holds_tonnes = 10000
growth_rate_percent_when_there_is_room = 40
stock_now_tonnes = 9000
half_full_stock_tonnes = 5000
low_stock_tonnes = 2000
surplus_at_the_current_stock_tonnes = int(growth_rate_percent_when_there_is_room * stock_now_tonnes * (lake_holds_tonnes - stock_now_tonnes) / (100 * lake_holds_tonnes))
surplus_at_half_full_tonnes = int(growth_rate_percent_when_there_is_room * half_full_stock_tonnes * (lake_holds_tonnes - half_full_stock_tonnes) / (100 * lake_holds_tonnes))
surplus_at_the_low_stock_tonnes = int(growth_rate_percent_when_there_is_room * low_stock_tonnes * (lake_holds_tonnes - low_stock_tonnes) / (100 * lake_holds_tonnes))
surplus_at_a_full_lake_tonnes = int(growth_rate_percent_when_there_is_room * lake_holds_tonnes * (lake_holds_tonnes - lake_holds_tonnes) / (100 * lake_holds_tonnes))
room_left_now_per_mille = int((lake_holds_tonnes - stock_now_tonnes) * 1000 / lake_holds_tonnes)
tonnes_a_year_the_half_full_lake_adds = surplus_at_half_full_tonnes - surplus_at_the_current_stock_tonnes
print("lake holds : " + str(lake_holds_tonnes) + " tonnes of fish")
print("growth when there is room : " + str(growth_rate_percent_when_there_is_room) + " percent a year")
print("stock now : " + str(stock_now_tonnes) + " tonnes, room left " + str(room_left_now_per_mille) + " per mille")
print("")
print("yearly surplus, full lake : " + str(surplus_at_a_full_lake_tonnes) + " tonnes")
print("yearly surplus, at " + str(stock_now_tonnes) + " : " + str(surplus_at_the_current_stock_tonnes) + " tonnes")
print("yearly surplus, at " + str(half_full_stock_tonnes) + " : " + str(surplus_at_half_full_tonnes) + " tonnes")
print("yearly surplus, at " + str(low_stock_tonnes) + " : " + str(surplus_at_the_low_stock_tonnes) + " tonnes")
print("half full gives more by : " + str(tonnes_a_year_the_half_full_lake_adds) + " tonnes a year")
print("")
print("the fullest-is-best reasoning")
print(" survey : " + str(stock_now_tonnes) + " tonnes, accurate")
print(" growth : up to " + str(growth_rate_percent_when_there_is_room) + " percent a year when there is room")
print(" spawners : more fish, more spawners")
print(" intent : the largest catch that lasts")
print(" facts wrong : 0")
print(" verdict : THE FULLEST LAKE SUPPORTS THE BIGGEST CATCH")
print("")
print(" surveying the stock accurately is the part done right here,")
print(" and it is why " + str(stock_now_tonnes) + " tonnes is exactly what is in the lake")
print("")
print("growth needs room")
print(" what a lasting catch can be : the yearly surplus, no more")
print(" what the surplus is : the growth rate times the stock times the")
print(" share of room still left")
print(" a nearly full lake : a big stock with almost no room, " + str(room_left_now_per_mille) + " per mille,")
print(" so a surplus of " + str(surplus_at_the_current_stock_tonnes) + " tonnes")
print(" a half-full lake : half the stock and half the room, the best")
print(" product of the two, " + str(surplus_at_half_full_tonnes) + " tonnes")
print(" a full lake : no room at all, a surplus of " + str(surplus_at_a_full_lake_tonnes))
print("")
print("the fishery")
print(" believed : the most the lake can give, at its fullest")
print(" actual : " + str(surplus_at_the_current_stock_tonnes) + " tonnes a year, where a half-full lake gives " + str(surplus_at_half_full_tonnes))
print(" is the survey wrong : no")
print(" do more fish mean more to catch : only while there is room;")
print(" near the top, crowding eats the growth")
print("")
nc_lasting_catch_at_the_fullest_stock_tonnes = 360
nc_lasting_catch_at_half_full_tonnes = 1000
nc_tonnes_a_year_the_half_full_lake_adds = 640
print("null control - judge the lake by its surplus")
print(" lasting catch at the fullest stock : " + str(nc_lasting_catch_at_the_fullest_stock_tonnes) + " tonnes a year")
print(" lasting catch at half full : " + str(nc_lasting_catch_at_half_full_tonnes) + " tonnes a year")
print(" tonnes a year the half-full lake adds : " + str(nc_tonnes_a_year_the_half_full_lake_adds))
print(" no lake and no fish changed; the stock was valued by what it")
print(" can spare, not by what it holds")
print("")
print("what an accurate survey of a nearly full lake guarantees")
print(" the lake holds " + str(stock_now_tonnes) + " tonnes of fish : exactly")
print(" it supports the biggest lasting catch : not addressed; the")
print(" surplus is growth times stock times room left, " + str(surplus_at_the_current_stock_tonnes) + " tonnes")
print(" a year at " + str(stock_now_tonnes) + " against " + str(surplus_at_half_full_tonnes) + " at half full")
print("")
print("a full larder is not a busy kitchen; what a stock can give each year is what")
print("it adds, and nothing adds much once there is no room left to grow into")
print("")
print("The lake holds " + str(stock_now_tonnes) + " tonnes - the survey is right. But the yearly surplus is")
print("growth times stock times the room left, so the nearly full lake spares " + str(surplus_at_the_current_stock_tonnes))
print("tonnes a year where a half-full one spares " + str(surplus_at_half_full_tonnes) + ", until the lake is valued by what it")
print("adds rather than by what it holds.")stdout (executed)
textlake holds : 10000 tonnes of fish
growth when there is room : 40 percent a year
stock now : 9000 tonnes, room left 100 per mille
yearly surplus, full lake : 0 tonnes
yearly surplus, at 9000 : 360 tonnes
yearly surplus, at 5000 : 1000 tonnes
yearly surplus, at 2000 : 640 tonnes
half full gives more by : 640 tonnes a year
the fullest-is-best reasoning
survey : 9000 tonnes, accurate
growth : up to 40 percent a year when there is room
spawners : more fish, more spawners
intent : the largest catch that lasts
facts wrong : 0
verdict : THE FULLEST LAKE SUPPORTS THE BIGGEST CATCH
surveying the stock accurately is the part done right here,
and it is why 9000 tonnes is exactly what is in the lake
growth needs room
what a lasting catch can be : the yearly surplus, no more
what the surplus is : the growth rate times the stock times the
share of room still left
a nearly full lake : a big stock with almost no room, 100 per mille,
so a surplus of 360 tonnes
a half-full lake : half the stock and half the room, the best
product of the two, 1000 tonnes
a full lake : no room at all, a surplus of 0
the fishery
believed : the most the lake can give, at its fullest
actual : 360 tonnes a year, where a half-full lake gives 1000
is the survey wrong : no
do more fish mean more to catch : only while there is room;
near the top, crowding eats the growth
null control - judge the lake by its surplus
lasting catch at the fullest stock : 360 tonnes a year
lasting catch at half full : 1000 tonnes a year
tonnes a year the half-full lake adds : 640
no lake and no fish changed; the stock was valued by what it
can spare, not by what it holds
what an accurate survey of a nearly full lake guarantees
the lake holds 9000 tonnes of fish : exactly
it supports the biggest lasting catch : not addressed; the
surplus is growth times stock times room left, 360 tonnes
a year at 9000 against 1000 at half full
a full larder is not a busy kitchen; what a stock can give each year is what
it adds, and nothing adds much once there is no room left to grow into
The lake holds 9000 tonnes - the survey is right. But the yearly surplus is
growth times stock times the room left, so the nearly full lake spares 360
tonnes a year where a half-full one spares 1000, until the lake is valued by what it
adds rather than by what it holds.Trace event types
eml:run:starteml:assigneml:outputeml:run:done