logoalt Hacker News

fritzo • yesterday at 6:28 PM • 1 reply • view on HN

You need to pick an abstraction level. I don't prove in lean the impact of my programs on the price of eggs at the local market. I don't prove in lean how much energy my programs consume, or even how much RAM they consume. I do prove that say a particular pair of functions commute, or that another function is idempotent, or that under a denotational semantics a collection of functions can be composed without error.


Replies

trehans • yesterday at 8:17 PM

I think that is a valid level to use formal verification but I would argue it is much more powerful to also have a formal model of code. For example, if I have:

  my_value = run_some_function(some_arg_1, some_arg_2)
  for some_value in my_value.some_list:
     run_some_action(some_value)
Yes it is very helpful to know some properties about `run_some_function` (maybe it is commutative? idempotent?), but it is much more valuable to have a model which can translate what ultimately is being passed to `run_some_action` at the end and how that derives from the return of `run_some_function`, grounding the LLM's reasoning in something deterministic it can't break from.