{"id":"66c7a433-b647-496b-bbe0-4296ab772b86","arxiv_id":"1908.05839","paper_version":2,"verdict":"CONDITIONAL","confidence":"HIGH","novelty_score":4.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":0,"one_line_summary":"A survey and tutorial that distills the design principles behind bidirectional typing, presents a recipe for designing such systems, and argues that bidirectionality is about information flow rather than polarized logic.","lead":"This survey explains how bidirectional typing works by combining type checking and type synthesis, and it collects the design principles behind the approach. It is a useful map for language designers and proof-assistant implementers who want to support advanced type systems without excessive annotations.","discovery_kind":"review","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Section 8.4's anti-polarity conclusion rests on an informal 'undeniably bidirectional' classification; its exemplars are consistent with a polarized reading, leaving the central conceptual claim under-supported.","rationale":"The reader's verdict is CONDITIONAL, and I agree with the reader's identified weak spot. The survey has real strengths: the Pfenning recipe is described precisely enough to be implemented; §8.1 gives a genuine term model of the initial CCC using bidirectional normal forms; and the polymorphism section mentions an independent machine-checked formalization (Zhao et al. 2019). None of that is in question. What is load-bearing is the claim that the folklore connection to polarized logic is wrong. That claim is the survey's main conceptual novelty, and it is used to advise designers to 'seek inspiration from polarized type theory, but not restrict yourself to it.' The support in §8.4 is a list of systems that 'reject the basic recipe.' But rejecting the recipe is not the same as escaping polarized logic. Zeilberger's backwards system is literally MLL; Chlipala et al. is explicitly substructural; Odersky et al.'s type-level mode marks are a form of polarity. Without a precise definition, the classification is doing all the work. The authors' own §12 says the actual relationship between polarity/focusing and bidirectional typing is not yet understood, which undercuts the assertiveness of §8.4. I would not change the conditional verdict, but I would add a condition: the survey should either provide a formal characterization of bidirectional mode structure and prove the exemplars live outside it, or present the anti-polarity thesis as an open design hypothesis. I do not rely on the error-locality point: Section 3.4 already flags the lack of empirical evidence, and that claim can be softened without touching the methodology.","tokens_in":34242,"tokens_out":8365,"duration_ms":88277,"concrete_test":"Focus on the strongest §8.4 example, Zeilberger's backwards system from §6.5. Build a focused sequent calculus for MLL with up/down shifts, assign polarities to unit, tensor, and linear implication, and define a translation from the backwards checking/synthesis judgments to focused sequents. Prove that each backward derivation maps to a focused derivation and vice versa. If the translation exists, the claim that this system demonstrates bidirectionality beyond polarized logic loses its main evidence; if a faithful translation provably cannot exist, §8.4 is supported. Repeat the exercise for Odersky et al.'s colored types only if the first case is inconclusive.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The paper's most consequential conceptual claim, advanced in §8.4 and repeated in §12, is that bidirectional typing is not a manifestation of polarized logic: 'the essence of bidirectional typing is the management of information flow.' The argument hinges on classifying Odersky et al.'s mixed-direction types (§6.1), Chlipala et al.'s strict bidirectional checking (§6.5.1), and Zeilberger's backwards MLL system (§6.5) as 'undeniably bidirectional' yet outside the Pfenning-recipe/polarity narrative. No formal definition of bidirectional typing, and no criterion for 'arises from polarized logic,' is given; no theorem shows these examples cannot be faithfully presented as focused calculi. The examples actually cut the other way: Zeilberger's system is a fragment of multiplicative linear logic, the canonical setting for polarity; Chlipala et al. explicitly invoke relevance logic; Odersky et al.'s inherited/synthesized type decorations behave like polarity tags. If any of these systems admits a polarity-preserving focused presentation, §8.4's conclusion reduces to a definitional preference rather than an empirical or mathematical discovery. This is not an internal inconsistency, but the survey's boldest interpretive claim is not supported by a checkable criterion.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The manuscript is a survey of bidirectional typing, presenting the two-judgment checking/synthesis paradigm, design criteria for bidirectional systems, a 'Pfenning recipe' for constructing them, a catalogue of variants (mixed-direction types, backwards bidirectional typing, mode annotations, simultaneous input/output judgments), connections to proof theory and polarized type theory, and historical notes. It argues that bidirectional typing is essentially about managing information flow rather than being a manifestation of polarized logic, and it concludes with open challenges for the field. The paper contains worked examples, several proof sketches (notably annotatability in Section 4.5.3 and a backwards substitution theorem in Section 6.5), and a systematic normalization of notation.","tokens_in":34474,"tokens_out":7869,"duration_ms":75392,"significance":"If its central claims hold, this survey will be a valuable reference for language designers and type theorists. It collects and organizes a large body of work, gives explicit design criteria (mode-correctness, annotatability, rule size, annotation character), and offers a concrete recipe with a falsifiable annotation-character claim. The historical treatment is careful, and the normalized notation across systems is genuinely useful. The manuscript does not ship machine-checked proofs or executable artifacts; the proof sketches are mostly adequate for a survey, but the strongest conceptual claim about polarity is currently under-supported. The paper's main value is as a synthesis and design guide, and its central methodological claims are defensible once appropriately qualified.","major_comments":[{"comment":"The claim that the 'essence of bidirectional typing is the management of information flow' and that the folklore belief in a polarized-logic origin is 'wrong' is not supported by a checkable criterion. The argument classifies the systems of Odersky et al. (Section 6.1), Chlipala et al. (Section 6.5.1), and Zeilberger (Section 6.5) as 'undeniably bidirectional' and outside the Pfenning-recipe/polarity narrative, but the paper gives no formal definition of 'bidirectional' and no criterion for 'arises from polarized logic.' Each of the three exemplars is consistent with a polarized or focused reading: Zeilberger's system is a fragment of multiplicative linear logic, the canonical setting for polarity; Chlipala et al. explicitly draw on relevance logic; Odersky et al.'s inherited/synthesized decorations behave like polarity tags. As written, the conclusion reduces to a definitional preference rather than a supported empirical or mathematical discovery. I request either a precise delimitation of the surveyed class together with a theorem or counterexample showing that it is not faithfully presentable as a polarized/focused calculus, or a softening of the conclusion to 'not necessarily a manifestation of polarized logic.'","section":"Section 8.4 and Section 12"},{"comment":"The abstract advertises that 'bidirectional typing improves error locality,' but the manuscript offers no empirical evidence for this causal claim. Section 3.4 explicitly states that 'in the absence of empirical studies' the annotation-discipline claims are hypotheses, and the historical note on Lee and Yi in Section 10 is anecdotal. Because this benefit is advertised in the abstract and used as motivation, it is load-bearing. Either report supporting evidence or hedge the abstract and the relevant passages to say that bidirectional typing 'can improve' or 'is often observed to improve' error locality.","section":"Abstract, Section 3.4, and Section 10"},{"comment":"The claim that under the recipe 'an annotation is required on a subterm if and only if an introduction form meets an elimination form' is not a precise or verifiable statement as written. No syntactic definition of 'meets' is given, and the examples include cases in which an elimination form (a case expression) must be annotated because it cannot synthesize, even though no introduction form directly meets an elimination form at that node. Section 4.1 also documents that the earlier 'redex-only' version of this claim was false. Please either formalize the criterion or present it as a heuristic with explicit exceptions.","section":"Section 4.5.4"}],"minor_comments":[{"comment":"The backwards substitution theorem is stated but no proof or citation is given for it; either supply a proof sketch or attribute the theorem explicitly to a source.","section":"Section 6.5, Theorem 1"},{"comment":"There is a typo: 'bidrectional' should be 'bidirectional.'","section":"Section 9.1"},{"comment":"The second author's name appears as 'NEEL KRISHNASW AMI' with an erroneous space; it should be 'NEEL KRISHNASWAMI.'","section":"Byline"},{"comment":"The annotatability proof is described as an induction, but only the two 'into the wind' cases are shown; a sentence summarizing the straightforward cases would make the sketch complete.","section":"Section 4.5.3"}],"recommendation":"major_revision","confidential_remarks":"This is a strong survey, and I do not see grounds for rejection. The main revision should focus on calibrating the conceptual claim in Section 8.4 and the abstract's error-locality claim; both are fixable within the manuscript's scope. The Section 8.4 issue is the most consequential: without a more precise definition of the surveyed class and of what it means to 'arise from polarized logic,' the conclusion is a definitional preference. The authors are well positioned to make that repair, and doing so would substantially increase the paper's value."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"First, the key take: this is a survey by two people who have built a good chunk of the area. It is not a new breakthrough, but it is probably the best single place to learn what bidirectional typing is, how the design recipe works, and how the pieces fit historically. I'd send it to peer review without hesitation.\n\nWhat it does well: the exposition of the Pfenning recipe is clearer than the original, and the criteria (mode-correctness, annotatability, size, annotation character) give language designers a useful yardstick. The formal bits are real: annotatability is proved by induction, principal synthesis is defined precisely, and the backwards bidirectional system of Zeilberger is presented with a substitution theorem. The citation pattern is honest—the recipe is attributed to Pfenning, and related work like Pierce-Turner, Peyton Jones et al., and Zeilberger is given credit. I also appreciate the historical notes on Reynolds and the notation table.\n\nWhere it gets soft: the abstract says bidirectional typing improves error locality, but Section 3.4 explicitly says there are no empirical studies. That's an overclaim and should be softened. The bigger conceptual claim, in Section 8.4, is that bidirectional typing is not a manifestation of polarized logic. That argument rests on an informal 'undeniably bidirectional' classification of Odersky, Chlipala, and Zeilberger's systems. No formal criterion is given, and as the stress-test note points out, at least Zeilberger's stuff lives inside MLL, which is the canonical polarized setting. I don't think this sinks the paper—the authors themselves say in the conclusion that the actual relationship is not yet understood—but the Section 8.4 rhetoric goes beyond the evidence. Either provide a checkable criterion or present the claim as an open question.\n\nAll in all: sound, useful, honest in its limitations. The weak spots are interpretive overreach, not technical errors. The paper will be read by language designers and type theorists, and it deserves a serious referee. I'd recommend minor revisions, not rejection.","headline":"A thorough, well-organized survey that will become a standard reference for bidirectional typing; the formal additions are modest and the abstract overclaims error locality, but it deserves serious refereeing.","tokens_in":34979,"tokens_out":2264,"would_cite":true,"duration_ms":20934,"reading_group":"yes","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":["68N18","03B40"],"pacs":[],"model":"deepseek-v4-flash","headline":"Bidirectional typing—alternating checking and synthesis—is a broadly applicable design method that lets languages support undecidable inference features while keeping annotations light.","keywords":["bidirectional typing","type checking","type synthesis","type inference","mode-correctness","Pfenning recipe","higher-rank polymorphism","information flow"],"falsifier":"A concrete counterexample would settle the thesis: a type system that the community regards as bidirectional but that uses only one judgment (or no mode-switch rule), or a polarized type theory that provably does not admit the two-judgment checking/synthesis structure. A sharper, more quantitative test is to prove whether every system meeting the two-judgment-plus-mode-switch definition is decidable; exhibiting one such system that is undecidable, or proving that all are decidable, would confirm or refute the survey's claim that this structure is the source of bidirectionality's practical power.","tokens_in":34049,"feed_emoji":"🔄","tokens_out":7172,"duration_ms":61903,"temperature":0.7,"pith_summary":"Bidirectional typing alternates between type checking, where the type is a known input, and type synthesis, where the type is produced as output. This survey argues that the combination is a broadly applicable design method: checking lets a language support features such as dependent types, refinement types, and higher-rank polymorphism even when full inference is undecidable, while synthesis keeps the required annotations light. It distills four design criteria—mode-correctness, completeness (annotatability), rule size, and annotation character—and presents the Pfenning recipe as a reliable starting point for building such systems. It also argues that the essence of bidirectional typing is the management of information flow, not polarized logic, so the technique extends beyond focused proof calculi. A sympathetic reader should come away with a practical recipe and a research agenda, not just a catalogue.","feed_headline":"Bidirectional typing's essence is information flow, not polarized logic","feed_subtitle":"Alternating checking and synthesis lets languages support undecidable features with few annotations.","key_machinery":"The load-bearing mechanism is the pair of typing judgments $\\Gamma \\vdash e \\Leftarrow A$ and $\\Gamma \\vdash e \\Rightarrow A$, together with a direction-switching subsumption rule $\\Gamma \\vdash e \\Rightarrow A$ with $A = B$ yielding $\\Gamma \\vdash e \\Leftarrow B$. The Pfenning recipe is the named design procedure that fixes the directions of every judgment: the principal judgment of an introduction rule checks, the principal judgment of an elimination rule synthesizes, and every other judgment checks whenever its type is already known from the inputs. This produces rules that are mode-correct, keeps the system small, guarantees a subformula property, and locates the need for annotations precisely at boundaries where an introduction form meets an elimination form.","core_discovery":"The central claim is that bidirectional typing is best understood through its judgments: $\\Gamma \\vdash e \\Leftarrow A$ means checking $e$ against a known type $A$, and $\\Gamma \\vdash e \\Rightarrow A$ means synthesizing the type $A$ from $e$. The paper contends that a system built by following the Pfenning recipe—principal judgments of introduction rules check, principal judgments of elimination rules synthesize, and a subsumption rule switches between the two—satisfies the design criteria and, in particular, is always mode-correct and admits a predictable, local annotation discipline. The paper further claims that this is not the only viable structure: backwards bidirectional systems, in which the directions are reversed, and mixed-direction types, in which modes are tracked inside the type syntax, are also genuinely bidirectional. From these examples it concludes that bidirectionality does not arise from polarized logic or focusing, but from the deliberate choice of where type information flows.","pith_inferences":["If information-flow structure is the true essence, then a formal mode calculus describing such flows could unify the surveyed systems and predict when a new two-judgment design will be decidable; the survey itself leaves this as an informal observation.","The recipe's correction about variable-binding eliminations suggests a testable conjecture: the annotations required by a bidirectional system are exactly those placed at boundaries where a commuting conversion would otherwise be needed, which could be checked against the surveyed counterexamples.","Applying the same two-judgment design to program synthesis (where the term is the output) parallels the survey's mode analysis and could yield a symmetric theory of annotation-light synthesis, a direction the paper only touches on."],"forward_implications":["A designer who follows the recipe gets a directly implementable type system: mode-correctness fixes a strategy, and syntax-directed rules avoid backtracking.","Features whose inference is undecidable—dependent types, refinement types, higher-rank polymorphism—become decidable to check, at the cost of annotations whose placement is locally determined.","The subformula property confines risky connectives (unknown types in gradual typing, evaluation-order connectives) to places the programmer explicitly requests.","The classification of backwards and mixed-direction systems as bidirectional reframes the design space: the field is defined by information-flow structure, not by adherence to the recipe or by polarization.","Proofs of annotatability become a routine induction over type-assignment derivations, with the only nontrivial case being the conversion of a checking derivation into a synthesizing one by adding an annotation."],"supporting_citations":[{"why":"Supplies the logic-programming notion of modes used to define mode-correctness, the first design criterion.","marker":"Warren [1977]"},{"why":"First widely cited bidirectional system; its local type inference defines the problem and motivates the annotation-character criteria.","marker":"Pierce and Turner [2000]"},{"why":"Origin of the Pfenning recipe, the central constructive method the survey explains and assesses.","marker":"Dunfield and Pfenning [2004]"},{"why":"Baseline for principal-type let-polymorphism that bidirectional typing extends toward higher-rank and impredicative features.","marker":"Damas and Milner [1982]"},{"why":"Early dependent-type checking algorithm that already combines checking and synthesis with convertibility, grounding the 'prehistoric' continuity claim.","marker":"Coquand [1996]"},{"why":"Pre-canonical and pre-atomic judgments instantiate checking and synthesis in a linear spine calculus, linking bidirectionality to verifications and uses.","marker":"Cervesato and Pfenning [2003]"},{"why":"Exhibits a fully reversed or 'backwards' bidirectional system, used as evidence that information-flow structure, not polarization, is the essence.","marker":"Zeilberger [2015]"},{"why":"Call-by-push-value is the polarized type theory that fits neatly with bidirectional typing yet is argued to be distinct from it.","marker":"Levy [2001]"}],"fun_headline_variants":["Bidirectional typing: it's about flow, not logic","Check and synthesize: bidirectional typing's core","Why bidirectional typing isn't polarized logic","Typing's two-way street: checking and synthesis","Bidirectional typing: where type info flows"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The survey's boundary and its main conceptual conclusion rest on an informal definition of bidirectionality as any system with two judgment forms, one checking and one synthesizing, linked by a mode-switch rule; if that definition is too broad or too narrow, the claim that polarized logic is not the essence collapses with it.","fun_headline_variants_meta":{"raw":{"variants":["Bidirectional typing: it's about flow, not logic","Check and synthesize: bidirectional typing's core","Why bidirectional typing isn't polarized logic","Typing's two-way street: checking and synthesis","Bidirectional typing: where type info flows"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000176,"raw_usage":{"total_tokens":1221,"prompt_tokens":810,"completion_tokens":411,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":426,"completion_tokens_details":{"reasoning_tokens":341}},"tokens_in":426,"tokens_out":411,"duration_ms":4233,"temperature":1.0,"reasoning_tokens":341,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-14T13:03:33.015971+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"A concrete counterexample would settle the thesis: a type system that the community regards as bidirectional but that uses only one judgment (or no mode-switch rule), or a polarized type theory that provably does not admit the two-judgment checking/synthesis structure. A sharper, more quantitative test is to prove whether every system meeting the two-judgment-plus-mode-switch definition is decidable; exhibiting one such system that is undecidable, or proving that all are decidable, would confirm or refute the survey's claim that this structure is the source of bidirectionality's practical power.","supporting_citations":[],"review_version":1}