Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
139 tokens/sec
GPT-4o
47 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

AlloyASG: Alloy Predicate Code Representation as a Compact Structurally Balanced Graph (2403.00170v4)

Published 29 Feb 2024 in cs.SE and cs.PL

Abstract: Writing declarative models has numerous benefits, ranging from automated reasoning and correction of design-level properties before systems are built to automated testing and debugging of their implementations after they are built. Unfortunately, the model itself needs to be correct to gain these benefits. Alloy is a commonly used modeling language that has several existing efforts to repair faulty models automatically. Currently, these efforts are search-based methods that use an Abstract Syntax Tree (AST) representation of the model and do not scale. One issue is that ASTs themselves suffer from exponential growth in their data size due to the limitation that ASTs will often have identical nodes separately listed in the tree. To address this issue, we introduce a novel code representation schema, Complex Structurally Balanced Abstract Semantic Graph (CSBASG), which represents code as a complex-weighted directed graph that lists a semantic element as a node in the graph and ensures its structural balance for almost finitely enumerable code segments. We evaluate the efficiency of our CSBASG representation for Alloy models in terms of it's compactness compared to ASTs, and we explore if a CSBASG can ease the process of comparing two Alloy predicates. Moreover, with this representation in place, we identify several future applications of CSBASG, including Alloy code generation and automated repair.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (42)
  1. Behcet Acikmese “Spectrum of Laplacians for Graphs with Self-Loops”, 2015 arXiv:1505.08133 [math.OC]
  2. “Towards a Formal Foundation of Web Security” In 2010 23rd IEEE Computer Security Foundations Symposium, 2010, pp. 290–304
  3. “Adversarial Patch Generation for Automatic Program Repair” In ArXiv abs/2012.11060, 2020 URL: https://api.semanticscholar.org/CorpusID:260510563
  4. Uri Alon, Omer Levy and Eran Yahav “code2seq: Generating Sequences from Structured Representations of Code” In International Conference on Learning Representations, 2019 URL: https://openreview.net/forum?id=H1gKYo09tX
  5. “A formal approach for detection of security flaws in the Android permission system” In Formal Asp. Comput., 2018
  6. “Clone detection using abstract syntax trees” In Proceedings. International Conference on Software Maintenance (Cat. No. 98CB36272), 1998, pp. 368–377 DOI: 10.1109/ICSM.1998.738528
  7. Jorge Cerqueira, Alcino Cunha and Nuno Macedo “Timely Specification Repair for Alloy 6” In Software Engineering and Formal Methods: 20th International Conference, SEFM 2022, Berlin, Germany, September 26–30, 2022, Proceedings Berlin, Germany: Springer-Verlag, 2022, pp. 288–303 DOI: 10.1007/978-3-031-17108-6˙18
  8. Nathan Chong, Tyler Sorensen and John Wickerson “The Semantics of Transactions and Weak Memory in x86, Power, ARM, and C++” In SIGPLAN Not. 53.4, 2018, pp. 211–225
  9. Edward B. Duffy and Brian A. Malloy “Design and Implementation of a Language-Complete C++ Semantic Graph” In Proceedings of the 50th Annual Southeast Regional Conference, ACM-SE ’12 Tuscaloosa, Alabama: Association for Computing Machinery, 2012, pp. 170–175 DOI: 10.1145/2184512.2184552
  10. “TACO: Efficient SAT-Based Bounded Verification Using Symmetry Breaking and Tight Bounds” In TSE, 2013
  11. Hongyang Gao, Zhengyang Wang and Shuiwang Ji “Large-Scale Learnable Graph Convolutional Networks” In CoRR abs/1808.03965, 2018 arXiv: http://arxiv.org/abs/1808.03965
  12. Divya Gopinath, Muhammad Zubair Malik and Sarfraz Khurshid “Specification-Based Program Repair Using SAT” In TACAS, 2011, pp. 173–188
  13. “DeepFix: Fixing Common C Language Errors by Deep Learning” In Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, AAAI’17 San Francisco, California, USA: AAAI Press, 2017, pp. 1345–1351
  14. “Bounded Exhaustive Search of Alloy Specification Repairs” In 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE), 2021, pp. 1135–1147 DOI: 10.1109/ICSE43902.2021.00105
  15. Shan Huang, Xiao Zhou and Sang Chin “Application of Seq2Seq Models on Code Correction” In Frontiers in Artificial Intelligence 4, 2021 DOI: 10.3389/frai.2021.590215
  16. Daniel Jackson “Alloy: A Lightweight Object Modelling Notation” In ACM Trans. Softw. Eng. Methodol. 11.2 New York, NY, USA: Association for Computing Machinery, 2002, pp. 256–290 DOI: 10.1145/505145.505149
  17. “Finding Bugs with a Constraint Solver” In ISSTA, 2000
  18. “Adaptive Graph Convolutional Neural Networks” In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence and Thirtieth Innovative Applications of Artificial Intelligence Conference and Eighth AAAI Symposium on Educational Advances in Artificial Intelligence, AAAI’18/IAAI’18/EAAI’18 New Orleans, Louisiana, USA: AAAI Press, 2018
  19. Fan Long, Peter Amidon and Martin Rinard “Automatic Inference of Code Transforms for Patch Generation” In Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2017 Paderborn, Germany: Association for Computing Machinery, 2017, pp. 727–739 DOI: 10.1145/3106237.3106253
  20. “Automatic Patch Generation by Learning Correct Code” In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’16 St. Petersburg, FL, USA: Association for Computing Machinery, 2016, pp. 298–312 DOI: 10.1145/2837614.2837617
  21. “Sharing and Learning Alloy on the Web”, 2019 arXiv:1907.02275 [cs.CY]
  22. “TestEra: A Novel Framework for Automated Testing of Java Programs” In ASE, 2001
  23. “The Margrave Tool for Firewall Analysis” In LISA, 2010
  24. Mathias Niepert, Mohamed Ahmed and Konstantin Kutzkov “Learning Convolutional Neural Networks for Graphs” In CoRR abs/1605.05273, 2016 arXiv: http://arxiv.org/abs/1605.05273
  25. “Mapping Python Programs to Vectors using Recursive Neural Encodings” In Journal of Educational Data Mining 13.3, 2021 DOI: 10.5281/zenodo.5634224
  26. Ugasini Preetha P, M. Suresh and Ebenezer Bonyah “On the spectrum, energy and Laplacian energy of graphs with self-loops” In Heliyon 9.7, 2023, pp. e17001 DOI: https://doi.org/10.1016/j.heliyon.2023.e17001
  27. “Modeling Relational Data with Graph Convolutional Networks”, 2017 arXiv:1703.06103 [stat.ML]
  28. “An Analysis of the Automatic Bug Fixing Performance of ChatGPT” In 2023 IEEE/ACM International Workshop on Automated Program Repair (APR) Los Alamitos, CA, USA: IEEE Computer Society, 2023, pp. 23–30 DOI: 10.1109/APR59189.2023.00012
  29. Caroline Trippel, Daniel Lustig and Margaret Martonosi “Security Verification via Automatic Hardware-Aware Exploit Synthesis: The CheckMate Approach” In IEEE Micro, 2019
  30. “An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation” In ACM Trans. Softw. Eng. Methodol. 28.4 New York, NY, USA: Association for Computing Machinery, 2019 DOI: 10.1145/3340544
  31. “GraphGAN: Graph Representation Learning with Generative Adversarial Nets” arXiv, 2017 DOI: 10.48550/ARXIV.1711.08267
  32. Kaiyuan Wang, Allison Sullivan and Sarfraz Khurshid “Automated Model Repair for Alloy” In Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering, ASE ’18 Montpellier, France: Association for Computing Machinery, 2018, pp. 577–588 DOI: 10.1145/3238147.3238162
  33. “Unified Abstract Syntax Tree Representation Learning for Cross-Language Program Classification” In Proceedings of the 30th IEEE/ACM International Conference on Program Comprehension, ICPC ’22 Virtual Event: Association for Computing Machinery, 2022, pp. 390–400 DOI: 10.1145/3524610.3527915
  34. “Automatically Comparing Memory Consistency Models” In POPL, 2017
  35. Bingting Wu, Bin Liang and Xiaofang Zhang “Turn Tree into Graph: Automatic Code Review via Simplified AST Driven Graph Convolutional Network” In Know.-Based Syst. 252.C NLD: Elsevier Science Publishers B. V., 2022 DOI: 10.1016/j.knosys.2022.109450
  36. “Structural Balance of Complex Weighted Graphs and Multi-Partite Consensus” In IEEE Control Systems Letters 7, 2023, pp. 3801–3806 DOI: 10.1109/LCSYS.2023.3341992
  37. “Structural Balance of Complex Weighted Graphs and Multi-partite Consensus”, 2023 arXiv:2311.04389 [eess.SY]
  38. Geunseok Yang, Kyeongsic Min and Byungjeong Lee “Applying Deep Learning Algorithm to Automatic Bug Localization and Repair” In Proceedings of the 35th Annual ACM Symposium on Applied Computing, SAC ’20 Brno, Czech Republic: Association for Computing Machinery, 2020, pp. 1634–1641 DOI: 10.1145/3341105.3374005
  39. Razieh Nokhbeh Zaeem and Sarfraz Khurshid “Contract-Based Data Structure Repair Using Alloy” In ECOOP, 2010, pp. 577–598
  40. Pamela Zave “How to Make Chord Correct (Using a Stable Base)” In CoRR abs/1502.06461, 2015
  41. “A Novel Neural Source Code Representation Based on Abstract Syntax Tree” In 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE), 2019, pp. 783–794 DOI: 10.1109/ICSE.2019.00086
  42. “ATR: Template-Based Repair for Alloy Specifications” In Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2022 New York, NY, USA: Association for Computing Machinery, 2022, pp. 666–677 DOI: 10.1145/3533767.3534369

Summary

We haven't generated a summary for this paper yet.