Comments (2)
I don't know of any easy-to-read resource, we have been reading up on bedrock1/VST and talking to users of these systems to figure out what to do. The primary reason behind of omitting function pointer support for now was to focus efforts elsewhere. I think it that a similar system could likely be built with function-pointer support, and we might even add it once everything else is working. But for now, the plan is to use C++-style templates (implemented as coq functions) for code reuse across types instead of runtime function pointers. We realize this is limiting in some cases, but the judgement call was that improving the quality of the toolchain for function-pointer-free code is more important than allowing function pointers.
The fundamental source of difficulty in verifying code with function pointers is as follows:
To verify a function f
that takes in a function pointer g
, the precondition of f
needs to say something about when it is safe to call g
. However, defining what it means for g
to satisfy its precondition is tricky because g
could in principle call f
, and circular definitions are no good. Thus we would need to either have some discipline to rule out the possibility of g
calling f
, or create some technical distinction between the top-level call to f
and each following call through g
. http://flint.cs.yale.edu/flint/publications/xcap.pdf section 2.3 discusses possible approaches for dealing this in more detail.
The XCAP style is perhaps the cleanest, but proof automation for it in bedrock1 was painfully slow on non-trivial examples. As far as we understand, this was due to technical debt in Coq, not because it fundamentally has to be slow, so likely either working around or fixing some coq asymptotic performance surprises (or here) could make this usable. For code without function pointers, the proof-by-reflection technique is a standard workaround.
from bedrock2.
answered
from bedrock2.
Related Issues (20)
- Move MMIO.v HOT 3
- stackloop: `main` should return `int`, not `void` HOT 1
- Using multiple return values HOT 2
- Why does bedrock2 use `Load`? HOT 2
- Please create a tag for Coq 8.16 in Coq Platform 2022.09 HOT 6
- bedrock2 fails with a syntax error on Windows HOT 9
- bedrock2 lightbulb example is incompatible with native_compute HOT 5
- Less Memory-Hungry, More Principled Solution for Decidable Side-Conditions HOT 2
- Failing in coq CI HOT 1
- `make` should not run `coq` and `cc` when there's nothing to be done
- Update tested is failing with rate limits HOT 2
- Bedrock2 is broken on Coq's CI HOT 1
- Please pick the version you prefer for Coq 8.17 in Coq Platform 2023.03 HOT 2
- Please pick the version you prefer for Coq 8.17 in Coq Platform 2023.03 HOT 2
- design: outputting bitwidth-generic code? HOT 7
- design: core functionality of RecordPredicates? HOT 4
- Unbound value Int.land HOT 2
- Please pick the version you prefer for Coq 8.18 in Coq Platform 2023.10 [coq-bedrock2] HOT 2
- Please pick the version you prefer for Coq 8.18 in Coq Platform 2023.10 [coq-bedrock2-compiler] HOT 2
- install target is unusable when sudo doesn't have access to coqc HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bedrock2.