geometor.byrne.pseudocode¶
Formal grammar, AST, and 3-way Rosetta metrics for Oliver Byrne’s 1847 Visual Pseudocode.
Models Oliver Byrne’s 1847 notation (Introduction, pp. ix–xi, xxvii–xxix) as a pointer-free, typed geometric value-token language:
Classical Euclidean Text (Heath / Heiberg): Pass-by-reference. Geometric objects are unnamed in ink; vertices carry alphabetic memory addresses (
A,B,C, …) and prose dereferences composite tuples (line AB,angle BAC,triangle FBC,square ABFG) at every step.Byrne 1847 Visual Pseudocode: Pass-by-value. Every geometric primitive is assigned a perceptual signature
(kind, color, stroke, fill)that appears literally inside vertical symbolic equations (∴,∵,=,+,⊏,⊐,∥,⊥,∷) with marginal axiom/proposition citations.GEOMETOR Formal Pseudocode (elements / model): Typed Constructive DAG. Explicit constructor steps (
line,circle,intersect) and symbolic algebraic invariants over exact number fields.
Attributes¶
Classes¶
Typed geometric primitive sorts in Byrne's 1847 visual grammar. |
|
Stroke patterns used by Byrne to multiply his 4-color register space. |
|
Planar region rendering modes in Chiswick Press woodblock plates. |
|
Canonical block phases in Byrne's structured proposition layout. |
|
An inline pass-by-value geometric glyph in a Byrne statement. |
|
An algebraic, relational, or deductive operator in a Byrne equation. |
|
Minimal connecting English keyword in Byrne's telegraphic equations. |
|
A single structured line in a Byrne visual program. |
|
Complete 3-way Rosetta formalization of a Euclidean proposition. |
|
Static visual register-allocation audit for a |
|
Quantitative comparison across Heath (alphabetic), Byrne (visual), and GEOMETOR (DAG). |
Functions¶
|
Count symbolic letter-pointer dereferences ( |
|
Audit visual register allocation and collision freedom in |
|
Compute quantitative Rosetta comparison metrics for a |
|
Lookup a |
Module Contents¶
- class geometor.byrne.pseudocode.TokenKind¶
Bases:
enum.StrEnumTyped geometric primitive sorts in Byrne’s 1847 visual grammar.
- LINE = 'line'¶
- ANGLE = 'angle'¶
- TRIANGLE = 'tri'¶
- SQUARE = 'sq'¶
- RECTANGLE = 'rect'¶
- ARC = 'arc'¶
- CIRCLE = 'circle'¶
- MAGNITUDE = 'mag'¶
- class geometor.byrne.pseudocode.StrokeMode¶
Bases:
enum.StrEnumStroke patterns used by Byrne to multiply his 4-color register space.
- SOLID = 'solid'¶
- DASHED = 'dashed'¶
- DOTTED = 'dotted'¶
- SOLID_DOTTED = 'solid-dotted'¶
- class geometor.byrne.pseudocode.FillMode¶
Bases:
enum.StrEnumPlanar region rendering modes in Chiswick Press woodblock plates.
- NONE = 'outline'¶
- FILLED = 'filled'¶
- HALF = 'half'¶
- THREE_SIDE = 'three-side'¶
- class geometor.byrne.pseudocode.ProofPhase¶
Bases:
enum.StrEnumCanonical block phases in Byrne’s structured proposition layout.
- ENUNCIATION = 'enunciation'¶
- GIVEN = 'given'¶
- SOUGHT = 'sought'¶
- CONSTRUCTION = 'construction'¶
- DEMONSTRATION = 'demonstration'¶
- QED = 'qed'¶
- class geometor.byrne.pseudocode.VisualToken¶
An inline pass-by-value geometric glyph in a Byrne statement.
Encodes primitive
kind(TokenKind), Byrnecolorexpression,stroke(StrokeMode),fill(FillMode), optional interactivegeom_ref,squaredexponent flag, Book Vshape_hint, and intentional symmetriccongruence_group.- color: str¶
- stroke: StrokeMode¶
- geom_ref: str = ''¶
- squared: bool = False¶
- shape_hint: str = ''¶
- congruence_group: str = ''¶
- property register_signature: tuple[str, str, str, str, str]¶
Perceptual tuple distinguishing this token in visual working memory.
- role_spec_body(plate_id: str = '') str¶
Build the RST role argument string for
:byrne-<kind>:.
- to_rst(plate_id: str = '') str¶
Compile this visual token into a Sphinx
:byrne-*:role.
- to_html(plate_id: str = '') str¶
Render this visual token directly to an interactive HTML/SVG span.
- to_compact() str¶
Return a concise human-readable token representation for CLI/tables.
- class geometor.byrne.pseudocode.OpToken¶
An algebraic, relational, or deductive operator in a Byrne equation.
- symbol: str¶
- to_rst() str¶
- to_html() str¶
- to_compact() str¶
- class geometor.byrne.pseudocode.TextFragment¶
Minimal connecting English keyword in Byrne’s telegraphic equations.
- text: str¶
- to_rst() str¶
- to_compact() str¶
- class geometor.byrne.pseudocode.ByrneStatement¶
A single structured line in a Byrne visual program.
Stores block
phase(ProofPhase), ordereditemsof visual tokens, operators, and minimal connectors, marginal Euclideanjustifications, and an optional analyticalcomment.- phase: ProofPhase¶
- items: tuple[StatementItem, ...]¶
- justifications: tuple[str, ...] = ()¶
- comment: str = ''¶
- visual_tokens() list[VisualToken]¶
Return all
VisualTokeninstances in this statement.
- word_count() int¶
Count natural-language words (excluding pure visual glyphs and operators).
- to_rst(plate_id: str = '') str¶
Compile statement into RST with inline
:byrne-*:and:just:roles.
- to_compact() str¶
Render statement into compact Unicode pseudocode.
- class geometor.byrne.pseudocode.ByrneProgram¶
Complete 3-way Rosetta formalization of a Euclidean proposition.
Pairs Byrne’s 1847 pointer-free visual program with Heath’s classical alphabetic English translation and GEOMETOR’s formal DAG pseudocode.
- prop_id: str¶
- plate_id: str¶
- heath_id: str¶
- g_id: str¶
- title: str¶
- pickering_page: str¶
- number_field: str¶
- statements: tuple[ByrneStatement, ...]¶
- heath_text: str¶
- geometor_steps: tuple[str, ...]¶
- design_notes: str = ''¶
- all_visual_tokens() list[VisualToken]¶
Flatten all visual tokens appearing across all phases of the program.
- class geometor.byrne.pseudocode.RegisterDiagnostic¶
Static visual register-allocation audit for a
ByrneProgram.- distinct_signatures: int¶
- distinct_geom_refs: int¶
- uses_stroke_modulation: bool¶
- uses_composite_tokens: bool¶
- intentional_congruence_twins: tuple[str, ...]¶
- ambiguous_collisions: tuple[str, ...]¶
- property is_unambiguous: bool¶
Return True iff zero unintended visual register collisions exist.
- class geometor.byrne.pseudocode.RosettaMetrics¶
Quantitative comparison across Heath (alphabetic), Byrne (visual), and GEOMETOR (DAG).
- prop_id: str¶
- heath_words: int¶
- heath_pointer_dereferences: int¶
- byrne_words: int¶
- byrne_pointer_dereferences: int¶
- byrne_visual_tokens: int¶
- byrne_distinct_registers: int¶
- byrne_statement_count: int¶
- geometor_step_count: int¶
- word_compression_ratio: float¶
- register_diagnostic: RegisterDiagnostic¶
- geometor.byrne.pseudocode.count_alphabetic_dereferences(text: str) int¶
Count symbolic letter-pointer dereferences (
AB,BCD,point A, …) in classical prose.Excludes Roman numeral proposition references (
I,II,III,IV,V,VI) when preceded byBookorProp.
- geometor.byrne.pseudocode.analyze_visual_registers(program: ByrneProgram) RegisterDiagnostic¶
Audit visual register allocation and collision freedom in
program.Distinguishes:
Stroke modulation (
dashed/dotted/solid-dotted) when 4 colors alone cannot separate adjacent collinear or overlapping elements;Composite tokens (
yellow+blacksplit angles orred/blue/blacktriangles);Intentional congruence twins (e.g. equal legs
/ A B /and/ A C /inI.5deliberately sharingred solidto encodeAB = ACvisually); andAmbiguous collisions (two unequal
geom_refentities sharing an identical register signature without acongruence_groupdeclaration).
- geometor.byrne.pseudocode.compute_rosetta_metrics(program: ByrneProgram) RosettaMetrics¶
Compute quantitative Rosetta comparison metrics for a
ByrneProgram.
- geometor.byrne.pseudocode.ROSETTA_PROGRAMS: dict[str, ByrneProgram]¶
- geometor.byrne.pseudocode.get_rosetta_program(prop_id: str) ByrneProgram¶
Lookup a
ByrneProgramby proposition ID (e.g."I.47").