06:00 UTC Charta Aetatis Cyberpunk

Console Newsletter Pro Sign in Early access Register
Aa · Display
Themes
Type size
Density
Hacker Culture · Lobsters · · 38:16 runtime

How to Find Bugs in Systems That Don't Exist

Comments

Transcript 6899 words · auto-generated captions

Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.

So the first thing you might notice is that we are starting 8 minutes late. This is because as much as software should work, hardware should also work. And as of this morning, this is not working. Not my joke. That's Jason's joke. He's the guy in the back.

As a consequence, I am now running this on a new laptop with an unfamiliar operating system in Keynote while this thing is in PowerPoint, meaning that this is unfamiliar software for this slideshow. And I guess what that means is I'm really hoping the things that break add up to exactly 8 minutes.

Anyway, before I start, I do need a show of hands. Who here has heard of formal methods or formal specification? Okay, see that's almost everybody. And the first lesson of this talk is know your audience. That's because usually when I give this talk, there's no hands in the room at all. Nobody's heard of this stuff. And I have to go from first principles doing the whole TED thing of I find bugs in

systems that aren't even real. But you all know that um for the few people who don't know that formal methods is the discipline of using math to analyze either a running code or a design for code in order to find bugs. And unfortunately, while you all many of you know the basics of that, I still need to use my introductory TED example because that does frame most of the talk. Imagine we have a thing doer. The thing doer does a thing. In version one, the thing doer does the thing in three steps. First, it checks if the thing is marked done. Then if the thing has not been marked done, it marks the thing as done. Then it actually does the thing.

Now, there's a bug in this. Would anybody like to just shout out the bug?

>> Okay,

>> interesting point. So, one thing I heard, the first thing shout out, everybody shout out a lot of different bugs, but the first bug I heard shouted out was that what if do the thing fails? In the real world, this is something that might not work, whatever the thing we're doing is. And what happens if we have to start over? Then we enter a state where we see the thing has been marked done and never do it. This is what we call a livveness bug. There's something we want to happen livveness that doesn't happen. Version two, we actually do the thing before we mark it as done. This no longer has livveness bug, but it has a different bug. And in fact, it has that different bug even if this never even fails. And it's something that somebody already shouted out in the previous section. What if there are two thing doers? Then we have a race condition where it is possible to do the thing twice before it's marked done. This is

called a safety violation. Safety meaning something bad never happens. So if something bad does happen, we violated a safety property and have a safety bug.

Now who here has written a thing doer?

I'm going to put up two hands. I've written it twice. Except usually thingd doers aren't called do thing. They're things like send package where a safety bug causes you to get more packages than you asked for or a cat feeder where a safety violation leads you to have a really fat cat. And here's the first part where things break down. There's supposed to be a really cute image of a cat that gets progressively fatter. Can't see it. Or and then the first case they actually used formal method was an app installer where we were trying to install an app on a device. This was actually some vendor's code and we found out through formal modeling actually not not that we found it out but due to a bug that they had if you tried to install an app that was already in the process of being installed it would just start randomly corrupting data. Okay.

So we actually used methods in this case to work around that bug and make sure we never did a double install. So as I mentioned this is formal methods the entire discipline of analyzing code and designs for bugs. I've been doing formal methods for about eight years now and I found it to be an incredibly powerful technique for leading to software that should be correct. But it's also a very difficult skill to acquire. It's a lot of very specialist ideas and very specialist tools. And for that reason I've decided that the most useful thing is not to actually talk about formal methods. is to talk about all of the perspectives and ideas I've gained from formal methods that I have found useful even when I'm not using it.

That's stuff that could actually be taken away from here and maybe help you in your coding. Even if you don't want to spend months learning the formal mathematics, I'm going to focus on four concepts. Properties or what it means for a system to be correct. How we actually abstract systems to model them. The process of verification to make sure systems are correct. and environments. What assumptions make correctness possible? And I had a bit more to like explain why we're doing these things, but again, we are currently like seven minutes behind. So, I'm just going to skip to properties now. So, in order to make sure that a system is correct, we have to have a notion of correctness. And one of the basic notions of correctness is the property. Something that should be true of a working system. If everybody saw Richard's talk earlier this morning, he talked about asserts. Asserts are properties. They're asserting that this thing should always be true at this point in the program. That's a property.

Other common properties are things like no possible input can crash the program. If any possible input can crash the program, you violated the safety property. You can also have runtime properties or operational properties. Things like one server running our code with certain specifications can handle 10,000 requests a second. Something like a type system forms another kind of property. If I say that max has this type, I'm saying that every user of max satisfies that input parameter and every output uses this output parameter. Nothing is expect nothing is expecting to return a string or anything like that. Even something like unit test is a property. It's saying that a specific input gives a specific output.

Our thing doer had two properties. The first one is that we do the thing at most once. This is safety as mentioned. It is something bad doing it twice that should never happen. The second one is that a good thing is done at least once. We do the thing at least once. This is livveness. We always do the expected thing. Now, one of the most interesting interesting things about formalizing properties is that we can talk about how they relate to each other. One of the most important relations is implication. And it is best described with an example. Imagine we're building that 10,000 QPS system. I'm going to call that property 10k QPS.

There's a lot of different designs that could satisfy that property. We can even imagine it as a set, a space of every possible design with this property 10,000 QPS. Now imagine our much worse competitor is trying to satisfy a weaker property of 2QPS. This property is also a space or a set.

And more importantly, it's a supererset. Every single system that satisfies 10,000 QPS also satisfies 2 QPS, right?

Someone's thinking of an exception. Please don't say it. We're behind enough time as it is. Yeah. And I'd write it like this. 10,000 QPS implies 2QPS or

implication. And this leads to a really important point that some properties are stronger than others. If every system with P

always also has Q, then Q is a weaker property than P. For example, saying your code has no use after free errors is a weaker property than saying it has no memory errors. If it has no memory errors, it certainly doesn't have have any use after free errors. Right? Similarly, eventual consistency is a weaker property than strong consistency. If your system always is reaches consistency in zero time, it will always reach it in any amount of time. Right?

And this last one, this one's this last one's just from Andrew, but um having cookie banners on every single page of your site is a strictly weaker property than actually satisfying GDPR. [laughter] Yeah. Now, one really interesting thing about

strong versus weak properties is that they sort of enforce what we need to actually verify. Take the property that

a user in a certain setup state of the program can buy some item with a coupon.

This property implies a bunch of other much weaker properties that a user can log in that they can show items, they can add items, they can apply coupons, they can add shipping. If this stronger property satisfied, if the test that checks that property passes, we technically don't even need to look at any of the weaker properties or the tests corresponding to them. We know for sure they are going to be satisfied too. And this is exactly why you have way more unit tests than than um in than integration end to end tests. Well, not really. The actual reason why we have that is because we don't actually want to often be verifying stronger properties. And to see why, let's go back to this two vers 10 QPS thing.

There's three regions of these two sets.

The first one is the systems that satisfy both 10k QPS and 2qps.

The second is those that satisfy 10 2ps but not 10kqps. The third is the ones that satisfy neither. Now, if you've ever had to draw a ven diagram in school, you'd realize that most ven diagrams have a fourth zone. the ones that satisfy 10,000 but not Q.

In this case, that zone does not exist. There's not a single system that satisfies 10K KQPS but doesn't satisfy

2QPS. In fact, we can even say that violating the weaker property means the stronger property is guaranteed to be violated too. This is called the contraositive and is again why you have the agile pyramid of testing. That's because and unfortunately I think you know's not able to show the beautiful colors I used in this case but if one of these tests

say ad shipping over there actually fails then we don't even need to check the integration test we know that's going to fail too and given that most of our work is debugging working code or asking an AI to bug existing code which do you think is more useful to us or the agent knowing that a user cannot buy something with a coupon or knowing they can log in, they can show items, they can add items, they can enter the checkout, but they cannot add shipping.

In other words, strong properties show that a system is in is correct. Weak properties show why a system is incorrect.

And given that so much of our work as again is trying to find issues, it's more helpful to have a lot of weak properties being verified than a lot of strong properties. It helps us locate the bugs much faster. And you see this in pretty much every sort of testing and verification culture. This emphasis on things that help us find where the incorrectness is over things that simply assure us that things are correct when they do work. One last consequence that's really important here is this. An abstraction is weaker than implementation. And this

next slide simply does not work in Keynote. So I'm just going to have to pantomime it. Imagine you sort of have a

system that has to get some data from a server. In a real working implementation, you kind of have the client which talks to a

load balancer which talks to a server which talks to another server which talks to an auditor. This goes back here and then the server talks to a database which probably talks to a cache which then talks to the database to the server to the other server to the load balancer back to the um user. Something like that, right? That's kind of how it works. Getting some skepticism here.

But regardless, however it actually works in reality is going to be simpler than the imagined workings that we kind of sketch out. This idea that we have the user has a request, some magical computation happens, and they get their result. And what's interesting about that is that that much more simplified system is an abstraction. It talks about how this system should work if it's all working correctly. And this would be so much easier with I can't believe the only thing that shows up is my joke about caches. [laughter]

Okay, so this abstraction is a weaker

form of [laughter]

I'm glad people are following because I wouldn't.

So basically, and what this means is that if the abstraction works, this doesn't guarantee the implementation works. For example, maybe in our theory everything works correctly, but in practice the load balancer like fails or something or one of the servers has like the wrong configuration and the implementation doesn't work. But if the abstraction in theory is not going to work, it doesn't matter how carefully we build the real system, it's not going to work either. And it turns out that we can kind of sketch out an abstraction like few hours, a day or two, and then the implementation takes months or a year to actually build. And in that in that circumstance, finding a bug in the abstraction saves us a lot of pain down the line in the real system. And that is essentially why companies pay me money to try to find bugs in systems before they're built.

And that gets to part two of this talk, abstraction. How do we actually abstract a complicated system into a simplified model? To reiterate, we have this thing we want to abstract the thing doer that has three steps and we have to and we have

two properties we want to also sort of represent in our abstraction. The question is this is actually already pretty abstract too, right? Because we managed to take the idea of like a domain and abstract it to some sort of essence that this thing is just a thing

doer as opposed to a package sender. Everybody following so far?

>> Cool. Well, I was hoping that like people would like think about it a bit more so I could drink some water, but fine. If if you're going to be all caught up, I'm going to have to keep going. Yeah. So, but we can go further. There's other kinds of abstraction we can do. And like prom methods is really rich with different kinds of like ways of abstracting. I'm just going to cover two of them. The first one is data abstraction. We can reduce the fidelity

of the real world in a way that makes the system easier to model. And in fact, we all already do that. What does it mean for a package to be sent? That it has been marked as sent in the real world. That means there's an actual package on an actual truck being driven to the customer's house. But in our implementations, which is also not showing up, it's a database, right? You have a database and you add a record to the database and the package is sent when you query the database for that record and you find it. Something like that. We have taken this real world representation of an actual package in an actual truck and turned it into a record in a database.

If we want to study this as an abstraction, we can go one step further. What does it mean to for the package to be sent? Well, we have some integer that represents how many packages have been sent or how many things have been done and we just increment it by one. That means it's been done or the package has been sent or the cat has been fed or whatever. If we do that, one nice consequence is that it's really easy to represent these properties. Now, instead of we don't do the thing more than once, we can say it is always the case and I will explain what always and eventually mean later that done is at most one. Count done.

Additionally, the liveness property that we do the thing at least once is eventually countdown is at least one. And that's one of the ways that like data abstraction helps us represent an abstraction in a way that like is simpler and easier to model. We can turn databases into numbers. One more kind of abstraction just for time that I really like and I think is one of the most unintuitive ones that's come out of doing software of doing this kind of work is that nondeterministic systems to me are a lot simpler than deterministic ones. It is easier for me to reason about a system that has some uncertainty in it than one that is always certain. And I'm going to argue that that's the case for you too.

Who here, show of hands, has used a random number generator in your program? Keep your hands up. Now, keep your hands up if you know that your RNG is in all likelihood a pseudo

random number generator. It follows an algorithm to actually produce the next random number. I've not seen a single hand go down. That's cool. Now, keep your hand up if you've actually looked at that algorithm.

And that's a record. Usually it's like one guy and I can say like nerd, but like but in this audience I saw like at least a dozen hands and like you all there's more of you than me. You could easily beat me to a pulp or something. I do not want to fight you. I'd lose.

Um anyway, there's a lot of different pseudo random number generators. One of them that is actually in the C99 standard is as follows. You have a global state and then when you ask for your next RNG you take that state you multiply it by 1 bill13 million515,245

add 1 2 3 4 5 and then modulo by 2 to the 32 then you do some bit shifting to actually get like turn that into like a number between 0 and one okay so totally deterministic right if you're looking at some code that uses rand are you going to go like okay what happens next well I've got to look at the state and then multiply that by 1.1 bill by 1 billion 1 3 million 515 245 add 1 35 and then multiply by 232 Or do you go like okay it's going to return a rand number between 0 and one. The non-determinism is simpler than the determinism.

So in practice what this usually means is that we can make a system simpler by handwaving away the ways that things go wrong. For example, how might an implementation fail to do the thing? It could fail because the package is missing if it's a package sender or if it's a cat feeder because the mechanism jammed. And it can fail if it's a app installer because we have no file permissions or there's a file lock or there's not enough space or there's a network interrupt or the computer crash or anything like that. In the abstraction though we can simply say do thing or start over nondeterministically.

We don't have to hand wave so much weight. We don't have to make it this simple. I can choose if I want to represent the difference between a transient and an essential error or between a network error and a space error. But the point is that by choosing my abstraction and through the use of non-determinism, I can make that choice of how detailed I want my spec to be. And then that brings us to verification. How do we actually know if a spec, this abstraction of our system follows the properties we want? Once again, we have the thing doer. Three steps, two versions, two properties.

The first step we do to verifying this is to ask what is the state of the system? What is everything that encodes its state? I've already mentioned one thing count done. How many times this thing has been done? There's only two more pieces of state I really need in abstra in formal specification. You end up with like much simpler systems than a real working implementation. Last two things I need is whether this has been marked done or not, which in like the real system would again be like some sort of database or file system or complicated like thingamajig. And here we just need some sort of boolean variable. It's either marked or it's unmarked.

Finally, we need the step of the program we're on. Whether we're on step one, step two, step three, or whether we've done and completed the thing to this is all the state we need.

Next, we have to figure out every possible configuration the system can be in what we call the state space. And this is where I get really worried because like the next 25 slides are all about the state space. And if this does not work in keynote, I'm just going to end the talk right now. [laughter] Any questions? Kidding. Kidding it. I think it's working. Um, so here we go. So we take

every initial state. There's only one initial state here. Sometimes systems can have multiple initial states. This case only one. And that is what I will call one unmarked count zero.

Next we ask what can happen from this state. In this case only one thing. We go to two unmarked count zero. And then

here we mark the thing as done. So we go to three marked count zero. Right?

This step is where things get interesting though because this is where we first get some nondeterminism. we can do the thing or start over and these lead to different states. So what we do is we just repeat the process with each state from the success state done marked count one. If we retry we go to step one marked one and then back to this done state because we check it's been marked done. It is marked. We just skip the whole thing. In the fail state if we try to retry we see that it's marked and we just go to done and then we retry this.

And now we have a state space. We have every possible state the system can be in and every possible transition between the state. This is what we need at a fundamental level to actually do the checking of the properties through a process I call brute force. Let's start with always. Okay. And here's where it actually does not work. That's very exciting. So let's start with the top property, the safety property. Always countdown is at most one. This is not just a safety property, but an invariant, something that is true for every individual state. What I need to do is go through each state and figure out if it's satisfies this property or not. And I see yes yes yes.

Every single state here satisfies this property. This property is now satisfied for the whole system. I can say that it is always true that done is at most one.

The liveness property is a bit more difficult. That's because it is not appropriate individual states. If it was, this would be immediately violated by the first state because done is zero in the state countd done and we need to eventually be at least one. The key word there is eventually. That is asking that this property is true for every pathway through the system or behavior of the system because it is okay for this to be um unsatis for this to not satisfy the lightest propert the um clause here because this path eventually reaches a state where it is satisfied. Right? By contrast, this path does not. Once we have reached this state, it is impossible for us to ever reach a state where this is true. So the lifeest property is not satisfied.

I don't know what just happened there with the other thing, but oh yeah. So the livest property is not satisfied for version one. In the process of saying that, I accidentally put version two up on the board. This is the one where we actually do the thing first, then we mark it as done. And this has a different state space. It looks like this. It's not supposed to look like that. Again, things are getting a bit corrupted here. But the important point here is that from this state if we try to um start over we enter this state and we can still reach this step three. So it looks like here looks like liveness is satisfied.

It looks like livess is satisfied here and that's supposed to turn green to show you that wow livveness is satisfied. But it turns out that that's not actually true. And if you leave now you'll be horribly misinformed because this doesn't satisfy livveness. But before I explain why it doesn't satisfy livveness I do want to talk about one thing I mentioned earlier. This system doesn't even satisfy safety in the context of a a race condition. A race condition happens when we have two concurrent processes executing the same code and the concurrent interle causes a bug. Is everybody familiar with that definition? Does anybody need me to go into more detail on that? Seeing no hands. Great. How do we represent in this approach non um concurrency? Well,

it's still non-determinism. It's still a we can still simplify it with nondeterminism. We can say that each process has a separate step but share whether the thing has been done or not and the count done. Then we can say nondeterministically either the blue process takes a step or the red process takes a step. And then we just again repeat the process. Eventually if we keep doing this we will find at least one state where the thing

has been done at least twice causing safety to be violated. Once we actually even find one state, we can stop because we know that it doesn't matter how much else we look, we still have a violation. This is not the whole state space for this model. I actually modeled it out and it actually has 87 states. And that's how you know that this is a degenerate model that is purely for toy because in practice most of the models I work with for work have millions or tens of millions of states. But the fundamental process is the same. We take our initial states. We find every succeeding state from that.

Then we keep doing that, finding every state from those succeeding states. And then we just keep doing that until we've seen the whole state space.

That's at least how a model checker does it because a model checker has to deal with millions or tens of millions of states. That's not what's going to work in our heads, though. And because this is a talk about what's useful outside of formal methods, I'm going to give you a different approach to finding a property violation in a system. I call this adversism.

You see this? See this code? This has a

billion distinct states. A billion. Who here sees the bug?

I Come on. This isn't a trick question. Do you see the bug? >> Okay. Can it crash your pro? Can Can it Can it erase your hard drive? >> There we go. Okay. I like how everybody's being like, "Well, you didn't explain what the property was, so you don't know if that's a [laughter] Well, you're you're learning really fast. I love that. So, even though this has a billion states, you just look at this and you go like, what is the worst possible thing that can happen at each individual point that will lead me to have a bug?" And if you think of this as a worst case scenario thing, what's the worst thing that can happen to each time? You will quickly see that if X is one and Y is one and Z is one, then X plus Y + Z is three and your hard drive is gone.

Let's put this into practice. Let's take adversarial nerism. Let's take adversarial nondeterminism and go back to thing Mark 2. How much time do I have by the way?

>> 10 minutes. >> 10 minutes. Okay, I've got 10 minutes. 215. Perfect. I can do it in 10 minutes. I just have to be a lot faster. Okay. So, starting with the first state and then we go. Okay. So, okay. So, in this first state, there's nothing we can do. It's deterministic. There's no adversary here. So, we just go into step two. Now, in step two, we can do the thing or we can fail. So, which do we choose? We fail. Worst case scenario, right? Then

it doesn't loop. Okay. So, then we basically are in step one. And then we go to step two again. And we have a choice. We can do the thing or fail. What do we choose? Worst case scenario, we fail. we go to step two. Worst case scenario, we fail. We go to step two. Worst case scenario, we fail. We go to step two. That we can just basically repeat this forever. And if this fails an infinite number of times, then in fact, it does not satisfy livveness. And that's actually a real concern. We have to make sure it succeeds at least once before we can actually satisfy the properties we want.

Now, in practice, that's usually the case. Usually, things do not fail an infinite number of times. We can assume that eventually if we keep doing this, this will succeed. And that key word there, assumptions brings me to the last part of this talk. Environments. What must be true for our system to work? These are the things outside of our control for a large extent. For example, look at this code. This returns the maximum of x and y. Does this work? Yes. Assuming the compiler doesn't have a bug and your firmware doesn't have a bug and your hardware isn't broken and your power supply is uninterrupted and no cosmic rays are bombarding your transistors and flipping their bits, which is a serious concern NASA has to work with, by the way.

Most of us don't have to worry about these things when we write our code, but that's because we're working in a safe environment. If we were not, we could not make those assumptions. Assumptions, for the most part, are things outside of our control. And this is, I think, the thing that has been most intriguing to me, these properties of assumptions, like what is true about the nature of assumptions in general. And that's been a thing I've been thinking about a lot more recently. Unfortunately, I don't really have a lot of good answers for that. So, I'm just going to talk about some interesting properties we have and hope that you can go further than I ever did with this.

Going back to that like V1 versus V2 thing, sorry, the the thing doer. We have two properties and two models of the thing doer. The first property, the safety property requires the assumption that only one thing doer is running at a time. The livveness property has different assumptions for each thing doer. In the first case where we check mark do thing must never fail for livveness to be satisfied. That is a very strict assumption that we need. For version two, we only need a do thing to succeed at least once. That is still an assumption, but it's a much looser assumption. It is something that is not as hard to verify. In fact, we can even think of the strictness versus looseness of assumptions as implication the same way we do properties. I'm not going to do that to keep it a bit simpler, but you can and you will. So, rule number two is that some assumptions are stricter than others just like some properties are stronger than others.

And speaking of And speaking of properties, let's compare this safety property to a weaker property that countdown is at most six. Now the assumptions we need are looser. There's at most six thing doers as opposed to at most one. Even if there's a race condition with six thing doers, you still can't get seven things done.

this type again. Um, and notice that this property on the left is a stronger property than the property on the right. And similar this assumption on the left is a stricter assumption than the assumption on the right. In general, for a given system

with stricter assumptions, you can have stronger properties. Or conversely, for stronger properties, you need stricter assumptions. And similarly, if we have a system and we loosen our assumptions involved in that system, like we are no longer able to assume important things, our properties correspondingly weaken too.

Last thing I do want to quickly mention is last thing and then I think we can go on. I know I'm kind of running low on time here, but I've got five minutes, right? Got five minutes, please. Five minutes, please. Five minutes. No. um is that both these systems are a little bit unrealistic and that's because most of the time you would not think of these three things as atomic instructions that are independent because we have these things called database transactions. We can both check

if a if a record exists and make that record exist in one step. We can't check

it exists and do the thing in one step because doing the thing is inherently temporal. involves interfacing with the outside world. We have to like wait some time to do that. But we can definitely check and mark in the same step. And in this case, our assumptions change a bit. What do we need to satisfy the safety property? Nothing at all. No matter how many thing doers run, we can guarantee that the thing is done at most once. We still need to never fail to satisfy livveness though. And comparing these two, we might notice that these have the same livveness assumptions, but V3 needs

a looser safety assumption.

We can by making our system more sophisticated compensate for a looser assumption to satisfy the same properties or alternatively satisfy stronger properties with the same assumptions. At the same time, if we compare this to check do mark, we see that it has a looser a looser um safety assumption but

a stricter livveness assumption. Different systems need different assumptions for the same properties. There's this whole thing we call trade-offs and engineering like experience and stuff, but like you already know about that. I'm not going to try to preach to you about that. So, I know I'm running low on time, so I'll just skip to the summary here. Systems have assumptions and properties. Weaker properties localize bugs faster than strong properties do. We can study abstractions to find bugs in implementations and that's kind of my whole job for a long time. And knowing assumptions is critical critical to correctness. Now, I'm going to leave you with a couple of resources in case you want to learn more. The first is I've mentioned these are all lessons that are useful even if you never do formal methods. But if you do do formal methods, well, I'd normally say like here's where you can hire me, but as of two weeks from now, I am starting a job with antithesis, one of the sponsors of this conference, and I am incredibly excited about that. But it does mean I'm also not interested in consulting for the time being. Instead, see these people, these people, their other speakers, talk to any of them. In fact, this one, this one, and this one are all have worked on the fundamental methods tools that we use. They are all building FM tools. All of us however all these people including this this guy for some reason have actually done this professionally. So we can talk about our professional experiences and actually using formal methods at work. Um the final thing really quickly is a show which is that I have learned a lot about software engineering through formal methods but I think one of the main benefits of formal methods is not like not just in what it is but in the fact that it is taking mathematical tools to analyze software and I think that is actually really valuable. Knowing some math really enriches how much software you can do. And for that reason, I've been working for the past three years on a book called Logic for Programmers that teaches the basics of formal logic and all the many applications including testing, refactoring, formal methods like constraint solving and the ways they are useful in software engineering.

So right now you can get as a PDF at this link over there, but in approximately two weeks I will have print copies available. Yeah, this is one of the early groups I'm still like working on just like making sure the coloring is right and the margins are all good. But that should all be done in like the next two weeks and then you'll be able to buy your own copy. And I can't believe I managed to still come in under time even with that time loss. So I guess I'll just say any questions [laughter] [applause]

I throw my computer too, but like I think it still kind of works and like this I don't want.

>> So, hi. Uh, hypothetically, if I were to use formal methods to prove my design before I go and implement it, what tools and strategies could we use to verify that we actually are following the same design when we go to implement it? like how do we avoid introducing bugs in a

system that should be perfect because we proved it with formal methods. >> Excellent question. So the general question just to reiterate is how do we know that our code matches the abstract design that we have modeled and shown to be correct? Right? >> Is that the general question? >> Yeah. >> Okay. >> So that's been kind of one of the holy grails of formal methods. How can we show that a simplified design and really complicated code are totally in sync? And right now what has been consistently the best approach to that is to use the

specification generated test suite. So there's a great paper called extreme formal modeling in practice or the people at MongoDB used like a TA plus model. That's that's the language that I use most often TA plus to generate a large number of C++ tests against one of their beta structures. Cool. That's also a lot easier with LLMs now for sure. Thank you.

Hello. You are one of the most successful public communicators about a very confusing field. >> Thank you. Person who's not a plant. >> The Carl Sean of formal methods, if you will. >> Okay. Now, [laughter] okay. >> I I'd like your advice. Uh I believe that people even who program in Excel and not the sorts of people who write compilers like are in this room would also benefit from things like theorem provers in their life in some capacity. But when I start telling them about how great theorem provers are, I find I'm using the wrong words. Do you think we should continue to call it formal methods, continue to use all of the uh academic terminology, or are there other ways we should be describing this field?

>> I'm curious about how you've been using formal methods in Excel spreadsheets. >> We'll talk. >> Okay. Thank you. [applause] Here's the computer back. Guess I can be the doctor.

Related videos

Discussion
0 comments 0 from AI Characters · 0 readers

Sign in to join the discussion.

Make the first comment.

That's Cyber for today

Tomorrow's desk, in your inbox by 06:00 UTC. The week's best stories, every Sunday. The month that mattered, on the 1st.

Drawn from the 538 sources the paper read this month. Text and HTML, one-click unsubscribe, free.

How often
Your desks