Better HN
topnewbestaskshowjobs
Log inSign up

redjamjar

31 karma · joined Jul 28, 2010 (16y ago) · 46 submissions

Submissions

comment 3y ago · link · parent

Yeah, ok that’s fair enough!!

comment 3y ago · link · parent

I think LLM can help here in various ways. For example, by inferring preconditions/postconditions and loop invariants automatically. Also, perhaps, by writing lemmas as required automatically. I'd guess there has been some work on this already, but not sure.

comment 3y ago · link · parent

> I hope this is a typo

Yeah, sorry --- that is a typo.

comment 3y ago · link · parent

So, you can use fixed-width data types in Dafny and verify properties about functions using them. For example, in our EVM implementation we have types like u8, u16, u256, etc. Of course, Dafny won't let operations on these types underflow or overflow, so it does mean more work ensuring your code doesn't allow this.

comment 3y ago · link · parent

> The halting problem has almost no practical relevance because we don't really care about the general case.

Yup, agreed

comment 3y ago · link · parent

Yeah, SPARK/Ada is a comparable system to Dafny. I agree with that! Also, Frama-C and a bunch of other more esoteric research languages as well.

comment 3y ago · link · parent

Yeah, so as I understand it, AWS is using Dafny generated (Java) code in production. I think we can assume it won't be as efficient has hand written code (at this stage anyway) but it does give you the added guarantees.

comment 3y ago · link · parent

> The problem with Dafny and other SMT solvers is that when they work, they're brilliant, but when they don't, they're infuriating

Yeah, look I'm not going to disagree with that. I have had plenty of frustrating times figuring out why something won't verify with Dafny. But, the more you do it, the easier it gets. And, we should work on the assumption that these tools will get better.

> Languages like Coq, Lean, and Isabelle/HOL are better in that you prove things manually (unless you abuse `auto` and tactics for non-trivial proofs, then you still run into the above).

So, it is nice that you always feel like you can make progress with these tools. But, at the same time, that progress can be awfully slow and painstaking. I think the sweet spot lies in using automation as much as possible, but with the fall back option of proving things manually. Dafny to some extent lets you do this, as you can always fall back on manual induction using a lemma.

comment 3y ago · link · parent

I agree. There are tools though which are specifically for determining worst-case execution time for e.g. embedded systems which can actually give accurate timing information (upto a point).

comment 3y ago · link · parent

Yeah, so these tools will not tell you how long it will take to terminate --- only that it will eventually. In the vast majority of cases, that is what you want to know.

comment 3y ago · link · parent

Haha, yeah ... this one you would have a very hard time with :)

Hopefully, though, termination of your program does not depend on this ... otherwise could be a long wait!

comment 3y ago · link · parent

> there are a huge number of useful loops that do useful work and for which you can prove properties like termination

Exactly! If the loop doesn't terminate, then you obviously cannot show it. But if it does, then you should be able to (even if that requires some changes to help the tool)

13.

Functional Reactive Programming (In Whiley)(youtu.be ↗)

3 points · by redjamjar · 6y ago · discuss

14.

Use package managers and dependency declarations? We need your help(massey.au1.qualtrics.com ↗)

3 points · by redjamjar · 8y ago · discuss

15.

Neat Demo of Software Verification(youtube.com ↗)

1 points · by redjamjar · 9y ago · discuss

16.

What's the Net effect on OOP?(whiley.org ↗)

2 points · by redjamjar · 9y ago · discuss

comment 9y ago · link · parent

Nice job!! Love the 8 ball example ... really fun :)

18.

Introductory Lecture on Verification in Whiley(whiley.org ↗)

1 points · by redjamjar · 11y ago · discuss

19.

The Architecture of Verification in Whiley(whiley.org ↗)

1 points · by redjamjar · 13y ago · discuss

20.

Presentation on Whiley [video](whiley.org ↗)

1 points · by redjamjar · 13y ago · discuss

21.

VIDEO: Reconstructing 3D Scenes from a Camera [wait for the green car](youtube.com ↗)

4 points · by redjamjar · 13y ago · 1 comment

22.

Understanding Loop Invariants in Whiley(whiley.org ↗)

1 points · by redjamjar · 13y ago · discuss

23.

Testing out my Papilio FPGA(whiley.org ↗)

2 points · by redjamjar · 13y ago · discuss

24.

Generating Verification Conditions for Whiley(whiley.org ↗)

1 points · by redjamjar · 13y ago · discuss

25.

Comparing I/O in C with Java(whiley.org ↗)

1 points · by redjamjar · 14y ago · discuss

26.

A Misconception of Functional Programming?(whiley.org ↗)

3 points · by redjamjar · 14y ago · discuss

27.

Notes on Java versus C++ Performance(whiley.org ↗)

2 points · by redjamjar · 14y ago · discuss

28.

The Liquid Metal Project(whiley.org ↗)

2 points · by redjamjar · 14y ago · discuss

29.

Flow Typing for References in Whiley(whiley.org ↗)

1 points · by redjamjar · 14y ago · discuss

12