收藏切换
Ionia: A Typed Learning Framework and Code Generation Tool Based on Coq
收藏切换
Xiaoli Zhang1, Gang Chen1, *, Yingying Ma2, Ping Hu3
Journal of Computer Research and Development | 2025, 62(10) : 2635 - 2650
Less
收藏切换
Journal of Computer Research and Development | 2025, 62(10): 2635-2650
• Software Technology •
Ionia: A Typed Learning Framework and Code Generation Tool Based on Coq
Full
Xiaoli Zhang1, Gang Chen1, *, Yingying Ma2, Ping Hu3
Affiliations
  • 1College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 211106
  • 2Haiguang Information Technology Co. Ltd., Suzhou, Jiangsu 215028
  • 3Shanghai Biren Technology Co. Ltd., Shanghai 201114
  • born in 1998. Master. Student member of CCF. Her main research interests include formal methods, Coq, and AI compiler

    born in 1958. PhD, professor, PhD supervisor. His main research interests include programming language design, higher order theorem proving, and AI compiler

    born in 1997. Master. Her main research interests include formal engineering mathematics, functional language, and Coq

    born in 1965. PhD, Chief Software Engineer. Her main research interests include type theory, compiler optimization, and high performance computing

About Author:

born in 1998. Master. Student member of CCF. Her main research interests include formal methods, Coq, and AI compiler

born in 1958. PhD, professor, PhD supervisor. His main research interests include programming language design, higher order theorem proving, and AI compiler

born in 1997. Master. Her main research interests include formal engineering mathematics, functional language, and Coq

born in 1965. PhD, Chief Software Engineer. Her main research interests include type theory, compiler optimization, and high performance computing

Published: 2025-10-01 doi: 10.7544/issn1000-1239.202440672
Outline
收藏切换

As the scale of AI grows rapidly, errors in deep learning applications are also increasing. Existing popular deep learning frameworks are mostly built on the dynamical-typed language Python, which lacks type checking mechanisms. This leads to many errors that cannot be eliminated through type checking at the compilation stage. We propose a strongly-typed functional programming style deep learning framework based on the theorem prover Coq. The framework features typed tensor structures and a powerful static type checking capability. The experimental results demonstrate that the framework can automatically, quickly, and effectively detect shape mismatch errors in deep learning models, and it has greater advantages in terms of speed and detection capability compared with other checking tools. Furthermore, we design and implement a set of rewriting rules that translate functional programming models into C code, realizing the translation from functional neural network operator expressions to multi-core parallel OpenMP C code. According to the results of multiple sets of experiments, the C code for operators generated by this method is on par with manually written code. Furthermore, the speed of the generated neural network operator C code with multi-core parallel optimization is improved by 4−10 times compared with the sequentially executed operator C code. Additionally, the generated C operators are highly secure and can effectively avoid common issues such as out-of-bounds indexing and memory allocation errors in manually written code.

deep learning (DL) framework  /  static analysis  /  type system  /  shape error checking  /  Coq  /  multi-core parallel code generation
张晓丽, 陈钢, 麻莹莹, 胡萍. Ionia:基于Coq的带类型学习框架及代码生成工具. 计算机研究与发展, 2025 , 62 (10) : 2635 -2650 . DOI: 10.7544/issn1000-1239.202440672
Xiaoli Zhang, Gang Chen, Yingying Ma, Ping Hu. Ionia: A Typed Learning Framework and Code Generation Tool Based on Coq[J]. Journal of Computer Research and Development, 2025 , 62 (10) : 2635 -2650 . DOI: 10.7544/issn1000-1239.202440672
Year 2025 volume 62 Issue 10
95
43
Cite this Article
BibTeX
Article Info
doi: 10.7544/issn1000-1239.202440672
  • Receive Date:2024-08-13
  • Online Date:2026-11-10
  • Published:2025-10-01
Article Data
Affiliations
History
  • Received:2024-08-13
  • Revised:2025-01-23
  • Accepted:2025-03-03
Affiliations
    1College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 211106
    2Haiguang Information Technology Co. Ltd., Suzhou, Jiangsu 215028
    3Shanghai Biren Technology Co. Ltd., Shanghai 201114
References
Share
https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/10.7544/issn1000-1239.202440672
Share to
QR

Scan QR to access full text

Cite this article
BibTeX
Citations
表12种不同金属材料的力学参数
科
Family
属数
Number of
genus
种数
Number of
species
占总种数比例
Percentage of
total species (%)
属
Genus
种数
Number of
species
占总种数比例
Percentage of total
species (%)
鹅膏菌科Amanitaceae 2 11 5.26 鹅膏菌属 Amanita 10 4.78
小菇科 Mycenaceae 2 12 5.74 丝盖伞属 Inocybe 5 2.39
多孔菌科 Polyporaceae 8 14 6.70 蜡蘑属 Laccaria 5 2.39
红菇科 Russulaceae 3 23 11.00 小皮伞属 Marasmius 6 2.87
小菇属 Mycena 11 5.26
光柄菇属 Pluteus 5 2.39
红菇属 Russula 17 8.13
栓菌属 Trametes 5 2.39
关闭全屏
  • BibTeX
  • EndNote
  • RefWorks
  • TxT