aboutsummaryrefslogtreecommitdiff
path: root/checker/analyze.ml
AgeCommit message (Collapse)Author
2020-03-11Fix coqchk for primitive integers on 32bit arch with OCaml >= 4.08 (#11624)Pierre Roux
2019-12-06Use standard float an integer datatypes in Votour representation.Pierre-Marie Pédrot
It seems this passed under my radar, but the change of implementation of the safe demarshaller introduced by native integers and floating point numbers is dangerous. For floats, it makes the demarshaller depend on float kernel representation. This is just an alias to the standard OCaml float type, so this is currently not problematic, but this makes the code fragile if ever we decide to change it there. This would trigger unsound object casts without any complaint from the type-checker. Furthermore, having such a low-level library depend on the kernel library sounds like a anti-feature to me. For native integers, the situation is direr. The demarshaller turns unconditionally 64-bits integers into their Int63 representation, which depends on the architecture. This means that when parsing vo files from a architecture where these types are not the same, we are guaranteed to get into unsound casts. Some of them *might* get caught by the value representation checker, yet it is a footgun. The demarshaller should only deal with OCaml representations and not try to mess with Coq specific data types, otherwise we are going to face desynchronization and thus unsound casts.
2019-11-01Add primitive floats to checkerPierre Roux
2019-07-08[core] [api] Support OCaml 4.08Emilio Jesus Gallego Arias
The changes are large due to `Pervasives` deprecation: - the `Pervasives` module has been deprecated in favor of `Stdlib`, we have opted for introducing a few wrapping functions in `Util` and just unqualified the rest of occurrences. We avoid the shims as in the previous attempt. - a bug regarding partial application have been fixed. - some formatting functions have been deprecated, but previous versions don't include a replacement, thus the warning has been disabled. We may want to clean up things a bit more, in particular w.r.t. modules once we can move to OCaml 4.07 as the minimum required version. Note that there is a clash between 4.08.0 modules `Option` and `Int` and Coq's ones. It is not clear if we should resolve that clash or not, see PR #10469 for more discussion. On the good side, OCaml 4.08.0 does provide a few interesting functionalities, including nice new warnings useful for devs.
2019-02-04Primitive integersMaxime Dénès
This work makes it possible to take advantage of a compact representation for integers in the entire system, as opposed to only in some reduction machines. It is useful for heavily computational applications, where even constructing terms is not possible without such a representation. Concretely, it replaces part of the retroknowledge machinery with a primitive construction for integers in terms, and introduces a kind of FFI which maps constants to operators (on integers). Properties of these operators are expressed as explicit axioms, whereas they were hidden in the retroknowledge-based approach. This has been presented at the Coq workshop and some Coq Working Groups, and has been used by various groups for STM trace checking, computational analysis, etc. Contributions by Guillaume Bertholon and Pierre Roux <Pierre.Roux@onera.fr> Co-authored-by: Benjamin Grégoire <Benjamin.Gregoire@inria.fr> Co-authored-by: Vincent Laporte <Vincent.Laporte@fondation-inria.fr>
2018-12-09[doc] Enable Warning 50 [incorrect doc comment] and fix comments.Emilio Jesus Gallego Arias
This is a pre-requisite to use automated formatting tools such as `ocamlformat`, also, there were quite a few places where the comments had basically no effect, thus it was confusing for the developer. p.s: Reading some comments was a lot of fun :)
2017-11-28Use safe demarshalling in the checker.Pierre-Marie Pédrot
Instead of relying on the OCaml demarshaller, which is not resilient against ill-formed data, we reuse the safe demarshaller from votour. This ensures that garbage files do not trigger memory violations.
2017-11-28Use large arrays in the checker demarshaller.Pierre-Marie Pédrot
This allows to work around the size limitation of vanilla OCaml arrays on 32-bit platforms, which is rather easy to hit.
2017-05-26[votour] Fix/disable warnings.Emilio Jesus Gallego Arias
2017-05-26[votour] Fix build with -safe-string (bug 5553)Emilio Jesus Gallego Arias
2015-06-25Adding a more efficient representation of OCaml objects in votour.Pierre-Marie Pédrot