A Language-based Approach to Macroprogramming for IoT Systems through Large Language Models

Large language models (LLMs) have transformed software engineering, particularly in code generation, where they assist developers in writing functions or entire programs. However, code generation remains challenging when the target domain is complex, as is the case with Internet of Things (IoT) systems. The challenge lies in capturing the entire system behavior within a single specification. developers often model only a subset of the system’s functionality, focusing primarily on individual device behavior or data processing aspects, which may not address the core challenges of IoT, such as large-scale distributed coordination and emergent behavior. To address this, macroprogramming paradigms have been proposed as a means to specify the collective behavior of IoT systems more holistically. Among these approaches, aggregate computing stands out for its ability to express system-wide properties through a top-down, global-to-local perspective. Despite its potential, the adoption of aggregate computing remains limited due to the complexity of writing and maintaining such programs. To overcome these barriers, we propose a language-based approach based on macroprogramming that leverages LLMs for IoT code generation. Specifically, we employ the in-context learning capabilities of LLMs, guiding them to generate code based on an aggregate computing abstraction. This creates code that reflects system-wide properties and frees programmers from writing low-level code by letting them specify desired global properties in natural language. The LLM then translates these specifications into executable code, thus facilitating the development of collective intelligence applications in IoT systems.

Authors

Institutions

Publication Details

Journal
ACM Transactions on Internet of Things
Published
2025-08-05
DOI
https://doi.org/10.1145/3758326
Citations
1
Primary Topic
Modular Robots and Swarm Intelligence
Type
article
Field-Weighted Citation Impact
0.71
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Language-based Approach to Macroprogramming for IoT Systems through Large Language Models

Mirko Viroli, Gianluca Aguzzi, Nicolas Farabegoli
1 citations
ACM Transactions on Internet of Things
Modular Robots and Swarm Intelligence
0.71
article

A Language-based Approach to Macroprogramming for IoT Systems through Large Language Models

Mirko Viroli, Gianluca Aguzzi, Nicolas Farabegoli
article en
1 citations

Abstract

Large language models (LLMs) have transformed software engineering, particularly in code generation, where they assist developers in writing functions or entire programs. However, code generation remains challenging when the target domain is complex, as is the case with Internet of Things (IoT) systems. The challenge lies in capturing the entire system behavior within a single specification. developers often model only a subset of the system’s functionality, focusing primarily on individual device behavior or data processing aspects, which may not address the core challenges of IoT, such as large-scale distributed coordination and emergent behavior. To address this, macroprogramming paradigms have been proposed as a means to specify the collective behavior of IoT systems more holistically. Among these approaches, aggregate computing stands out for its ability to express system-wide properties through a top-down, global-to-local perspective. Despite its potential, the adoption of aggregate computing remains limited due to the complexity of writing and maintaining such programs. To overcome these barriers, we propose a language-based approach based on macroprogramming that leverages LLMs for IoT code generation. Specifically, we employ the in-context learning capabilities of LLMs, guiding them to generate code based on an aggregate computing abstraction. This creates code that reflects system-wide properties and frees programmers from writing low-level code by letting them specify desired global properties in natural language. The LLM then translates these specifications into executable code, thus facilitating the development of collective intelligence applications in IoT systems.

ACM Transactions on Internet of ThingsVol. 6(4)
GNA University (IN), Azienda-Unita' Sanitaria Locale Di Cesena (IT), University of Bologna (IT)
Openalex Percentile: Top 29%
Modular Robots and Swarm Intelligence
0.71
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

A Language-based Approach to Macroprogramming for IoT Systems through Large Language Models — Mirko Viroli, Gianluca Aguzzi, et al. · ACM Transactions on Internet of Things (2025) | TGRS Research Map | TGRS