SearcharxivSearch

arXiv subjects

Pengxiang Huang

Publications and source records attributed to Pengxiang Huang.

3 recordsLinked to original sources

Non-Blocking Fault Current Limiting Control of Half-Bridge MMCs for MTDC Transmission

A key protection requirement in multiterminal HVDC (MTDC) transmission systems is to selectively isolate faulted areas using DC circuit breakers (DCCBs) during DC faults while keeping the rest of the systems in operation. However, in MTDC systems using half-bridge modular multilevel converters (HB-MMCs), the lack of inherent fault current suppression capability in HB-MMCs can cause converter blocking before fault clearance by DCCBs. This work presents an active fault current limiting (AFCL) control strategy for HB-MMCs to mitigate DC fault currents, thus avoiding converter blocking and reducing the breaking capability required of DCCBs. In addition, a systematic approach is proposed to design the AFCL control strategy under converter and network stability constraints. The effectiveness of the proposed strategy is demonstrated through PSCAD on two typical MTDC systems during DC faults.

eess.SY

Raw Pointer Rewriting with LLMs for Translating C to Safer Rust

There has been a growing interest in translating C code to Rust due to Rust's robust memory and thread safety guarantees. Tools such as C2RUST enable syntax-guided transpilation from C to semantically equivalent Rust code. However, the resulting Rust programs often rely heavily on unsafe constructs, particularly raw pointers, which undermines Rust's safety guarantees. This paper aims to improve the memory safety of Rust programs generated by C2RUST by eliminating raw pointers. Specifically, we propose a raw pointer rewriting technique that lifts raw pointers in individual functions to appropriate Rust data structures. Technically, PR2 employs decision-tree-based prompting to guide the pointer lifting process. It also leverages code change analysis to guide the repair of errors introduced during rewriting, effectively addressing errors encountered during compilation and test case execution. We implement PR2 and evaluate it using gpt-4o-mini on 28 real-world C projects. It is shown that PR2 successfully eliminates 18.57% of local raw pointers across these projects, significantly enhancing the safety of the translated Rust code. On average, PR2 completes the transformation of a project in 5.02 hours, at a cost of $1.13.

cs.SE

APILOT: Navigating Large Language Models to Generate Secure Code by Sidestepping Outdated API Pitfalls

With the rapid development of large language models (LLMs), their applications have expanded into diverse fields, such as code assistance. However, the substantial size of LLMs makes their training highly resource- and time-intensive, rendering frequent retraining or updates impractical. Consequently, time-sensitive data can become outdated, potentially misleading LLMs in time-aware tasks. For example, new vulnerabilities are discovered in various programs every day. Without updating their knowledge, LLMs may inadvertently generate code that includes these newly discovered vulnerabilities. Current strategies, such as prompt engineering and fine-tuning, do not effectively address this issue. To address this issue, we propose solution, named APILOT, which maintains a realtime, quickly updatable dataset of outdated APIs. Additionally, APILOT utilizes an augmented generation method that leverages this dataset to navigate LLMs in generating secure, version-aware code. We conducted a comprehensive evaluation to measure the effectiveness of APILOT in reducing the incidence of outdated API recommendations across seven different state-of-the-art LLMs. The evaluation results indicate that APILOT can reduce outdated code recommendations by 89.42% on average with limited performance overhead. Interestingly, while enhancing security, APILOT also improves the usability of the code generated by LLMs, showing an average increase of 27.54% in usability. This underscores APILOT's dual capability to enhance both the safety and practical utility of code suggestions in contemporary software development environments.

cs.CR