LEGO: Synthesizing IoT Device Components Based on Static Analysis and Large Language Models
Liwei Liu, Tao Wang, Wei Chen, Jun Wei, Wei Wang, Guoquan Wu
Abstract
IoT device components---digital representations of IoT devices within a platform and typically developed using Software Development Kits (SDKs)---are essential for ensuring seamless connectivity between IoT platforms and physical devices. However, developing these components demands extensive domain knowledge, as developers must understand the necessary elements of an IoT device and effectively utilize SDKs. Unfortunately, limited research has focused on automating this process, resulting in labor-intensive, time-consuming development. To tackle these challenges, we introduce LEGO, a method for synthesizing IoT device components based on the observation that APIs provided by device SDKs would eventually call network protocol methods to access physical devices. LEGO analyzes the SDK source code to identify candidate APIs that communicate with physical devices. Using static analysis, it generates a dataflow-enhanced call graph, extracts call paths containing network protocol methods, and heuristically identifies APIs that invoke these methods. To efficiently classify each API type and infer relevant device properties, LEGO employs a large language model-based program comprehension technique with an information-augmented prompt. LEGO then synthesizes device components using a platform-specific template, built from a common IoT device component model. It assembles IoT device components by populating the template with inferred properties and identified APIs, enabling developers to efficiently develop device components with minimal SDK knowledge. Comprehensive experiments on a set of open-source device SDKs and ten real-world IoT devices demonstrate the efficiency and effectiveness of LEGO in creating IoT device components.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get ebd6ce97-2c6e-41dc-b75f-916c5d05412dRelated papers
- LEGO: Empowering Chip-Level Functionality Plug-and-Play for Next-Generation IoT DevicesChong Zhang, Songfan Li, Yihang Song, Qianhe Meng et al.ASPLOS 2023 · 8 citations
- AutoIOT: LLM-Driven Automated Natural Language Programming for AIoT ApplicationsLeming Shen, Qiang Yang, Yuanqing Zheng, Mo LiMobiCom 2025 · 14 citations
- LEGO: Latent Execution-Guided Reasoning for Multi-Hop Question Answering on Knowledge GraphsHongyu Ren, Hanjun Dai, Bo Dai, Xinyun Chen et al.ICML 2021 · 94 citations
- LearnIoTVR: An End-to-End Virtual Reality Environment Providing Authentic Learning Experiences for Internet of ThingsZhengzhe Zhu, Ziyi Liu, Youyou Zhang, Lijun Zhu et al.CHI 2023 · 30 citations
- P-Verifier: Understanding and Mitigating Security Risks in Cloud-based IoT Access PoliciesZe Jin, Luyi Xing, Yiwei Fang, Yan Jia et al.CCS 2022 · 19 citations
