Repository navigation
Conversation
Port the core duplicate detection logic from check_duplicate_claims in Python to Flow. The Python original does batch checking with a seen-table; the Flow port provides a single-pair check that can be called in a loop. The batch orchestration stays in Python. Provides: - flowc_is_duplicate_claim: returns 1 if two claims have the same carrier, structure, and fingerprint but different paths, 0 otherwise Test: tests/lang/test_check_duplicates.flow has 7 checks, all pass under FLOW_HOST=python. Covers different claims, true duplicates, same path, different carrier, different structure, different fingerprint, and unparseable paths. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Port the mathematical_case_condition function from Python to Flow. Turns parser conditions into spoken mathematics. Provides: - flowc_mathematical_case_condition: converts conditions like "x == true" to "x holds", "x == false" to "x does not hold", "count == 0" to "count is zero", and falls back to replacing "==" with " equals " for other cases. Case-insensitive matching for true/false, matching the Python re.I behavior. Test: tests/lang/test_math_case_condition.flow has 9 checks, all pass under FLOW_HOST=python. Covers true, false, zero, generic equality, leading/trailing whitespace, spaces around ==, and case-insensitive TRUE. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Port the is_geometry_expr function from Python to Flow. Checks whether an expression contains geometry tokens or prefixes. Provides: - flowc_is_geometry_expr: returns 1 if the expression contains geometry prefixes (angle_, two_right_angles, one_right_angle, half_of_, radius_, triangle_) or exact tokens (triangle_ABC, triangle_DEF, angle_alpha, angle_beta, angle_gamma, etc.) with proper word boundary checking Test: tests/lang/test_is_geometry_expr.flow has 11 checks, all pass under FLOW_HOST=python. Covers all prefix types, exact tokens, negative cases, and word boundary checking. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Port the claim_path_latex function from Python to Flow. Converts a claim path to LaTeX for PDF rendering. Provides: - flowc_claim_path_latex: parses the path as a claim address and returns the coordinate LaTeX, or escapes underscores in the raw path if it cannot be parsed Test: tests/lang/test_claim_path_latex.flow has 5 checks, all pass under FLOW_HOST=python. Covers valid claim paths, underscore escaping, plain paths, empty strings, and single underscore. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Port the query normalization and module qualification helpers from know.py to Flow. The Python original does filesystem scanning and claim indexing; the Flow port exposes the pure string helpers. Provides: - flowc_normalize_query: strip "verify.", "examples.verify.", or "lib.verify." prefixes and trim whitespace - flowc_package_prefix: extract package prefix from a module path, dropping segments that contain "/" (Claim Path artifacts) - flowc_qualify: qualify a claim path with a module prefix Test: tests/lang/test_know.flow has 12 checks, all pass under FLOW_HOST=python. Covers all three prefix strippings, whitespace trimming, no-prefix passthrough, slash segment dropping, empty module, and qualification with cleaned prefixes. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Port the ordering_hover function from lsp_ordering.py to Flow. Returns hover documentation for ordering keywords. Provides: - flowc_ordering_hover: returns hover text for sort, sortBy, asc, desc, unique, entropy, and order keywords. Returns empty string for unknown keywords. The Python original uses em dashes in the hover text; the Flow port uses hyphens to stay within ASCII. Completion items with snippet interpolation stay in Python. Test: tests/lang/test_lsp_ordering.flow has 9 checks, all pass under FLOW_HOST=python. Covers all seven known keywords and the unknown keyword case. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Port the type size lookup and statement cost model from wcet_analysis.py to Flow. The Python original parses the AST and collects function info; the Flow port exposes the pure lookups. Provides: - flowc_type_size: estimate the size of a Flow type in bytes. Covers all primitive types (i8 through i128, f32/f64, c64/c128, bool, ptr, string) and defaults to 16 for unknown structs. Pointer prefixes (ptr_, Ptr_) return 8. - flowc_stmt_cost: abstract instruction count for statement kinds (assignment=2, if=3, for/while=5, return=2, call=10, declare=1, default=1) - FLOWC_DEFAULT_LOOP_BOUND: conservative default of 1000 Test: tests/lang/test_wcet.flow has 21 checks, all pass under FLOW_HOST=python. Covers all primitive type sizes, pointer prefixes, struct default, all statement cost kinds, default cost, and the loop bound constant. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Port the node kind classification and DOT escaping helpers from proof_kernel.py to Flow. The Python original builds full proof kernels and writes JSON/plots; the Flow port exposes the pure helpers. Provides: - flowc_node_kind: classify a proof step's English text into a kernel node kind (conclude, deduce, case, invoke, bind, frame, step). Case-insensitive matching. - flowc_escape_dot: escape backslashes and double quotes for DOT graph format Test: tests/lang/test_proof_kernel.flow has 17 checks, all pass under FLOW_HOST=python. Covers all node kinds (conclude, deduce, case, invoke, bind, frame, step), case insensitivity, and DOT escaping (backslash, quotes, plain text, empty). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Port the dynamics_hover function from lsp_dynamics.py to Flow. Returns hover documentation for dynamics DSL keywords, with namespaced form support (dyn.dsys resolves to dsys). Provides: - flowc_dynamics_hover: returns hover text for 18 dynamics DSL keywords (dsys, horizon, sense, ga, closed, analyze, wfc, dynamics, dyn, controllable, spectral, gramian, stable, energy, population, generations, mutation, discrete, continuous). Handles namespaced forms by checking the last segment after ".". Returns empty string for unknown keywords. The Python original uses em dashes; the Flow port uses hyphens. Completion items stay in Python. Test: tests/lang/test_lsp_dynamics.flow has 11 checks, all pass under FLOW_HOST=python. Covers direct lookups, namespaced resolution (dyn.dsys, dynamics.horizon), and unknown keywords. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Compiler improvement from self-hosted rebuild: - cgen: handle array<T,N> in struct fields, emitting T fieldname[N] instead of a bare pointer. Also handle array<T,N> in generic type contexts as T*. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
compiler/src/cgen.flow: - Handle array<T,N> in struct field emission: T fieldname[N]. - Handle array<T,N> in generic type context: emit T* (struct fields and top-level lets handle the [N] suffix separately). - Add <complex.h> and typedef c64/c128 to the preamble. compiler/src/math_prose.flow: - Add forward declaration for flowc_replace_eq. compiler/src/lsp_dynamics.flow: - Add forward declaration for flowc_dynamics_hover_direct. Fixes 6 modules with "unknown type name 'array'" and 1 with "unknown type name 'c64'" in the stdlib scan. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
array<T,N>in struct field emission:T fieldname[N].array<T,N>in generic type context: emitT*.<complex.h>and typedefc64/c128to the C generator preamble.flowc_replace_eqandflowc_dynamics_hover_direct.know.pyhelpers toknow.flow.ordering_hovertolsp_ordering.flow.wcet_analysis.pyhelpers towcet.flow.proof_kernel.pyhelpers toproof_kernel.flow.dynamics_hovertolsp_dynamics.flow.is_duplicate_claimtoclaim_path.flow.mathematical_case_condition,is_geometry_expr,claim_path_latextomath_prose.flow.Test plan
This pull request includes code written with the assistance of AI.
The code has not yet been reviewed by a human.
Generated with Devin