Skip to content
An Econ-ARK project

API

Summary

The public names of bellman.stage, bellman.period and bellman.trellis, one table each, and every path and verb of the way in to the stage object: the functions that read, elaborate and bind stage files and trellises, find the joins and the order of the stages of a period and draw periods, the table of method types, and the pieces of the stage object reached from the stage by name, each with what it answers, the type of its answer, one answer the package prints and where the package defines it. The attributes of the records these paths answer, such as a parameter's value or a kernel's origins, and the class ElaboratedStage, the module semgraph and the four refusal classes have no row. The tables are written from the package by the documentation's own script, so they list what the installed package answers. The pages below this index take the stage object one level at a time.

Relationship with other documents

Builds on — Stage tutorial: the stage file whose object these paths reach. Used by — The factory API and The stage: the pages of the two groups below. See also — Operations and Methods: the kinds of operation and the method types a listing names.

Key terminology
Term What it names
Stage One self-contained decision problem, written as one stage file, a .bl file; in Python, the object elaborate_stage returns for that file.
Perch One of the three information sets of a stage: arrival arvl, decision dcsn and continuation cntn.
Field A named quantity at a perch, with a declared set: a state, a control, a shock or a value.
Block A group of equations of a stage file between declared inputs and outputs (Stage tutorial §3).
Initial diagram The blocks of one direction of a stage on the fields they read and write, one graph backward and one forward.
Builder The operator one block denotes: on value functions backward, on finite measures forward.
Builders graph The builders of one direction: stage.builder.bwd, the backward builders a solution applies, and stage.builder.fwd, the forward builders a simulation applies.
Piece A component of a stage reached by its name from the component that holds it: a builder, a block, a sub-builder, an operation or a line.
Operation One primitive operator inside a builder, such as a pullback or an aggregation (A piece §1).
Line One equation of a block, read by its id; a line marked !doc states what the control is, is not computed and has no box (The initial diagrams §3).
Grain How far a graph's boxes are opened: one box per block, or one box per primitive operator.
Wire A typed connection of a graph, carrying one object: a field in an initial diagram, a function or a measure in a builders graph.
Coordinate A control a block lists among its inputs: its lines are written in it, and no wire carries it (The initial diagrams §3).
Kernel The pointwise object one operation applies: a law of motion 𝑔, a value aggregator 𝐺 or a declared distribution (A piece §2).
Denotation The mathematical object a piece denotes under the declarations of its file and the calibration of its version: a set, a map between sets, a measure, a relation or an operator; denote() states it, and the package computes none.
Builder at a policy A backward builder or a push-forward stated at the policy function: one operator for each policy, all with the same inputs and outputs (A builder §1).

1 The way in

Every piece of a stage is reached from the piece that contains it, and each answers for itself, a verb meaning the same at every level that answers it. A builder is identified by the ordered pair of perches it joins and read by that pair as a key of stage.builder: stage.builder["cntn", "dcsn"] is the backward builder from continuation to decision, and the policy builder is read by its own key, stage.builder["policy"]. Each perch reaches the builders of the edge that leaves it, stage.dcsn.builder.bwd, a path defined as that one pair, and the pages below write a builder by its perch path (The builders graphs §§1 and 2). Every other piece is read by its name as a key, stage.dcsn.builder.bwd["pullback"]; one parameter, one setting and one bound method by the name their file writes, stage.par["ρ"], stage.settings["n_a"] and stage.methods["policy"]; and the value alone of a parameter or a setting by the same name as an attribute, stage.par.ρ and stage.settings.n_a. A graph, a builder and a sub-builder open to a finer grain by an attribute, primitives or sub_builders. The verbs are view() for the stage's printed view, list() for the pieces inside, denote() for the piece's printed record, signature() for its inputs and outputs, diagram() for its drawing, kernel() and compile_kernel() for the rule an operation applies, kernels() for the kernels of every operation of a builder or a sub-builder, as one record that refers to no stage, and methods for the methods bound within it. The stage answers no signature() or diagram(); stage.initial answers list() and methods alone, and stage.builder these two and view(); a perch answers no verb, and the builders of a perch, stage.dcsn.builder, answer list() alone; only the stage, stage.builder, stage.par and stage.settings answer view(); an operation answers no diagram(); a block answers no kernels(), which the builder of the same name answers; and a line marked !doc answers denote() and methods alone.

The pages take the two groups of the API in turn.

Group Pages
Bellman factory API The factory API, Stage functions, Recipe functions, Period functions, The trellis factory: the functions that read files, elaborate and bind trellises and draw periods.
The stage object The stage, The initial diagrams, The builders graphs, A builder, A piece, Parameters and settings, Methods and places, The definitions table, The binding verbs: one page per level of the object.

Beside the drawing that diagram() answers, a stage or a trellis is read interactively in Google's Model Explorer through the functions explore and write_model_explorer, which stand in bellman.stage and in bellman.trellis and are no verbs of a piece: The view in Model Explorer.

The registry of the representation families stands in the submodule bellman.stage.representations, whose names the tables of §2 do not hold: the class RepresentationFamily describes one family, register(family) adds it, unregister(word) removes it, and families() answers the registered families by word; the method table bellman.stage.method_types lists a registered family as it lists the package's own rows (Methodization §3.4).

2 Every path, in four tables

One row per public function and per public constant of bellman.stage, bellman.period and bellman.trellis, in one table per namespace, then one row per path and verb of the way in, each written from what the package answers; a class or a module that a namespace exports, such as the class ElaboratedStage, has no row. Every table has five columns:

  • path is what you type: a function with the parameters a call must give; the stage itself, stage, the object elaborate_stage returns; or an attribute or verb of an object reached from stage, at the path that reaches the object. A reading by a key is written with the name the package gives the key, stage.par[name], and a reading by an attribute, by which a parameter or a setting answers its value under its own name, with that name in angle brackets, stage.par.<name>.
  • what it answers is the first sentence of the docstring the package gives the function, the attribute or the verb. An attribute or a reading by a key with no docstring of its own takes the first sentence of the docstring of the class of its answer, where that class is the package's own and the answer is no frozen copy, the immutable copy a stage holds of an object of DisCoPy, the library the package builds its graphs with; otherwise it takes the sentence of the docstring of the class holding it that names the attribute or writes a key. The row of the stage itself takes the first sentence of the docstring of its class. A constant, such as the method table or a perch word, takes the first sentence of the docstring of its class where the package defines that class, and otherwise that of the comment above the line that assigns it.
  • type is the class of the answer: for a frozen copy, the class of the object it copies, BellmanHypergraph, Builder or Box; otherwise the answer's class, or, where that class's name begins with an underscore, the first class it inherits from whose name does not, such as Mapping for the method table.
  • example is the call, where the path takes an argument or a key, and the answer as the package prints it, on one line: the first line it prints, each run of white space written as one space and a function's memory address left out, cut to its first 75 characters where it runs past 76. The mark … stands for what the cell leaves out, the rest of a cut line or the later lines of an answer that prints several. Where the package refuses the path, the type is a dash and the example names the object that refuses it, with the refusal's class and message.
  • defined in is the module, by its path in the package, and the name of the function, the class, the attribute or the verb that the row describes.

The row of the stage itself and every row of an object reached from it, the rows of §2.4, are printed on the specified version of the stage file applications/portfolio-choice/declaration/stages/cons/cons.bl, calibrated by applications/portfolio-choice/declaration/calibration/portfolio.yml, methodized by applications/portfolio-choice/declaration/stages/cons/methods.bl, the methods file beside the stage file, and configured by applications/portfolio-choice/declaration/settings/cons.yml; the example of calibrate is applied to the symbolic stage, that of methodize to the calibrated version and that of configure to the methodized one. An object has the attributes and verbs of its class, so the rows of one object name what every object of its kind answers, and each kind has its rows at the paths named here: those of a graph stand at stage.initial.backward, stage.builder.bwd and stage.builder.fwd; those of a builder at stage.builder["cntn", "dcsn"], except state_choice_measure(), the forward decision builder's joint measure of state and choice, at stage.builder["dcsn", "cntn"]; those of an operation at stage.builder["cntn", "dcsn"]["pullback"]; those of a line with a box at stage.initial.backward["cntn_to_dcsn"]["value"], the line read from its block by its id; and those of a line marked !doc, which the consumption stage does not write, at stage.initial.backward["policy", "objective"] of the portfolio stage applications/portfolio-choice/declaration/stages/port/port.bl, whose maximization is so marked. The mapping stage.builder has one row for each pair it reads on cons.bl, and the builders of a perch have their rows at each of the three perches, stage.arvl.builder, stage.dcsn.builder and stage.cntn.builder, since each perch answers or refuses its paths for reasons of its own. A block shares its class with a builder, so only its reading by a key has a row, at stage.initial.backward["cntn_to_dcsn"]. The functions of bellman.stage are printed on cons.bl: in their calls, text is the text of the file, record the record load_stage reads from it, and stage the symbolic stage elaborate_stage(record), not the specified version of §2.4. The functions of bellman.period and bellman.trellis are printed on the trellis file applications/cons-port/declaration/trellis.cons-port.yml, where in a call syntactic is the trellis the file writes, elaborated its elaborated trellis and periods that trellis's periods, or on the durables registry applications/durables/declaration with the recipe spec.two-stages.yml. The functions of a period are printed on periods[0], and inter_period_joins on the file's inter-period mapping, mapping, with periods[1], the period appended later and so earlier in time, and periods[0]. The functions of the view in Model Explorer are printed in bellman.stage on the symbolic stage of cons.bl and in bellman.trellis on elaborated; explore and write_model_explorer each write their two files into a folder model-explorer inside a temporary folder, which is removed afterwards, and answer their paths relative to the temporary folder. A trellis is a plain Python dictionary, whose printed form is Python's own.

2.1 bellman.stage

path what it answers type example defined in
bellman.stage.load_stage(path) The source record of the stage file at path: its text and its origin under stage, the calibration and the settings empty, under methods the record of each addition whose path additions lists, in the order given (named_addition), and its origin and the digest of its text under provenance. dict load_stage("applications/portfolio-choice/declaration/stages/cons/cons.bl"): {'stage': {'text': '@stage: cons\n\nXm := ℝ₊₊\nXa := ℝ₊\n\nρ : [1, inf)\n\n… factory/loading.py, load_stage
bellman.stage.elaborate_stage(record) The stage of one source record, the mapping load_stage returns: its text parsed and constructed at its origin and, where bind is true, as it is by default, every source the record supplies bound, in the order calibrate, methodize, configure. ElaboratedStage elaborate_stage(record): ElaboratedStage('cons', symbolic) factory/elaboration.py, elaborate_stage
bellman.stage.elaborate_text(text, origin) The symbolic stage of a stage text with origin recorded as its source, as elaborate_stage builds it from the record of the text with empty calibration, settings and methods sources: the one reader of a text that the dossier, the refusal catalogue and the command line elaborate. ElaboratedStage elaborate_text(text, "applications/portfolio-choice/declaration/stages/cons/cons.bl"): ElaboratedStage('cons', symbolic) factory/elaboration.py, elaborate_text
bellman.stage.make_stage(term, spans) The ElaboratedStage of the stage that term, the parsed AST of a stage file or of its union with its additions, describes, with the span table spans of its parse, or None for a decoded term: the stage of the fields construction.stage_fields constructs, which states the pipeline and its refusals, read at its two levels by levels.construct, with every typing entry resolved to its place (places.typings) and the components checked against the catalogue's rows (components.check_components), so that an entry that names no place, types a component twice, omits a keyword its row requires or writes a grid the place does not admit is refused where the stage is made. ElaboratedStage make_stage(*parse_with_spans(text)): ElaboratedStage('cons', symbolic) stage/elaborated.py, make_stage
bellman.stage.source_spans(text, origin) The span table of a stage text: a read-only mapping from the address of each authored item to its SourceSpan, the file as origin names it, the line and the column of the item's first character and those just after its last, counted from one, the column in code points (bellman.syntax.lower.parse_with_spans). mappingproxy source_spans(text, "applications/portfolio-choice/declaration/stages/cons/cons.bl"): mappingproxy({'1': SourceSpan(file='applications/portfolio-choice/declarati… factory/elaboration.py, source_spans
bellman.stage.bind_stage(stage, record) The Binding of stage from the three sources of record, the calibration, methods and settings of a record load_stage or load_recipe returns, a calibration or a settings source a mapping or the path of a YAML file and a methods source the additions it holds, which methodize reads into the stage. Binding bind_stage(elaborate_stage(record), {"calibration": "applications/portfolio-choice/declaration/calibration/portfolio.yml", "methods": {}, "settings": {}}): Binding(stage=ElaboratedStage('cons', calibrated), bound=('calibrate',), sk… factory/elaboration.py, bind_stage
bellman.stage.arvl The perch word of arrival as a string, bellman.stage.arvl == "arvl", exported so that a key of stage.builder is written without quotation marks. str 'arvl' syntax/vocabulary.py, arvl
bellman.stage.dcsn The perch word of decision as a string, bellman.stage.dcsn == "dcsn", exported so that a key of stage.builder is written without quotation marks. str 'dcsn' syntax/vocabulary.py, dcsn
bellman.stage.cntn The perch word of continuation as a string, bellman.stage.cntn == "cntn", exported so that a key of stage.builder is written without quotation marks. str 'cntn' syntax/vocabulary.py, cntn
bellman.stage.method_types The one method table, METHOD_TYPES, as a read-only mapping, each row read by its tag with its !, method_types["!egm"], or by the underscore spelling of a hyphenated tag; a representation family that bellman.stage.representations.register adds is listed and read by its tag as the package's own rows are. Mapping !egm … stage/method_table.py, method_types
bellman.stage.admitted_methods(stage, address) The method words of the catalogue, in its order, that a typing entry may name at the place address, each spelled as a .bl entry writes it, !gauss_hermite for the catalogue's gauss-hermite: each method whose row admits the kind of the place; none at the derivative operator. tuple admitted_methods(elaborate_stage(record), "arvl_to_dcsn"): ('!egm', '!vfi', '!time_iteration', '!explicit', '!deterministic', '!histog… stage/places.py, admitted_methods
bellman.stage.typing_entries(text) Every typing entry and handler binding of the .bl text text, by the address <place>.<component> it types, in textual order: a file-level entry by its own path, and an entry of a block's header by the block's address before its path, the block's own address or a nested block's label removed from the path's front where the path writes it (the union's rule 7). dict typing_entries(addition, "applications/portfolio-choice/declaration/stages/cons/methods.bl"): {'policy.method': TypingEntry(subject='method', value='!egm', span=SourceSp… syntax/typing_entries.py, typing_entries
bellman.stage.write_typing_entry(text, origin, place, component, value) The .bl text text with the component of the place place typed as value, the value's text as an author writes it, !vfi, !Cartesian(a=(a_min, a_max, n_a)) or "cons-port:egm": where the text types the component, the entry's value replaced, its subject, the spacing around its colon, a trailing annotation and every other character of the text kept; otherwise the entry appended at file level by the full path, <place>.<component> : <value>, on a line of its own. str write_typing_entry(addition, "applications/portfolio-choice/declaration/stages/cons/methods.bl", "policy", "method", "!vfi"): @methods: cons … syntax/typing_entries.py, write_typing_entry
bellman.stage.graph_refusal(stage, level, direction) The Refusal held in the place of one graph of the stage, or None where the graph was constructed. NoneType graph_refusal(elaborate_stage(record), "builders", "forward"): None stage/grains.py, graph_refusal
bellman.stage.header_line(record) The line of a block's header as a SourceLine, read from the position the block's record holds beside the header's text (AuthoredCard.header, cons.bl:21); None for a record that holds no header or a header at no position. SourceLine header_line(stage.initial.backward["cntn_to_dcsn"].denote()): SourceLine(file='cons.bl', number=20) display/cards.py, header_line
bellman.stage.source_lines(record) The authored lines the Source section of a titled record's card quotes, in the order it quotes them (_quoted), each a SourceLine: the file and the line number the section prints for it. tuple source_lines(stage.definitions.denote("cons:g:dcsn_to_cntn")): (SourceLine(file='cons.bl', number=17),) display/cards.py, source_lines
bellman.stage.card_sections(record) The sections of the card of a titled denotation answer, in the order the card prints them, each a CardSection: the key of its heading, its heading line and its rows, each row the lines it prints on with their indentation. tuple card_sections(stage.builder["cntn", "dcsn"].denote()): (CardSection(label='signature', heading='Signature', rows=((' in 𝑉≻ : Xa → … display/cards.py, card_sections
bellman.stage.to_model_explorer(stage_or_trellis) The GraphCollection of a stage version or of a trellis dictionary: its two builders graphs at the primitive grain, backward and forward, each primitive a node, and, for a stage version, its two initial diagrams before them. GraphCollection to_model_explorer(elaborate_stage(record)): GraphCollection(label='cons', graphs=[Graph(id='backward initial diagram', … factory/model_explorer.py, to_model_explorer
bellman.stage.perch_overlays(stage_or_trellis) The three perch overlays of a stage version or a trellis, arrival, decision and continuation, in the perches' colors (PERCH_COLORS): each holds every edge of every graph of the view whose wire lives at its perch (_collected_overlays), with no label. list perch_overlays(elaborate_stage(record)): [EdgeOverlay(name='arrival', edgeColor='#172A52', edges=[Edge(sourceNodeId=… factory/model_explorer.py, perch_overlays
bellman.stage.box_attributes(stage, direction, box) The attributes a primitive's node shows in the side panel, each one line, by key: kind, the kind of its operator; policy, the policies its row is held at, where it is held at any; kernel, the lines its kernel() prints, from which the card's Where and Rule sections are written; rule, the rules of the card's Rule section, each on one line with the region it holds on after it (cards.rule_rows); lines, the file and the numbers of the lines the card's Source section quotes (_line_numbers), benhabib_bellman.bl 27–28, where it quotes one; and the attributes of the method bound within the box (_method_attributes). dict box_attributes(stage, "backward", stage.builder.bwd.primitives["cntn_to_dcsn:Pullback"].box): {'kind': 'Pullback', 'policy': '𝑐', 'rule': '(𝑉≻ ∘ 𝑔≻(·, 𝑐))(m_d) = 𝑉≻(𝑔≻(m… factory/model_explorer.py, box_attributes
bellman.stage.layers_to_open(collection, graph, depth) The namespaces of the layers a page opens on the graph graph of the view collection, a GraphCollection or the document of its graph file: of each node, the first depth parts of its namespace joined by "/", each once, in the order of the nodes, so that depth 1 names a stage's builders and depth 2 a trellis's stage occurrences. tuple layers_to_open(to_model_explorer(elaborate_stage(record)), "backward", 1): ('cntn_to_dcsn', 'dcsn_to_arvl', 'policy') factory/model_explorer.py, layers_to_open
bellman.stage.node_place(collection, graph, node_id) The NodePlace of the node node_id of the graph graph of the view collection, or of the layer whose id it is, policy___group___ (LAYER_ID_ENDING), read from the namespace the view holds and from no spelling of an identity: a trellis namespace opens with the period and the stage key, periods[0]/cons/policy, and a stage namespace with the block, cntn_to_dcsn/risk_ce. NodePlace node_place(to_model_explorer(elaborate_stage(record)), "backward", "policy.optimality:Argmax"): NodePlace(occurrence='', block='policy') factory/model_explorer.py, node_place
bellman.stage.wire_counts(collection) The wires of each builders graph of the view collection, backward and forward, as distinct wire identities: the distinct ports the graph's edges leave from, so that a wire two boxes read counts once, 20 for cons.bl over the two graphs; a refused graph counts none. dict wire_counts(to_model_explorer(elaborate_stage(record))): {'backward': 11, 'forward': 3} factory/model_explorer.py, wire_counts
bellman.stage.BOUNDARY_IDS the ids of the two nodes whose ports are a builders graph's own inputs and outputs; the viewer has no node of this kind, and these two are this module's. tuple ('GraphInputs', 'GraphOutputs') factory/model_explorer.py, BOUNDARY_IDS
bellman.stage.INITIAL_IDS the ids of the two initial diagrams of a stage view, the documentation's words for them (02-initial.md), by direction; the two builders graphs keep the ids backward and forward, by which the lessons and Bellman Workbench name them dict {'backward': 'backward initial diagram', 'forward': 'forward initial diagra… factory/model_explorer.py, INITIAL_IDS
bellman.stage.LAYER_ID_ENDING the ending the viewer writes after a layer's namespace to form its id str '___group___' factory/model_explorer.py, LAYER_ID_ENDING
bellman.stage.LAYER_COLORS The colors of a layer by its level, (fill, border, label), each with a navy border and a navy label: a period of a trellis white, a stage occurrence on the first step of the ice, a builder on the second, and a sub-builder, with every layer within one, on the third, so that each level a reader opens is one step darker. dict {'period': ('#FFFFFF', '#172A52', '#172A52'), 'stage': ('#EDF7FC', '#172A52… factory/model_explorer.py, LAYER_COLORS
bellman.stage.NODE_STYLE The style of a node as the viewer's page reads it: the three fields of the viewer's GraphNodeStyle and textColor, the color of the node's label, which the page reads (its types.ts) and that class does not declare. object _NodeStyle(backgroundColor='#FFFFFF', borderColor='#172A52', hoveredBorderC… factory/model_explorer.py, NODE_STYLE
bellman.stage.OUTPUT_STYLE The style of a node as the viewer's page reads it: the three fields of the viewer's GraphNodeStyle and textColor, the color of the node's label, which the page reads (its types.ts) and that class does not declare. object _NodeStyle(backgroundColor='#FFFFFF', borderColor='#214EDA', hoveredBorderC… factory/model_explorer.py, OUTPUT_STYLE
bellman.stage.PERCH_COLORS The color of each perch's overlay, the stylesheet's token of the perch in the form it takes for a line: arrival --bf-arvl, navy; decision --bf-accent-line, the orange of --bf-dcsn darkened for a line; and continuation --bf-cntn-line, ultramarine. dict {'arvl': '#172A52', 'dcsn': '#C45C1D', 'cntn': '#214EDA'} factory/model_explorer.py, PERCH_COLORS
bellman.stage.explore(stage_or_trellis) Write the view of stage_or_trellis to its two files (write_model_explorer) and open it in the default browser; answers the paths of the files and the address of the view, (paths, url). tuple explore(elaborate_stage(record), folder="model-explorer", open_browser=False): ((PosixPath('model-explorer/cons.graph.json'), PosixPath('model-explorer/co… factory/model_explorer.py, explore
bellman.stage.write_model_explorer(stage_or_trellis, folder) The view of stage_or_trellis, what to_model_explorer answers, written to two JSON files in folder, which is made where it does not exist; answers their paths in this order: <stem>.graph.json, the collection, and <stem>.edge-overlays.json, the three perch overlays (perch_overlays) as one EdgeOverlaysData named perches. tuple write_model_explorer(elaborate_stage(record), "model-explorer"): (PosixPath('model-explorer/cons.graph.json'), PosixPath('model-explorer/con… factory/model_explorer.py, write_model_explorer
bellman.stage.header_of(box) The inputs and outputs a block's header declares, as two tuples of sorts: the retained BlockHeader where the box carries one, and the box's own wires otherwise. DeclaredSides header_of(stage.initial.backward["cntn_to_dcsn"].box): DeclaredSides(inputs=(Sort('cons:cntn:V', 'field', perch='cntn', role='valu… fold/block_lines.py, header_of
bellman.stage.header_fields(text, origin) The field each listing of the block headers of a stage text names: a read-only mapping from the address the span table gives the listing, <block>.in.<field> or <block>.<label>.out.<field> (source_spans), to its HeaderField, in the order of the text. mappingproxy header_fields(text, "applications/portfolio-choice/declaration/stages/cons/cons.bl"): mappingproxy({'arvl_to_dcsn.in.m': HeaderField(identity='cons:arvl:m', role… factory/elaboration.py, header_fields
bellman.stage.branches(stage) The branches of a branching stage, each label to the continuation fields its nested block writes; empty for a stage without branches. mappingproxy branches(elaborate_stage(record)): mappingproxy({}) stage/stage_answers.py, branches
bellman.stage.to_source(term) The normalized .bl text of an expression, a set expression, or a block statement term. str to_source(stage.fields()["cons:dcsn:c"].domain): 'ℝ₊₊' syntax/source.py, to_source
bellman.stage.ROLE_WORD the word of each role as a header writes it after !: c : !ctrl dict {'state': 'state', 'control': 'ctrl', 'value': 'vlu', 'shock': 'shck'} syntax/vocabulary.py, ROLE_WORD
bellman.stage.PRIMITIVE_SETS the primitive set each spelling names, by the spelling: ℝ₊, R_{+} and R+ name one set dict {'ℝ': Primitive(glyph='ℝ', kind='real', order=0, bounds=(-inf, False, inf, … syntax/vocabulary.py, PRIMITIVE_SETS
bellman.stage.PERCH_MARK The mark a name carries for each perch, printed directly after its letters: V≻, μ≺, c. dict {'arvl': '≺', 'dcsn': '', 'cntn': '≻'} syntax/vocabulary.py, PERCH_MARK

2.2 bellman.period

path what it answers type example defined in
bellman.period.period_joins(period) The joins of one period, {"joins": [{"from": (key, field), "to": (key, field)}], "outputs": [(key, field)]}, both lists sorted: one join per pair the selection holds between two stages of the period, a continuation state field of one stage and an arrival state field of another, authored by a connector of the period or inferred where the two names are equal and the pair is the unique admissible one; the outputs are the continuation state fields no join within the period reads, those that leave it. dict period_joins(periods[0]): {'joins': [{'from': ('cons', 'a'), 'to': ('disc', 'a')}, {'from': ('port', … factory/joins.py, period_joins
bellman.period.forward_order(period) The keys of the period's stages in dependency order: a stage after every stage whose continuation fields it takes; the list order of the period carries no meaning. list forward_order(periods[0]): ['port', 'cons', 'disc'] factory/joins.py, forward_order
bellman.period.backward_order(period) The keys in the order the backward operators are applied: the reverse of the forward order. list backward_order(periods[0]): ['disc', 'cons', 'port'] factory/joins.py, backward_order
bellman.period.computable_together(period) The keys of the period's stages in dependency layers. list computable_together(periods[0]): [['port'], ['cons'], ['disc']] factory/joins.py, computable_together
bellman.period.diagram_period(trellis, h) A Drawing of trellis["periods"][h], in the format of a graph's diagram() (drawing.dot_head): one box per stage, labeled by its key, with its stage name in parentheses beneath where the two differ, standing in the forward order, left to right; one arrow per join, labeled by the field it carries, field → arrival where a connector renames it; one unlabeled arrow to a plain label per continuation field that no stage of the period takes. Drawing diagram_period(elaborated, 0): Drawing of 3 boxes factory/trellis_drawings.py, diagram_period
bellman.period.forward_record(period) The ForwardRecord of period, a period of elaborated stages, {"stages": {key: stage}, "connectors": [...]}, as a trellis holds it or as it is written by hand around one stage. ForwardRecord forward_record(periods[1], mapping, to=periods[0]): forward record of periods[1] … factory/forward_record.py, forward_record

2.3 bellman.trellis

path what it answers type example defined in
bellman.trellis.load_trellis(file) The syntactic trellis a trellis file writes out: each period's stages a mapping from keys to records, each record naming its .bl file under stage, its calibration and its settings inline or as paths, and its methods as the path of one .bl addition or a list of them, applied in the order written, every path relative to the file's directory; a {template, repeat} entry read as read_trellis_file reads it; each stage file read once. dict load_trellis("applications/cons-port/declaration/trellis.port-cons-vfi.yml"): {'periods': [{'stages': {'port': {'stage': {'text': '@stage: port\n\nR : ℝ₊… factory/loading.py, load_trellis
bellman.trellis.read_trellis_file(file) The periods and the inter-period mappings a trellis file writes, expanded: each entry of periods written out or given as {template: <period file>, repeat: n} and then repeated n times. dict read_trellis_file("applications/cons-port/declaration/trellis.port-cons-vfi.yml"): {'periods': [{'stages': {'port': {'stage': 'stages/port/port.bl', 'calibrat… factory/loading.py, read_trellis_file
bellman.trellis.load_recipe(directory, recipe) The syntactic trellis a registry directory and a recipe define: the recipe, the trellis file and the stage files at the paths the recipe writes, the period templates the trellis file names and every source file the recipe names are read once; each {template, repeat} entry is expanded and a single inter-period mapping repeated for each adjacent pair; each fill stands in its slot; each source list is merged; one record is written per stage and period, holding the stage's text and digest, its three merged mappings and the ordered sources that produced them. dict load_recipe("applications/durables/declaration", "spec.two-stages.yml"): {'periods': [{'stages': {'keeper_cons': {'stage': {'text': '@stage: keeper_… factory/recipe.py, load_recipe
bellman.trellis.elaborate_trellis(syntactic) The elaborated trellis of a syntactic trellis, no calibration and no settings bound. dict elaborate_trellis(syntactic): {'provenance': {'trellis': {'path': 'applications/cons-port/declaration/tre… factory/trellis.py, elaborate_trellis
bellman.trellis.accrete(trellis, period) The trellis with period appended at the end of periods, the period earlier in time, and inter_connector, the mapping from its continuation fields to the arrival fields of the period appended before it, written at inter_connectors[len(periods) - 2], the entry that joins the appended period to the one before it, {} when none is given. dict accrete({"periods": [], "inter_connectors": []}, periods[0]): {'periods': [{'connectors': [{'w': 'm'}], 'stages': {'port': ElaboratedStag… factory/trellis.py, accrete
bellman.trellis.changed_positions(before, after) The positions (h, key) whose stage occurrence in after is a new version of the one in before, or stands at a position before lacks. list changed_positions(elaborated, calibrate_trellis(elaborated, syntactic)): [(0, 'port'), (0, 'cons'), (0, 'disc'), (1, 'port'), (1, 'cons'), (1, 'disc… factory/trellis.py, changed_positions
bellman.trellis.calibrate_trellis(elaborated, syntactic) A new elaborated trellis, each stage occurrence calibrated with syntactic["periods"][h]["stages"][key]["calibration"], the one value its period supplies standing for each parameter its stage shares with another stage of the period (period_calibrations), where that mapping differs, in the parameters the stage occurrence declares, from the calibration it holds, and copied otherwise. dict calibrate_trellis(elaborated, syntactic): {'provenance': {'trellis': {'path': 'applications/cons-port/declaration/tre… factory/trellis.py, calibrate_trellis
bellman.trellis.methodize_trellis(elaborated, syntactic) A new elaborated trellis, each stage occurrence holding the additions its record names under methods, which were read with its text when it was constructed (elaborate_trellis), so that the verb binds nothing and copies each position once; a record whose additions differ from those the occurrence holds is refused under record-shape, since a changed selection is constructed again by elaborate_trellis(syntactic, elaborated) before it is bound. dict methodize_trellis(elaborated, syntactic): {'provenance': {'trellis': {'path': 'applications/cons-port/declaration/tre… factory/trellis.py, methodize_trellis
bellman.trellis.configure_trellis(elaborated, syntactic) A new elaborated trellis, each stage occurrence configured with the settings mapping at its key, the one value its period supplies standing for each setting its stage shares with another stage of the period (period_settings), where that mapping differs from the settings it holds, and copied otherwise. dict configure_trellis(methodize_trellis(elaborated, syntactic), syntactic): {'provenance': {'trellis': {'path': 'applications/cons-port/declaration/tre… factory/trellis.py, configure_trellis
bellman.trellis.specify_trellis(syntactic) The specified trellis of a syntactic trellis: the trellis that elaborate_trellis(syntactic, previous) and the trellis verbs of kinds make, the verbs applied in the order calibrate, methodize, configure whatever order kinds writes, all three by default. dict specify_trellis(syntactic): {'provenance': {'trellis': {'path': 'applications/cons-port/declaration/tre… factory/trellis.py, specify_trellis
bellman.trellis.respecify_trellis(specified, before, syntactic) The trellis specify_trellis(syntactic, None, kinds) answers, made from the trellis specified by binding again the positions whose record changed alone. dict respecify_trellis(specify_trellis(syntactic), syntactic, syntactic): {'provenance': {'trellis': {'path': 'applications/cons-port/declaration/tre… factory/trellis.py, respecify_trellis
bellman.trellis.assemble_trellis(directory, recipe) The specified trellis of a registry and a recipe, specify_trellis(load_recipe(directory, recipe, **fills)): the trellis the calls load_recipe, elaborate_trellis, calibrate_trellis, methodize_trellis, configure_trellis make, in that order, each stage occurrence copied once. dict assemble_trellis("applications/durables/declaration", "spec.two-stages.yml"): {'registry': {}, 'provenance': {'recipe': {'path': 'applications/durables/d… factory/trellis.py, assemble_trellis
bellman.trellis.inter_period_joins(mapping, later, earlier) The joins an inter-period mapping makes, [{"from": (key, field), "to": (key, field)}], in the mapping's order: each key a continuation state field that leaves later, the period appended later and earlier in time, each value an arrival state field of earlier, the period appended before it, which it joins; a key may name the stage before the field, cons.a, where the bare name is shared. list inter_period_joins(mapping, periods[1], periods[0]): [{'from': ('disc', 'a'), 'to': ('port', 'k')}] factory/joins.py, inter_period_joins
bellman.trellis.unjoined_fields(trellis) The state fields of an elaborated trellis that no join reaches, {"writing": [(h, key, field)], "reading": [(h, key, field)], "sources": {(h, key, field): (address, …)}}, the two lists sorted. dict unjoined_fields(elaborated): {'writing': [(0, 'disc', 'a')], 'reading': [(5, 'port', 'k')], 'sources': {… factory/joins.py, unjoined_fields
bellman.trellis.derivative_missing(trellis) The derivative readings of an elaborated or specified trellis that no route meets, read along the route certification of its selection: one Diagnostic under derivative-missing for each derivative term a block of a source occurrence reads of its continuation value, D_{a}V[>] (stage_answers.derivative_reads), on each route from that occurrence, where the requirement comes to rest at a value that carries no derivative (_unmet_along). tuple derivative_missing(elaborated): () factory/joins.py, derivative_missing
bellman.trellis.connection_report(trellis) The ConnectionReport of an elaborated or specified trellis dictionary: its selection (trellis_selection), read from the occurrences the trellis holds and the calibration each holds, and nothing constructed or bound for it. ConnectionReport connection_report(elaborated): ConnectionReport(pairs=(Pair(writing=FieldUse(h=0, key='port', perch='cntn'… factory/connections.py, connection_report
bellman.trellis.trellis_selection(trellis) The Selection of an elaborated or specified trellis dictionary: select_connections over its periods, its inter_connectors and the calibration each occurrence holds (held_calibrations). Selection trellis_selection(elaborated): Selection(uses=(FieldUse(h=0, key='port', perch='dcsn', field='k', branch=N… factory/connections.py, trellis_selection
bellman.trellis.transport_point(route, point) The point point, a tuple in the order of the route's source coordinates, in the order of its destination coordinates. tuple transport_point(route, (1.0,)): (1.0,) factory/connection_maps.py, transport_point
bellman.trellis.transport_vector(route, components) The components of a derivative the destination supplies, in the order of the route's destination coordinates, in the order of its source coordinates: component j of the answer is the component the destination has in the coordinate that is the image of source coordinate j. tuple transport_vector(route, (0.1,)): (0.1,) factory/connection_maps.py, transport_vector
bellman.trellis.transport_hessian(route, matrix) An authored Hessian in the destination's order, rows and columns alike, in the source's order: entry (j, k) of the answer is the destination's entry at the two coordinates j and k land at. tuple transport_hessian(route, ((1,),)): ((1,),) factory/connection_maps.py, transport_hessian
bellman.trellis.transport_atoms(route, atoms) The atoms of a finite measure on the route's source tuple, each (point, mass), transported to the destination tuple: ((point, mass), …) in order of first image, the masses of atoms with one image summed and every mass preserved. tuple transport_atoms(route, (((1.0,), 0.5), ((2.0,), 0.5))): (((1.0,), 0.5), ((2.0,), 0.5)) factory/connection_maps.py, transport_atoms
bellman.trellis.pull_back(route, function) The pullback of function, a function of the destination's coordinates in their order, to the source's coordinates: the function that answers function at the transported point. float pull_back(route, lambda w: 2*w)(1.0): 2.0 factory/connection_maps.py, pull_back
bellman.trellis.diagram_trellis(trellis) A Drawing of the periods of an elaborated trellis, every one or those whose indices periods lists, in the format of a graph's diagram(). Drawing diagram_trellis(elaborated): Drawing of 18 boxes factory/trellis_drawings.py, diagram_trellis
bellman.trellis.to_model_explorer(stage_or_trellis) The GraphCollection of a stage version or of a trellis dictionary: its two builders graphs at the primitive grain, backward and forward, each primitive a node, and, for a stage version, its two initial diagrams before them. GraphCollection to_model_explorer(elaborated): GraphCollection(label='trellis', graphs=[Graph(id='backward', nodes=[GraphN… factory/model_explorer.py, to_model_explorer
bellman.trellis.perch_overlays(stage_or_trellis) The three perch overlays of a stage version or a trellis, arrival, decision and continuation, in the perches' colors (PERCH_COLORS): each holds every edge of every graph of the view whose wire lives at its perch (_collected_overlays), with no label. list perch_overlays(elaborated): [EdgeOverlay(name='arrival', edgeColor='#172A52', edges=[Edge(sourceNodeId=… factory/model_explorer.py, perch_overlays
bellman.trellis.layers_to_open(collection, graph, depth) The namespaces of the layers a page opens on the graph graph of the view collection, a GraphCollection or the document of its graph file: of each node, the first depth parts of its namespace joined by "/", each once, in the order of the nodes, so that depth 1 names a stage's builders and depth 2 a trellis's stage occurrences. tuple layers_to_open(to_model_explorer(elaborated), "backward", 2): ('periods[5]/port', 'periods[5]/cons', 'periods[5]/disc', 'periods[4]/port'… factory/model_explorer.py, layers_to_open
bellman.trellis.node_place(collection, graph, node_id) The NodePlace of the node node_id of the graph graph of the view collection, or of the layer whose id it is, policy___group___ (LAYER_ID_ENDING), read from the namespace the view holds and from no spelling of an identity: a trellis namespace opens with the period and the stage key, periods[0]/cons/policy, and a stage namespace with the block, cntn_to_dcsn/risk_ce. NodePlace node_place(to_model_explorer(elaborated), "backward", "periods[1]___group___"): NodePlace(occurrence='periods[1]', block='') factory/model_explorer.py, node_place
bellman.trellis.wire_counts(collection) The wires of each builders graph of the view collection, backward and forward, as distinct wire identities: the distinct ports the graph's edges leave from, so that a wire two boxes read counts once, 20 for cons.bl over the two graphs; a refused graph counts none. dict wire_counts(to_model_explorer(elaborated)): {'backward': 133, 'forward': 31} factory/model_explorer.py, wire_counts
bellman.trellis.BOUNDARY_IDS the ids of the two nodes whose ports are a builders graph's own inputs and outputs; the viewer has no node of this kind, and these two are this module's. tuple ('GraphInputs', 'GraphOutputs') factory/model_explorer.py, BOUNDARY_IDS
bellman.trellis.LAYER_ID_ENDING the ending the viewer writes after a layer's namespace to form its id str '___group___' factory/model_explorer.py, LAYER_ID_ENDING
bellman.trellis.LAYER_COLORS The colors of a layer by its level, (fill, border, label), each with a navy border and a navy label: a period of a trellis white, a stage occurrence on the first step of the ice, a builder on the second, and a sub-builder, with every layer within one, on the third, so that each level a reader opens is one step darker. dict {'period': ('#FFFFFF', '#172A52', '#172A52'), 'stage': ('#EDF7FC', '#172A52… factory/model_explorer.py, LAYER_COLORS
bellman.trellis.NODE_STYLE The style of a node as the viewer's page reads it: the three fields of the viewer's GraphNodeStyle and textColor, the color of the node's label, which the page reads (its types.ts) and that class does not declare. object _NodeStyle(backgroundColor='#FFFFFF', borderColor='#172A52', hoveredBorderC… factory/model_explorer.py, NODE_STYLE
bellman.trellis.OUTPUT_STYLE The style of a node as the viewer's page reads it: the three fields of the viewer's GraphNodeStyle and textColor, the color of the node's label, which the page reads (its types.ts) and that class does not declare. object _NodeStyle(backgroundColor='#FFFFFF', borderColor='#214EDA', hoveredBorderC… factory/model_explorer.py, OUTPUT_STYLE
bellman.trellis.PERCH_COLORS The color of each perch's overlay, the stylesheet's token of the perch in the form it takes for a line: arrival --bf-arvl, navy; decision --bf-accent-line, the orange of --bf-dcsn darkened for a line; and continuation --bf-cntn-line, ultramarine. dict {'arvl': '#172A52', 'dcsn': '#C45C1D', 'cntn': '#214EDA'} factory/model_explorer.py, PERCH_COLORS
bellman.trellis.explore(stage_or_trellis) Write the view of stage_or_trellis to its two files (write_model_explorer) and open it in the default browser; answers the paths of the files and the address of the view, (paths, url). tuple explore(elaborated, folder="model-explorer", open_browser=False): ((PosixPath('model-explorer/trellis.graph.json'), PosixPath('model-explorer… factory/model_explorer.py, explore
bellman.trellis.write_model_explorer(stage_or_trellis, folder) The view of stage_or_trellis, what to_model_explorer answers, written to two JSON files in folder, which is made where it does not exist; answers their paths in this order: <stem>.graph.json, the collection, and <stem>.edge-overlays.json, the three perch overlays (perch_overlays) as one EdgeOverlaysData named perches. tuple write_model_explorer(elaborated, "model-explorer"): (PosixPath('model-explorer/trellis.graph.json'), PosixPath('model-explorer/… factory/model_explorer.py, write_model_explorer
bellman.trellis.unpaired_joins(trellis) The joins of a trellis view that leave a wire unpaired in its graph of direction, as UnpairedJoin records in the order of the refusing node's rows join n (_unpaired_attributes), the view restricted by periods and stages as to_model_explorer restricts it and its joins paired as its graph pairs them (_pairing); none where the graph is drawn, or refused for another reason, an occurrence's graph the construction refused or a marginal value whose name declares two pairings. tuple unpaired_joins(elaborated): () factory/model_explorer.py, unpaired_joins
bellman.trellis.entry_span(text, address) The EntrySpan of the value at address in a YAML text. EntrySpan entry_span((ROOT / "applications/cons-port/declaration/trellis.port-cons-vfi.yml").read_text(), "inter_connectors[0]"): EntrySpan(line=19, column=5, end_line=19, end_column=16) factory/file_entries.py, entry_span
bellman.trellis.entry_value(text) The value at address in a YAML text as the package's reader of YAML files reads it: mappings, lists and scalars, every tag kept as {"__yaml_tag__": tag, …}, a key written twice refused; the whole document for the empty address, its tag !trellis or !period kept beside its keys. dict entry_value((ROOT / "applications/cons-port/declaration/trellis.port-cons-vfi.yml").read_text(), "inter_connectors[0]"): {'disc.a': 'k'} factory/file_entries.py, entry_value
bellman.trellis.replace_entry(text, address, written) The YAML text with the characters of the value at address replaced by written, a string, a number, a boolean or a tag. str replace_entry((ROOT / "applications/cons-port/declaration/trellis.port-cons-vfi.yml").read_text(), "name", "cons_port_copy"): !trellis … factory/file_entries.py, replace_entry
bellman.trellis.append_to_mapping(text, address, key, value) The YAML text with the entry key: value added at the end of the mapping at address: in block style on a line of its own after the mapping's last entry, at the indentation of its keys; in flow style before its closing brace, after a comma where the mapping holds an entry. str append_to_mapping(Path("applications/cons-port/declaration/trellis.port-cons-vfi.yml").read_text(), "inter_connectors[0]", "w_next", "w"): !trellis … factory/file_entries.py, append_to_mapping
bellman.trellis.append_to_sequence(text, address, item) The YAML text with item added at the end of the list at address: in block style - item on a line of its own after the list's last entry, at the column of its dashes; in flow style before its closing bracket, after a comma where the list holds an item. str append_to_sequence(Path("applications/cons-port/declaration/trellis.port-cons-vfi.yml").read_text(), "periods[0].connectors", "{b: k}"): !trellis … factory/file_entries.py, append_to_sequence
bellman.trellis.insert_in_sequence(text, address, index, item) The YAML text with item placed before the item at index of the list at address: in block style - item on a line of its own just before the line that holds that item's dash, at the dash's column, the new line ending as that line ends; in flow style just before that item, followed by a comma and a space. str insert_in_sequence(Path("applications/cons-port/declaration/trellis.port-cons-vfi.yml").read_text(), "periods[0].connectors", 0, "{b: k}"): !trellis … factory/file_entries.py, insert_in_sequence
bellman.trellis.split_entry(text, address, at) The YAML text with the entry at address, an item of a list that writes repeat: n, written twice in its place, the first time with repeat: at and the second with repeat: n - at, so that the two entries stand for the periods the entry stood for. str split_entry(Path("applications/cons-port/declaration/trellis.port-cons-vfi.yml").read_text(), "periods[0]", 3): !trellis … factory/file_entries.py, split_entry
bellman.trellis.remove_from_sequence(text, address, index) The YAML text with the item at index of the list at address taken out, every other character kept, so that the comments, the other entries and the layout stay as written. str remove_from_sequence(Path("applications/cons-port/declaration/trellis.port-cons-vfi.yml").read_text(), "periods[0].connectors", 0): !trellis … factory/file_entries.py, remove_from_sequence
bellman.trellis.remove_from_mapping(text, address, key) The YAML text with the key key of the mapping at address taken out with its value, every other character kept. str remove_from_mapping(Path("applications/cons-port/declaration/trellis.port-cons-vfi.yml").read_text(), "inter_connectors[0]", "disc.a"): !trellis … factory/file_entries.py, remove_from_mapping
bellman.trellis.written_at(file, address) The file and the address at which the trellis file file writes the part of its expanded trellis at address, the periods and the adjacent pairs counted as loading.read_trellis_file counts them. tuple written_at("applications/cons-port/declaration/trellis.port-cons-vfi.yml", "periods[3].stages.cons.methods"): ('applications/cons-port/declaration/trellis.port-cons-vfi.yml', 'periods[0… factory/file_entries.py, written_at
bellman.trellis.written_spans(file, addresses) The source of each expanded address, in order, as (path, EntrySpan). tuple written_spans("applications/cons-port/declaration/trellis.port-cons-vfi.yml", ("periods[3].stages.cons.methods", "periods[4].stages.cons.methods")): (('applications/cons-port/declaration/trellis.port-cons-vfi.yml', EntrySpan… factory/file_entries.py, written_spans
bellman.trellis.period_entries(file) For each period of the expanded trellis the trellis file file writes, in order, (path, address, periods): the file that writes the period, the period file where the period's entry names one under template and the trellis file otherwise; the address of the period's entry in that file, periods[n] in the trellis file and the empty address in a period file, as written_at answers periods[h]; and every period, in order, whose entry stands at that file and address. list period_entries("applications/cons-port/declaration/trellis.port-cons-vfi.yml"): [('applications/cons-port/declaration/trellis.port-cons-vfi.yml', 'periods[… factory/file_entries.py, period_entries
bellman.trellis.connector_entry(trellis, writing, reading) The ConnectorEntry of a drag from the writing port writing, a continuation state field, to the reading port reading, an arrival state field, of the forward trellis graph of trellis, an elaborated trellis whose provenance names its trellis file; each port is (h, key, field), the period's index, the stage occurrence's key and the field's name. ConnectorEntry connector_entry(elaborated, (0, "disc", "a"), (5, "port", "k")): ConnectorEntry(file=None, address=None, periods=(), text=None, reason='not-… factory/file_entries.py, connector_entry

2.4 The stage object

path what it answers type example defined in
stage One version of a stage, with its declarations, graphs and bindings. ElaboratedStage ElaboratedStage('cons', specified) stage/elaborated.py, ElaboratedStage
stage.name name is the authored stage name and metadata its authored annotations. str 'cons' stage/elaborated.py, ElaboratedStage.name
stage.metadata The authored @ annotations other than the stage name, in file order. Metadata none stage/elaborated.py, ElaboratedStage.metadata
stage.definitions The version's read-only definitions table, from each identity to its record in file order. Definitions Definitions('cons', 35 records) stage/elaborated.py, ElaboratedStage.definitions
stage.initial The two initial diagrams of a version, stage.initial: backward and forward answer the diagrams, and a block is read by its block id as a key of the diagram that holds it, stage.initial.backward["policy"]. Initial InitialDiagrams('cons', backward, forward) stage/elaborated.py, ElaboratedStage.initial
stage.bindings This version's calibration and settings mappings, each None until bound and read-only afterwards, blocks, the rows a solution method's lines add at the operative level, by the builder each opens, and families, the record of each representation family the version's typing entries name, by its word, as the record stood when the version was made, so that a later registration or unregistration leaves the meaning of the version as it was. Bindings calibration ρ = 6.0 … stage/elaborated.py, ElaboratedStage.bindings
stage.provenance How this stage version was built, retained in a read-only entries mapping: source path or origin, text, digest, trellis position, binding sources and package and grammar versions. Provenance origin applications/portfolio-choice/declaration/stages/cons/cons.bl … stage/elaborated.py, ElaboratedStage.provenance
stage.view() The stage inventory as a printed sheet: its perches, fields, blocks, definitions, graphs, bindings and directions. Sheet BELLMAN-SYM / STAGE cons [VERSION = SPECIFIED] … stage/elaborated.py, ElaboratedStage.view
stage.list() The blocks of the two initial diagrams under initial, each with its kind and direction, and the builders under builder, each by its block identifier with the pair of perches it joins and its direction word, the listing that builder.list() answers. SectionedListing initial … stage/elaborated.py, ElaboratedStage.list
stage.methods The components typed at the places of this version, by place, as a read-only mapping, methods["policy"]: the method word with its arguments, the grid and the handler the typing entries at the place give it. BoundMethods arvl_to_dcsn !deterministic … stage/elaborated.py, ElaboratedStage.methods
stage.par The parameters of this version, a read-only mapping from each parameter's name, as the file declares it, to its record, par["ρ"], whose value is the number a calibration binds. Parameters name set value describes … stage/elaborated.py, ElaboratedStage.par
stage.settings The settings bound to this version, a read-only mapping from each setting's name to its record, settings["n_a"], with its configured value and the methods that read it; empty before configure. Settings name set value read at by grid … stage/elaborated.py, ElaboratedStage.settings
stage.builder The builders by the pair of perches each joins, stage.builder["cntn", "dcsn"], with the two builders graphs at bwd and fwd and the policy builder at policy. BuilderPairs Builders('cons', 5 by their perches) stage/elaborated.py, ElaboratedStage.builder
stage.declared The declared builders, the operators the blocks of the stage file denote as elaboration builds them, with the interface of stage.builder: stage.declared.policy, stage.declared["cntn", "dcsn"], stage.declared.bwd. BuilderPairs Builders('cons', 5 by their perches) stage/elaborated.py, ElaboratedStage.declared
stage.arvl The arrival perch: stage.arvl.builder.fwd is the forward builder from arrival. PerchHandle Perch('cons', 'arvl') stage/elaborated.py, ElaboratedStage.arvl
stage.dcsn The decision perch: stage.dcsn.builder.bwd is the backward decision builder, stage.dcsn.builder.policy the policy builder. PerchHandle Perch('cons', 'dcsn') stage/elaborated.py, ElaboratedStage.dcsn
stage.cntn The continuation perch, the last of the stage: no edge of the stage leaves it, so its builder refuses both directions with the reason. PerchHandle Perch('cons', 'cntn') stage/elaborated.py, ElaboratedStage.cntn
stage.fields() The sort of every field wire by identity, in first-listing order, followed by declared shocks not listed in a header, then the multipliers the block bodies declare, which no header lists either. Fields cons:arvl:m ≺ arvl state in Xm … stage/stage_answers.py, fields
stage.obligations() The stage's conditions, in first-appearance order, with their sentences, statuses and evidence. Obligations arithmetic-definedness ¬(1 − ρ = 0) [established] … stage/stage_answers.py, obligations
stage.diagnostics() Nine answers about the completeness of the stage, read from its block headers, lines and stored graphs, as a read-only mapping, and a tenth on a stage whose lines read a derivative of a value it writes, derivative_missing. Diagnostics complete_signature True … stage/stage_answers.py, diagnostics
stage.check_inputs(values) Check complete continuation data and return the undecided conditions. tuple check_inputs({"V[>]": abs}): (Condition(condition='continuation-input', entries=(Identity(kind='field', … stage/input_requirements.py, check_inputs
stage.denote() The stage's backward and forward builders-graph denotations, under those two direction names. StageDenotation STAGE cons … stage/denotations.py, denote
stage.encoding() The definitions, stored graph hierarchy, bindings, provenance and conditions of this version as a fresh JSON-compatible mapping. StageEncoding { … stage/encoding.py, encoding
stage.places() The places of the stage as read-only address and kind rows, the listing stage.places() prints, bound as the method places of the stage. Rows address kind … stage/places.py, places
stage.methodize(additions) The stage itself with the additions read into it: the stage file's tree with each addition attached, in the order given, elaborated anew and held by the stage, so that the components of its signatures, the rows a solution method's lines add at the operative level and the lines an addition appends are those the union of the files gives. ElaboratedStage methodize("applications/portfolio-choice/declaration/stages/cons/methods.bl"): ElaboratedStage('cons', specified) stage/binding_verbs.py, methodize
stage.calibrate(calibration_source) The stage itself, with values for all declared parameters. ElaboratedStage calibrate("applications/portfolio-choice/declaration/calibration/portfolio.yml"): ElaboratedStage('cons', specified) stage/binding_verbs.py, calibrate
stage.configure(settings_source) The stage itself, with settings bound. ElaboratedStage configure("applications/portfolio-choice/declaration/settings/cons.yml"): ElaboratedStage('cons', specified) stage/binding_verbs.py, configure
stage.definitions[identity] One entry of the definitions table: a name the stage file declares, once, in file order. Definition ["cons:g:dcsn_to_cntn"]: Definition('cons:g:dcsn_to_cntn', law of motion) stage/pieces.py, Definitions.__getitem__
stage.definitions.list() The identities grouped by definition kind, in table order, displayed with each declaration's map or relation and cited rule. DefinitionsListing BELLMAN-SYM / STAGE cons / DEFINITIONS [RECORDS = 35] … stage/pieces.py, Definitions.list
stage.definitions.denote(identity) One definition's denotation: its positioned declaration, denoted objects and cited rules, descriptions, conditions and bindings. DefinitionCard denote("cons:g:dcsn_to_cntn"): STAGE cons / LAW OF MOTION dcsn_to_cntn … stage/pieces.py, Definitions.denote
stage.initial.backward The backward initial diagram. GraphHandle InitialDiagram('cons', 'backward') stage/pieces.py, Initial.backward
stage.initial.forward The forward initial diagram. GraphHandle InitialDiagram('cons', 'forward') stage/pieces.py, Initial.forward
stage.initial.level The level of the graphs this collection holds, initial. str 'initial' stage/pieces.py, Graphs.level
stage.initial.list() The names of the blocks in the two directions, each with its kind and direction. NamedListing cntn_to_dcsn block, backward … stage/pieces.py, Graphs.list
stage.initial.methods The read-only methods mapping for pieces within both directions, empty before methodization. BoundMethods arvl_to_dcsn !deterministic … stage/pieces.py, Graphs.methods
stage.initial.backward.level One graph of a version, identified by level, direction and grain. str 'initial' stage/pieces.py, GraphHandle.level
stage.initial.backward.direction One graph of a version, identified by level, direction and grain. str 'backward' stage/pieces.py, GraphHandle.direction
stage.initial.backward.grain One graph of a version, identified by level, direction and grain. str 'builder' stage/pieces.py, GraphHandle.grain
stage.initial.backward.graph The DisCoPy hypergraph at this level, direction and grain. BellmanHypergraph bellman.native.hypergraphs.BellmanHypergraph(dom=frobenius.Ty(Sort('cons:cn… stage/pieces.py, GraphHandle.graph
stage.initial.backward.list() The graph's pieces in order of application, each under its whole name, with the kind column, what it produces and its number: a builder its position among the builders, a primitive its position among the primitives of its own builder. Listing cntn_to_dcsn block → V … stage/pieces.py, GraphHandle.list
stage.initial.backward.primitives The same graph with all sub-builders opened and compatible primitive operations merged. GraphHandle InitialDiagram('cons', 'backward', primitives) stage/pieces.py, GraphHandle.primitives
stage.initial.backward.sub_builders The same graph at the authored decomposition, with each !node retained as a sub-builder. GraphHandle InitialDiagram('cons', 'backward', sub_builders) stage/pieces.py, GraphHandle.sub_builders
stage.initial.backward.diagram() The drawing of this graph, separately for each direction. Drawing Drawing of 7 boxes stage/pieces.py, GraphHandle.diagram
stage.initial.backward.signature() The typed inputs and outputs of this graph. Signature in V≻ : {V≻} … stage/pieces.py, GraphHandle.signature
stage.initial.backward.denote() The graph's mathematical record. AuthoredCard STAGE cons / BACKWARD INITIAL DIAGRAM … stage/pieces.py, GraphHandle.denote
stage.initial.backward.obligations() Conditions owned by this graph's builders together with those of the whole stage, retaining their statuses and evidence. Obligations arithmetic-definedness ¬(1 − ρ = 0) [established] … stage/pieces.py, GraphHandle.obligations
stage.initial.backward.methods The bindings at pieces within this graph and the authored lines they represent, as a read-only mapping. BoundMethods cntn_to_dcsn.evaluate !Linear !Cartesian(m_d=(m_min, m_max, n_m)) "cons-por… stage/pieces.py, GraphHandle.methods
stage.initial.backward[key] One box of this graph by its whole name, stage.builder.bwd.primitives["cntn_to_dcsn:Aggregation"]. BubbleHandle ["cntn_to_dcsn"]: Block('cons', 'cntn_to_dcsn') stage/pieces.py, GraphHandle.__getitem__
stage.builder["arvl", "dcsn"] The builder that joins the ordered pair of perches (source, target). BubbleHandle Builder('cons', 'arvl_to_dcsn') stage/pieces.py, BuilderPairs.__getitem__
stage.builder["dcsn", "cntn"] The builder that joins the ordered pair of perches (source, target). BubbleHandle Builder('cons', 'dcsn_to_cntn') stage/pieces.py, BuilderPairs.__getitem__
stage.builder["cntn", "dcsn"] The builder that joins the ordered pair of perches (source, target). BubbleHandle Builder('cons', 'cntn_to_dcsn') stage/pieces.py, BuilderPairs.__getitem__
stage.builder["dcsn", "arvl"] The builder that joins the ordered pair of perches (source, target). BubbleHandle Builder('cons', 'dcsn_to_arvl') stage/pieces.py, BuilderPairs.__getitem__
stage.builder.policy The policy builder: the backward builder that writes the controls. BubbleHandle Builder('cons', 'policy') stage/pieces.py, BuilderPairs.policy
stage.builder.bwd The backward builders graph, on value functions. GraphHandle BuildersGraph('cons', 'backward') stage/pieces.py, BuilderPairs.bwd
stage.builder.fwd The forward builders graph, on measures. GraphHandle BuildersGraph('cons', 'forward') stage/pieces.py, BuilderPairs.fwd
stage.builder.list() One line per builder, forward pairs first, whose key is the block identifier, by which the builder is read from its graph, stage.builder.bwd[identifier] or stage.builder.fwd[identifier], and whose value is the pair, printed source → target, by which it is read from the mapping, stage.builder[pair], or for the policy builder its key, policy, with the direction word. NamedListing arvl_to_dcsn arvl → dcsn, fwd … stage/pieces.py, BuilderPairs.list
stage.builder.view() The listing printed, one line per builder. str arvl_to_dcsn arvl → dcsn, fwd … stage/pieces.py, BuilderPairs.view
stage.builder.methods The read-only methods mapping for the pieces within both builders graphs, empty before methodization; a graph the construction refused holds none. BoundMethods cntn_to_dcsn.evaluate !Linear !Cartesian(m_d=(m_min, m_max, n_m)) "cons-por… stage/pieces.py, BuilderPairs.methods
stage.arvl.builder The builders of the edge that leaves this perch, fwd and bwd, and at decision policy. PerchBuilders PerchBuilders('cons', 'arvl') stage/pieces.py, PerchHandle.builder
stage.arvl.builder.fwd The forward builder of the edge that leaves this perch, which maps the measure at this perch to the measure at the next perch. BubbleHandle Builder('cons', 'arvl_to_dcsn') stage/pieces.py, PerchBuilders.fwd
stage.arvl.builder.bwd The backward builder of the edge that leaves this perch, which constructs the value functions at this perch from those at the next perch. BubbleHandle Builder('cons', 'dcsn_to_arvl') stage/pieces.py, PerchBuilders.bwd
stage.arvl.builder.policy The policy builder, at the decision perch alone: stage.builder.policy. — refused on stage.arvl.builder: AttributeError: stage 'cons': the policy builder stands at the decision per… stage/pieces.py, PerchBuilders.policy
stage.arvl.builder.list() The paths of this perch, each with the key of stage.builder it reads: two at arrival, three at decision with policy, and none at continuation. NamedListing stage.arvl.builder.fwd arvl → dcsn … stage/pieces.py, PerchBuilders.list
stage.dcsn.builder The builders of the edge that leaves this perch, fwd and bwd, and at decision policy. PerchBuilders PerchBuilders('cons', 'dcsn') stage/pieces.py, PerchHandle.builder
stage.dcsn.builder.fwd The forward builder of the edge that leaves this perch, which maps the measure at this perch to the measure at the next perch. BubbleHandle Builder('cons', 'dcsn_to_cntn') stage/pieces.py, PerchBuilders.fwd
stage.dcsn.builder.bwd The backward builder of the edge that leaves this perch, which constructs the value functions at this perch from those at the next perch. BubbleHandle Builder('cons', 'cntn_to_dcsn') stage/pieces.py, PerchBuilders.bwd
stage.dcsn.builder.policy The policy builder, at the decision perch alone: stage.builder.policy. BubbleHandle Builder('cons', 'policy') stage/pieces.py, PerchBuilders.policy
stage.dcsn.builder.list() The paths of this perch, each with the key of stage.builder it reads: two at arrival, three at decision with policy, and none at continuation. NamedListing stage.dcsn.builder.fwd dcsn → cntn … stage/pieces.py, PerchBuilders.list
stage.cntn.builder The builders of the edge that leaves this perch, fwd and bwd, and at decision policy. PerchBuilders PerchBuilders('cons', 'cntn') stage/pieces.py, PerchHandle.builder
stage.cntn.builder.fwd The forward builder of the edge that leaves this perch, which maps the measure at this perch to the measure at the next perch. — refused on stage.cntn.builder: AttributeError: stage 'cons': the forward pass leaves the stage at continua… stage/pieces.py, PerchBuilders.fwd
stage.cntn.builder.bwd The backward builder of the edge that leaves this perch, which constructs the value functions at this perch from those at the next perch. — refused on stage.cntn.builder: AttributeError: stage 'cons': no value is built at continuation, so `stage.… stage/pieces.py, PerchBuilders.bwd
stage.cntn.builder.policy The policy builder, at the decision perch alone: stage.builder.policy. — refused on stage.cntn.builder: AttributeError: stage 'cons': the policy builder stands at the decision per… stage/pieces.py, PerchBuilders.policy
stage.cntn.builder.list() The paths of this perch, each with the key of stage.builder it reads: two at arrival, three at decision with policy, and none at continuation. NamedListing none stage/pieces.py, PerchBuilders.list
stage.builder.bwd.level One graph of a version, identified by level, direction and grain. str 'builders' stage/pieces.py, GraphHandle.level
stage.builder.bwd.direction One graph of a version, identified by level, direction and grain. str 'backward' stage/pieces.py, GraphHandle.direction
stage.builder.bwd.grain One graph of a version, identified by level, direction and grain. str 'builder' stage/pieces.py, GraphHandle.grain
stage.builder.bwd.graph The DisCoPy hypergraph at this level, direction and grain. BellmanHypergraph bellman.native.hypergraphs.BellmanHypergraph(dom=frobenius.Ty(Sort('cons:fu… stage/pieces.py, GraphHandle.graph
stage.builder.bwd.list() The graph's pieces in order of application, each under its whole name, with the kind column, what it produces and its number: a builder its position among the builders, a primitive its position among the primitives of its own builder. Listing 1 cntn_to_dcsn builder → 𝑉 … stage/pieces.py, GraphHandle.list
stage.builder.bwd.primitives The same graph with all sub-builders opened and compatible primitive operations merged. GraphHandle BuildersGraph('cons', 'backward', primitives) stage/pieces.py, GraphHandle.primitives
stage.builder.bwd.sub_builders The same graph at the authored decomposition, with each !node retained as a sub-builder. GraphHandle BuildersGraph('cons', 'backward', sub_builders) stage/pieces.py, GraphHandle.sub_builders
stage.builder.bwd.diagram() The drawing of this graph, separately for each direction. Drawing Drawing of 13 boxes stage/pieces.py, GraphHandle.diagram
stage.builder.bwd.signature() The typed inputs and outputs of this graph. Signature in 𝑉≻ : Xa → [−∞, ∞) … stage/pieces.py, GraphHandle.signature
stage.builder.bwd.denote() The graph's mathematical record. Composite STAGE cons / BACKWARD BUILDERS … stage/pieces.py, GraphHandle.denote
stage.builder.bwd.obligations() Conditions owned by this graph's builders together with those of the whole stage, retaining their statuses and evidence. Obligations arithmetic-definedness ¬(1 − ρ = 0) [established] … stage/pieces.py, GraphHandle.obligations
stage.builder.bwd.methods The bindings at pieces within this graph and the authored lines they represent, as a read-only mapping. BoundMethods cntn_to_dcsn.evaluate !Linear !Cartesian(m_d=(m_min, m_max, n_m)) "cons-por… stage/pieces.py, GraphHandle.methods
stage.builder.bwd[key] One box of this graph by its whole name, stage.builder.bwd.primitives["cntn_to_dcsn:Aggregation"]. BubbleHandle ["cntn_to_dcsn"]: Builder('cons', 'cntn_to_dcsn') stage/pieces.py, GraphHandle.__getitem__
stage.builder.fwd.level One graph of a version, identified by level, direction and grain. str 'builders' stage/pieces.py, GraphHandle.level
stage.builder.fwd.direction One graph of a version, identified by level, direction and grain. str 'forward' stage/pieces.py, GraphHandle.direction
stage.builder.fwd.grain One graph of a version, identified by level, direction and grain. str 'builder' stage/pieces.py, GraphHandle.grain
stage.builder.fwd.graph The DisCoPy hypergraph at this level, direction and grain. BellmanHypergraph bellman.native.hypergraphs.BellmanHypergraph(dom=frobenius.Ty(Sort('cons:me… stage/pieces.py, GraphHandle.graph
stage.builder.fwd.list() The graph's pieces in order of application, each under its whole name, with the kind column, what it produces and its number: a builder its position among the builders, a primitive its position among the primitives of its own builder. Listing 1 arvl_to_dcsn builder → μ … stage/pieces.py, GraphHandle.list
stage.builder.fwd.primitives The same graph with all sub-builders opened and compatible primitive operations merged. GraphHandle BuildersGraph('cons', 'forward', primitives) stage/pieces.py, GraphHandle.primitives
stage.builder.fwd.sub_builders The same graph at the authored decomposition, with each !node retained as a sub-builder. GraphHandle BuildersGraph('cons', 'forward', sub_builders) stage/pieces.py, GraphHandle.sub_builders
stage.builder.fwd.diagram() The drawing of this graph, separately for each direction. Drawing Drawing of 4 boxes stage/pieces.py, GraphHandle.diagram
stage.builder.fwd.signature() The typed inputs and outputs of this graph. Signature in μ≺ : finite measure on Xm × ℝ₊ … stage/pieces.py, GraphHandle.signature
stage.builder.fwd.denote() The graph's mathematical record. Composite STAGE cons / FORWARD BUILDERS … stage/pieces.py, GraphHandle.denote
stage.builder.fwd.obligations() Conditions owned by this graph's builders together with those of the whole stage, retaining their statuses and evidence. Obligations arithmetic-definedness ¬(1 − ρ = 0) [established] … stage/pieces.py, GraphHandle.obligations
stage.builder.fwd.methods The bindings at pieces within this graph and the authored lines they represent, as a read-only mapping. BoundMethods arvl_to_dcsn !deterministic … stage/pieces.py, GraphHandle.methods
stage.builder.fwd[key] One box of this graph by its whole name, stage.builder.bwd.primitives["cntn_to_dcsn:Aggregation"]. BubbleHandle ["dcsn_to_cntn"]: Builder('cons', 'dcsn_to_cntn') stage/pieces.py, GraphHandle.__getitem__
stage.builder["cntn", "dcsn"].box version is its stage version; box is the DisCoPy bubble. Builder bellman.native.hypergraphs.Builder(frobenius.Diagram(inside=(rigid.Layer(fr… stage/pieces.py, BubbleHandle.box
stage.builder["cntn", "dcsn"].list() The tree of the interior's pieces in order of application, each under the key that reaches it from this handle, with the kind column and what it produces: a builder's or a sub-builder's primitives numbered as the operations block of its card numbers them, a sub-builder's row unnumbered with its primitives under it; primitives.list() opens the sub-builders and lists the primitives alone with the same numbers; a block's lines, the !doc line among them, unnumbered. Listing 1 Pullback primitive … stage/pieces.py, BubbleHandle.list
stage.builder["cntn", "dcsn"].denote() This piece's mathematical record, with typed wires and contained pieces. Composite STAGE cons / BACKWARD BUILDER cntn → dcsn (cntn_to_dcsn) … stage/pieces.py, BubbleHandle.denote
stage.builder["cntn", "dcsn"].primitives This piece with every sub-builder opened and compatible primitive operations merged. BubbleHandle Builder('cons', 'cntn_to_dcsn', primitives) stage/pieces.py, BubbleHandle.primitives
stage.builder["cntn", "dcsn"].sub_builders This piece at its authored sub-builder decomposition. BubbleHandle Builder('cons', 'cntn_to_dcsn', sub_builders) stage/pieces.py, BubbleHandle.sub_builders
stage.builder["cntn", "dcsn"].diagram() The drawing of this piece's interior. Drawing Drawing of 3 boxes stage/pieces.py, BubbleHandle.diagram
stage.builder["cntn", "dcsn"].signature() The typed inputs and outputs of this piece. Signature in 𝑉≻ : Xa → [−∞, ∞) … stage/pieces.py, BubbleHandle.signature
stage.builder["cntn", "dcsn"].kernels() The kernels of this builder as one BuilderKernels record, from which a numerical operator is constructed with no stage in hand: for each primitive operator in order of application, the function its compile_kernel() answers with the names of its arguments and its outputs, the parameters it reads with the values the calibration binds, the wires it reads and writes and its printed kernel, and for a row with no explicit function its printed relation in place of a function; then the builder's parameters with their values and the sets its pieces are read on. BuilderKernels kernels of cntn_to_dcsn: 𝑉≻ → 𝑉 … stage/pieces.py, BubbleHandle.kernels
stage.builder["dcsn", "cntn"].state_choice_measure() The joint measure of state and choice for a forward decision builder. Lambda mu … stage/pieces.py, BubbleHandle.state_choice_measure
stage.builder["cntn", "dcsn"].obligations() The stage's authored conditions and type checks concerning this piece. Obligations aggregation-admissibility V(m_d) ∈ [−∞, ∞) … stage/pieces.py, BubbleHandle.obligations
stage.builder["cntn", "dcsn"].methods Bindings at this piece, inside it, and at the authored lines of the block it is built from. BoundMethods cntn_to_dcsn.evaluate !Linear !Cartesian(m_d=(m_min, m_max, n_m)) "cons-por… stage/pieces.py, BubbleHandle.methods
stage.builder["cntn", "dcsn"][key] One box inside it by name, the kind compared without regard to case; a tuple of keys walks one level down per element. BoxHandle ["pullback"]: Operator('cons', 'cntn_to_dcsn:Pullback') stage/pieces.py, BubbleHandle.__getitem__
stage.builder["cntn", "dcsn"]["pullback"].box version is its stage version and box the retained DisCoPy box. Box frobenius.Box('cntn_to_dcsn:Pullback', frobenius.Ty(Sort('cons:function:cnt… stage/pieces.py, BoxHandle.box
stage.builder["cntn", "dcsn"]["pullback"].list() The pieces below this box: none, since a primitive operator or an authored line has no interior, so the listing prints none; the same verb at every level. Listing none stage/pieces.py, BoxHandle.list
stage.builder["cntn", "dcsn"]["pullback"].denote() This box's mathematical record and card: an operator's mapping, typed wires, kernel and conditions, or an authored line's positioned statement, tags, control and methods. OperatorCard STAGE cons / BACKWARD BUILDER cntn → dcsn (cntn_to_dcsn) / Pullback … stage/pieces.py, BoxHandle.denote
stage.builder["cntn", "dcsn"]["pullback"].kernel() The kernel applied by this operator, with its defining records in origins. Kernel 𝑔 of dcsn_to_cntn: 𝑔(m_d, c) = m_d - c stage/pieces.py, BoxHandle.kernel
stage.builder["cntn", "dcsn"]["pullback"].compile_kernel() The kernel as one plain Python function, the text kernel().python executed, on a symbolic or a calibrated version: its arguments are the kernel's own and then the parameters it reads, whose values kernel().parameter_values holds. function <function g_dcsn_to_cntn> stage/pieces.py, BoxHandle.compile_kernel
stage.builder["cntn", "dcsn"]["pullback"].signature() The typed inputs and outputs of this box. Signature in 𝑉≻ : Xa → [−∞, ∞) … stage/pieces.py, BoxHandle.signature
stage.builder["cntn", "dcsn"]["pullback"].obligations() The conditions this box owns. Obligations none stage/pieces.py, BoxHandle.obligations
stage.builder["cntn", "dcsn"]["pullback"].methods The read-only bindings at this box and the authored lines it represents. BoundMethods none stage/pieces.py, BoxHandle.methods
stage.initial.backward["cntn_to_dcsn"][key] One box inside it by name, the kind compared without regard to case; a tuple of keys walks one level down per element. BoxHandle ["value"]: Line('cons', 'cntn_to_dcsn.value') stage/pieces.py, BubbleHandle.__getitem__
stage.initial.backward["cntn_to_dcsn"]["value"].box version is its stage version and box the retained DisCoPy box. Box frobenius.Box('cntn_to_dcsn.value', frobenius.Ty(Sort('cons:cntn:V', 'field… stage/pieces.py, BoxHandle.box
stage.initial.backward["cntn_to_dcsn"]["value"].list() The pieces below this box: none, since a primitive operator or an authored line has no interior, so the listing prints none; the same verb at every level. Listing none stage/pieces.py, BoxHandle.list
stage.initial.backward["cntn_to_dcsn"]["value"].denote() This box's mathematical record and card: an operator's mapping, typed wires, kernel and conditions, or an authored line's positioned statement, tags, control and methods. AuthoredCard STAGE cons / BACKWARD BLOCK cntn_to_dcsn / value … stage/pieces.py, BoxHandle.denote
stage.initial.backward["cntn_to_dcsn"]["value"].kernel() The kernel applied by this operator, with its defining records in origins. — refused on stage.initial.backward["cntn_to_dcsn"]["value"]: ConstructionError: applications/portfolio-choice/declaration/stages/cons/co… stage/pieces.py, BoxHandle.kernel
stage.initial.backward["cntn_to_dcsn"]["value"].compile_kernel() The kernel as one plain Python function, the text kernel().python executed, on a symbolic or a calibrated version: its arguments are the kernel's own and then the parameters it reads, whose values kernel().parameter_values holds. — refused on stage.initial.backward["cntn_to_dcsn"]["value"]: ConstructionError: applications/portfolio-choice/declaration/stages/cons/co… stage/pieces.py, BoxHandle.compile_kernel
stage.initial.backward["cntn_to_dcsn"]["value"].signature() The typed inputs and outputs of this box. Signature in V≻ : {V≻} … stage/pieces.py, BoxHandle.signature
stage.initial.backward["cntn_to_dcsn"]["value"].obligations() The conditions this box owns. Obligations none stage/pieces.py, BoxHandle.obligations
stage.initial.backward["cntn_to_dcsn"]["value"].methods The read-only bindings at this box and the authored lines it represents. BoundMethods none stage/pieces.py, BoxHandle.methods
stage.initial.backward["policy", "objective"].definition One entry of the definitions table: a name the stage file declares, once, in file order. Definition Definition('policy.objective', line) stage/pieces.py, LineHandle.definition
stage.initial.backward["policy", "objective"].denote() The authored relation, positioned statement and annotations of this line, as the same record a line with a box answers. AuthoredCard STAGE port / POLICY BLOCK policy / objective … stage/pieces.py, LineHandle.denote
stage.initial.backward["policy", "objective"].methods The read-only methods mapping at this line. BoundMethods none stage/pieces.py, LineHandle.methods
stage.par[name] One parameter of a version, stage.par["ρ"]: its name as the file declares it, its declared set domain, a retained term or None where no declaration names one, its value, the number a calibration binds or the word unbound, and the author's description describes. Parameter ["ρ"]: ρ = 6.0 : [1, inf) stage/pieces.py, Parameters.__getitem__
stage.par.<name> The value alone of one parameter, read by its name as an attribute, stage.par.ρ: the value of the record stage.par["ρ"], the number a calibration binds. float .ρ: 6.0 stage/pieces.py, Parameters.__getattr__
stage.par.list() The parameters as a table, one row each with name, domain, value, describes and definition: the declared set, printed under set, the bound value or the word unbound, and the definition of a derived parameter, printed under set after the set and :=. Rows name set value describes … stage/pieces.py, Parameters.list
stage.par.view() The table of the parameters as printed text. str name set value describes … stage/pieces.py, Parameters.view
stage.settings[name] One setting of a version, stage.settings["n_a"]: its name; its domain, the set its declaration in the methods file names, None for a setting no file declares; its configured value, or unbound where no configuration has valued it; and readers, the triples of the place that reads it, the method word there and the outer word of the grid typed at that place where the grid reads the setting, as a bound or a count of one of its factors or as its declared points, ("policy", "!egm", "!Cartesian"), the word empty otherwise, ("dcsn_to_arvl.E_ψ_ξ", "!gauss_hermite", ""); readers is empty for a setting no component names. Setting ["n_a"]: n_a = 800 : ℕ, read at policy by !egm for its grid !Cartesian stage/pieces.py, Settings.__getitem__
stage.settings.<name> The value alone of one setting, read by its name as an attribute, stage.settings.n_a: the value of the record stage.settings["n_a"], the configured value. int .n_a: 800 stage/pieces.py, Settings.__getattr__
stage.settings.list() The settings as a table, one row for each method that reads a setting, with name, the declared set under set, value, read at, by and grid, the outer word of the place's grid where the grid reads the setting, as a bound or a count of one of its factors or as the declared points of !Points; a setting no method reads has one row with the last three empty. Rows name set value read at by grid … stage/pieces.py, Settings.list
stage.settings.view() The table of the settings as printed text. str name set value read at by grid … stage/pieces.py, Settings.view
stage.methods[place] The components typed at one place of a stage: method, the method component, the Word of the typing entry <place>.method : !egm(tol=tol_v) with its keyword arguments; grid, the grid component, the one outer grid term of <place>.grid : !Cartesian(a=(a_min, a_max, n_a)), !Points(nodes=P) or !Fibred(base=…, fibre=…), a Cartesian, a PointGrid or a Fibred; and handler, the program the binding <place>.handler : "cons-port:egm" names, which realizes the operator and is no classifier. Components ["policy"]: !egm !Cartesian(a=(a_min, a_max, n_a)) "cons-port:egm" stage/pieces.py, BoundMethods.__getitem__