Automatic inspection of program state in an uncooperative environment

Detalhes bibliográficos
Autor(a) principal: José Wesley de Souza Magalhães
Data de Publicação: 2021
Tipo de documento: Dissertação
Idioma: eng
Título da fonte: Repositório Institucional da UFMG
Texto Completo: http://hdl.handle.net/1843/40072
Resumo: The program state is formed by the values that the program manipulates. These values are stored in the stack, in the heap, or in static memory. The ability to inspect the program state is useful as a debugging or as a verification aid. Yet, there exists no general technique to insert inspection points in type-unsafe languages such as C or C++. The difficulty comes from the need to traverse the memory graph in a so-called uncooperative environment. In this dissertation, we propose an automatic technique to deal with this problem. We introduce a static code transformation approach that inserts in a program the instrumentation necessary to report its internal state. Our technique has been implemented in Low Level Virtual Machine (LLVM). It is possible to adjust the granularity of inspection points trading precision for performance. In this paper, we demonstrate how to use inspection points to debug compiler optimizations; to augment benchmarks with verification code; and to visualize data structures.
id UFMG_12fe0bb20c6342018cebdd7409a24f5a
oai_identifier_str oai:repositorio.ufmg.br:1843/40072
network_acronym_str UFMG
network_name_str Repositório Institucional da UFMG
repository_id_str
spelling Fernando Magno Quintão Pereirahttp://lattes.cnpq.br/4608001746330875Chunhua LiaoRafael Dueire Linshttp://lattes.cnpq.br/5322689552829310José Wesley de Souza Magalhães2022-03-15T01:33:04Z2022-03-15T01:33:04Z2021-10-15http://hdl.handle.net/1843/40072The program state is formed by the values that the program manipulates. These values are stored in the stack, in the heap, or in static memory. The ability to inspect the program state is useful as a debugging or as a verification aid. Yet, there exists no general technique to insert inspection points in type-unsafe languages such as C or C++. The difficulty comes from the need to traverse the memory graph in a so-called uncooperative environment. In this dissertation, we propose an automatic technique to deal with this problem. We introduce a static code transformation approach that inserts in a program the instrumentation necessary to report its internal state. Our technique has been implemented in Low Level Virtual Machine (LLVM). It is possible to adjust the granularity of inspection points trading precision for performance. In this paper, we demonstrate how to use inspection points to debug compiler optimizations; to augment benchmarks with verification code; and to visualize data structures.O estado interno de um programa é formado pelos valores que tal programa manipula. Estes valores são armazenados na pilha de chamadas de funções, na heap, ou em memória estática. A habilidade de inspecionar o estado interno de um programa é útil para propósitos de depuração e verificação. Entretanto, não existe técnica geral para inserir pontos de inspeção em linguagens com um sistema de tipos não seguros, como C ou C++. A dificuldade vem da necessidade de percorrer o grafo de memória em um assim chamado ambiente não cooperativo. Nesta dissertação, uma técnica automática para lidar com esse problema é proposta. Nós introduzimos uma transformação estática de programa para reportar o seu estado interno. Nossa técnica foi implementada utilizando Low Level Virtual Machine (LLVM). É possível ajustar a granularidade dos pontos de inspeção, trocando precisão por desempenho. Nesta dissertação, nós demonstramos como utilizar pontos de inspeção para depurar otimizações de compiladores; para inserir código de verificação em benchmarks; e para visualizar estruturas de dados.CAPES - Coordenação de Aperfeiçoamento de Pessoal de Nível SuperiorengUniversidade Federal de Minas GeraisPrograma de Pós-Graduação em Ciência da ComputaçãoUFMGBrasilICEX - INSTITUTO DE CIÊNCIAS EXATAShttp://creativecommons.org/licenses/by-nd/3.0/pt/info:eu-repo/semantics/openAccessComputação – TesesProgramas de computador – Inspeção – TesesCompiladores (Programas de computador) – TesesInspection pointVerificationProgram stateAutomatic inspection of program state in an uncooperative environmentInspeção automática do estado interno de programas em um ambiente não cooperativoinfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesisreponame:Repositório Institucional da UFMGinstname:Universidade Federal de Minas Gerais (UFMG)instacron:UFMGORIGINALwesley_dissertation.pdfwesley_dissertation.pdfapplication/pdf3041466https://repositorio.ufmg.br/bitstream/1843/40072/4/wesley_dissertation.pdf5e0f2fdfdf7ae86d0698fe10ee3af3b4MD54LICENSElicense.txtlicense.txttext/plain; charset=utf-82118https://repositorio.ufmg.br/bitstream/1843/40072/5/license.txtcda590c95a0b51b4d15f60c9642ca272MD55CC-LICENSElicense_rdflicense_rdfapplication/rdf+xml; charset=utf-8805https://repositorio.ufmg.br/bitstream/1843/40072/2/license_rdf00e5e6a57d5512d202d12cb48704dfd6MD521843/400722022-03-14 22:33:05.062oai:repositorio.ufmg.br:1843/40072TElDRU7Dh0EgREUgRElT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b3NpdGFkYS4KCkNBU08gQSBQVUJMSUNBw4fDg08gT1JBIERFUE9TSVRBREEgVEVOSEEgU0lETyBSRVNVTFRBRE8gREUgVU0gUEFUUk9Dw41OSU8gT1UgQVBPSU8gREUgVU1BIEFHw4pOQ0lBIERFIEZPTUVOVE8gT1UgT1VUUk8gT1JHQU5JU01PLCBWT0PDiiBERUNMQVJBIFFVRSBSRVNQRUlUT1UgVE9ET1MgRSBRVUFJU1FVRVIgRElSRUlUT1MgREUgUkVWSVPDg08gQ09NTyBUQU1Cw4lNIEFTIERFTUFJUyBPQlJJR0HDh8OVRVMgRVhJR0lEQVMgUE9SIENPTlRSQVRPIE9VIEFDT1JETy4KCk8gUmVwb3NpdMOzcmlvIEluc3RpdHVjaW9uYWwgZGEgVUZNRyBzZSBjb21wcm9tZXRlIGEgaWRlbnRpZmljYXIgY2xhcmFtZW50ZSBvIHNldSBub21lKHMpIG91IG8ocykgbm9tZXMocykgZG8ocykgZGV0ZW50b3IoZXMpIGRvcyBkaXJlaXRvcyBhdXRvcmFpcyBkYSBwdWJsaWNhw6fDo28sIGUgbsOjbyBmYXLDoSBxdWFscXVlciBhbHRlcmHDp8OjbywgYWzDqW0gZGFxdWVsYXMgY29uY2VkaWRhcyBwb3IgZXN0YSBsaWNlbsOnYS4KRepositório de PublicaçõesPUBhttps://repositorio.ufmg.br/oaiopendoar:2022-03-15T01:33:05Repositório Institucional da UFMG - Universidade Federal de Minas Gerais (UFMG)false
dc.title.pt_BR.fl_str_mv Automatic inspection of program state in an uncooperative environment
dc.title.alternative.pt_BR.fl_str_mv Inspeção automática do estado interno de programas em um ambiente não cooperativo
title Automatic inspection of program state in an uncooperative environment
spellingShingle Automatic inspection of program state in an uncooperative environment
José Wesley de Souza Magalhães
Inspection point
Verification
Program state
Computação – Teses
Programas de computador – Inspeção – Teses
Compiladores (Programas de computador) – Teses
title_short Automatic inspection of program state in an uncooperative environment
title_full Automatic inspection of program state in an uncooperative environment
title_fullStr Automatic inspection of program state in an uncooperative environment
title_full_unstemmed Automatic inspection of program state in an uncooperative environment
title_sort Automatic inspection of program state in an uncooperative environment
author José Wesley de Souza Magalhães
author_facet José Wesley de Souza Magalhães
author_role author
dc.contributor.advisor1.fl_str_mv Fernando Magno Quintão Pereira
dc.contributor.advisor1Lattes.fl_str_mv http://lattes.cnpq.br/4608001746330875
dc.contributor.referee1.fl_str_mv Chunhua Liao
dc.contributor.referee2.fl_str_mv Rafael Dueire Lins
dc.contributor.authorLattes.fl_str_mv http://lattes.cnpq.br/5322689552829310
dc.contributor.author.fl_str_mv José Wesley de Souza Magalhães
contributor_str_mv Fernando Magno Quintão Pereira
Chunhua Liao
Rafael Dueire Lins
dc.subject.por.fl_str_mv Inspection point
Verification
Program state
topic Inspection point
Verification
Program state
Computação – Teses
Programas de computador – Inspeção – Teses
Compiladores (Programas de computador) – Teses
dc.subject.other.pt_BR.fl_str_mv Computação – Teses
Programas de computador – Inspeção – Teses
Compiladores (Programas de computador) – Teses
description The program state is formed by the values that the program manipulates. These values are stored in the stack, in the heap, or in static memory. The ability to inspect the program state is useful as a debugging or as a verification aid. Yet, there exists no general technique to insert inspection points in type-unsafe languages such as C or C++. The difficulty comes from the need to traverse the memory graph in a so-called uncooperative environment. In this dissertation, we propose an automatic technique to deal with this problem. We introduce a static code transformation approach that inserts in a program the instrumentation necessary to report its internal state. Our technique has been implemented in Low Level Virtual Machine (LLVM). It is possible to adjust the granularity of inspection points trading precision for performance. In this paper, we demonstrate how to use inspection points to debug compiler optimizations; to augment benchmarks with verification code; and to visualize data structures.
publishDate 2021
dc.date.issued.fl_str_mv 2021-10-15
dc.date.accessioned.fl_str_mv 2022-03-15T01:33:04Z
dc.date.available.fl_str_mv 2022-03-15T01:33:04Z
dc.type.status.fl_str_mv info:eu-repo/semantics/publishedVersion
dc.type.driver.fl_str_mv info:eu-repo/semantics/masterThesis
format masterThesis
status_str publishedVersion
dc.identifier.uri.fl_str_mv http://hdl.handle.net/1843/40072
url http://hdl.handle.net/1843/40072
dc.language.iso.fl_str_mv eng
language eng
dc.rights.driver.fl_str_mv http://creativecommons.org/licenses/by-nd/3.0/pt/
info:eu-repo/semantics/openAccess
rights_invalid_str_mv http://creativecommons.org/licenses/by-nd/3.0/pt/
eu_rights_str_mv openAccess
dc.publisher.none.fl_str_mv Universidade Federal de Minas Gerais
dc.publisher.program.fl_str_mv Programa de Pós-Graduação em Ciência da Computação
dc.publisher.initials.fl_str_mv UFMG
dc.publisher.country.fl_str_mv Brasil
dc.publisher.department.fl_str_mv ICEX - INSTITUTO DE CIÊNCIAS EXATAS
publisher.none.fl_str_mv Universidade Federal de Minas Gerais
dc.source.none.fl_str_mv reponame:Repositório Institucional da UFMG
instname:Universidade Federal de Minas Gerais (UFMG)
instacron:UFMG
instname_str Universidade Federal de Minas Gerais (UFMG)
instacron_str UFMG
institution UFMG
reponame_str Repositório Institucional da UFMG
collection Repositório Institucional da UFMG
bitstream.url.fl_str_mv https://repositorio.ufmg.br/bitstream/1843/40072/4/wesley_dissertation.pdf
https://repositorio.ufmg.br/bitstream/1843/40072/5/license.txt
https://repositorio.ufmg.br/bitstream/1843/40072/2/license_rdf
bitstream.checksum.fl_str_mv 5e0f2fdfdf7ae86d0698fe10ee3af3b4
cda590c95a0b51b4d15f60c9642ca272
00e5e6a57d5512d202d12cb48704dfd6
bitstream.checksumAlgorithm.fl_str_mv MD5
MD5
MD5
repository.name.fl_str_mv Repositório Institucional da UFMG - Universidade Federal de Minas Gerais (UFMG)
repository.mail.fl_str_mv
_version_ 1801676842412802048