2 ms·
+1 on decision tables. I've been so deep into esoteric stuff that I forgot all about those. Tie-in to recent research is Boolean truth tables. The simple logic
by nickpsecurity 10y ago
+1 on decision tables. I've been so deep into esoteric stuff that I forgot all about those. Tie-in to recent research is Boolean truth tables. The simple logic & ability to map it out so easily allowed for vast improvements in synthesis, transformation, and especially verification of properties. It's a major reason hardware is so much more reliable than software of similar complexity. Similar tooling could be applied to software version for contracts. Protocols and control systems, too, I'd think. Might have started there.
Another old technique from high assurance was using relatively simple functions and interactions with each one being a state machine. Dijkstra-style, we state input and output assumptions in precise, formal way. Then, the function is expressed in terms of both successful and failure states. Already plenty of techniques to model-check this sort of stuff to cover all cases. Even tools that generate them from specifications. So, modifying them for smart contracts with push-button verification that properties apply to all states is another option. Just dawned on me that the combinatorial explosion risk might make a natural mechanism to force the contracts to stay ultra-simple.
Animats, what do you think of that latter idea? If not for contracts, than verified software in general. Many talked about Kloc we could cover at any point as a limitation. People like Wirth saw simplicity as a benefit. Perhaps a reasonable Kloc limit combined with great tooling/process could be seen as an enabler for simpler, assured software? I mean, there's proven impact of such rigorous techniques & modular code in defect rates. But I'm thinking for non-pro's prone to incidental complexity working within limits that reduce their defect rates by forcing them to keep simple and verifiable.
Note: Might seem a bit rambling more than specific question. I'm sort of brainstorming on that one is why...
- Animats 10y agoI used to work on program verification.[1] I've worked on automatic theorem proving. Formal verification is too much heavy machinery for this application. Here, you want something simple and understandable. Find the minimal solution which will handle the use cases listed and any likely ones I missed. That's probably enough. With decision tables, you can run a case through them by hand quite easily. You can explain decision tables to lawyers and judges when necessary. You can distinguish between "contract did the wrong thing" and "underlying system executed the contract incorrectly." This is a big help when there's trouble. After the Etherium/DAO debacle, the next attempt at this has to be simple and understandable. It would probably get more use, too. [1] http://www.animats.com/papers/verifier/verifiermanual.pdf http://www.animats.com/papers/verifier/verifiermanual.pdf
- nickpsecurity 10y agoAppreciate the feedback. Makes sense.