Invited Talk given by @Vincent Laporte
About rose trees, you may give a look at Coq-Elpi's derive facility, see also https://drops.dagstuhl.de/opus/volltexte/2019/11084/pdf/LIPIcs-ITP-2019-29.pdf (the running example is rose trees).
Here a bit of "doc": https://github.com/LPCIC/coq-elpi/tree/master/apps/derive
I was thinking precisely of that when he said that ;)
Thanks for the nice talk!
Non-urgent remark/question: We've used the compcert library for machine integers in hacspec. Would it be suitable for jasmin too?
IIRC, the issue with that library is that there are little or no mixed-size operations. These are very useful for specifying vector operations. There are also some funny instructions (e.g., RCL) that operate on bitvectors of size (2^n)+1.
Thanks for the pointer, Enrico.
A long time ago we wrote a library of machine integers that were just list of bits with the size appearing in the type (it was in 2006, today it would be n.-tuple bool), we found this type nice to mix machine integers of various sizes (archive: https://github.com/affeldt-aist/seplog/blob/master/lib/machine_int.v)
Is there a library/framework for defining semantics for CPUs?
It would be nice to have some sort of standardized machine integers for Coq
https://coq.zulipchat.com/#narrow/stream/237977-Coq-users/topic/unsigned.20integer.20library.20using.20Cyclic.3F
Reynald, an other requirement for our ideal library, is that the semantics of Jasmin programs is executable: there is a reference interpreter that just runs the semantics (after extraction to OCaml). I fear that 256.-tuple bool
might show bad performances on non-trivial examples (but I’d love to be proved wrong).
IIRC, Tuple is a dependent pair of a list and proof of its length. So yes, you don't have random access...
@Vincent Laporte In your talk you said that (argument) variables "x" and "y" are always different. Does that mean it is illegal to call a jasmin function h as h(a,a)?
It is not illegal. It has a well-defined semantics (this is not UB, as they say in C parlance). You can use this program, e.g. within a proof or run it through the interpreter. However, the compiler will fail at compiling this program.
@Ben Siraphob There is sail which looks promising.
Vincent Laporte said:
Reynald, an other requirement for our ideal library, is that the semantics of Jasmin programs is executable: there is a reference interpreter that just runs the semantics (after extraction to OCaml). I fear that
256.-tuple bool
might show bad performances on non-trivial examples (but I’d love to be proved wrong).
Yes, indeed, that won't fly as such ^_^. In the end, execution of bitstrings eventually led us to custom OCaml extraction (https://staff.aist.go.jp/tanaka-akira/succinct/succinct-icfem2016-author.pdf) or C extraction (https://www.jstage.jst.go.jp/article/ipsjjip/26/0/26_54/_pdf/-char/en) (to have random access).
Last updated: Oct 13 2024 at 01:02 UTC