Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formal specification of DIF #23

Open
dstolfa opened this issue Jan 22, 2018 · 3 comments
Open

Formal specification of DIF #23

dstolfa opened this issue Jan 22, 2018 · 3 comments

Comments

@dstolfa
Copy link
Contributor

dstolfa commented Jan 22, 2018

Given that DIF is an intermediate representation that DTrace currently uses and compilers will have to map their language into DIF, it would be useful to have a formal specification of DIF in Isabelle/HOL [1] or Coq [2] as a long term goal. This would allow for a clear specification of DIF without a reference implementation and would resolve potential ambiguity in the text.

Furthermore, writing it this way would allow for proofs about DIF to be constructed under certain agreed on assumptions (such as builtin variables returning an arbitrary value of a certain type, following pointers results in a valid memory location etc) various properties such as termination and certain types of safety. This also allows one to expose information from a concrete implementation of a DIF interpreter/JIT compiler and assert that it adheres to the specification (given that the assumptions hold). This would also make it easier to understand the implications of changes to DIF (such as addition of instructions or change of semantics).

[1] http://isabelle.in.tum.de
[2] https://coq.inria.fr

@hannesm
Copy link

hannesm commented Jan 26, 2018

IMHO the first steps would be to formalise DIF in ott and/or lem. there is already the C semantics cerberos developed in lem, from which DIF may borrow some bits and pieces (such as integer arithmetics etc.).

@dstolfa
Copy link
Contributor Author

dstolfa commented Jan 26, 2018

@hannesm I quite like the idea of using ott or lem, as they provide translation to other proof assistants. Do you know if they have any special requirements to get working on platforms that have an OCaml compiler/runtime or should they just work out of the box on any system where OCaml works?

@hannesm
Copy link

hannesm commented Jan 27, 2018

@dstolfa ott is released to opam, after installing ocaml-opam, you should be able to opam install ott to install it into ~/.opam/YYY/bin/ott! lem I've so far built only manually from a checkout, it works (worked?) on FreeBSD flawlessly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants