Repository navigation
Releases: naivej/dygnosis
Release list
v0.11.17
v0.10.2
-
Internal symbol history uses distinct types for symbol kinds and parser positions. Explicit removal-fallback queries preserve existing diagnostic and view behavior.
-
Subsample definitions, copies, and named prior/options uses follow macro execution order. An earlier written line in a later iteration can use a definition already executed in the previous iteration without false E428/E429.
-
Extract retains successful type changes for selected names in parser order. Space-separated declaration lists filter unselected names while preserving TeX and per-name options.
-
Finishes the written-parameter-list audit. Initial/history values, filter rows, shock/path targets, init2shocks, homotopy, shock groups, varobs, estimated-parameter roles, Markov parameter options, and prior copy sources use the type at the statement. Macro iterations keep their own parser context for ordinary names too.
-
Steady-state order, estimated skewness, parameters in shock values, deterministic-trend warnings, and PAC/VAR matching use final types. Completion, semantic colors, and compare names, kinds, and parameter values agree with the final-type views.
-
Named external_function declarations reject unknown options with E001. Repeated valid options keep the first value, as Dynare does, without false E271.
-
An unused trend_var or log_trend_var name can change to an ordinary type without false E295. Final counts and symbol lists include it while retaining its written trend declaration.
-
Names excluded before optim_weights report E317; later excluded planner or Ramsey-constraint references report E426. Earlier accepted uses keep their removal warrants.
-
The policy-generated discount parameter is known to later command lists, assignments, and duplicate checks. Its implicit creation keeps written declarations and counts intact.
-
Non-model expression calls register unknown functions and distinguish integer arguments from variable timing. A later declaration or command list uses their known function kind; valid calls no longer get E279/E280 as bare function-name uses.
-
dsge_prior_weightis reserved in Dynare blocks. Accepted parameter-assignment and policy-option expressions no longer get E001 for that name. -
Command symbol lists use final types after
change_type, including exclusion/restoration and a heterogeneous name made ordinary. E240 no longer rejects valid retyped names or accepts a heterogeneous name as an ordinary type. -
A later declaration that clashes with an expression-created native local reports E030 with Dynare's declared-twice sentence.
-
Command symbol lists report E240 for native locals introduced by expressions, including a list written before the expression. Native MATLAB assignment heads remain undeclared.
-
Equation symbol classes, timing, model counts, and hover follow each name's final type after
change_type. Declaration locations still point at the written declaration. Hover distinguishesvarexo_detfrom ordinaryvarexo. -
E251,E182, andE255use a name's type afterchange_type, not the list where it was declared. Avarexoretyped to a parameter is no longer an exogenous in the planner objective or inoccbin_constraints, and a parameter retyped tovarexois. Avarretyped to a parameter can be used inosr_params_bounds; a parameter retyped tovarcannot. -
Policy instruments use their type when the policy command is read. Undeclared names use
E101; declared names of the wrong type useE317withN is not endogenous.A later declaration or type change cannot validate an earlier instrument. Repeated macro iterations retain their own type checks. -
discretionary_policyreportsE378when an existingoptimal_policy_discount_factoris not a parameter at the command. That earlier refusal withholds instrument errors on the same command. Native locals introduced by preceding expressions or by the command's options use the declared wrong-type instrument sentence. -
A comment that mentions
differentiate_forward_varsno longer hides the equation-count error. The option still withholdsE188when it is written onmodel(…)ormodel_options(…), because that option can add helper variables. -
Diagnostic location mapping reuses joined include text and source maps. Document edits, disk reloads, and search-path changes invalidate that snapshot while preserving included-file diagnostic locations.
v0.10.1
- Macro functions, scalar
@#for ... when ...filters, and tuple loops expand in diagnostics and model views, with loop origins kept. A filtered-out iteration no longer invents an unknown name or a count warning. A range bound can use arithmetic:1:N-1ends atN-1. An undefined macro variable or function isE063at the directive that uses it, and a quoted macro string used as a name is reported without its quotes. A valid expression Dygnosis cannot evaluate showsI211Information, withholds the checks that need the expanded model, and marks model info, equations, compare, and the effective-model view as incomplete. - Equation counts use each name's final type after
change_type. Avarretyped to a parameter orvarexono longer counts forW013,E186, orE188, and a parameter orvarexoretyped tovardoes. - Parameter checks follow
change_type.z = 1;orz.prior(…)afterchange_type(parameters) z;is no longerE378; before it, or afterchange_type(var), it still is.W010,W022, andW121use the final type, so a parameter retyped tovarno longer gets them and avarretyped to a parameter does. E193reports three PAC target-equation refusals visible in the written file: a nonlinear right side, a variable absent frompac_target_infocomponents, or a listed component absent from the equation. That check runs before the missing-operator refusal. Unary, diff, and other rewrite-dependent forms remain quiet, as does a competing assignment that might be simplified first.- A written constant division by zero is
E189on the first proven left- or right-hand side. A direct unused endogenous isE186. A plain aggregate or heterogeneous equation count that cannot create helper variables isE188orE192. A direct two-variableEXPECTATION(0)sum underpartial_informationisE190. Counts and substitutions that depend on rewrite stay quiet. W186reports Dynare's auxiliary-name warning on a symbol list and stops that list. A duplicate name in the same list still warns.W212warns when aninitvalorendvalassignment, includingendval(learnt_in=1), names a variable that a latermodel_removeorvar_removestill excludes.change_typeaftervar_removerestores the name, so the warning stays quiet and an unused restored exogenous isE021.- An incomplete macro expansion withholds later workspace file and companion checks. The incomplete notice stays; a complete file still reports a real missing include or unknown value-file name.
- Command option lists follow the Dynare 7.2 grammar for membership, separators, and simple numeric values. A missing comma after an option value is reported on the next option, where Dynare reports it.
estimated_params_removeparses its rows and checks each name when that row is read. - Diagnostics and references from an included file use the included source. Batch diagnosis uses that same ownership.
v0.10.0
- A non-ASCII character in active Dynare syntax is
E001with Dynare'scharacter unrecognized by lexer. That includes a declaration (var café;), an equation (y = café;), and a shock name. Unicode comments,long_name, TeX names, equation-name strings, verbatim text, native MATLAB text, and a discarded@#ifbranch stay accepted, as does the complementarity operator. - A heterogeneity dimension whose written equations do not match its distinct written endogenous names warns
W208, the same kind of count as aggregateW013. Leads and lags that Dynare later turns into helper variables are not part of this count. A repeated name counts once. An unresolved include or macro expansion withholds the count. W211warns when an ordinary aggregatevarexois written with a lead in an aggregate equation or model-local definition and the file containsstoch_simulorestimation. The lead is legal; the warning asks for a timing review.varexo_det, heterogeneous variables, lags,simul, and anyperfect_foresight_*command stay quiet. There is no switch that turns the warning off.x@{i}in a macro loop is the identifierx1,x2, and so on, in diagnostics and model views.- Comment silencing (
// dygnosis:disableand thevsd:names) is removed. The editor, the command line, and agents all show the same diagnostics. Hiding a check in one editor, without writing it into the file, is a 0.11 editor action. - Information codes
I208,I209, andI210summarize missing equationnametags, missing declarationlong_names, and numeric literals written in model equations. Each note is one count for the compilation unit and points to its first affected source file, including through CLI, MCP and editor include handling. They are writing preferences, not Dynare refusals. An unresolved include or macro expansion withholds the count. - When that equation-name summary is shown, the editor can add
eq_Ntags to the counted equations it can edit safely. Existing tags stay. A generated@#forcopy, an equation whose source is ambiguous, and an include that would name more than one equation are left unchanged. The action title counts those skips. Running it again does not change the file. - Compare pairs aggregate equations by name first. A unique name pairs across reordering; a repeated name pairs only when the normalized text and tags match. Equation rows include each side's name and tags, and
unmatched_same_namegroups leftovers that still share a name. - Compare diffs each heterogeneity dimension on its own, with the same name and tag pairing. Those rows are
heterogeneous_equations. Aggregate equation lists stay aggregate-only. - Removes parameter-value inlay hints and the model-counts code lens. Folded assignment values stay on hover and in compare. Counts stay in
dynare_model_info. dynare_formatformats a.modfile with the same rules as the editor. It returns the full text when the formatting changes. Empty or whitespace-only input, and a file that is already formatted, areunchanged. Formatting that cannot be done safely isunsupported.formatIndentistabor 1–8 spaces, as in the editor.dynare_extractreturns a named equation group with the declarations, model locals, and heterogeneity dimension it needs. It retains required static/dynamic partners, OccBin constraint declarations, expanded equation order and macro iteration origins, including static rows. Supplied file maps are self-contained and preserve source-key identity. The text is a fragment, not a runnable or square model. An empty selector is an input error. No match isempty. Missing required setup, a PAC or VAR expectation, heterogeneous static replacement or OccBin regime context, or an unresolved include or macro returnsunsupported_contextwith no fragment.dynare_workspace_diagnosechecks several root.modfiles in one call. Pass a files map with the roots to check, or paths to files and directories. Map includes, inherited include search paths and companion existence use only supplied files; unprovided disk files cannot affect the report. Disk paths with redundant.components are diagnosed once. Each root is reported on its own, and one failure does not drop the others.- Compare reports
symbols_changedfor a shared name whose declaration kind,long_name, or TeX name differs, including metadata that was added or removed. Missing metadata stays empty rather than being filled with the symbol name. Parameter value changes stay inchanged_parameter_values. A kind change acrossvar,varexo, andparametersalso stays in the existing added and removed name lists. A change betweenvarexoandvarexo_det, or between an aggregate declaration and the same command with a heterogeneity dimension, stays on that command's list and is reported insymbols_changed. - Signature help inside a known command's option list shows that command's catalog option names and descriptions and marks the option being typed. The editor asks again on
(,,, and=. A comma inside parentheses, brackets, braces, a string, or a comment stays on the same option.shocks(heterogeneity=…)lists the heterogeneous shock options. A model equation, and a command with no catalog options, has no signature. - The editor offers named stochastic and deterministic shocks templates for eligible aggregate exogenous declarations. Clear stochastic or perfect-foresight contexts choose the appropriate form; ambiguous or mixed contexts offer both eligible forms. Each unfinished row and the wrapper are commented, and no standard deviation, period or value is filled in. Insertion stays outside every block, including unfinished blocks. A heterogeneous shocks block does not hide the actions, and nothing is applied automatically.
- LSP requests, diagnostics and edits use UTF-16 positions, including supplementary Unicode characters. MCP retains its existing scalar coordinates. Public equation rows retain
textand omit the redundantlhsandrhsfields.
v0.9.0
- Reads Dynare 7.2 heterogeneity dimensions, declarations, model blocks, shock rows, and the four heterogeneity commands while keeping aggregate and heterogeneous equations separate.
dynare_model_infoshows aggregate counts and per-dimension heterogeneous counts;dynare_equationsreturns heterogeneous rows with dimension and source origin. Variable hover and outline use timing from heterogeneous equations.dynare_expandand the editor's effective-model view include heterogeneous equations in their origin lists. The expand count covers all counted written model equations and reports aggregate and per-dimension counts separately.- Reports the written heterogeneity refusals (
E459–E479and the recordedE001shapes) and warns on a second distinct heterogeneity dimension (W207). The per-dimension equation count after auxiliary equations stays silent (E192). - Adds Dynare 7.2 names and descriptions for the heterogeneity commands and options to completion, hover, and
dynare_list_options.SUMis operator help.heterogeneityis listed onshocks. Hover and completion onoverwriteinsideshocks(heterogeneity=…)describe that dimension's variance settings; ordinaryshocks(overwrite)keeps the regular-shocks sentence. shock_setup_changespairs heterogeneous variance, standard-error, covariance, and correlation rows by dimension, and shows the written settings, overwrite status, and source locations.
v0.8.0
- Reads Dynare 7.2
var_model,trend_component_model,var_expectation_model,pac_model, andpac_target_info, plus their named model operators. The independentdeterministic_trendsblock is also checked. Parse summaries and equation tools still show the equations you wrote. - Reports the family's parse and PAC target checks, selected VAR/trend equation shape and tag errors, VAR and PAC expectation name errors, and written PAC growth, target, operator-use, and fixed generated-name clashes (
E432–E458,W206). SharedE021andE058now reach applicable family fields. Diagnostics use the same core in LSP and MCP. - Adds Dynare 7.2 option names and descriptions to completion, hover, and
dynare_list_options. These include barestructuralandeqtags;pac_target_infobody rows remain block content rather than command options. - Checks that require Dynare's generated equations, substituted expressions, or lag-derived auxiliary names remain silent until their source causes can be mapped. The installed 7.2 PAC example passes the check-stage smoke test; it prints an unused-parameter warning.
v0.7.0
- Reads the written shock, path, learning-date, and database forms accepted by Dynare 7.2 and reports their parse, check, and written transform refusals (
E393–E425). ExistingE343/E344now reach deterministic shocks;E111catches covariance followed by correlation and skew/co-skew duplicates have their own codes. - Subsample declarations, copies, and named
prior/optionsuses now report missing or repeated ranges (E427–E430) and invalid final target types at Write (E431). A model use aftervar_removereportsE426; command lists recognize removed and model-local names throughE240. Written denominator cancellation reachesE278, and malformed DATE and handed-over command forms reachE001. Mixed-typecorr(A,B).optionsusesE379. - W060 names missing selected shocks from
irf_shocks, or warns for an unselected positiveirfonly when no plain exogenous shock has a written size. It stays quiet for bare declarations, barestoch_simul, explicit zero size, an estimated standard error for the plain exogenous shock, a possible external size, and uncertain macro or include input. An observed-variable measurement-error estimate alone does not suppress it. Warnings in a file with resolved includes point to the active file. - Compare adds
shock_setup_changesand a Shock setup changes markdown section for stochastic, scheduled, surprise, multiplicative, heteroskedastic, controlled, and terminal instructions. It shows written values, timing, learning dates, controls, and overwrite status, with source locations when the input text can be verified against the parsed file. It does not infer realized paths or solver results. - Compare also shows changed initial and terminal values, time settings, database references, and heteroskedastic data settings beside affected shocks;
shock_groupsandinit2shockschanges have a separate Shock analysis setup section.
v0.6.0
Reads method of moments, matched moments and IRFs, and the IRF and moment calibration blocks, and reports the refusals Dynare makes on them. Codes E382–E392.
Diagnostics implemented in this release:
- E382–E385 —
method_of_momentsneedsmom_method(GMM,SMM, orIRF_MATCHING); GMM and SMM needdatafile;analytic_standard_errorsandanalytic_jacobianneed GMM; only one of the HP, one-sided HP, and bandpass filters. - E386 — a
matched_momentsrow is not a product of endogenous variables:Matched moment expression has incorrect format. - E387–E392 — a matched-IRF shock that is not exogenous, a repeated endogenous/exogenous pair or tuple,
periodsandvalues(orweights) of different lengths, and a date written inperiods. - E058 and E317 reach the name slots of
matched_irfs,matched_irfs_weights,irf_calibration, andmoment_calibration. - E239 and E240 reach the trailing name lists of
forecast,rplot,dynasave,dynatype, and the shock-decomposition commands.rplotallows an endogenous or an exogenous.
Other changes:
dynare_list_optionsknowsmatched_moments,matched_irfs,matched_irfs_weights, andmoment_calibration.- A variable may be named after a block opener (
shocks,matched_irfs) or after a command whose only lexer rule is at the start of a statement (steady,dynatype).forecast,identification,simul,stoch_simul, andvarobsare still not names. model = 0.2;andsteady = 0.9;at the start of a statement are syntax errors, as they are in Dynare. Inside a block,endis the block closer, not a name.
v0.5.5
Adds the refusals the Dynare preprocessor prints only at its last stage, when it writes the MATLAB files — after its check and transform stages have already accepted the file. The file you edit is enough to decide each of them. Codes E380, E381 and W205.
Diagnostics implemented in this release:
- E380 — a
load_params_and_steady_statefile names something the loader cannot take: anepiloguehelper, anexternal_functionname (thename=value or a value named byfirst_deriv_provided/second_deriv_provided), or a trend variable. The four slots it accepts are parameter, endogenous,varexoandvarexo_det. Dynare refuses only when writing:Unsupported variable type for A in load_params_and_steady_state. - E381 — a
steady_state(…)expression calls anexternal_function:The expression inside a steady_state operator cannot contain external functions. The operand walk descends, so a call nested under an operator is caught too. - W205 — two rows of the same
shock_groupsblock reuse a label:shock group label 'g1' has been reused. Only using the last definition.The comparison is within one block, as Dynare's is: two separateshock_groupsblocks may share a label silently.
Other changes:
W204narrows: the unsupported kinds above now errorE380instead, andW204keeps the genuinely unknown name. All three kinds are positional, as Dynare's own reading is — a name declared only after theload_params_and_steady_statestatement is still unknown to the loader, warnsUnknown symbol, and staysW204.- Writer-stage honesty: the test harness can now spawn a run that reaches the MATLAB writer (bare
nopreprocessoroutput, withoutonlyjson, which is what skips the writer), and cleans the+<name>/package directory such a run leaves beside the.mod. - The two writer-stage messages that no
.modshape can be matched against — the more-than-32-nested-parentheses warning (whose trigger is Dynare's generated text) and the excluded-name-still-in-initvalrefusal (which aborts Dynare with no message) — are documented as deliberately silent (W187,E191).
v0.5.4
Adds the MS-SBVAR family: the ms_* commands, sbvar, svar, markov_switching, the svar_identification and conditional_forecast_paths blocks, conditional_forecast, plot_conditional_forecast, the data statement and the dotted prior statement are read instead of skipped, and the refuses Dynare makes on them are reported. Codes E338–E379.
Diagnostics implemented in this release:
- The family's own refusals (one code per distinct Dynare message): the
datastatement's file-or-series rule, its both-at-once rule and itsnobsbound (E338–E340);ms_estimation'sdatafile/initial_yeargate (E341);conditional_forecast'sparameter_set(E342), andconditional_forecast_paths' mismatched period and value counts and its repeatedvarname (E343,E344);markov_switching's required options, its chain and regime-count values, its chain order, itsparameterstypes, itsrestrictionsrow shape, its regime bound, its repeated regime pair, its transition probabilities and their sums (E345–E355);svar_identification's one-block and one-cholesky rules, its repeated lag, its repeated equation, its equation-number bound, its repeated name and its Qi-or-Ri restriction (E356–E362);svar's choice of one ofcoefficients/variances/constantswith its chain and equation values (E363–E367); thems_*commands' mutually exclusive regime and filtered-probability options (E368–E371); and thepriorstatement'sshape,mean/mode,stdev/varianceanddomainrules, the joint head's name count, a head that is not a parameter, and acorrhead whose two names differ in type (E372–E379). E227reads thedatastatement in file order:estimation; data(file='x.csv');is refused, as Dynare refuses it, while adatastatement written before theestimationsilences the refusal on both sides.- The parsed family reaches the shared name checks: an undeclared name in the
svar_identificationbody, in aconditional_forecast_pathsvarrow or in apriorhead reportsE058; avarrow naming an exogenous reportsE317; apriorhead naming a parameter reportsE059; and the trailing name lists ofms_irfandplot_conditional_forecastreportE239/E240with Dynare's own text. - Malformed family shapes are
E001, pointed at the token Dynare's parser stops on: a missing or empty option list, an option name the command does not take, a value written in a shape the grammar has no production for, an empty or malformed block body, and the statementsdsample(10, 10);,rplot(periods=10);,smoother2histval(periods=10);,var_remove(alpha);,y(1) = 2;and the dotted heads whose body is notprior,optionsorsubsamples. E378also fires on a top-level assignment (y = 3;), where Dynare'sy is not a parameteris the same sentence itspriorhead prints.
Other changes:
- The
datastatement is parsed: it replaces the presence-only record 0.5.2 kept for thedatafilegate. - A line the Dynare lexer reads as native MATLAB text is no longer reported as a parameter assignment with a missing semicolon;
aaaa = 1followed bybbbb = 2;is accepted here, as Dynare accepts it. sbvar,svar_identification,svar_global_identification_check,conditional_forecast_paths,plot_conditional_forecastand the dottedpriorare indynare_list_options, in option hover and completion, and in command-name completion.
Three shapes stay silent on purpose, because Dynare 7.1 prints no message for them: it aborts on markov_switching(…, parameters=[<undeclared>]), on a restriction whose expression is not a coeff(…) term, and on a duration written as a vector.