kth.sePublications KTH
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
HOL4P4: Mechanized Small-Step Semantics for P4
KTH, School of Electrical Engineering and Computer Science (EECS), Computer Science, Theoretical Computer Science, TCS.ORCID iD: 0000-0001-8682-6804
KTH, School of Electrical Engineering and Computer Science (EECS), Computer Science, Theoretical Computer Science, TCS. Saab AB, Järfälla, Sweden.ORCID iD: 0000-0001-9921-3257
KTH, School of Electrical Engineering and Computer Science (EECS), Computer Science, Theoretical Computer Science, TCS.ORCID iD: 0000-0002-8069-6495
KTH, School of Electrical Engineering and Computer Science (EECS), Computer Science, Theoretical Computer Science, TCS.ORCID iD: 0000-0001-5432-6442
2024 (English)In: Proceedings of the ACM on Programming Languages, E-ISSN 2475-1421, Vol. 8, no OOPSLA1, article id 102Article in journal (Refereed) Published
Abstract [en]

We present the first semantics of the network data plane programming language P4 able to adequately capture all key features of P416, the most recent version of P4, including external functions (externs) and concurrency. These features are intimately related since, in P4, extern invocations are the only points at which one execution thread can affect another. Reflecting P4's lack of a general-purpose memory and the presence of multithreading the semantics is given in small-step style and eschews the use of a heap. In addition to the P4 language itself, we provide an architectural level semantics, which allows the composition of P4-programmed blocks, models end-to-end packet processing, and can take into account features such as arbitration and packet recirculation. A corresponding type system is provided with attendant progress, preservation, and type-soundness theorems. Semantics, type system, and meta-theory are formalized in the HOL4 theorem prover. From this formalization, we derive a HOL4 executable semantics that supports verified execution of programs with partially symbolic packets able to validate simple end-to-end program properties.

Place, publisher, year, edition, pages
Association for Computing Machinery (ACM) , 2024. Vol. 8, no OOPSLA1, article id 102
Keywords [en]
formal verification, interactive theorem proving, P4, programming language semantics
National Category
Computer Sciences
Identifiers
URN: urn:nbn:se:kth:diva-348304DOI: 10.1145/3649819ISI: 001209927600009Scopus ID: 2-s2.0-85195797284OAI: oai:DiVA.org:kth-348304DiVA, id: diva2:1874676
Note

QC 20240624

Available from: 2024-06-20 Created: 2024-06-20 Last updated: 2025-11-12Bibliographically approved
In thesis
1. Formal Verification of Software-Defined Network Elements and Machine Code
Open this publication in new window or tab >>Formal Verification of Software-Defined Network Elements and Machine Code
2025 (English)Doctoral thesis, comprehensive summary (Other academic)
Abstract [en]

Software, programmability and connectivity are increasingly pervasive aspects of society. In the span of a lifetime, everything from vehicles to phones has evolved from fixed-function to generally programmable devices that are always online. As a result, their functionality is entirely determined by their software, which may change from update to update and depending on what applications you have installed. The software itself is increasingly written by outsourced consultants or even by AI, with vulnerabilities appearing and being fixed on a daily basis.

Where does one even begin to secure modern digital equipment? The highest levels of assurance certification demand formal verification - mathematical proofs that rule out vulnerabilities based on models of hardware or programming-language semantics. This is costly and time-consuming, and so is applied mainly to small, critical components. The way to gain scalability is to base your assurance statements on highly automated verification tools whose correctness depends only on minimal, auditable trusted code bases.

The work in this thesis is focused on the creation of formal verification tools in the domains of machine code and networking. The common denominator is the use of an interactive theorem prover to gain assurance of the results. Specifically, the thesis presents (i) methods to decompose verification tasks for unstructured programs, especially as applied to machine code, and (ii) a formal model of the P4 domain-specific networking language, accompanied by (iii) a proof-producing symbolic execution tool and finally (iv) a complete toolchain to verifiably compile a verified P4 program down to a software switch.

Abstract [sv]

Mjukvara, programmerbarhet och uppkoppling genomsyrar i allt högre grad samhället. Under loppet av en livstid har allt från fordon till telefoner utvecklats från enheter med fast funktion till programmerbara enheter som alltid är uppkopplade. Som följd av detta bestäms deras funktionalitet helt av deras mjukvara, vilken kan förändras med uppdateringar och installering av applikationer. Mjukvaran i sig skrivs i allt högre grad av utkontrakterade konsulter eller till och med av AI, med sårbarheter som dyker upp och åtgärdas dagligen.

Hur kan man ens påbörja att säkra modern digital utrustning? De högsta nivåerna av säkerhetscertifiering kräver formell verifiering - matematiska bevis som utesluter sårbarheter baserat på modeller av hårdvara eller semantik för programmeringsspråk. Detta är kostsamt och tidskrävande, och tillämpas därför främst på små, kritiska komponenter. Vägen till skalbarhet går genom att basera sina assuransutlåtanden på högautomatiserade verifieringsverktyg vars korrekthet endast beror på minimala, granskningsbara betrodda kodbaser.

Arbetet i denna avhandling fokuserar på skapandet av formella verifieringsverktyg inom domänerna maskinkod och nätverk. Den gemensamma nämnaren är användningen av en interaktiv teorembevisare för att säkerställa resultatens tillförlitlighet. Specifikt presenterar avhandlingen (i) metoder för att dela upp verifieringsuppgifter för ostrukturerade program, särskilt tillämpat på maskinkod, och (ii) en formell modell av det domänspecifika språket P4 för nätverk, tillsammans med (iii) ett bevisproducerande exekveringsverktyg och slutligen (iv) en komplett verktygskedja för att verifierbart kompilera ett verifierat P4-program ner till en mjukvaruswitch.

Place, publisher, year, edition, pages
Stockholm: KTH Royal Institute of Technology, 2025. p. xix, 66
Series
TRITA-EECS-AVL ; 2025:103
Keywords
Formal verification, interactive theorem proving, HOL4, P4, binary analysis, semantics, program logic, symbolic execution, Formell verifiering, interaktiv teorembevisning, HOL4, P4, binäranalys, semantik, programlogik, symbolisk exekvering
National Category
Formal Methods
Research subject
Computer Science
Identifiers
urn:nbn:se:kth:diva-372675 (URN)978-91-8106-459-9 (ISBN)
Public defence
2025-12-08, https://kth-se.zoom.us/j/61627100868, Kollegiesalen, Brinellvägen 8, Stockholm, 13:00 (English)
Opponent
Supervisors
Funder
Swedish Foundation for Strategic ResearchVinnova, 2023-03003
Available from: 2025-11-13 Created: 2025-11-12 Last updated: 2025-11-24Bibliographically approved

Open Access in DiVA

No full text in DiVA

Other links

Publisher's full textScopus

Authority records

Alshnakat, AnoudLundberg, DidrikGuanciale, RobertoDam, Mads

Search in DiVA

By author/editor
Alshnakat, AnoudLundberg, DidrikGuanciale, RobertoDam, Mads
By organisation
Theoretical Computer Science, TCS
In the same journal
Proceedings of the ACM on Programming Languages
Computer Sciences

Search outside of DiVA

GoogleGoogle Scholar

doi
urn-nbn

Altmetric score

doi
urn-nbn
Total: 382 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf