Yeah, that's okay. Thank you. So we talked a bit about VPP this morning But but I realized many people here may not know about about VPP So let me calibrate my presentation who in the room knows about VPP Okay, so some of you know but not everybody so I can what I can do is I can I can Share a few slides about what VPP is and then while While Jill gals was talking I did set up a quick container demo using using VPP so perhaps I will be here and it's very risky because I just did it now, so we'll see and Maybe we'll have one of those demo effect and then I will share with you slides Explaining how VPP is integrated into open stack with this networking VPP ML to driver Okay, so let me Share a few slides first quickly and then we'll go into the demo Okay, so VPP stands for vector packet processing It's a project. It's an open source project under Linux foundation And it actually it's it is actually under another umbrella project, which is FD.io, which stands for fast data.io VPP is a software that does packet processing. What that means is that? Reads packet and forward them and modify them and forward them again So this kind of of thing which is usually done in Linux kernel or in other packet forwarding or in hardware, right? So it's a software implementation usually it works on DPDK, but then you have all their net packet.io that on top of which it can sit and This project sits here in the in the in the stack so this morning Charles was talking about open daylight, which is here. I guess later in the afternoon in the days There will be a presentation about OPNFV So a VPP is really low layer right the thing reading packet forwarding packet and the thing which needs to be really really fast so this Fido project is actually a multi-party project with many people coming from many companies Contributing so we see people from Intel, ARM, Ericsson, so many many companies are actually contributors and It's a very active project, right? So here it's I won't go into the details But basically I took a three project in the same domain So OVS, DPDK and VPP and try to show the number of commits. So it's it's a very active project You have many components, but on that I will go quickly. So that's the thing I'd like Well that I will go quickly Why is VPP fast and what is what is that really? Okay So what VPP does is it it treats packets and forward them So that does layer 2, layer 3 and now we also have layer 4 What is extremely important to understand is the secret source of VPP and don't tell it because it's a secret source it's it works with vectors of packets in order to Make the best use of Instruction cache as well as data cache, right? So what we do is when we have to process a packet We go through several nodes So for instance we can read packet from DPDK and then we'll get a bunch of packet from DPDK There will be processed at the internet level and then we perhaps will do IPv6 or IPv4 We do a lookup and then we'll forward it, right? So we have several steps, right? If you look at the usual cut data pass The usual cut for data pass. It's actually pretty long, right? So you have a lot of instructions to do because forwarding a packet is not that simple You may have to do a occult you may have to do not not or not You may have to do many many things, right? So it's a lot of lines of code and what what we are trying to do is to make sure that when we execute an Instruction to process a packet this instruction is actually in the cache of the CPU So how can we do that either we increase the instruction cache size? And I guess our friends from ARM from Intel they are all doing that But what we can do as well is try to be smarter in writing our software and instead of executing the full Data processing the full code for every packet and coming back again What we can do is have a small portions of code that are and that are applied to a bunch of packets So this bunch of packet is actually called a vector and what we will do is we will Execute a limited number of lines of code on this bunch of packet So with that we make sure that The code is always or 99% of the case the code is in the cache And then all the packets will take benefit of that because the penalty to fetch the cache The code from central memory is actually huge when you are processing millions of packet per second So that's really what VPP is about so that's secret source number one secret source number two is Okay, let's assume. We are good with our cache for the instruction We need we now need to also to make sure that when we have we are fetching data to process the packets the data here as well so in order to do that we We will process packets with a quad loops or dual loops, and I will show you how so This is a very slow animated slide. So I ate that So you have your vector of packet which arrives from your nick card, right or any other thing could be through DPDK If you have a VM that can come from a via a user interface that can come from regular Linux kernel and this vector of packet will arrive here and basically will process this vector of packet and Because we always have the we always process a vector. So let's assume. We are in this node called IPv6 rewrite When packets or packet zero is being processed Probably the code won't be in the cache because before that CPU was executing IPv6 lookup and before that he was executing IPv6 input so probably when when packet zero will be processed There is a very little probability to to have this The code of IPv6 rewrite in the instruction cache But but now the beauty of this model is that for packet one two and three They will all have the benefit of the car of the cache warm-up which was done for for packet zero So that is really One thing which is fundamental in VPP. So if processing this graph is slow What that means is when we will then come back to the AF packet input or to the Dpdk input will probably have a lot of packet waiting to be processed. So what we do in VPP is we tend to measure What is the vector size? So if we have small vectors that means that? VPP is doing nothing because it don't Because it's processing very small vectors and when VPP is very very active or when there is a lot lot of packet to Be processed then we'll have we'll have long vector So so the size of vectors is typically between one to two hundred and fifty six and if you have two hundred and fifty six vector size that means that Your CPU is under high pressure if it's if you have small packets It means that your CPU is no is doing nothing So that is that is what we do for For to process packets, of course You may have vectors that do not go through the same through the same path in this graph like here You have a packet which is an art packet. Of course this packet will won't go here So we are not saying that all packets have to go in the same path in this in this graph Okay, one of the beauty of this model as well is This nodes are actually dot SO file, right? So it's really easy to extend if one wants to add nodes to do some special processing I don't know that maybe for for a curl that can be for whatever you want It's really easy to extend you just have to write a node here You do not modify the rest of the code So you can localize of your specific plug-in that can be open source or even closed source You do whatever you want with that you are you have you have your plugins And you can extend this graph at runtime without having to recompile VPP So that is something extremely powerful and You can think about hardware acceleration like we see people having unique cards Which are able or accelerators which are able to do crypto for instance In that case or that can do the first, you know levels of processing in this graph So that so of course VOS user and AF packet input these are software nodes But nothing for but forbids you having cards which will do some level of processing and inject Packet later in this poll in this processing graph in VPP Okay, that I will skip numbers When I when I say fast what what do I mean? So just few graphs and and I'm sorry. This is a bit all the Version and we can't read anything resolution is not good enough. Can you read something? No, it's It's it's actually very hard. So trust me that doesn't work Can we zoom in and I will show a live demo because slides are good But demo are better. So after that I prepare kind of a demo risky demo, but we'll see What is important here is I did a test with IPv4 and test with IPv6 By the way, we have with VPP. We have also a testing infrastructure, which is all public You can it's called CC it. It's in the cloud. You can connect to it It's under the Linux foundation and you can rerun the test Read the measurements all that is public. So We is what is interesting here is So we have IPv4 and we have IPv6 and what we did is we increased number of calls, right? To do routing what routing means it it means three operations Basically one is receiving packet two is taking your routing decision and three is forwarding the packet, right? so with two calls we do like 20 24 million packet per second whatever is packet size, right? So that is really good and and and one of the beauty of this model is that when you are adding calls Yeah, you have a linear increase of the performance with a number of cores That's extremely powerful because we did this test from two to two thirty six course And we see this line your increase thanks to this cash effect that we are taking so so that is really good This is with 1 million IPv4 entries and we have exactly same effect with IPv6 Where we have we are increasing number of calls and we have the same linear increase, right? Here it's 24 million packet per second on two calls which means 12 million packets per second per cause You seem a bit sleep I mean wake up 12 millions packet per second, right? Thank you 12 million packet per second per core receiving for routing and and then forwarding if you do the math That's not a lot of cycles per packet, right? So that's what we do in this test and then we did the same for It sounds like some people are still doing switching in this world So you have a layer 2 processing here and with with a layer 2 processing. This is a 20 million packet per second per core with the same linear increase, right? so that is pretty cool and Now it's enough talking and forgive me if that doesn't work because I just did this demo before Here it is so What I did here is I have I have two containers with an IPv4 address each IPv4, sorry about that and And and what I did is I put VPP to connect those two guys And I will run an IP of client and an IP of server between these guys, right? So and then please help me praying the user the gods of demo We'll see whether that will work So where where I'm lost Okay So I puff To a regular Linux containers running I puff it's it's this this is not a bare metal server This is actually this is a VM, right? So I have two containers in a VM Okay, running in a VMware if I remember correctly and and these two containers can do with with a regular TCP connection with VPP in between like 37 gigabit per 36 37 gigabit per second So that's cool, but I told you before what is actually important is what is the vector size for that, right? So what is let's have a look at let's have a look at vector size so so we have a magic comment for that So vector size So these are the nodes in the graph so you remember the graph in the graph we have the we have all these those nodes and vector size is thank you is six dot 93rd right for this top zero output and and And for the TX as well What that means is what that means the way you have to understand that is if we come back to this presentation Which was here When the vector when the vector of packet arrives, we typically process six packets here, right? That's the average we do In order to process 40 gigabit per second in regular Linux kernel Which is fun is that the bottlenecks so that and so so the but when when we are only processing six packets That means VPP is not the bottleneck here What that means is Let's have a look with with the bottleneck then so let me run again this hyper and So I don't know if you are familiar with H top, but the red is kernel processing The green is VPP VPP is in polling mode So it takes 110 percent CPU when it has to work right so in red this is a TCP stack so the TCP stack is actually the bottleneck here and If I stop my traffic, of course now everything is at zero VPP He does have this call so-called adaptive mode when there is traffic pressure It starts pulling the packets right so it's an active loop But when it when it When there is no longer a lot of traffic pressures and it stops doing that to avoid burning one core So that is what is VPP, but this presentation was supposed to be about networking VPP and I only have 10 minutes So I will what I will do now is I will switch to the other presentation Explaining you how that that can be integrated into open stack Because all that is useless if that is not Integrated somewhere Okay, so networking VPP is an ML to driver for open stack It was primarily designed to support NFV right at the beginning What are the open stack features we support with VPP VLAN VXLAN? VM connectivity is only with VOS to the interface otherwise. That's that's too slow We support many security features including regular open stack stuff such as security groups But very advanced stuff such as JSON web token with certificates I will show you what that means and we do layer 2 and layer 3 with a chair and all those stuffs so Networking VPP has this architecture. It's a TV centric What that means is when you want when when you turn up to create a port instead of communicating directly with With the compute nodes what it does is it will put that in at CD and then The the compute nodes will be weaker We will wake up and we'll take into account that stuff That is really cool because the problem with open stack in such a distributed system is you don't know When a failure will arrive, but the failure will will arrive at some point and what we are doing here is we are making sure that when Let's assume Neutron wants to create a port on this VM Okay on this on this compute node if this compute node is dead for some reason sorry rebooting or whatever you want When it will restart it will actually fetch the states from at CD instead of reading that them from from Neutron so it's kind of intent based networking if you will because Neutron is writing its intent the desired states in In at CD and then the compute nodes are actually reading these those desired states and If the agent so let me show you what that means So typically creating a port will go through these several steps So first there is Neutron asking to create a port then this is stored in at CD Later that will be Understood by the agent and then the agent will send the feedback and will notify Neutron so that the VM can be created If for some reasons the agent crash what it will do when it when it will restart it It will do what we call state reconciliation What that means is every object within VPP comes with a unique ID and when we restart this agent will actually fetch the state from from at CD state fetch the states from from VPP and will Reconciliate the we will do a diff between those guys and and and remove states which are useless now and include new states Which are required? So that is something interesting Also interesting thing is it's very much at CD centric, which means that if for some reasons at CD fails There is another one which can end over there are many many cool features with with networking VPP One of them is now we have this Redulency between layers three routers Based on keeper live D. So that is so if one dies then the other one can end over. So that's also extremely useful in production Security Security we have a role-based access control So when only few compute nodes the compute nodes comes with rights and there you cannot write and read anything in at CD So basically if there is a malicious compute node for some reasons then you are sure That the database cannot be overwritten by someone who doesn't have the rights. So that is another cool feature We have these Jason web tokens that can make sure that The states which are written in the database have been written by the right compute node. So we have all that right? So I will just go to the roadmap slide We are now have a lot of features the next thing we need to work on is this villa nowhere VMs that we don't have and Have a better app ending for for v6 So these are really the remaining features we have now and you are more than welcome to contribute or to test it If you want I realize I may no longer have time. So do you do we have time for questions or? Okay Yep, five minutes to until the start of the next presentation before questions I just like to for those who aren't on the mailing list. We're having a gathering. There's some space in the man can piece cafe Later this evening from 730. So you're all well Some of you are welcome to join us come along if there's room there's room and if there isn't room Then then it's it's also the center center center part of town. So and so it's a big enough place We should be able to fit a good number of us in With that any questions about VPP VPP or VPP used to connect containers or for open stack I know it was a lot of things being showed in these Presentation there is there is another VPP presentation later, which will go into more detail I think in the in the higher-level technical details of VPP Anybody have any questions you shout it out. I'm Jean. Can you? The question just for the record the question was does the agent of VPP replace replace the agent of neutron on the compute nodes I will answer So there is an I Mean there is not an agent for for a neutron in general people are you people may use will be the agent Which which is on the compute node will depend on the virtual switch you will use right? So if you are obvious you will get a neutron agent if you are using You know regularly the next bridge you will use another agent So we have written an agent which is running on the compute node and that will drive VPP So yes the agent on the compute node Replaces this agent because this agent knows how to talk to VPP and knows how to talk to hcd. I Actually have a question as well. Is this different from the honeycomb agent? It is absolutely Honeycomb is is a net confiung agent and here. It's an hcd thing right so it's this one is written in python You said VPP run mostly on top of the pdk I know there is also an option to run on top of ODP Please can you explain the benefit? sure, so in the past in the past VPP was tightly coupled with the pdk and during the last version what we did is trying to have Dpdk being a plug-in an important plug-in, but but just a plug-in beside others So there are many reasons why not having not using dpdk So for instance in the demo. I was showing before I was connecting regular containers, which doesn't work with dpdk. So So on ODP right now I Don't know to be honest with you because I have not done a lot of tests a lot of tests with it But I know people who are using with it working with it So I guess there may be some better performance with some new cards, but I'm not too sure about that So I don't want to answer so last question Anybody else have a question? I'll go beyond the usual suspects. Yeah So the question was can you use the VPP agent along with the OpenStack enables this option to have hierarchical driver So I I don't see good reasons why that wouldn't work, but I don't really see the benefit of doing such a thing Right, so in theory. Yes, but why would you do that? I mean if you use one for water It's probably for a good reason. So I don't see why you would you would have those two guys Was that alongside just again for the recording that the VPP agent alongside the OVS ML 2 Okay, well or another costume agent It looks to me a bit like a Frankenstein solution, but but but why not why not? Okay, that's World of time so thank you very much So my next speakers I will be meeting them for the first time on the stage so


A drone attack in Moscow have targeted homes of Russian intelligence officials. A drone attack in Moscow last week appeared to target the homes of Russian intelligence officers, the latest salvo in a psychological campaign against Russian President Vladimir Putin's regime over its invasion of Ukraine, multiple sources familiar with the strike said. This was announced by NBC News. A senior U.S. official and a congressional staffer with knowledge of the matter said the drone strikes appeared aimed at what were believed to be Moscow residences of Russian intelligence officers. At least one of the apartment buildings hit in the drone strikes has ties to Russia's SRV, the Foreign Intelligence Service, according to Strider Technologies, a Utah-based strategic intelligence startup that uses open source data. According to the Strider Global Intelligence Team, the building was owned by a Russian state budgetary organization which has held contracts with a military unit known to be a cover for the Foreign Intelligence Service NBC News reported. This was not some random attack on a wealthy suburb, said Eric Levesque, the chief operating officer and co-founder of Strider Technologies. The strike gets to the heart of the psychological warfare elements of the Russia-Ukraine conflict, which for the first time is reaching Moscow neighborhoods, he said.


Hi, it's Jesse at Mountain View Dodge. I've got a great truck for you to have. 2017 Ram 1500 SLT Blue in color. You can see that it's been lowered. Custom exhaust. This truck is a great cloth interior tow package. Only 6,000 kilometers on this truck. And you can see behind, interior is absolutely meant to be ever been driven. Spray liner, box liner.  Custom exhaust. This truck sounds absolutely amazing. Once again, you can see what kind of shape this truck is in. This would look great in your driveway. Come see me at Mountain View Dodge. My name's Jesse.


So does plastic wrap actually remove cork-taint, TCA? I'm gonna put this to the test.  Hello, welcome back to Exotic Wine Travel. I am your host, Matthew Horky. Welcome back to the show where we help you drink adventurously so you can expand your palate and expand your mind. Today, I'm hopefully gonna expand some palettes because I'm gonna try to solve a corked bottle of wine with plastic wrap. I've seen this little trick before, but I don't know if it works. We're gonna test it out and see here today. If you don't know what it means to have a corked bottle of wine, I did a video previously about what corked wine is, what TCA is. I'll link that up here in the description box below. So what will you need for this trick? You'll need a corked bottle of wine, a decanter or some kind of pitcher and some plastic saran wrap. I usually hate using plastic or buying this kind of stuff, but I made the sacrifice and I went out there and bought some of this specifically for you today. Okay, let's give this a go. If you didn't see the previous video, I told you I did a tasting and I came across a corked bottle of wine. Fortunately, the producer sent me two bottles here, so the second bottle was not corked. I was able to evaluate it properly, but thanks to this producer, I'm gonna be able to do this video. Like I said in the previous video, it's not the producer's fault that the wine is corked, it's a cork manufacturer's problem. So let's give this a go here. I've never done this before, I've never tried, so let's see how it, if it actually works. First, I gotta make sure that I get this out evenly. The thing with plastic wrap or foil, if you don't get it evenly unwrapped, then it's gonna take you forever to get this correct. Now I remember why I don't use this stuff. I think I already tore it. Okay, supposed to put this little plastic saran wrap in a ball, put it in there. I don't know if that's enough. Now the thought process behind this is that the plastic soaks up or attracts that molecule, TCA, trichloroanosol. It's supposed to leave the wine tasting better. Let's actually see. So we have the pitcher, I have the plastic wrap, now it's time to dump in that bottle of wine. I'm gonna keep some in the bottle so we can do a taste test between the saran wrap bottle, the corked bottle, and the uncorked bottle. Now, we wait. Okay, while I wait a little bit longer, I'll start smelling the wine. So, you know, I did in the previous video, what does corked wine actually taste like?  I don't know where the wet dog comes from, but we're gonna see if it starts to get, I know that for me, I started to notice it does, it actually smells mostly like dry cardboard, especially if you tear the cardboard in half and smell it. That's what I think corked wine does. It takes away some of the fruit, some of the aromas, and it takes away a lot of the pleasure. People have different tolerances to it. I've heard some wine people say actually they don't mind TCA when it's in port wine. So, hey goodness, I have my trusty Corvine. You can learn more about the Corvine. I have some videos on this. I'll put a link in the description box. Put a non-corked wine here. This wine, by the way, is a fiano from Campania in Italy. It's, for me, it's one of my favorite indigenous white grapes in all of Italy. Okay, maybe I just start out with the corked wine first. The thing with corked wines, a lot of times as they air, they start to become more and more corked and more unpleasurable. Let's do the uncorked wine here. Much brighter, much more expressive. Let's try the one in saran wrap now. So does this actually work? I'm gonna have to say I was skeptical of this little test, but the saran wrap worked to a certain extent. It took away some of those cardboardy flavors. It obviously was not even close to as pleasurable as the real wine, but it was not as terrible as the corked wine. So my suggestion, if you bought your wine at the restaurant or the wine shop, just take it back and get another bottle. I hope you like this video. Let me know in the comment section below. Has this worked for you before? I'd love to know and I will see you at the next episode. Hello, thanks for watching. Hey, you made it to the end. Make sure to subscribe to our YouTube channel, click the bell so you know when new videos are out. If you like content like this, check out our Patreon page where you get some behind the scenes exclusive content. Thanks for watching. Cheers. Cheers.


Hi and welcome to part three of this first lecture in the program analysis course. What we'll do in this third part is to look at some of the foundations of this course. So this is basically material that you've probably seen in some other course during your studies. So this is just to make sure that everybody's on the same page and we start from the same level when we talk about the more advanced topic. So here we look into grammars and then some representations of programs, for example, ASTs, abstract syntax trees and CFGs, which means control programs. So if you have seen all this material somewhere else, feel free to skip this part of the course. So this is just to make sure everybody is on the same page. Because this course is about program analysis, it is of course based on programming languages because you first need a language in which you can write a program so that you can then analyze it. So let's start by having a look at what these programming languages actually are. So a programming language or short PL can be thought of three parts. One is the syntax, the other one are the semantics of the language and then if it's a real language that you can actually use, there also needs to be an implementation. So what do these three parts really mean? So the syntax basically means the form of programs written in this language. So how do they look like? What kinds of characters can you put together in order to get a program written in this language? The semantics are about the meaning of programs written in this language. So the semantics of a programming language basically say what will happen if you execute a program written in that language. And then finally there's the actual implementation, which is what you need to really execute these programs. There are some languages that only exist basically on pen and paper. So they have a defined syntax and they have defined semantics, but are never implemented. This is mostly for research purposes, but in this lecture we focus on languages that are implemented. So the implementation is an essential part of these languages. We look into each of these three parts in some way or another during the lecture. I'll start to say a little bit about the implementation and the syntax here. And then in the next lecture, we look into more detail on how to describe the semantics of languages. So let's start with the third of these two ingredients, namely the implementation, because this is probably what you are most familiar with when you're actually using programming languages. So there are basically three different ways how a language can be implemented, which compilation, interpretation, and some hybrid form of these two. And let's have a start by look at how typically compiler works, so how compilation usually works. So compilation means we have some source code of a program. And at the end, we would like to execute this program on some machine. So we need to have the same program in a machine language. So for example, the source code could be written in C, and then the machine language could be x86, if you want to execute this on a machine that understands x86 instructions. And now to do this, a typical compiler consists of four steps. The first one is a lexical analysis or short Alexa. And what this lexical analysis does is to split the source code into so-called tokens, which you can think of as individual words in the programming language. Then the next part is a syntax analyzer or also called a parser. And what this part of a compiler does is to take the tokens and organize them into a tree, which is then called the syntax tree. Then next we have a semantic analysis, which is basically checking that some semantic properties of this program hold. So for example, if you have a typed programming language like C, then it's typed checking the program. And then after the semantic analysis and assuming that it has successfully passed, then the final part of this tool chain is a machine code generator, which is taking the program in some intermediate representation and then emits the instructions in the machine language, so that at the end we have, for example, x86 instructions that can then be executed on the actual machine. Another way to implement the programming language, which is not based on compilation, and this should be b0c, is interpretation. So without going into much detail here, let me just say that this is easier in a way, but not as efficient as a typical compiler. So what happens here is that the code is passed, so the first two boxes in the compiler are more or less similar, but then there's no generation of machine code, but instead the interpreter will go through the past code one statement after the other and just execute it whenever it sees that statement. And then finally there are some hybrid approaches that basically combine this idea of interpretation and compilation. For example, this is done for languages like Java or also JavaScript, where you have a virtual machine that is starting to interpret code, so that you can start running the code very quickly, but at some point compiled some of the code, usually code that is executed very often, so that it is executed faster because the machine code is specialized and optimized, so this is typically much faster than interpretation. So these hybrid implementations and virtual machines basically try to get the best of both compilation and interpretation. All right, so now after the implementation, let's have a look at another ingredient of a language, and that's the syntax of the language. And here we look at two ways to describe the syntax, and the first of them is based on a grammar. So essentially what a grammar is trying to answer is the question, which programs are syntactically correct, so which programs are actually part of the language. And to do this a grammar consists of four parts, which you probably have already seen somewhere, so this is hopefully just a summary. One of them is a set of terminals, which are the basic building blocks of the programming language. Then you have a set of non-terminals, which you can think of as helper symbols that describe how the terminals can be put together in order to get a legal program. Then you have a set of production rules, or just productions, which describe how to derive terminals from non-terminals, and then you also have an initial symbol, which describes the starting point of deriving a correct program, and this is some non-terminal. To make this more concrete, let's have a look at a specific example, and this example will be a very simple toy language that describes arithmetic expressions. So arithmetic expressions, things like 1 plus 2, and so on, right? So in order to do this, we need to define these four things, the terminals, the non-terminals, the productions, and the initial symbol, and let's start with the terminals here. So this is a set of symbols that your programs, or in this case your arithmetic expressions, are composed of, and this will be all the digits from 0 to 9, and also plus and minus, because we want to focus on these two operators in our expressions. Then we need to have this set of non-terminals, and in order to define arithmetic expressions, there are many possible ways how we can do this, so this is just one possible grammar, of course. In this grammar we'll have four non-terminals, one called x for expression, one called num for number, one called op for operator, and then the last one digit for digits. We also need to define the start symbol, so in our case the start symbol will be the non-terminal called exp, because we want to at the end be able to describe an expression, and this non-terminal represents expression. And then we have this set of productions, which are each a rule, so let's just put down these rules here, so there will be one rule that describes how an expression looks like, and this is basically saying that an expression can be a number, or it can be an expression followed by an operator, followed by another expression. Then we also need to say what an operator is, so we give another rule for that, where we say an operator can either be plus or minus. We also need to define what a number is, so we say a number is either a single digit, or it's a single digit followed by a number, and then finally we need to say what the digit is, and here we use the remaining terminals that we haven't used so far by saying a digit is either zero or one, and so on until nine. And these four things, the terminals, the non-terminals, the productions, and the initial symbol are now describing how our language of arithmetic expressions looks like. So now to make sure you really understood this, let me just have a little quiz for you, where I'm basically asking what of the following is really part of our language, and I'm giving you four options here, so the first one is this, the second one will be this, the third one is this, and then finally we also have this, and at this point if you do not yet know the answer right away, maybe stop the video for a second so that you can think about it, and then I'll tell you the solution. So the first example is part of the language, because you can derive this program or this arithmetic expression by starting at the start symbol and then using the production rules. The second is not part of the language, and the reason is that the parenthesis are not really in our set of terminals, so there's no way to get this string of characters from the language that we have defined. Similarly the third example is also not part of the language, it looks almost correct just that we do not have an operator for multiplication, we just have defined operators plus and minus, and finally the last one is an example of this arithmetic expression language, because we say in the first production rule that an expression can just be a number, and a number can be a sequence of digits, so this example is a legal arithmetic expression. So now a grammar is describing what programs are part of a language, but once the compiler or any kind of program analysis tool has determined that a program is actually a legal program in your language, then a common way to look at these programs still on a syntactic level are abstract syntax trees, and since we'll see them a couple of more times in this lecture, let's have a look at what they actually are. So abstract syntax trees are defined also through a grammar, but this grammar is called an abstract grammar, because it basically describes what trees are part of this abstract syntax tree. So just to give you an example, and this happens to be an example again for our arithmetic expressions, we could have an abstract syntax tree that basically says while there are expressions, expressions can either be a number or an operator that is applied to two expressions, and an operator can be plus or minus. So as you can see in this abstract grammar, the terminals that are used here correspond to the tokens of the language, and just to give you an example, let's say we have an arithmetic expression 3 plus 45, then in our little abstract grammar, we would get an abstract syntax tree that says there's an operator, namely plus, and this has two children, namely 3 and 45, and this tree actually can be described or can be derived from the grammar that you see, because the operator is the plus, and then the two expressions each are number, namely 3 and 45. We'll see more complex abstract syntax trees and also see how this works for a larger language in the next lecture. So now an abstract syntax tree looks mostly at the structure of the program, but it's not really reasoning about what happens if you execute this program. In the following, we look at two representations of programs that look at particular aspects of what happens when you execute this program, and the first one are control flow graphs. So control flow graph is basically a model of the flow of control through the program. So what this means is that it basically models in what order the different parts, different statements in the program are actually executed. And obviously, this does not have to be the order in which these statements occur in the program, because sometimes there may be branches or loops or jumps, which make you go not just to what comes next, but to some other statement. So such a control flow graph as any graph consists of two things, a set of nodes and a set of edges. And here the nodes are so called basic blocks. What are basic blocks?  So you can think of this as basically a sequence of statements or sequence of operations that do not have any branching instruction in between. So you know that they will always be executed one after the other. And then the edges in our control flow graph are describing possible transfers of control. So they are basically saying after this that thing may happen next. To make this more concrete, let's have a look at two examples. And example number one will be a very simple piece of code in JavaScript. But again, this could be any language. I'm just picking one that many of you may already know. So here we have an if statement with some condition called C. And if this condition is true, then we are assigning five to the variable X. And otherwise we are assigning seven to the variable X. And then after one of these two things has happened, we are writing the value of X to the console. So now if you want to create a control flow graph for this program, you would start at the first instruction that is executed here, which is this if where we are checking the condition. And this will be one of our nodes. And then the two basic blocks that could be executed next. One is this assignment of five to X. So we'll have another node here and it's connected through an edge with the conditional. And then we also have this other basic block, which consists of again, one assignment, namely assigning seven to X. And then no matter which of these is executed at the end, we'll reach this console log statement, which is then another node. And the two edges because you can reach this from either of these two branches. Now on this example, we have a branch, but we do not yet have a loop loops make programs more interesting. So let's have at a look at a second example, where we now do have a loop. And in this example, let's say we have a while loop. So we have this while with some condition C, and then in the while loop, there are two things. One is that we are incrementing a variable X, and then we are assigning the variable X to another variable Y. And after this loop, let's say we have again a call of console dot log, where we are passing the variable X. Now in order for you to really see if you've understood this idea of a control flow graph, I'll ask you to stop the video at this point and try to draw the control flow graph yourself and only then resume the video to double check if you've really understood it. So let me show you this control flow graph then. So in this case, we again have one node for this check of the condition in the while loop. And then there are two possible outcomes of this check. One is that we go into the loop, one is that we do not go into the loop. Let's start with the simpler one where we skip the loop body. So we will then directly go to the console log statement. So we have this as another node connected through an edge, or we could actually go into the loop in which case we have these two statements in the loop. And because they are always executed together, they actually form a basic block. So they will be together in the same node in our graph. So we have a node that has both the X plus plus instruction and this assignment of X to Y. And this forms a single basic block, which may be executed right after the check of the conditional. And now what happens when you're done with this execution of the loop body? Well, the semantics of a while loop say that you then go back to the condition and check again if you should enter the loop body one more time. So we have this edge that goes back to the first node here. So now the control flow graph focuses on the order of operations or statements happening during the execution of the program. Another graph representation that looks at a different kind of flow in the program, so called data dependency graphs. So what a data dependency graph is doing is to model the flow of data from so called definitions to so called uses. So again, it's a graph. So a graph consists always of a set of nodes and a set of edges. But now these nodes and edges are of course defined differently from the control flow graph because now the nodes are operations and the edges are possible definition use relationships and we'll see what this is in a second. So an edge in this graph, so an edge that goes from some node and one to some node and two means the following. It means that at node and two, some data is used that is defined at node and one. And an important word here is this word may because a data dependency graph typically shows you any possible definition use relations. So if node two may use the data defined at node and one but maybe it doesn't have to because there may be a branch then we'll still have an edge because this may be a defuse relation. All right, let's again have a look at two examples to make this more concrete. Example one again is a simple one and then for example two, I ask you to think about this yourself. So an example one, we have just two statements, one that assigns five to x and then another one that assigns the result of x plus one to y. So looking at the data dependency graph for this example, we'll have two nodes. One that is representing this first operation in the first statement where we are actually defining some value namely the value of x and then we have another operation here which is to take x add one to it and write the result into y and because the second operation is actually using the value of x defined in the first line there is an edge between these two that says hey there is a defuse relation between these two operations. As a second example let's have a look at a piece of code that is slightly more interesting because here we have a couple of more statements and also a branch. So here we start with an assignment to x followed by another assignment but now to y then we have an if where we are checking if x is greater than or equal to one and if this is the case then x is assigned to y and then at any case after that we are assigning to another variable z and what we do assign is the result of adding x and y. Again I'll invite you to stop the video here to just draw this data flow graph on your own to double check if you've understood the idea and then let me show you what the solution looks like. So here we'll have one node for this assignment of three to x another node for the other assignment that assigns five to y and then there are a couple of places where these variables are used. So one of the places where x is used is this check whether x is greater than or equal to one so there will be a defuse relation between these two nodes. Then we have this assignment of x to y which is also using x because in order to write the value of x into the variable y you first need to read x so you're using x and because x may be defined here we have this defuse relation chip and then there is finally this statement that adds x and y and writes the result into z and this one may use different values of x so there will be one edge from here or sorry and it may use different values of y so there are two edges one from here and one from here because depending on whether the if is actually executed the last statement will either read the y defined in line two or read the y defined in line four so we will have these two edges to represent this in the data flow graph. All right and after this very quick walk through some of the basics that we'll need in this program analysis course we are already at the end so I hope you now know what grammars are what ASTs are what control flow graphs are and what data flow graphs are and maybe you've already known this before so this is just to make sure we all know about this now and then in the next part of the lecture we'll actually have a deeper look into the semantics of programming languages and how they can be defined. Thank you very much for listening and see you next time.


Described an interesting finding, stating that length of stay, loce, of the donors in the intensive care unit, ICU, did not have an impact on the outcomes and survival of recipients up to five years after heart transplantation, HTX. This article was authored by Myit so that, Alessandra Verzoloni SEF, Nicholas J. Lees, and others.


They're attacking time one. Looks like I'm just hitting him, but it's just attacking time one. So as soon as I feel, as soon as I feel that he's about to attack, as soon as I see, which is even slower, that he's about to attack, I actually have a lot of time to react to his attack. And because I'm in this scar, I'm already halfway there, right? I'm not starting from here. This is a longer distance. I'm already halfway there. Okay, let's say I'm closer. I'm already halfway there. Is that from here? I'm already there. So it becomes a faster and more effective way to intercept and to use your speed and use your power to overcome the attacker. So we're talking about the strategy of g-condo, which is to be faster than your opponent, cut him off with your fist and be able to launch fast and to intercept his attacks.


let's read it human cognition page 46 of fool of the gods by Terence McKenna the search for the original tree of knowledge quote all the unique characteristics and preoccupations of human beings can be summed up under the heading of cognitive activities dance philosophy painting poetry sport meditation erotic fantasy politics and so esoteric self intoxication we are truly homo sapiens the thinking animal our acts are all a product of the dimensions that is uniquely ours the dimensions of cognitive activity of thought and emotion memory and anticipation of psyche from observing the ayahuasca from observing the ayahuasca using people of the upper Amazon it became very clear to me that shamanism is often intuitively guided group decision-making the shamans decide when the group should move or hunt or make war human cognition is an adjective risk at an adaptive response that is profoundly flexible in the way it allows us to manage what in other species or genetically programmed behaviors we alone live in an environment that is conditioned not only by the biological and physical constraints to which all species are subject but also by symbols and language our human environment is conditioned by meaning and meaning lies in the collective mind of the group symbols and language allow us to act in it in a dimension that is supernatural outside the ordinary activities of other forms of organic life we can actualize our cultural assumptions alter and shape the natural world in the pursuit of I ideological ends and according to the internal model of the world that our symbols have empowered us to create we do this through the elaboration of ever more effective and hence ever more destructive artifacts and technologies which we feel compelled to use symbols allow us to store information outside the physical brain this creates for us a relationship to the past very different from that of our animal companions finally we must add to any analysis of the human picture the notion of self-directed modification of activity we are able to modify our behavior patterns based on a symbolic analysis of past events in other words through history through our ability to store and recover information as images and written records we have created a human environment as much conditioned by symbols and languages as by biological environmental factors