Применение искинов - шоссе империализма (Стенгазета русификаторов ИТ)

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.



2017-06-08, Dasgupta, A Complete Formal Semantics of x86-64

Сообщений 1 страница 4 из 4

1

https://raw.githubusercontent.com/Stanf … ldi19a.pdf
https://dl.acm.org/doi/10.1145/3314221.3314601
https://www.researchgate.net/publicatio … chitecture

[26] Sandeep Dasgupta. 2018. Semantics of x86-64 in K. https://github.com/kframework/X86-64-semantics

2017-06-08, Dasgupta & Park & Kasampalis & Adve & Roşu, A Complete Formal Semantics of x86-64 User-Level Instruction Set Architecture

«We present the most complete formal semantics of x86-64 to date.»

«This totals 3155 instruction variants, corresponding to 774 mnemonics.
The semantics is fully executable and has been tested against more than 7,000 instruction-level test cases and the GCC torture test suite.»

«This extensive testing paid off, revealing bugs in both the x86-64 reference manual and other existing semantics.»
«We found errors in both the x86-64 standard document and other existing semantics including the baseline semantics (Section 4).»

Это тем, кто не любит "доказательное программирование". Реальный факт - у них наука развивается
(и было это 7 лет назад, когда мы обсуждали - делать ассемблер или нет, у них пятеро бойцов делали (даже немного раньше)).

«The entire implementation took 8 man-months, with the lead author having prior experience in binary decompilation and strong familiarity with the x86-64 architecture and documentation.»

«the roughly 5200 rules that we defined to model the entire semantics.»
«Each rule is 17 LOC on average, and the total size is 15 KB of text.»

Отредактировано Лис (2024-08-24 07:12:02)

0

2

«Like closely related previous work [33, 37], we omit the relaxed memory model of x86-64 and thus the concurrency-related operations. Modelling concurrency is a complex but relatively orthogonal problem in the presence of small-step operational semantics, as shown in prior work [48, 57], where they have integrated their memory model with a small subset of 32-bit x86 instruction set. We believe that integrating such a memory model into our instruction semantics is a
promising direction toward rigorously reasoning about real-world programs running on modern multiprocessors. We leave it for future work.»

0

3

«We employed the K framework [59] (Section 2.1) as our formalism medium to leverage its capability of deriving various correct-by-construction formal analysis tools directly from the language semantics. We took Heule et al. [37]’s semantics (Section 2.2) as our starting point to avoid duplicating the formalization effort. We made several corrections or improvements to this semantics, to improve both soundness and efficiency. We automatically translated their semantics into K, and cross-checked the translated semantics against the original using an SMT solver. We manually specified the semantics of the remaining instructions faithfully consulting the Intel manual [11] to obtain the complete semantics. A manual specification may sound like a daunting effort at first, but the fact that (1) x86-64
is largely stable and changes slowly over time, and (2) the state-of-the-art synthesis techniques for language semantics (notably, Strata [37] and Hasabnis et al. [35, 36]) suffer from scalability and/or faithfulness issues (see Section 3.2 and 7 for details), makes the effort worth undertaking.»

«We then translated these SMT formulas from Strata into K rules using a script, and tested the resulting rules by comparing with the Strata rules using Z3

Почему мы не можем так же? Другой уровень. У нас ни пруверов (Z3 это прувер), ни солверов, ни фреймворка нет.

Отредактировано Лис (2024-08-24 07:07:52)

0

4

Я б хотел, чтобы Ivan этот топик прокомментировал.
Но он:
1) во-первых, на этот сайт не ходит;
2) не уважает академический подход ("вы все эти книжки не читайте, вы по-простому")
3) занят переизобретением ассемблера. И это важно, нельзя его отрывать.

Отредактировано Лис (2024-08-24 07:47:08)

0