К критериям оценки безопасности нулевых ссылок при инициализации объекта
https://doi.org/10.18255/1818-1015-2017-6-718-729
Аннотация
Разыменование нулевого указателя остаётся одной из основных проблем в современных объектно-ориентированных языках. Очевидное добавление ключевых слов, чтобы различать всегда ненулевые и возможно нулевые ссылки, оказывается недостаточным во время инициализации объекта, когда некоторые поля, объявленные всегда ненулевыми, могут временно быть нулевыми до окончания инициализации. Данная работа устанавливает ключевые причины проблемы инициализации объектов. Она предлагает сценарии и метрики в качестве эталонных тестов для сравнения решений этой проблемы. Наконец, она демонстрирует применение этих тестов к предложенному решению инициализации объектов в Eiffel. Статья публикуется в авторской редакции.
разыменование нулевого указателя; безопасность нулевых ссылок; безопасность пустых ссылок; инициализация объектов; статический анализ; эталонные тесты безопасности нулевых ссылок
Об авторе
Александр Валентинович КогтенковРоссия
кандидат наук (Doctor of Sciences ETH Zurich), Независимый ученый, г. Подольск
Список литературы
1. F¨ahndrich Manuel, Leino K. Rustan M., “Declaring and Checking Non-null Types in an Object-oriented Language”, Proceedings of the 18th Annual ACM SIGPLAN Conference on Object-oriented Programing, Systems, Languages, and Applications, OOPSLA ’03, ACM, New York, NY, USA, 2003, 302–312, http://doi.acm.org/10.1145/949305. 949332.
2. F¨ahndrich Manuel, Xia Songtao, “Establishing Object Invariants with Delayed Types”, Proceedings of the 22nd Annual ACM SIGPLAN Conference on Object-oriented Programming Systems and Applications, OOPSLA ’07, ACM, New York, NY, USA, 2007, 337–350, http://doi.acm.org/10.1145/1297027.1297052.
3. Gamma Erich, Helm Richard, Johnson Ralph, Vlissides John, Design Patterns: Elements of Reusable Object-oriented Software, Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1995.
4. JetBrains, Kotlin Language Specification, https://jetbrains.github.io/kotlin-spec/kotlin-spec.pdf, visited on 2017-01-31.
5. Kogtenkov A. V., “Mechanically Proved Practical Local Null Safety”, Proceedings of the Institute for System Programming of the RAS, 28:5 (2016), 27–54, DOI:10.15514/ISPRAS-2016-28(5)-2.
6. Bertrand Meyer, Targeted expressions: safe object creation with void safety, 2017, http://se.ethz.ch/ meyer/publications/online/targeted.pdf, visited on 2017-05-08.
7. Qi Xin, Myers Andrew C., “Masked Types for Sound Object Initialization”, Proceedings of the 36th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’09, ACM, New York, NY, USA, 2009, 53–65, http://doi.acm.org/10.1145/1480881.1480890.
8. Spoto Fausto, “Precise null-pointer analysis”, Software & Systems Modeling, 10:2 (2011), 219–252, http://dx.doi.org/10.1007/s10270-009-0132-5.
9. Summers Alexander J., M¨uller Peter, “Freedom Before Commitment: A Lightweight Type System for Object Initialisation”, Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA ’11, ACM, New York, NY, USA, 2011, 1013–1032, http://doi.acm.org/10.1145/2048066.2048142.
10. Kogtenkov Alexander, “Practical Void Safety”, Verified Software. Theories, Tools, and Experiments, 2017, http://dx.doi.org/10.1007/978-3-319-72308-2_9.
Рецензия
Для цитирования:
Когтенков А.В. К критериям оценки безопасности нулевых ссылок при инициализации объекта. Моделирование и анализ информационных систем. 2017;24(6):718-729. https://doi.org/10.18255/1818-1015-2017-6-718-729
For citation:
Kogtenkov A.V. Towards Null Safety Benchmarks for Object Initialization. Modeling and Analysis of Information Systems. 2017;24(6):718-729. https://doi.org/10.18255/1818-1015-2017-6-718-729