Compiler correctness is, in its simplest form, defined as the inclusion of the set of traces of the compiled program into the set of traces of the original program, which is equivalent to the preservation of all trace properties. Here traces collect, for instance, the externally observable events of each execution. This definition requires, however, the set of traces of the source and target languages to be exactly the same, which is not the case when the languages are far apart or when observations are fine grained. To overcome this issue, we study a generalized compiler correctness definition, which uses source and target traces drawn from potentially different sets and connected by an arbitrary relation. We set out to understand what guarantees this generalized compiler correctness definition gives us when instantiated with a non-trivial relation on traces. When this trace relation is not equality, it is no longer possible to preserve the trace properties of the source program unchanged. Instead, we provide a generic characterization of the target trace property ensured by correctly compiling a program that satisfies a given source property, and dually, of the source trace property one is required to show in order to obtain a certain target property for the compiled code. We show that this view on compiler correctness can naturally account for undefined behavior, resource exhaustion, different source and target values, sidechannels, and various abstraction mismatches. Finally, we show that the same generalization also applies to many secure compilation definitions, which characterize the protection of a compiled program against linked adversarial code.

Trace-Relating Compiler Correctness and Secure Compilation / Abate, Carmine; Blanco, Roberto; Ciobaca, Stefan; Durier, Adrien; Garg, Deepak; Hritcu, Catalin; Patrignani, Marco; Tanter, Eric; Thibault, Jeremy. - 12075:(2020), pp. 1-28. (Intervento presentato al convegno ESOP tenutosi a Dublin, Ireland nel April 25-30,2020,) [10.1007/978-3-030-44914-8_1].

Trace-Relating Compiler Correctness and Secure Compilation

Patrignani , Marco;
2020-01-01

Abstract

Compiler correctness is, in its simplest form, defined as the inclusion of the set of traces of the compiled program into the set of traces of the original program, which is equivalent to the preservation of all trace properties. Here traces collect, for instance, the externally observable events of each execution. This definition requires, however, the set of traces of the source and target languages to be exactly the same, which is not the case when the languages are far apart or when observations are fine grained. To overcome this issue, we study a generalized compiler correctness definition, which uses source and target traces drawn from potentially different sets and connected by an arbitrary relation. We set out to understand what guarantees this generalized compiler correctness definition gives us when instantiated with a non-trivial relation on traces. When this trace relation is not equality, it is no longer possible to preserve the trace properties of the source program unchanged. Instead, we provide a generic characterization of the target trace property ensured by correctly compiling a program that satisfies a given source property, and dually, of the source trace property one is required to show in order to obtain a certain target property for the compiled code. We show that this view on compiler correctness can naturally account for undefined behavior, resource exhaustion, different source and target values, sidechannels, and various abstraction mismatches. Finally, we show that the same generalization also applies to many secure compilation definitions, which characterize the protection of a compiled program against linked adversarial code.
2020
Programming Languages and Systems - 29th European Symposium on Programming,{ESOP} 2020, Held as Part of the European Joint Conferences on Theoryand Practice of Software, {ETAPS} 2020, Dublin, Ireland, April 25-30,2020, Proceedings
Cham, Svizzera
Springer
978-3-030-44914-8
Abate, Carmine; Blanco, Roberto; Ciobaca, Stefan; Durier, Adrien; Garg, Deepak; Hritcu, Catalin; Patrignani, Marco; Tanter, Eric; Thibault, Jeremy
Trace-Relating Compiler Correctness and Secure Compilation / Abate, Carmine; Blanco, Roberto; Ciobaca, Stefan; Durier, Adrien; Garg, Deepak; Hritcu, Catalin; Patrignani, Marco; Tanter, Eric; Thibault, Jeremy. - 12075:(2020), pp. 1-28. (Intervento presentato al convegno ESOP tenutosi a Dublin, Ireland nel April 25-30,2020,) [10.1007/978-3-030-44914-8_1].
File in questo prodotto:
File Dimensione Formato  
esop20-paper22.pdf

accesso aperto

Tipologia: Versione editoriale (Publisher’s layout)
Licenza: Creative commons
Dimensione 535.3 kB
Formato Adobe PDF
535.3 kB Adobe PDF Visualizza/Apri

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11572/336511
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 7
  • ???jsp.display-item.citation.isi??? 8
social impact