I wonder if AI systems like ChatGPT will be helpful in this area. Something that’s able to track all requirements of a system and understands the code enough to validate it against the requirements.
I've had the same thought. Formally proven code can give powerful security assurances (cf. Project Everest[1]), but it's also very, very labor-intensive. I've heard rules of thumb like, "100x as much time to prove the software correct as to write it in the first place." If LLM systems are going to give us a virtual army of programmers, I think formally proving more systems software (device drivers, browser engines, e…
What I've Learned About Formal Methods in Half a Year
21–30 of 72 posts
Re: What I've Learned About Formal Methods in Half a Year
#22I've always thought theorem proving to be about proving equality of the function and the result. Lean to me is not only obscure but unapproachable by someone from a non-mathematical background. Take this snippet for instance theorem nat.add_comm : ∀ (n m : ℕ), n + m = m + n := λ (n m : ℕ), nat.brec_on m (λ (m : ℕ) (_F : nat.below (λ (m : ℕ), ∀ (n : ℕ), n + m = m + n) m) (n : ℕ), nat.cases_on m (λ (_F : nat.below (λ (…
Here is a closer approximation to how someone would actually write the proof in Lean:
lemma add_comm (a b : ℕ) : a + b = b + a :=
begin
induction a with a IH,
rw (add_zero b),
rw (zero_add b),
trivial,
rw (add_succ b a),
rw (succ_add a b),
rw IH,
trivial
endRe: What I've Learned About Formal Methods in Half a Year
#23If I had complete enough specifications for any interesting program that formal methods would be interesting, I think I would just be easier to hit compile on that spec. Yes, there are a subset of interesting bugs related to edge cases, but the real problematic bugs are when what the software does does not match what was expected, even if nobody really could articulate what was expected in the first place. The art of…
I think the interesting part isn't in a single component's edge cases at all, but in how complex webs of many, many things interact. I've yet to see a hard debugging problem that didn't boil down to something like, in the best of possible worlds: "component A expected something to meet promise FOO when it calls component B, because that's obvious, right?" combined with "component B just passes requests and routes res…
I suggest checking into Alloy, which is far easier to work with. It feels like writing a SQL schema, but you get bounded model checking and much more.
Re: What I've Learned About Formal Methods in Half a Year
#24Earlier quoted context omitted.
I've had the same thought. Formally proven code can give powerful security assurances (cf. Project Everest[1]), but it's also very, very labor-intensive. I've heard rules of thumb like, "100x as much time to prove the software correct as to write it in the first place." If LLM systems are going to give us a virtual army of programmers, I think formally proving more systems software (device drivers, browser engines, e…
I've had extremely poor results attempting to get current LLMs to generate proofs, for code or otherwise.
Basically, if you don't allow GPT to iteratively write, execute, criticise and then correct its code, you won't get good results.
Re: What I've Learned About Formal Methods in Half a Year
#25We use formal at Apple to verify hardware. We are always looking for good people in this area.
Do you have more to share? I use Alloy at work and research and would love to learn about how Apple uses FM.
https://jobs.apple.com/en-us/search?search=formal&sort=relev...
There are several different niches, and HW formal is likely using different tools and methods than SW formal, though there is overlap. Anyways there is room for a wide range of experience/skills/background in a variety of different areas.
Re: What I've Learned About Formal Methods in Half a Year
#26I've always thought theorem proving to be about proving equality of the function and the result. Lean to me is not only obscure but unapproachable by someone from a non-mathematical background. Take this snippet for instance theorem nat.add_comm : ∀ (n m : ℕ), n + m = m + n := λ (n m : ℕ), nat.brec_on m (λ (m : ℕ) (_F : nat.below (λ (m : ℕ), ∀ (n : ℕ), n + m = m + n) m) (n : ℕ), nat.cases_on m (λ (_F : nat.below (λ (…
> if we Who is this we? The people who understand mashed with the ignorant who put in no work? > to democratise So that those in the know can be further diluted with dabblers who contribute nothing and complain about their ignorance?
Then someone had to come along and invent the printing press.
Re: What I've Learned About Formal Methods in Half a Year
#27Earlier quoted context omitted.
> if we Who is this we? The people who understand mashed with the ignorant who put in no work? > to democratise So that those in the know can be further diluted with dabblers who contribute nothing and complain about their ignorance?
Yep, like the olden days where the only people “in the know” knew Latin. Or, before that, Greek. Then someone had to come along and invent the printing press.
Greek (or koine, for that matter) was pretty much street vernacular in the Roman/Byzantine empire during that period you're likely talking about.
Re: What I've Learned About Formal Methods in Half a Year
#28Re: What I've Learned About Formal Methods in Half a Year
#29We use formal at Apple to verify hardware. We are always looking for good people in this area.
Do you have more to share? I use Alloy at work and research and would love to learn about how Apple uses FM.
Here is a course taught at UT with some slides from guest lecturers from industry that looks like a decent overview:
https://www.cerc.utexas.edu/~jaa/verification/
Also, the main conference in the area is FMCAD, you can find a lot of related work there. More recently the conference has moved more towards software, but if you look at some of the older proceedings you can find a lot of hardware related stuff.
There is decent amount of overlap between formal for hardware and software, so if you study one you will likely have enough background to get started in the other.
Re: What I've Learned About Formal Methods in Half a Year
#30I've always thought theorem proving to be about proving equality of the function and the result. Lean to me is not only obscure but unapproachable by someone from a non-mathematical background. Take this snippet for instance theorem nat.add_comm : ∀ (n m : ℕ), n + m = m + n := λ (n m : ℕ), nat.brec_on m (λ (m : ℕ) (_F : nat.below (λ (m : ℕ), ∀ (n : ℕ), n + m = m + n) m) (n : ℕ), nat.cases_on m (λ (_F : nat.below (λ (…
I don't think you have any chance of approaching formal methods if the notation is a stumbling block. The difficulty and verbosity of formal proofs is huge even with the very concise mathematical notation. And learning the notation itself is a very small stumbling block compared to learning the actual theorems and logic that you need to use. So while I am not a fan of mathematical notation for general programming (wh…
Is perfectly reasonable.
If conciseness was that important theorem provers would have syntax like APL.