Implementasi Teori Automata dalam Perancangan Compiler Bahasa Pemrograman Domain-Specific

Authors

  • Bertha Meyke Waty Hutajulu Universitas Indraprasta PGRI
  • Halimatus Sa’diah Universitas Indraprasta PGRI
  • Irnawati Irnawati Universitas Indraprasta PGRI
  • Vici Febriana Universitas Indraprasta PGRI
  • Ruri Angelia Universitas Indraprasta PGRI

DOI:

https://doi.org/10.69693/ijmst.v5i1.14824

Keywords:

Teori Automata, Perancangan Compiler, Bahasa Domain-Specific, Finite Automata, Pushdown Automata

Abstract

Compiler untuk bahasa domain-specific (DSL) pada perangkat Internet of Things (IoT) memerlukan front-end yang benar dan efisien, tetapi hubungan eksplisit antara kelas automata dan setiap tahap kompilasi jarang disertai ukuran kuantitatif. Penelitian ini merancang KodeIn, sebuah DSL untuk mendeklarasikan sensor dan aktuator serta menyatakan kondisi dan pengulangan, beserta prototipe compiler yang memetakan analisis leksikal ke deterministic finite automata (DFA), analisis sintaksis ke pushdown automata (PDA) berbasis tata bahasa LL(1), dan analisis semantik ke tabel simbol yang menegakkan kendala sensitif konteks. Pemindai dibangun dari 32 pola ekspresi reguler dan menghasilkan DFA minimal dengan 67 state, sedangkan parser memuat 21 nonterminal dan 44 produksi tanpa konflik. Delapan kendala semantik, seperti deklarasi sebelum pemakaian dan keunikan pin perangkat, yang berada di luar kemampuan tata bahasa bebas konteks, ditegakkan oleh tabel simbol. Pengujian dengan 50 kasus, terdiri atas 30 program valid dan 20 program salah, menunjukkan seluruh kasus diputuskan dan digolongkan pada tahap yang benar. Lima kesalahan tertahan di pemindai, tujuh di parser, dan delapan pada analisis semantik. Waktu pemindaian dan pengurai tumbuh mendekati linear terhadap jumlah token (eksponen empiris 1,05 dan 1,16), sedangkan parser CYK pembanding tumbuh dengan eksponen 2,41 dan 92 kali lebih lambat pada 132 token. Hasil ini menunjukkan bahwa pemilihan kelas automata yang tepat pada tiap tahap menghasilkan front-end DSL yang cepat, deterministik, dan mudah diverifikasi.

References

1. Aho, A. V., Lam, M. S., Sethi, R., & Ullman, J. D. (2006). Compilers: Principles, techniques, and tools (2nd ed.). Pearson.

2. Anandayuvaraj, D., & Davis, J. C. (2022). Reflecting on recurring failures in IoT development. In Proceedings of the IEEE/ACM International Conference on Automated Software Engineering (ASE) (pp. 1–5). https://doi.org/10.1145/3551349.3559545

3. Attiogbé, C., & Rocheteau, J. (2023). Correctness of IoT-based systems: From a DSL to a mechanized analysis. Journal of Computer Languages, Article 101239. https://doi.org/10.1016/j.cola.2023.101239

4. Baicoianu, A., & Plajer, I. (2023). Considerations on efficient lexical analysis in the context of compiler design. Bulletin of the Transilvania University of Brașov, Series III: Mathematics and Computer Science, 65(2). https://doi.org/10.31926/but.mif.2023.3.65.2.14

5. Bala, M. M., & Bahri, S. (2026). A compiler-based framework for automated numerical method selection via deterministic finite automata. Journal of Computational Innovation and Analytics, 5(2), 1–24. https://doi.org/10.32890/jcia2026.5.2.1

6. Barriga, J. A., Clemente, P. J., Pérez Toledano, M. Á., Jurado Málaga, E., & Hernández, J. (2023). Design, code generation and simulation of IoT environments with mobility devices by using model-driven development: SimulateIoT-Mobile. Pervasive and Mobile Computing, 89, Article 101751. https://doi.org/10.1016/j.pmcj.2023.101751

7. Cooper, K. D., & Torczon, L. (2012). Engineering a compiler (2nd ed.). Morgan Kaufmann. https://doi.org/10.1016/C2009-0-27982-7

8. Cummins, C., Seeker, V., Grubisic, D., Elhoushi, M., Liang, Y., Rozière, B., Gehring, J., Gloeckle, F., Hazelwood, K., Synnaeve, G., & Leather, H. (2023). Large language models for compiler optimization (arXiv:2309.07062). arXiv. https://doi.org/10.48550/arXiv.2309.07062

9. Davis, J. C., Servant, F., & Lee, D. (2021). Using selective memoization to defeat regular expression denial of service (ReDoS). In Proceedings of the IEEE Symposium on Security and Privacy (SP) (pp. 1–17). IEEE. https://doi.org/10.1109/SP40001.2021.00032

10. Earley, J. (1970). An efficient context-free parsing algorithm. Communications of the ACM, 13(2), 94–102. https://doi.org/10.1145/362007.362035

11. Fauziah, F. (2019). Desain mesin compiler untuk penganalisa leksikal, sintaksis, semantik, kode antara dan error handling pada bahasa pemrograman sederhana. Journal of Applied Informatics and Computing, 3(1), 1–7. https://doi.org/10.30871/jaic.v3i1.1153

12. Geng, S., Josifoski, M., Peyrard, M., & West, R. (2023). Grammar-constrained decoding for structured NLP tasks without finetuning. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP) (pp. 10932–10952). Association for Computational Linguistics. https://doi.org/10.18653/v1/2023.emnlp-main.674

13. Hopcroft, J. E., Motwani, R., & Ullman, J. D. (2007). Introduction to automata theory, languages, and computation (3rd ed.). Pearson.

14. Ihirwe, F., Di Ruscio, D., Gianfranceschi, S., & Pierantonio, A. (2024). CHESSIoT: A model-driven approach for engineering multi-layered IoT systems. Journal of Computer Languages, 78, Article 101254. https://doi.org/10.1016/j.cola.2023.101254

15. Khakpour, A., Colomo-Palacios, R., Martini, A., & Sánchez-Gordón, M. (2023). The use of domain-specific languages for visual analytics: A systematic literature review. Technologies, 11(2), Article 37. https://doi.org/10.3390/technologies11020037

16. Kirchhof, J. C., Rumpe, B., Schmalzing, D., & Wortmann, A. (2022). MontiThings: Model-driven development and deployment of reliable IoT applications. Journal of Systems and Software, 183, Article 111087. https://doi.org/10.1016/j.jss.2021.111087

17. Kosar, T., Bohra, S., & Mernik, M. (2016). Domain-specific languages: A systematic mapping study. Information and Software Technology, 71, 77–91. https://doi.org/10.1016/j.infsof.2015.11.001

18. Liu, H., Xu, J., Chen, S., & Guo, T. (2022). Compiler optimization parameter selection method based on ensemble learning. Electronics, 11(15), Article 2452. https://doi.org/10.3390/electronics11152452

19. Lubbers, M., Koopman, P., Ramsingh, A., Singer, J., & Trinder, P. (2023). Could tierless languages reduce IoT development grief? ACM Transactions on Internet of Things, 4(1), 6:1–6:35. https://doi.org/10.1145/3572901

20. Mernik, M., Heering, J., & Sloane, A. M. (2005). When and how to develop domain-specific languages. ACM Computing Surveys, 37(4), 316–344. https://doi.org/10.1145/1118890.1118892

21. Sipser, M. (2012). Introduction to the theory of computation (3rd ed.). Cengage Learning.

22. Thompson, K. (1968). Programming techniques: Regular expression search algorithm. Communications of the ACM, 11(6), 419–422. https://doi.org/10.1145/363347.363387

23. Wang, H., Tang, Z., Zhang, C., Zhao, J., Cummins, C., Leather, H., & Wang, Z. (2022). Automating reinforcement learning architecture design for code optimization. In Proceedings of the 31st ACM SIGPLAN International Conference on Compiler Construction (CC) (pp. 129–143). ACM. https://doi.org/10.1145/3497776.3517769

24. Wąsowski, A., & Berger, T. (2023). Domain-specific languages: Effective modeling, automation, and reuse. Springer. https://doi.org/10.1007/978-3-031-23669-3

25. Younger, D. H. (1967). Recognition and parsing of context-free languages in time n³. Information and Control, 10(2), 189–208. https://doi.org/10.1016/S0019-9958(67)80007-X

Downloads

Published

26-11-2026

How to Cite

Hutajulu, B. M. W., Sa’diah, H., Irnawati, I., Febriana, V., & Angelia, R. (2026). Implementasi Teori Automata dalam Perancangan Compiler Bahasa Pemrograman Domain-Specific. Indonesian Journal of Multidisciplinary on Social and Technology, 5(1), 1997–2007. https://doi.org/10.69693/ijmst.v5i1.14824