An ANTLR-Based Approach to Compiling the Programing Language of Insect Intelligent Building
Wenjie Chen, Qiliang Yang, Jianchun Xing, Shuo Zhao, Guangtong Xue, Song Wang · 2019
I2B(Insect Intelligent Building) platform is a new type of building intelligent system. Lattice is a specialized programming language for I2B application development that we proposed earlier. Unfortunately, compiling Lattice codes into target codes running on the I2B hardware platform is still an unsolved problem. This paper proposes a compilation framework for Lattice. The entire compilation process is divided into multiple levels, and each level performs a specific translation work. We design key compiling algorithms for special language elements in Lattice, i.e., neighborhood interactive variables and higher-order operators. We conduct an experiment using a network summation case program in I2B. The experimental result shows our proposed compilation approach is effective.