AI 中文总结
针对Pharo代码补全引擎的实际限制,提出容错、隐式前缀扩展、分组补全条目和驼峰式匹配四种扩展,阐述实现方式、替代设计及权衡,展示了改进可在保留架构和行为的同时集成到代码补全中。
AI 中文摘要
代码补全是Pharo基于抽象语法树分析、惰性候选生成和基于过滤器的候选选择的上下文感知代码补全引擎。其现有设计虽已提供强大的语义补全,但仍存在一些实际限制。本文提出了四种扩展来解决这些限制:容错、隐式前缀扩展、分组补全条目和驼峰式匹配。针对每种扩展,描述了实现方式,讨论了替代设计并解释了其中的权衡。本文的主要贡献是表明这些改进可以在保留其模块化架构和可预测行为的同时集成到代码补全中。
英文摘要
Complishon is Pharo's context-aware code completion engine, built on AST analysis, lazy candidate generation, and filter-based candidate selection. Its existing design already provides strong semantic completion, but several practical limits remain. Strict prefix matching is sensitive to small typing errors, framework prefixes often force redundant input, large completion menus are difficult to scan, and prefix-only matching does not support common camel-case abbreviations. This paper presents four extensions that address these limits: typo tolerance, implicit prefix expansion, grouped completion entries, and camel-case matching. For each extension, we describe the implementation, discuss alternative designs, and explain the trade-offs involved. The main contribution of the paper is to show that these improvements can be integrated into Complishon while preserving its modular architecture and predictable behavior.