If you're looking for expert legal answers to all your property related questions, then stay tuned. It's lovely to welcome you back to another of your Property Rights podcasts. Hello, I'm Paul Rotherham and this show proudly brought to you by Private Property. Hello again, Silna. Hey Paul, always nice to be with you. It's always lovely to have you in studio. Thanks so much for being here and giving up your time. I know you are an important person and very busy as the MD of SSLR Incorporated Attorney, Silna Stain is our expert property lawyer, specifically focusing on rentals and evictions, but we do cover all sorts of topics, so thank you, Silna, for your time. Only a pleasure. Today's topic, oh, I could get riled over this and worked up about this, a lovely question that's come in regarding a tree. And I think you'll know where I'm going with this. I'm going to read it as it is.  The branches of said tree extend into my garden, shedding leaves and debris into my swimming pool. This constantly clogs up my pool pump, which has needed multiple repairs as a result.  When I tried to discuss this with my neighbor, I was told to, in quotes, just get a swimming pool cover. This is yet another expense I simply cannot afford. The question then for you today, Silna, on your property rights podcast is this. What can be done about this overhanging tree and the resultant damage and debris? And who is liable for the damages, including the damages to the pool pump? The person ends by saying, I'm losing my patience, which we don't want. Let's try and sort this out. How do we do it? Neighbor law is one of the most sensitive parts of the law that exists, because we all know the relationship between neighbors are extremely sensitive. I remember in another episode, we've discussed this as well. Yes, that was the barking dogs, as I recall. That's exactly. And you specifically said, remember not to get into a fight with somebody today who might have to help you out tomorrow. And that is essentially what the thing is when it comes to neighbor law. So in other parts of the law, it's quite simple to go to an attorney, do an aggressive letter and see if you can solve the problem. When it comes to neighbors, obviously you have to do it a bit more gentle and a bit more polite. Now in this context, it sounds like the listener already did that. Try to contact the neighbor, try to get the problem resolved. And clearly, the neighbor is just saying, well, this is sort of a you problem. Now the good news, Paul, is luckily this is our listener problem and not the neighbor's problem. And what I'm saying luckily is now we can do something about it. Give us the solution. The solution is quite simple. A tree that is overhanging from one property onto the other property is the owner of the land where the roots are is the owner of the tree. But any branches that extends over your boundary line, so be it a wall, be it a fence, even be it just a boundary line, like in a complex where you don't have walls or something like that. Anything that's over your property line, so over your boundaries, you are allowed to trim that. But here's the fun fact that I think you're going to I'm going to get a nice smile from your side on this one because the Romans, when they they figured this part of the law out, obviously, they weren't as many people as we currently have. They were much fewer people in societies. They were much closer and and the law is as much as it's developing. Some parts of it are still pretty archaic and this is one of them. And this is why I think it's going to make you smile. Theoretically, the branches of the trees that you're now cutting off still belongs to the owner of the tree. I know where this is going. So what happens is you're not actually entitled to the fruits of the tree. So say for instance, this is a pomegranate tree. Me now being very specific. It couldn't just be like an apple tree. Me being technical on fruits. But you're not allowed to take the fruits from the tree. So on the overhanging branches, you're not allowed to pick it. However, when it falls from the tree and it falls onto your earth, you can pick it up and it's yours now. But here's the fun part of the story. Strictly in law, if you are now cutting the trees through fruits or not from the neighbor's tree, you are, in fact, in law, obliged, not just entitled obliged to return. I love where this is going.  Well, I would chuck it over the wall. I might actually consider delivering it to the front door. I'm just saying I'm not encouraging bad behavior. Yes, I'm just saying it's one of those parts of the law where you can now clearly OK, this is the rule. But practically, this can blow up in your face immensely. Yes. If you have an overhanging tree, guess what your neighbor's going to be doing at the first available opportunity? If you've been rude and unneighbally, trust me, they're going to reply in the same way. Exactly. And that's exactly why I think it's so relevant to know because from both sides of the fence, I'm loving this question. I'm just rolling with him here. So on both sides of the fence, you have a potential benefit and a risk. But remember, this is how the law works. We have rights as well as obligations. So as the neighbor with the overhanging parts of the tree damaging your swimming pool, remember, you have an obligation and a duty to do your own gardening. So to leave those branches to cause damage to your swimming pool, to your pool pump, to your creepy crawly. Unfortunately, those damages must be carried by you because you had an obligation to trim and manage those branches on your side of the fence before it became a problem. Got you. And in fairness, if you run out every Saturday morning with a pruning scissor, look at me now. Cheers. Yes. Gardening, cheers or secateurs. They're going to teach you a thing or two about gardening on this show, See, now I know more about gardening. Thank you, Paul.  So I definitely encourage our listeners to keep it close. Eye on neighbor trees. And when they start coming into your part of the onto your earth, trim them in time before it becomes a problem. If you buy a property and you had nothing to do with this problem now, so you buy the property and they are these branches hanging over, I would definitely encourage you to contact the neighbouring party and say, listen, neighbour, I am a new person. I really don't want to start this relationship off on a bad foot. Let's do this. I want to trim them, but now it seems like the tree is going to fall over to my side. If I do this, can you and I come to an arrangement? We get a tree fallow, we prune him back properly. So I don't cause damages by trimming the one half of the tree. And now it's going to fall over the wall. And now all drama is going to going to break loose. And we're going to read about this in Aisgenwet. So what I what I recommend there is at that point, contact the neighbour. See if you can come to some sort of solution. If you can't, you're entitled to trim. I would then say, just do a polite letter indemnifying yourself to say, I've tried to communicate with you. I'm now getting in three fellas. I will return the branches to your doorstep politely as I should in terms of law. But if it collapses because you didn't want to come in and assist with the pruning on your side of the wall, I indemnify myself and should they be damaged to the wall, then or anything else. Please note that you will be responsible for those damages. And that person cannot be held accountable. So I think to answer this question in short, unfortunately, the damages to the pool pump are going to be for your account. A quick question relating to this, if said neighbour has a huge tree and that tree is well within their property, but on a windy day, there are leaves galore in autumn being blown across from their property into my pool. It's not through my negligence of not trimming the branches. It's far away. Would I have anything to say in that instance? Or is it just rotten luck that I happened to have purchased a home next to someone with a big tree? Is that just how it goes? It's it's rotten luck on your pool, but yay for your neighbour for providing that kind of oxygen to you. And I let me just state for the record, I'm one of those tree hugging people. I've had neighbours who've moved in and one of the first things that they've done is either prune or trim or cut down completely the trees. And for me, I can relate to this question. I really can because I think we all love the trees. We love the bird life it attracts, especially in the suburbs. We love the shade that those trees provide during a hot summer's day. And I think ultimately we just want to be able to get on with each other, but not go through the frustrations of having a swimming pool that is permanently clogged. So I do get that. Unfortunately, though, in this instance, the right thing to do is to trim the branches yourself, keep those nice and trimmed and cut back with a proper pair of shears or secateurs. Very good. You've been listening. And ultimately, for now, fix the pump yourself. It's water under the bridge, as it were. So thank you, Silne. It's a pleasure. Thank you for the question. It was a fun one. If you'd like to continue asking questions and commenting on this, you can join in the conversation or, hey, why don't you start a conversation on our private property Facebook page? We would love to hear from you your thoughts regarding your property rights. After all, that's what the show is. It is your property rights podcast. I'm Paul Rotherham and the show is proudly brought to you by Private Property.  Leave a comment or ask a question to join the conversation.


Hey everybody, I'm Lance Coyke. Cardio is really important. Today we're gonna do a follow along cardio circuit. Normally when I do my cardio, I like to just hop on the bike and bike for 30 minutes while I watch YouTube or whatever, but sometimes for whatever reason, people don't like doing that, hurts their butt too much, way too boring, they don't have a bike, they don't wanna go on the treadmill as another option, right? What we can do is we can do a bunch of good for you types of exercises, so this will also be somewhat corrective for you. So I've got a timer set up over here, we're gonna get that going. We got six exercises, we're gonna go for 45 seconds of work, 15 seconds of rest, 15 seconds is just enough to kinda switch exercises. 45 seconds is too long to really push too hard, which is kinda by design. This should be like a moderate intensity type thing, not a super high intensity interval training type of interval circuit workout. So we're just, we're gonna skip the warmup, we're gonna, first round's gonna be the warmup, then we're gonna try to make the super time efficient. 30 minutes of exercise, no cool down necessary because everything is kind of a lower moderate intensity. So let's get set up, got a 10 second warning here, first exercise we're gonna stand up and we're just gonna go run in place, just kind of exaggerate it. One, two, three, go. Now for this you can pick up the speed if it's not too tiring, especially early on, I kinda like to because that ramps my heart rate up. This one is gonna be maybe a little less muscularly intense, but you still got a lot going on with my mat, so we're gonna go on the back for 15 more seconds here. Make sure you're exaggerating the arm movement so that'll keep your legs swinging, stepping. I have to do something about this mat. And rest, so 15 seconds, next one is gonna be a row. Now I'm gonna choose to do a half kneeling row with a band.  It's really important that we're leading with the shoulder blade backward. This doesn't have to be super slow. Doesn't have to be super fast either. I like to also involve the other arm, and halfway, and same thing on this side. I like to involve the other arm because it teaches the torso to rotate as you can kinda see here. You can be super robotic about it, or you can be really exaggerated about it like this. Don't worry, I mean, you don't have to do it that way. I just, I always feel a lot better when I do it that way, and a rest. Okay, next one is leg lowering. Now there's a couple variations in this one. If you do have a band, and it's too tough, you're gonna hold one leg with the band and lower the other one. If it's not like that, you just keep both legs up and we're going, and you just lower them like this. If this is too tough, biggest thing here is you're trying to keep your low back pressed into the ground. Okay, that's super important. If you feel your low back come up, kinda like this, then you need to make it easier. Good way to make it easier, you can put one foot on the ground too, if you don't have the band to help you out, and then you just have to switch while we're going.  Bring through the mouth as a notch, restful. It's not very good for you. Only appropriate and really high intensity exercise. Next one's an alternating lunge. I'm gonna go forward lunge, that's kind of the advanced version. If you need an easier version, you can step back. Like this is maybe the moderate version, we're gonna alternate legs. And if you need an even easier version, use a wall for balance, one foot forward, one foot backward, and just little mini steps like this. Okay, I gotta catch up on these. I like to also exaggerate our movement on this one, because we're not holding any weights. That's kind of by design.  It's not slippery, eh? Maybe it's the carpet. Next one is the offset pushup, or the pushup, so easy version from the knees. You're just lowering as much as you can. Next step would be something from the feet, maybe half the distance. I'm gonna go offset, so one hand back, one hand front, and I'm gonna alternate sides. Nice and slow. Big thing on this one, so it's super confusing for people. You wanna make sure that you're letting the shoulders twist, and you're letting the torso side bend. When my left arm is away, my left side is longer, my right arm is away, my right side is longer. If at any point you need a break, just come down to your knees, take a little rest. You have a long work period, lots by design, and rest. All right, and sixth of the circuit is the short side plank genie twist.   And this one we're just gonna switch when we're halfway. If you need an easier version, you can put your butt on the ground, keep it on the ground while you do your twist. If you need a harder version, you can straighten your legs out like this. And halfway, let's flip. Trying to keep tension on the bottom side. Obliques, I'm gonna let those ahead so I'll hold you up. Obliques the shoulders free, and rest. Okay, that's one round. We got four more to go, five in total. That'll bring us to 30 minutes, or well, 29 minutes and 45 seconds. Stand it up, running in place, 45 seconds, and go. If you get bored with this one, you can spin around if you want. You can throw in some skips. Or if this is way too easy, you can do the high knee variation. If my heart rate's not at least 120, I'll probably do harder variations. Since I've been demoing, I don't think it's very high, so I'm gonna try to catch up. Remember, nasal breathing. One down, next one is the row. Either the renegade row, or the half-feeling row, if you got a band to use, and go. So what we're looking for on this is a nice straight line from the ear through the shoulder, through the hip, all the way down to the knee at the bottom. Switch sides if you're doing a single arm version, like I am. Good, two down. Next one on your back, leg lowering. Remember, support that leg if you can't keep your low back down. Three, two, one, and go. I like to put my hands down on my sides like this, palms down. Big thing to stabilize here is my belly button to stay sinking towards the ground. That'll help you keep your neck relaxed, not crunch so much to stabilize this, not the goal of this one. This is more for these outer lower abs, and less for this six-pack here in the center. It's a little more athletic that way. Two, three, two, one, and rest. Cool. Next one's the lunge. Alternating forward, alternating backward if you need an easier variation, and then remember just the split squat with the wall support, limited range of motion here if you need more help. I like to do these rhythmically because then it takes some of the confusion out of the opposite arm and leg movements. It makes it way easier to just execute. You wanna make sure that when you're stepping back on the lunge, you're not leaning backward to step up. That's not what we want here. Make sure you're pressing with the leg and rest. Okay, we're back to the push-up. Remember knees, if you need an easier variation, I like the offset hands, even from the knees. It's good to do that. Keeps the torso loose. Remember no rush on this. If you have glasses, you might wanna take them off so they don't fall off and poke you in the eye so I'm good for push-ups. I wanna push this tag of my shirt towards the ceiling at the top of each rep. That makes sure my arms get really long. My torso is in the right position. Helps me keep my ribs down, my abs on. My shoulders stable and rest. All right, that's five. Class one is the short side plank genie twists. My favorites are good. Now these, it's about that oblique we talked about. It's really good for unstable shoulders though. If you're generally with shoulder instability, the torso, the ribs, get really stiff, the pecs get overactive and you just can't move and halfway switch. So what we want instead is to promote looseness up there and rotation. Rotation is kind of like the thing that's gonna unlock you the most. All right, two down, three to go. It's hot in my room here but you should be sweating. Just maybe not as much as I am. All right, run it in place and here we go. I have this tendency to turn one way because I get in the zone and just stop thinking about it. So maybe halfway we'll switch, ready? And switch directions. It's a good just for keeping you not so bored but also a little bit of ankle mobility, looseness. Nice row is next. You're at band or the other one, running a row again from the push-up position. Three, two, one, go. There you go. Now when you do rows, I've always said you like to think about them like a lower body exercise, almost. It's like a lower body stabilization. If I'm doing the row with the hips, my hips are gonna get a workout switch halfway. My arms don't do a whole lot of rowing that way. So what I need is I need to fix the hips and then turn at the shoulders. The shoulders stay loose and that's why we do this free arm motion as well because it keeps everything nice and loose and good. Nice one on your back. Leg lowering, low back stays down. Exhale, let the belly button sink down toward the ground and no rush on this one. You should also pull the toes towards you. It'll give you a nice calf stretch along with the hamstring stretch on the straight leg. Good for promoting hip mobility but getting a good stretch in the calf prevents the calves from being overactive. Cabs tend to take over for lazy glutes. So if we keep them at least a normal length and rest, then we can access the glutes a lot better. Okay, next one, standing up, alternating forward lunge or backward lunge or wall supported split squat. Thank you. Let's try to pick up the base. This is what, round three? Yeah. So we got this round and then two more. This is the Wednesday round, the hump round. Now we were saying last time, if you're doing the forward lunge, make sure you're not leaning backward to stand up. That's not what we want, press through the leg, almost like a leg press, losing balance. All right, next one is the offset push-up. Remember, press it. If maybe you're starting to get tired and you need the break, you can regress halfway through. You don't have to do all your push-ups from the ground. You do need to make your arms long at the top though. So if you can't, if you feel like you can't do that, then it'd be better to bring your knees back down and work more on that. I promise you, it'll still burn. Once you're at that point, it's really hard to recover. Okay, and then short side plank, genie twist. I say short side plank because I intended for these to be done on your knees, but if you need that advanced version, you can go long side plank with the legs extended like I'm doing here. It's more about keeping the neck loose, keeping the shoulders kind of loose. So if you can't get that, make it easier. It's okay. And halfway, switching, and good. Three down, two to go. That's 18 minutes in, we got 12 to go. Doing good. All right, stand it up, run in place. If you need a break, feel free to pause. I would say just go really slowly though. It's better to just keep going if you can at the lowest level of intensity. Even if you just kept your feet down and you just swung your arms, that would be good. Or if your arms are the one that's tired, you put them on your hips like this. Kind of looks like I'm clogging. No, I suppose that's more of my body structure than anything. And rest. Back to the row, my mat. Figuring it out. It's not moving so much on me. All right, one knee down. I don't think we're doing it this way. Yeah. As far as which knee goes down, it's not the biggest deal. Doing something like this because your torso is twisting. So you're training both positions. If you wanted to switch now and flip your knees, that'd be fine. Halfway, switch arms. Big thing on the rows is just like the leg lower. Make sure the belly button stays backward. You don't want to flare the ribs out like this. This is too proud. My back is too straight. It's too hard to get my abs that way. Wow. Now I don't want to crunch and rest. I don't want to crunch like this to stabilize but a little bit of a slouch is actually pretty normal. Nice one on your back. Leg lower and I don't feel good now. I want to keep going. I think I got another round here. I hope you feel the same way. Remember, try to breathe through the nose. Breathe into the nose, filters the air that you breathe and it dilates the airways. So if you have allergies, it's more likely that your nose is going to clog but breathe through the nose will help prevent it from getting clogged as well. And then try not to over breathe. Try not to take too many breaths or too much breathing. Sounds kind of intuitive but if you're under breathing, you'll definitely be able to feel it. But if you're over breathing, you might not. Leg lowering. Next one is the lunge. You hear that squeak? That's sweat on the shoes. Biggest way to make this one harder is just to go faster. It's easy to take too much time at the top. But if I don't straighten out all the way at the top, it's much more intense if that's what you need. Rest. All right, push up. Next. Remember, it's okay to make this easier. I don't want you to finish the workout with a tight neck, right? It's okay sometimes, you know, you're going for a heavy bench press. But that's not what we're doing today. Today is a recovery workout, an easy cardio workout. I shouldn't hit failure on any muscle group today. Good, good, good. We're dripping now. Oof. And short side plank. Genie twist. Or long side plank. Genie twist. Along. Go. There you go. Four down. One to go. That's 24 minutes already. All right, stand up. Let's go here. If you're still feeling really good, you can pick up the pace. If you don't want it to be a recovery workout, you can really pick up the pace. But that defeats the purpose, I think. See how fast you can go while still breathing in and out through the nose. And rest. Good. All right, we're going to the row. Same idea, try to keep the pace up. Sustainable, but up a little bit. See what you have left. And breathe through the nose, whole time. If you gotta breathe through the mouth, it's not recovery. Two, one, and switch. And rest. Nice, on your back. Leg lowering. The quicker you transition, the more actual time you have to rest. So I like to just get right in the position right away. There you go. Yeah, go. I get to spend 10 seconds laying down. Here's some recovery. Remember, belly button six down on the exhale. Make sure you breathe through the nose. Keep your neck nice and relaxed. Okay, a little bit until up is okay. You don't want to crank it up. With your chin pointed straight vertical. Nice little arch in the neck. Keep your neck muscles relaxed. Especially important that you got shoulder problems. Or headaches. Okay, stand up. Or lunge. Alternating lunge. There you go. Remember, we can keep the pace up. It's okay, you don't want to burn out. But you probably won't. I won't.  That's fine. Remember, don't lean back. When you come out of your lunge, you gotta drive with the legs, not with the back. Should feel a lot of quad, a lot of glutes, and hopefully even some handshake to support you on the backs of the thighs. Especially if you got trouble with your knees. You can bend over a little bit more.  It feels pretty good. One hand, rest. All right. Push up. Last one of these push ups. Back sag. Belly seized up. Arms alone. And rest. Oh, that one got me. I'm going to go a little quick on that. All right. Last one, G-D-Twist. Almost there. So, hey, that's a half hour workout right there. Nice cardio workout. You can do this literally every day because of the intensity level. Keep the intensity level low. Not good. Cardio equipment works really great, but if you want some variety, throw in a circuit once in a while. Thanks for watching. If you need more help with stuff, I got a whole playlist on mobility circuits that you might like. You follow along and do those. Give that a shot.


We've looked at what foreign policy is and we talked about the levers we can pull to make foreign policy happen But who actually pulls those levers? How do decisions made in Washington DC become actions taken across the world? The answer depends on what kind of action we're taking but let's look at it broadly Many of the actions we take in foreign countries are directed by people in the executive branch Which is led by the president the president has advisors and staff members who collect information on what's going on around the world Give advice about how to respond to it and divide up the responsibility by acting on those decisions Chief among those advisors are the president's cabinet people like the secretary of defense or the secretary of state who run entire Departments with staffers of their own let's say the United States wants to make a treaty that promotes trade with another country Who made that decision? The Constitution gives the president the power to propose treaties and gives Congress the power to turn those treaties into law But that's not the whole picture before the treaty passes from the president to Congress It travels up the executive branch an ambassador who works for the State Department Negotiates terms with the other country staff consultants working with the executive office Evaluate it and make recommendations to the president the White House chief of staff schedules meetings with Congress people to win their support And finally the president submits the treaty to Congress who must give it a yes or no vote So now a policy is made, but how is it enforced that depends on what's being done? But let's run through a few examples take embargoes and sanctions Everything that goes in or out of the United States gets checked at the border by the Department of Homeland Security No sneaking things through they check with shipping companies to see where cargo shipments are going where they came from and whether They have a license to transport that cargo in the first place And if somebody does sneak something through the Department of the Treasury is on the case with help from the US Intelligence community like the CIA they collect information about financial transactions worldwide if they detect anybody Skirting sanctions they have the power to freeze their US assets and levy enormous fines They also keep a list of people who aren't allowed to do business in the United States at all because yes You can embargo a person and how do we decide who to embargo or sanction? Well, these things are generally proposed in the National Security Council The NSC brings together the president and all the top military and diplomatic advisors such as the Secretary of Defense and the Secretary of State they guide decisions about when and how to take international action and since intelligence operations are an important part of foreign policy The director of national intelligence is also a key member of the National Security Council the United States intelligence community including the CIA Gathers reports from a wide-ranging network of undercover operatives gathering What's called human intelligence from in-person interactions and information analysts who use machine intelligence to find Significant information buried in anything from social media to satellite images Armed with that information the council can make better decisions about how to intervene in foreign affairs Perhaps the intelligence reports suggest that the new ruler of a traditionally hostile state admires American culture The Secretary of State can strengthen that relationship by reaching out to establish Humanitarian aid through the United States Agency for International Development or USAID Congress funds USAID and USAID uses those funds to send a mission director to develop a plan to help the country If people are starving then the US can deliver food or bring in stronger seeds and fertilizers to boost agriculture Which feeds more people the mission director reports to the US ambassador in that country who in turn reports to the State Department And having a stable presence reinforced by humanitarian aid allows the CIA to extend its intelligence network deeper into the region Friendly nations can also be brought further into the fold by offering them an alliance The best-known example is the North Atlantic Treaty Organization NATO is a multi-country political and military alliance that started between 12 countries in 1949 and has been growing ever since The US counts fellow NATO members among its closest allies giving them trade privileges and exchanging technologies that aren't usually available to other countries In addition article 5 of NATO's founding treaty requires all members to come to each other's aid in case of a military attack on their home soil But the US forms alliances outside NATO as well Congress voted to create a special category of ally called I kid you not Major non-nato allies because the person in charge of naming things was just out that day I guess they authorized the president to add these allies by simply notifying Congress in writing One 30-day waiting period later and bam a new ally with all those special trade and technology privileges These allies are missing out on the military defense of NATO's article 5 But since they can now trade military technology with the US Department of Defense They're at least in a better position to protect themselves But if all else fails and war does come how does it work? The Constitution says that Congress declares war and the president leads the armed forces But just like treaties the reality is a lot more complicated as commander-in-chief The president can order troops into combat situations even ones that aren't clearly defined as war This has been used for everything from secret strike operations like the 1980 attempted rescue of American hostages from Iran to ongoing Police actions like the Korean War a United Nations authorized effort which lasted for three years in 1973 Congress attempted to define the limits of this presidential power with the war powers resolution It says that the president can send troops into battle for up to 60 days at a time and has to tell Congress about it within the first 48 hours Congress can extend that period by voting to approve further military action Which is not necessarily the same thing as a declaration of war if that sounds confusing That's because it is some scholars have challenged whether it's even legal under the Constitution President Nixon tried but failed to veto the resolution as soon as it passed and every president since has treated it as an Unconstitutional attempt by Congress to encroach on the president's leadership of the armed forces But so far it remains on the books technically in effect But never enforced nor challenged in the Supreme Court and no president really wants to start a war against the wishes of Congress It had looked terrible in the eyes of the American people not to mention the world and Demoralized the troops who have to fight that war so how does war or at least armed conflict actually happen in the end? It happens the same way as other major foreign policy decisions enacted by the executive branch the president meets with the National Security Council to hear their reports and weigh their suggestions if they decide the issue can't be resolved through Economic or diplomatic means and if covert military action doesn't work Then it's up to the executive branch to convince Congress and the American people to accept their case for war It's not an easy case to make wars are expensive people die And they're no more guaranteed to succeed than any of the other tools of foreign policy But with enough support the president can order the troops to go in and then the machine of federal agencies goes Into action dividing broad orders into tasks and subtasks Remember that bomb that went off in the market in Dhaka a coup is happening in Bangladesh And it kicks off a wave of consequences that will ripple across the whole world Should America stand with the old government or try to form a relationship with the new one the Bangladeshi economy will be disrupted Either way and people will suffer but are there actions we can take to restore stability sooner Not just to drop the price of t-shirts But to bring the whole interconnected web of our global society back into place What would you do if that were you in the White House situation room? Because all of these decisions that ripple out across the world and seem so impossibly large They're all made by people like you and me not perfect not all-knowing But trying to find the best way forward in a sea of difficult choices. Thanks for watching


Welcome to this new course on principles of compiler design. So, in this lecture I will give you an overview of a compiler, but before that we will also see how exactly the course is organized and then the motivation for studying compiler design and of course then go on to the details of a compiler with block diagrams. So, the course is actually a first level course. In other words this takes a detail look at the internals of a compiler and I do not assume any background for this particular course, but it is a very intensive course. So, the pace of the course is going to be you know not very slow, but at the same time it is not going to be racy either, but the students who are actually going to take this course seriously are requested to do the programming assignments. They are also supposed to solve theoretical problems which I am going to suggest otherwise this course will not be understood you know properly. The reason is a compiler is an excellent example of the theory being translated into practice and this is a wonderful example of that. So, let us see the motivation for studying a compiler. So, compilers are really everywhere. So, if you look at the applications of modern compiler technology pick up the browser open it and then immediately you know there would be html files which are displayed on the home page and that you are going to visit and so on. So, the html parsers are based on compiler technology and then behind the scene there is javascript, there is flash etcetera running inside the browser and the interpreters for this javascript and flash etcetera are also based on the modern compiler technology. Then of course, for the compiler itself we require machine code generation and for high level languages whenever we need code generation we need to use compiler technology anyway, but then apart from that it has uses in software engineering as well. For example, software testing and then program optimization then in the security domain malicious code detection design of new computer architectures. So, why are these important? For example, if you look at the development of a new processor nobody builds a processor you know right away even if the design is 100 percent accurate and all that the performance etcetera will all be known only after the hardware is built. Therefore, there is a simulator which is built for a new CPU and then people also build a compiler for that particular CPU. So, once a compiler is built you can compile right programs in C or C plus plus or any other language compile those programs and then run them on the simulator. See what kind of performance it has giving if necessary make changes in the hardware. So, that is called the compiler in the loop hardware development and it is very useful perhaps very widely used by chip designers in various companies. Then again in the area of hardware synthesis nobody really writes you know the low level assembly type of code for generating VLSI designs and so on and so forth that is called RTL register transfer logic. People really write it in very high description you know high level description languages called VHDL or VDL and so on and then the compilers really generate RTL from VHDL again compiler technology is involved here and then the novel application of compiler technology is compiled simulation. Suppose, you write a program in VHDL how do you really find out the performance of the chip or whatever is designed using that VHDL. So, typically the a program a compiler is used to generate a simulator and the simulator is actually a computer program which is generated for that particular program which is being simulated. So, this is called simulation of the design and it is an example of compiled simulation there is no interpretation of the design here and hence such simulations are much faster than interpretations. So, about the complexity of compiler technology it is also necessary to say a few words about this aspect. If you look at the compiler it is possibly the most complex system software and writing it is a substantial exercise in software engineering. So, in fact in our institutes whenever somebody teaches courses on compiler design the associated assignments are really small compilers themselves and writing these is a fairly large software engineering exercise. The complexity of a compiler really arises from the fact that it is required to map a programmers requirements which are written in high level languages to architectural details. So, we are really talking about a C program and then it is translated into a machine level program. So, in between you know the compiler has to actually travel a long distance it is not as if it is a very simple operation. So, there is a huge amount of complexity here. So, we are going to discuss this particular complexity and the complex operation in its details in our course. A compiler uses you know algorithms and techniques from a very large number of areas in computer science we are going to see some examples very soon. So, it is not in that compiler technology is a subject on its own it has to borrow a huge number of techniques and algorithms from other areas in computer science. And compiler translates I already mentioned this intricate theory into practice. So, you take a for example, a context free grammar specification which is very formal, very precise and absolutely essential for writing a you know describing a language. It can be translated into a parser with minimal effort there are tools such as YAC which do this. So, this enables tool building. So, tools take very abstract specifications and generate programs from these specifications. So, now let us look at the type of algorithms which are used inside a compiler and see and let me show you how we require many types of algorithms here. So, we require results from mathematical logic lattice theory linear algebra probability etcetera. So, where are these used for example, mathematical logic is used to you know in developing type checking theory then lattice theory is used in developing static analysis dependence analysis is heavily based on linear algebra and loop parallelization is based on loop dependence analysis. So, cache analysis uses both static analysis and probability theory. So, in other words a very deep mathematical background is required to develop new compiler algorithms. In our course we are going to study the existing compiler algorithms, but we will also look at some of the you know the basis which actually make up this particular topic. Then there are practical applications of many algorithms for example, greedy algorithms are used in register location. So, heuristic search is used in list scheduling which is a part of a code generator, graph algorithms are used in dead code elimination register location etcetera. Dynamic programming is used in instruction selection that is how to generate machine code. Optimization techniques are used in instruction scheduling, finite automata play a part in lexical analysis, push down automata are very helpful for parsing, fixed point algorithms are used for data flow analysis, very complex data structures such as symbol tables, parse trees, data dependence graphs are going to be built. So, we use you know trees, balance the trees, graphs etcetera for such applications. Computer architecture itself uses machine code you know the is used in the knowledge of computer architecture is used in machine code generation. And then what are the other uses of some parts of compiler technology, some aspects of compiler technology. For example, scanning and parsing techniques are of course used in compilers, but they are also useful for assembler implementation. They are useful for online text searching for example, grep and arc which are available in unix are based on you know the scanning techniques. Word processing, website filtering, command language interpreters that is for unix for example, shell you know. So, is a command language come scripting language. So, interpreters for such languages are useful, scripting language interpretation again, Perl, Python, Unix, shell, XML parsing, documentary construction, database interpreters the list is very big. So, I have mentioned only a few of them which are very important. What about program analysis? So, one part of a compiler is scanning and you know performs scanning and parsing, and another part of a compiler performs program analysis. So, program analysis techniques are useful in converting sequential programs to parallel programs, and very important it can be used to determine if programs are data rays free. In other words, are there two parts of the program through threads actually accessing the same locations etcetera, etcetera can all be decided using program analysis. Profiling programs to determine busy regions of the code, well if this is done then we can possibly make that particular region of the code much more efficient. Program slicing techniques are used in debugging. So, a slice of a program is one small part of a program. So, data flow analysis approach to software testing is again based on program analysis. For example, uncovering errors along all parts, dereferencing null pointers, buffer overflows, memory leaks these are all common errors which actually occur in programs, and to some extent taking detecting such problems using software testing requires a data flow analysis approach. Then worst case execution time estimation and energy analysis. If you look at a program, it is very difficult to say what is the worst case time that it requires, because time of execution for a particular program is based on its input it depends on the input. So, finding out the worst case input is a very hard problem, and worst case execution time estimation is also equally hard, and uses program analysis techniques. Energy analysis implies the detection you know rather computation of the amount of energy that a program takes. This is as difficult or more difficult than time analysis. So, program analysis techniques are used in energy analysis as well. So, that is about you know the motivation to study this subject called compiler design. So, let us begin with this block diagram which talks about a general language processing system. So, to begin with we have for example, here a pre processor which takes a source program as input, and then outputs modified source program. So, even in the C compiler we have such pre processors. So, for example, you write hash defined macros or hash include you know directives inside program, then such macros are expanded by the pre processor, and the pre processor expands and provides the source program as input to the compiler. A compiler itself takes a clean you know expanded source program in a high level language such as C or C plus plus or any other language, and outputs this assembly program for the particular machine. So, we will see the details of a compiler in a short while. The target assembly program is input to the assembler which takes the mnemonics in the assembly language and translate them to actual binary machine code. Finally, the assembler output is called as the relocatable machine code which is combined with library files and relocatable you know object files of from other sources by the linker and loader to provide the target machine code which can run on a particular machine. So, now we zero in on the compiler itself. So, compiler consists of many blocks they are all listed here lexical analyzer is the first one and the output of that goes to a syntax analyzer. The output of which is again fed to a semantic analyzer following that is the intermediate code generator and then comes the machine independent code optimizer the machine code generator and finally, machine dependent code optimizer. And all these parts of a compiler use a data structure called as a symbol table which is actually somewhere in the middle. So, we now have for example, let us look at lexical analyzer and see what it does. A lexical analyzer takes as input a character stream. So, we are now going to take each of these blocks and study them in detail. So, let us begin with this lexical analyzer. But before we begin with lexical analyzer I must hasten to add that there is a difference between what are known as compilers and interpreters. So, if we look at the previous slide the compiler consists of this entire you know seven blocks along with the symbol table. Whereas, an interpreter stops after the intermediate code generation stage and the output of the intermediate code generator is fed to an interpreter. So, let us see the difference between these two. Compilers generate machine code whereas, interpreters you know interpret intermediate code. Of course, interpreters are only 50 percent of a compiler. So, they are easier to write and can provide better error messages because we are we still have access to the symbol table and so on. But the catch is interpreters are 5 times slower or more actually more than 5 times slower than machine code generated by compilers. So, running machine code is much faster, but interpreters are easier to build. So, people tend to write you know interpreters for certain types of languages whereas, they try to write compilers for languages which are used to write professional programs. Interpreters also require much more memory. So, and then you know even the compilation lexical analysis parsing etcetera is all the time required by the interpreter itself is added to the time required by the interpreter. So, they require much more memory much more time than machine code generated by compilers and there are very famous examples Perl, Python, Unix shell, Java, basic, Lisp etcetera are all you know interpreter based languages. Now, let us get back to the block diagram and let us look at the lexical analyzer in some detail. A lexical analyzer takes source program. For example, here there is a line Fahrenheit equal to centigrade star 1.8 plus 32. This is an assignment statement in any particular language you know there is no need to talk about a particular C or C plus plus such assignments are available in every language. So, now the lexical analyzer takes as input such sentences from a source program and then it generates what is known as a token stream. So, in this particular case the two names Fahrenheit and centigrade are all are both called identifiers. So, Fahrenheit is coded as identifier 1 and centigrade is coded as identifier 2. The equal to sign which corresponds to assignment is actually made an assign is made into a token of kind assign. Similarly, multiply operator is a mult op and then plus is made into an add op the constant 1.8 is a floating point constant i constant you know 32 corresponds to the number 32. So, in other words we now have a stream of these tokens. The first part of the token id assign id mult op f constant add op i constant these are typically integers they are numbers. Whereas, the second part whenever it is present is actually gives you hints about what type of you know the token it is for example, if it is id then that 1 and 2 may point to a table with indices 1 and 2 containing the string corresponding to the identifier the i constant f constant you know the second part will tell you the value of that particular number and so on and so forth. This is the input to syntax analyzer. So, now let us look at the reasons why lexical analysis is required very briefly. So, lexical analyzers can be generated automatically from regular expression specifications. So, for example, lex and flex are two tools available in unix and if we feed a regular expression specification we are going to study these specifications later in the course outcomes a program which works as a lexical analyzer. The lexical analyzers are actually is a deterministic finite state automaton each one of them is a finite state machine and we will learn what these are in the coming lectures, but now let us answer the question why is lexical analysis separate from parsing. It is not a theoretical limitation in other words the next phase of a compiler called parser can actually incorporate the lexical analysis also there is not much difficulty as far as theory is concerned, but practically if you look at the design a compiler is an extremely large piece of software millions of lines of code and simplifying the design making it modular is the only way its complexity can be controlled. So, simplification of the design by making lexical analyzer a separate module is a reason because of software engineering purpose. The second reason input output issues are very limited you know or very serious and it is not a good idea to distribute such input output you know issues all over a compiler they are best handled in one module and in this case in a compiler lexical analyzer handles all the input output issues. So, for example, it reads programs you know the from the source file and then any errors etcetera are all actually listed by the lexical analyzer after collecting them from various parts then and so on. So, lexical analyzers based on finite automata are more efficient to implement than push down automata which are used for parsing this is a very deep reason. So, as I already mentioned a lexical analyzer is nothing but a deterministic finite state automaton and a parser as we will see later corresponds to a push down automaton. A push down automaton uses a stack for its operation. So, if we actually try you I mean doing lexical analysis with a push down automaton then we will end up actually pushing a lot of symbols on to the stack then popping them off the stack and so on which are very inefficient operations and therefore, using incorporating lexical analyzer into a parser makes it very inefficient compared to the making a finite automaton based lexical analyzer. So, these are the reasons why lexical analyzers are separate and of course, if you look at the previous slide as I said each one of these tokens the first part of the token is an integer. So, storing these integers is much more efficient than storing the characters corresponding to the source program. So, it is actually a very you know succinct and compact way of you know giving the program to the syntax analyzer. So, then once we understand lexical analysis we must see how it actually helps syntax analysis the output of the lexical analyzer is fed to a syntax analyzer. So, we have these tokens coming into a syntax analyzer the syntax analyzer looks at the tokens and finds out whether the syntax is according to a grammar specification. In other words the assignment statement must have a variable on the left side an expression on the right side and so on. So, does this have you know the assignment operator is it correct or is it there is there a mistake and whether the plus star etcetera are all properly inserted into the expression. These are all the syntax checks that a syntax analyzer can perform based on grammar specification which is given to it. The output of a syntax analyzer is a tree this small tree is called as a syntax tree or abstract syntax tree. So, for example, here it shows the structure of the assignment statement above this was Fahrenheit equal to you know let us look at it Fahrenheit equal to centigrade into 1.8 plus 32.  So, everything is working out well. So, this structure is shown in the form of a syntax tree which is the input to the next phase of a compiler called the semantic analyzer. So, syntax analyzers can be generated automatically from context tree grammars. So, we will learn about these specifications a little later, but right now it suffices to say that you know there are tools to do this. For example, the yawk and antler are two such tools. So, they handle what are known as you know L a l r 1 grammars that is yawk and bison and antler handles what are known as L L 1 grammars they generate c programs or c plus plus programs which correspond to these parsers you know and they can be used by the compiler. So, as I already said parsers are based on push down automata. So, they are actually what are known as deterministic push down automata and there is a reason why we need the next phase of analysis called semantic analysis. The reason is parsers cannot handle context sensitive features of programming languages let me give you few examples. So, if you are looking at the syntax alone that is whether the assignment statement has an identifier on the variable or identifier on the left hand side, a properly formed expression on the right hand side this forms a syntax, but if you say can I check whether an integer variable is being assigned a floating point expression that is type matching on both sides of assignment this cannot be handled by a parser. So, there are theoretical limitations here context free grammars cannot express such features of programming languages another feature which is here is variables are declared before use. So, we all know that we declare variables int a you know float b etcetera. Then at the time of using a and b that is suppose a is used in an assignment statement or an expression the compiler make sure that a was declared before and it also make sure that the type corresponding to the usage of a is the same as the type corresponding to it is declaration. So, this feature variables declared and then checked after use or even declared before use cannot be captured using context free grammars. They require higher form of grammars called as context sensitive grammars and this is a reason why we need another phase of analysis called semantic analysis. Another very important feature of programming languages which cannot be captured in the context free grammar and hence cannot be caught as mistakes of this kind cannot be caught by a parser they is here you know parameter types and number match in declaration and use. So, we declare a large number of parameters in program functions which we write and each one of these parameters has a type attached to it. So, when we actually call that function or procedure we have to make sure that the actual parameters that we supply or of the same type and the number of parameters we supply are exactly the same as the one in the declaration. So, parameter type and number match in declaration and use this property cannot be caught by the parser if the misuse of this property cannot be mistakes if this type cannot be caught by a parser and therefore, semantic analysis is supposed to take care of it. So, the next phase is the semantic analysis phase the input to the semantic analysis phase is a syntax tree. So, we already know that a syntax tree is produced by a syntax analyzer it goes into a semantic analyzer and the output is also a syntax tree, but it is actually modified syntax tree in other words there are changes made to this particular syntax tree. So, that the types of operands are all taken care of for example, this expression i d star 1.8 corresponds to a floating point type you know both the i d 2 and 1.8 are floating point types, but then we are adding an integer called 32. So, if there is some violation the you cannot really add floating point numbers and integers directly because the representation of these numbers is different inside a compiler. So, what does the compiler do inside a machine? So, the representation is different inside a machine. So, what does the compiler do? It converts the number 32 into a floating point number and then proceeds to generate you know machine code for this particular statement. So, and this is recorded faithfully in the syntax tree which is called as the annotated syntax tree. So, that the code generator need not worry too much it just goes ahead with code generation looking at what is available in the annotated syntax tree. Semantic consistency that cannot be handled at the parsing stage is handled here. So, I already gave you examples of this. So, I am in the same thing is repeated here type checking of various programming language constructs is one of the most important tasks. A semantic analyzer also stores information in the symbol table or the syntax tree itself. So, each node of the syntax tree could store information corresponding to that particular node. What is the type of information that is stored? What are the types of variables is it int, is it float, is it a struct, is it an array etcetera. What are the types of function parameters? What are the dimensions of an array etcetera. So, these are the information that are stored in a symbol table by the semantic analyzer. This information is used not only for catching errors semantic validation as we know it, but it is also used for subsequent phases of the compilation process itself. For example, the code optimizer will also require information about the types of operands in order to perform certain types of optimization and then the machine code generator needs to know the types of variables in order to generate appropriate types of instructions. So, both these phases require access to the symbol table. So, the semantic analysis phase builds the symbol table and that is the database which is used by the phases later in compilation. Static semantics of programming languages can be specified using what are known as attribute grammars. So, we are going to study attribute grammars also in our course a little later of course and attribute grammars actually are an extension of context free grammars. They are useful for specifying the semantics what are known as static semantics of programming languages and it is possible to generate the semantic analyzers semi-automatically from such specifications of attribute grammars. The next phase of compilation is the intermediate code generation phase. So, the annotated syntax tree which is output from a semantic analyzer is the input to an intermediate code generator and the output of the intermediate code generator goes to a machine independent code optimizer. So, let us see what this intermediate code generator has done on our example. So, here is a small tree corresponding to an assignment statement. So, it is very obvious that we need to do this multiplication first then the into float and then the plus and finally, the assignment. So, and that is the order in which the intermediate code has been generated. So, I will tell you why intermediate code after a few minutes, but let us understand this code to see what the intermediate code generator has done. It has generated t 1 equal to i d 2 into 1.8 corresponding to this expression. It has generated t 2 equal to into float 32 corresponding to this expression, t 3 equal to t 1 plus t 2 corresponding to this small tree and finally, i d 1 equal to t 3 corresponding to that assignment operator. So, an intermediate code program has the same semantics as the original source level. So, it is a machine level program, but it is at a much lower level compared to the source level program, but I must you know mention that it is not a machine language. So, let us see why we require such intermediate code and what exactly we do with it. So, when generating machine code from directly from source code is definitely possible. There is no theoretical or practical limitation. There are two problems associated with this approach. The problem is you need to write too many compilers. Suppose you want to write compilers for m languages and let us say you have n target machines for which you require compilers. So, if we directly write you know generate machine code without generating any other form of intermediate code, we need to write m into n number of compilers. Now, inside a compiler the code optimizer is perhaps one of the largest and the most difficult to write component and it so happens that if we write you know compilers which generate machine code directly, we will not be able to reuse any part of this optimizer. To give you the you know to some inkling of what is involved about 50 percent of the compiler source code is for you know the front end that is the lexical analyzer, the parser and assume semantic analyzer and let us assume that there is an intermediate code generator. So, all these four components together form about 50 percent of the source code of a compiler. The other 50 percent is for the code optimizer and the machine code generator. So, out of these about 30, 35 percent is meant for just this code optimizer and the other 20 percent, 25 percent is for machine code generation and machine code optimization. So, a very large part of compiler 30 to 40 percent, if it has to be rewritten again and again you know for every language and every machine it is a waste of a part. What we try to do is to generate intermediate code from the source code and then this intermediate code will be the same for many languages and many types of target machines. So, whether it is C or C plus plus or Fortran or Java the intermediate code will be very similar. So, we in fact for GCC the same type of intermediate code is used by the entire family of GCC GNU compilers really. GCC is one of them we have GNU compilers for Fortran, Java and C plus plus as well. So, all these compilers use the same form of intermediate code. Once we have the same intermediate code for many languages we can write a single machine independent code optimizer. So, in other words that 35 percent component is going to be used for different languages and it is a common module which will be used for different compilers as well. And of course, so once we do that we do not require m into n compilers, but we will really require m plus n compilers. So, for m different languages we require different the front ends that is lexical analyzer, parser etcetera etcetera and we also require n numbers of code generators which are specific to the various target machines, but the intermediate code optimizer is going to be common between these. So, strictly speaking you really require m plus n plus 1 number of components for the compilers. Intermediate code must be easy to produce it should not be as complicated as machine code, otherwise the effort spent in writing a machine code generator and machine independent or intermediate code generator will be similar. So, we do not want that to happen we want the intermediate code to be very simple and very easy to produce. This is some type of a universal language which can be mapped to any you know machine code and it should not contain any machine specific parameters no registers, no addresses etcetera etcetera. There are different types of intermediate code as well. So, the type of intermediate code that is deployed actually is based on the application. So, quadruples, triples, indirect triples, abstract syntax trees these are all classical forms of intermediate code. They have been in existence for decades and they have been used in commercial compilers machine independent optimization machine code generation in various types of compilers. That is something we are going to study later in our course. Then there is a form of intermediate code called the static single assignment form which is a recent one. When I say recent for the past 7, 8 years it is been deployed in the GCC compiler and using this type of optimized this type of intermediate code makes some of the optimizations more effective. For example, conditional constant propagation, global value numbering these are two very important optimizations which are carried out by a good compiler not necessarily simple compilers, but good quality compilers and these optimizations are more effective on an intermediate code such as SSA rather than the quadruples or triples. So, modern compilers nowadays invariably use SSA form as one of their intermediate forms. So, in other words we may end up using two or more types of intermediate code in our compiler to begin with it could be quadruples or abstract syntax trees. It may be translated to static single assignment form for better optimization and again translated to another type of intermediate code for better machine instruction machine code generation. Finally, program dependence type of a graph is another type of intermediate code which is useful in automatic parallelization instruction scheduling software pipelining etcetera. This is the intermediate code which shows the dependence between various types of statements in the program. For example, if there are two assignments statements in the program one of them produces a variable a the other one uses a variable a then there is a dependence between these two statements. So, this is in a nutshell what a program dependence graph shows. So, which this type of dependence is useful for automatic parallelization and other operations which I have mentioned here. Now, the code optimizer is the next phase which takes as input the intermediate code and generates you know produces very efficient code optimizer code intermediate code and inputs it into the machine code generator. So, I have already told you what a code optimizer is it improves code. So, let us see how it operates here. So, here the first statement t 1 equal to 82 star 1.8 remains as it is there is not much we can do in that, but it is not necessary to retain the second statement which is t 2 equal to into float 32. So, we might as well create a floating point constant 32.0 and generate a new quadruple I d 1 equal to t 1 plus 32.0 instead of the three quadruples which are stated here. So, we have actually reduced the number of quadruples from 4 to 2 you know it is a really good achievement because for the short program it implies 50 percent improvement. The machine independent code optimization actually becomes necessary because intermediate code as I said is a very simple type of code and the intermediate code generation process introduces many inefficiencies. So, there are extra copies of variables then instead of constants we actually put them into variables and then use that variable and then some expressions are evaluated again and again. So, these are all the inefficiencies which result from intermediate code generation. So, code optimization removes such inefficiencies and improves code and the improvement may be either time or space or power consumption. So, depending on what you require. So, for example, for very efficient servers you require time and memory optimization whereas, for embedded systems it could be power consumption which needs to be minimized. Code optimizers also change the structure of programs and sometimes they change it beyond recognition. So, they may inline functions, they may unroll loops. So, what does inlining of functions mean when there is a function call instead of making a subroutine call for that particular function. The code of that particular function is embedded into the program and that is called inlining. Unrolling loops of course, is easy and fairly well known. We do not execute a loop 100 times instead of that we may execute it only 10 times, but the body of the loop is made 10 times bigger. 10 iterations are actually inlined inside the loop and that is called unrolling of a loop and eliminating some programmer defined variables. So, if there is a counter called i and there is another variable j which is dependent on i in such a case it may be possible to remove i itself eliminate i. So, this is called induction variable elimination.  You never know whether there would be improvement or not, but some programs yield improvement some other programs may not then yield any improvement. So, there are different types of machine dependent optimizations. For example, common spectrum elimination, copy propagation, loop invariant code motion, partial redundancy elimination, induction variable elimination and strength reduction, code optimization and to perform these optimizations we require information about the program. What type of information? Which expressions are being recomputed in a function? Which definitions reach a particular point? So, analysis of the program to determine such information and storing it in a particular way is called data flow analysis and we are going to study this part of a compiler towards the end of the course. Finally, the machine code generation. So, it takes intermediate code as input and outputs a particular type of machine code. In this case you can say in a load floating point and then multiply floating point, add floating point, store floating point corresponding to these two instructions are being generated here. So, it converts intermediate code into machine code and each intermediate code instruction may actually result in many instructions otherwise it is possible that many intermediate code instructions actually give rise to only one single machine instruction depends on the complexity of the machine. It must also handle all aspects of machine architecture registers, pipelining, cache, multiple function units, multiple cores whatever all these aspects must be handled by the machine code generator. Generating efficient code is a very difficult problem is usually NP complete and therefore, only for very simple types of machines this can be done optimally and generally tree pattern matching based strategies are among the best that are available. So, of course, we require tree intermediate code for this type of tree pattern matching based generation. Storage allocation decisions are also made here. So, you know register location which registers are used which operand should go into which register etcetera, etcetera are all solved in the machine code generation phase of the compiler. There are also after machine code generation even the code that results is not very efficient it is possible to improve it little more. For example, there are what are known as machine dependent optimizations a few are listed here. There are what are known as peephole optimizations. So, you analyze a sequence of instructions say 10, 15 in what is known as a small window and this window is called as a peephole and using preset patterns you replace them with more efficient instructions.  So, this is not necessary. So, you could just say load a comma r 1 get rid of the store instruction. Sometimes there is no need to if you have a some code where there is a jump instruction and the target is another jump then this jump to jump can be eliminated and replaced by a single jump. It is possible to use a increment instead of load and add. So, these are called machine idioms and these form part of a peephole optimizations. Instruction scheduling that is reordering of instructions to eliminate pipeline interlocks and increase parallelism. So, usually we should not make the pipeline get stuck there should be a free flow into the pipeline and out of the pipeline. So, reordering instructions to make this happen is called instruction scheduling and that is one of the machine dependent optimizations and if the basic you know programs have what are known as basic blocks which are single entry single exit pieces of code. So, if they are very small there is no way you can increase the parallelism in the program. So, we must make them bigger and this technique called trace scheduling is used to increase the parallelism available in the program by increasing the size of basic blocks. Finally, the software pipelining which is too complex to explain orally is a very sophisticated optimization which is used to increase parallelism in loops. So, that brings us to the end of the overview and in the next lecture we are going to look at the details of lexical analysis parsing etcetera. Thank you very much.


Good afternoon. My name is Peyton Brian and I'm chair of the Babcock Center Foundation Board of Directors. Every year our board is tasked with a difficult decision of determining which ornament or which landmark in the city of Columbia will be our annual Christmas ornament. It's always difficult because we live in a city with beautiful historic sites and buildings. With that said, the Babcock Center is proud to unveil our 2018 official city ornament, depicting the historical Curtis Wright Hangar at Owensfield Airport. Curtis Wright Hangar was first erected at Owensfield in 1929 and was used to house airplanes for passenger and air mail services. Later it became the headquarters for the South Carolina Aeronautics Commission. It was also used for a civilian flight training program and for general aircraft maintenance. Coolest part, in the 1930s the hangar hosted notable aviators and personalities such as Amelia Earhart, President Roosevelt and Jimmy Doolittle. The hangar was added to the National Register on April 30th of 1998. In 2018 the hangar was repurposed as the Hunter Gatherer Brewery. The brewery occupies the entire 13,000 square foot space and includes a taproom, a 527 gallon brew house, a bottling and kegging line, and observation deck that overlooks the airport and event space. Proceeds from the ornament sales will benefit the Babcock Center Foundation and will be used to enhance the lives of the people we support in a variety of ways such as providing medical and dental care not covered by insurance as well as providing some of the amenities of life that we all often take for granted such as clothing, bedroom and home furnishings and resources for recreational and social activities. All of these make it possible for the Babcock Center to achieve its mission to empower people with lifelong disabilities to enjoy life by promoting abilities and respecting choice. On behalf of the Babcock Center Foundation as Board of Directors, I'd like to thank all of our loyal collectors who have supported this project year after year for 25 years since 1993. It is incredibly heartwarming to see the outpouring of support from our community during this holiday season. Their contributions and purchasing the ornaments help us achieve our mission and make a positive impact on the lives of people with lifelong disabilities. Finally, ornaments are $15 each and may be purchased at the Columbia Visitor Center online at BabcockCenter.org or calling our Foundation office at<PHONE_NUMBER>. I would now like to present Mayor Benjamin with the first 2018 Official City Ornament and ask him to say a few words. This looks fantastic. I so look forward to this event every year. My scheduler will tell you that, well, I think we scheduled at least once or twice because there was no way in the world I was not going to be here in town for this unveiling. I'll be leaving shortly and catching a flight to sunny Albany, New York. So I'm looking forward to being very cold, incredibly cold very shortly. But it was important for me to be here as a leader in this city because obviously this ornament and all of the ornaments for the last decade plus adorn the Christmas tree and the Benjamin House Hall every single year. My children love receiving them. They love celebrating the authenticity of our historic structures or iconic structures here in Columbia by sharing in this tradition given to us by the Babcock Center. It helps us appreciate the place that we call home and the people who make the place that we call home. The Curtis Wright hangars of another project that the city was very proud to participate in and so thankful for the work that the Brennan's and their entire team have done in making that place a wonderful new place for this community to celebrate all of the things that makes Columbia special. This is so much more important obviously because it supports the work of the Babcock Center and the work they've been doing for over 30 years to make sure that our city, that this region is indeed what it's supposed to be. The purpose of the city is to help each and every one of us recognize the power of human potential. When we work together as a community, the great things that we can do together and these wonderful people behind me do this every single day. Every single day and we're so thankful and so very proud of their accomplishments. We want to encourage people to come out and to buy this ornament to support the work of the Babcock Center. They need to hurry up because we're going to put an order today for 50 ornaments real quick so they're going to go fast. I want to encourage everyone, obviously we want to encourage the spirit of giving throughout the year and the spirit of sponsorship throughout the year. This is a special moment, special time and a very special tradition that we believe makes Columbia the place that it is. So come out and support the Babcock Center. Let's get these ornaments off the shelf in record time. Thank you.


I appreciate you. This is the one in the morning. Hashtag fast divides, where we do music and lifestyle. Himefika yo pa tia music and lifestyle. Yeah! My favorite part. You're from saying his song. He is called Naida Anajina. Interesting. Hewa chakusa ni mulzal toa api o Jina. Naida karibu. Asante. So yo Jina ultoa api. Lekini wu musicians imu na kwa nga na ma Jina. Kwa ni ni? Ni ni nga betu yo Jina ultoa api. Bote ni kulithu wali ni meske maikoli ga kuliza, gestuwa kwa matoka pa. It's your official name. Mmmhmmmmm... I think so. You think so? Because yo Jina ime tokakwa ma first name. What's your first name? If you don't mind sharing? Radhan. Ah okay. So karibu asante. Asante. I went from your name because nikimaki apo. When did you start music? Okay, back in Primo. Let me say that. Uluko na imba? Yeah, go spell ya. Nikuwa nandika kapa songs, nikuwa na fortulia music. Nikuwa na pendola both music. So women here watch tour. Patu wa ko break webu kwa po na imba. Nandika. You started writing music in mini? Yeah, mnujwa. Back then, uluko na nikuwa nandika muziki kwa magazine. I used to paste. What was this? Jujumi mi ni kama UNZ ni nipita? Oh my god. Mi mi mi mi mi mi mi mi mi mi mi mi mi mi mi mi mi mi mi mi mi mi jenzi. I think between two or seven there. Aha. What inspired you kufanya music? Okay, what I can say. It has been a journey. And before I went back to official doing music, I used to be a footibola. So back then, I had challenges with my parents here and there. They used to ask me, balita isa leta food kwa tebu. So it was so hard for me. When I was going to training, they were complaining. So I just nailed down and I asked God to give me something that can balance my time, their time. I can do any time. So it came through all about music here. Aha, how's the journey been? Aha, it's fair to me. I can't complain. For me, I can't complain.  I can't say so. I'm a chef still. Chakulaki kwa apinyameni. Me na food. I can't say anything food related. Outapata. Recipes. Emethimiya. All the food. Dakuwa na behind the tent. You have to. You'll enjoy it. Dipate kwa. Dipate kwa. Recipe kwa.  I don't know how to prepare lunch. Ya, I'll ask money. So you know what I'm going to do? I'm going to pay your receipt. Mungu ni nani. Exactly. Mungu ni nani. So journey me kwa. J. Okay. So this time me kwa smooth. I'm going to break for a while due to me kwa msi. For around 2 to 3 years. I'm going to home to bed, check up. Last year I broke through my camp here in Limelight. Ya, I'm going to say ma. Aha. Highlight ya kwa? J. Young music. I'm going to say ma. Okay, you're going to say ma. Before me highlight, me kwa na challenges. Me kwa msi for sure. Friends kwa me run away. Family friends, ma relatives. But for me, Goda me kwa there for me. So me ni strengthen. Atuki angele de my last song in mefanya, recent. Your song inongelia all about the journey of my medication, sickness here. So throughout that journey, that journey kukwam gondro, of course that's a difficult period to be in. What kept you? Okay, one thing, prayer. And my pastor's been there for me, my workmates. I'm sick and then I received a letter from where I applied for a job. I didn't tell them that I was sick, but recent I could not refuse the offer because I need medication. I need to go for checkup, ya to support still my ministry to stay. Nobody knew what was going on, but what I can say, prayer has really worked for me. Ya. I'm one person who loves stories and especially stories in yamu feel zina jangam sayju kukwana. There are stories you don't get to hear every day. You don't want any kwa apa. Exactly. There are stories you don't get to hear every day. Ya. And then kukwana I'm saying ameka tumali. Maybe anapitia, very tough situation na na niha ya tu anapitia yo situation. So how are you able to navigate around that time? Okay, kitu na zase mawan. Wekiwana challenge, illife billa challenge, wezi kwa strong. Na through challenges na zina fanyamtu na kwa strong. Imu kiyangaliya safariyangu, nili kwa nimona light, kwa nimona light, nili kwa nimona night and do yami fika apa. But by then, nili anza kwa mgunjol over sade na imu kwa under depression in such a way that nimi ameka tu kitu around 3 in the morning. Nili anza kufil pain, kwa tumbo. Ili kwa sama ilikwena niwa matu. Kakuja ika panda ilikwena na throw to the brain. Kitu ilikwena kenda koruka and I was home alone. Imu kimi kili kibiza ibo. Nikianda osi kupima nothing osi. All my salary went there, my savings. It has been so in a kwa challenge. It's a long story. I'm taking a moment to take your team throughout that period. What is going through your mind? Okay, one. I was almost giving up, let me say that. Nili anza under depression. My loved ones wali switch. Kwa base te wali jitowa. Na my close, close, close, close utusi kwa itagaji ata nitoka. Ali tiza kama akajum jamana nda. So God me nani. God dami kwa nami. My parents were many on there. Wami kwa nami me piya. My pastor church. Piya the place in the kwa nimi apply job piya. Wami kwa kisi mama na mimi. Ata the project, the mission in mefanya. Wami kwa na mimi, wami nipigani apiya. Wami nisapot sana. So when I wali kwa nimi wali kwa lini kwa maulim dey mo. Ili kwa dedicated kwa nga. Let me say that. Wa, but that's really, I'm so sorry you went through that. It's okay, ya ya. What are some of the lessons you'll be soma from that season? One thing, gondo aneza, aneza sima mama nawe. Any time, time you're suffering, time you're kofiti, gondo aneza sima mama nawe. Piya, on my side, miwa zazinda wami nisapot. Piya wami sana fasi mama na church. Kama onanda church piya ukwa good relationship na church ya kwa. Piya ata sima mama nawe through prayers ata kama si financia di prayers. Prayers really works. Because minimum on a God, since we've gone through 2 to 3 years, waji realizini ini mi na sumu kwekin na sumu wa. But prayers doesn't work. Let me say that, ya. Wa. So, hello then, hingoma iniulim baya. Ya mwisho. Ya mwisho. Ukwa langoma zini na gand. Nikwa langoma around 5, YouTube ya. Pick one. What's your favorite? Kama niya stwa. See, this is my favorite. Favourite nii reason, because we don't go anywhere. We don't go anywhere. Difficult kulizam sayi, by the way. Because we are mwisho. Because we are mwisho. Okay, wacha nii amde, maijani maile lianzia, lianzia right side. We can go to the first one right side, ilikuwa, nilikuwa nawei, nona. So, nii kaji pato on the right side, ya. Ilikuwa between right and left. Sekila, Gospela, nii nii, because my friends will wanna do Sekila. So, nii kaji pato Gospela. Since then, nii me kuja either way through, kuja nii kandika goma nii toa Jesus. Ya nii ku strengthen nii o the first song, all about Jesus. Nii kakuja nii mea nii ka, kuna, kuna songa, songa nii meifanya pia, imini skumapia, ilikuwa nii amde nii press on. Nii kuna challenges, kuna nii nii, ni songa tu, ya nii me kuwa na nii ke kaza kaza ya ya. Finally StoryMobile ya. StoryMobile. Ya StoryMobile is the last one ya. Inaza unaza ima patya songa. Songa, nii dikora. Ya. Ya nii komoji, ya doja 3, 3 ya songa. Ni nasidiku songa, songa, songa, songa, badawa na bunga bunga, bunga bunga, ni nasidiku songa, songa, songa, songa, badawa na bunga bunga, bunga bunga. Aha, nice, thank you, thank you. Welcome. Sijuka nii na penda kuskia, like, the raw version of a song, intua kimba na feelingi kona, hiyo, kitu eni swede, ladies and gentlemen, hiyo eni lafanya hibi, na feelingi kwa na, ok, for me na feelingi kwa na, a lot of more impact for me. Awesome. Adagama ni ka small version. Ya. What can you say about, what can you comment about music industry, especially gospel industry, kwenye tuko kenya sai? Oh, in my country. What I can say, wama kwa na challenge sana, piya mi mi piya junikondani, kuna challenges, because, if you can go to most of the people on the switch, no, on the switch, piya, but it was a complaint, no na. But no matter mungwa, when you come back, sayzeongela sa idea, na zongela sa idea, to see as a minister, no matter what kind of strength, to strengthen, piya, to engage in shape, piya, apatia, so easier for them to listen from us, so that they can come back to their limelight. Ya, that's what I can say to them. Ni ni na sa nyawa nainda? Uwezi juwa mentality, I am say, yunik tineza sa yama. Na mitu ezi kuja, kwenye taki kuja interview, ezi kwenye ni ni, aneza kwenye tu ni ako business, but ya na juwa ni ni, no na. Labda li kwa discouraged, labda actual kwa na expect, ali kosa kwa ministry, no na. Na labda li promisi wakitu, inata gemi walingi aje, na ume pitiatru ni ni apu. Do you think that gospel musicians, wana faku kwa watu, wa kubuna genuwa kuna relationship na God, ama ju mi neza imba ni kuna sauti, neza ni kwa gospel, iko ni ni, wacha ni adi kegoma ni fae ni, ni toe. Aki tineza sema, gospel ministers, ono juwa tu ko limited, for us we are limited, kwenye tu komplina, the other side of the world, because one thing, to number one thing, all about God, we praise God. Na the other side, oneeza muka tu imbe, neme a muka, no na. No na. Oneeza imba anything, but as for us, we are limited, Bible asimu also me pia, iko guide pia, na, uspo suma Bible, utanzaku, kwenye wakitu za kutu. Kuna msa niflani ali nea pia, ya ya fedali, chai ako between secular and gospel. So ni kwenye za, ane enda wabi, akere mbe dada gospel. Ni kwenye za, wana na dada gospel. Kasima kwa sababu, gospel hanid kwa dika anything, mga mazium kami atu, lakini secular, nazima anze kwa dika mamistari zi ingi ali. Uki angalebo, yo one thing, anapachanga mke so first, because yondio the way, oneeza pata ni call bado, anaitua, uki tikiya, ita wakitu, na uki leanga pia, nazima, Goda isha kujia, tiku kujia lafum leanga pia, mamba kutaku angumi kumbele. So how do you get, how do you get messages for yourself? One thing, ya ni gumu pia. Mimi for me, niki enda studio, niki skabit, na flonayo. Na the other thing, ina ni kujiaanga, as long as mimi the only thing, ina fortilianga ni, kora, because ma verses you come to any time, ni ma pona. Ah amazing, amazing. How do you look up to? Ok ni kwa nangali am safe la ni, but so first, so good. Sai na press on to, on my way, mi na nangali am, ok ni kwa na, Sai na nangali am stories, kina Travis Green, but in Kenya, ni me kwa, a long way ni ki, siyezi danga ni, ni me kwa ni ki follow eko, ni me kwa na eko, dida for a while pia, wakina holiday, wakina toilet, on ma legend for now, past 30, ni me kwa now. So, ni me kwa jane, so those are my, ya. Ah amazing. In your musical journey, what would you tell yourself, your younger self, right now, as you began? Like, Sai if I look at, if you look at yourself, ok yanza, wuna za jambia, wuna za jambia, wuna za jambia, sometimes while he is, he is unifanye, like it will let me ask you this. Anga shem. I know, I don't even know shem, but no, no we ask this question in English. What would you tell your younger self, the younger and neither, when you began ministry? Ok, um, kitu neza say mama, neza jambia mimi, jusia zi jungle lisha, but niza jungle lisha through, he said my heart, ah, ni, azidi too, nida azidi, because, nisha jwa, uizu kwa ni wata wana kwit pia, nifanye research pia, why people quitting from the ministry, na ni me wana, the company that you have to, kutembia now, so that you can maintain, kwa ministry pia, na, what you're supposed to do, kubaki kwa ministry, kitu liatu kido goivi, kuna mtumalia na te seka, maybe I'll kwa nangudia meseji akunona, so, imeni fumza, alot. What are you currently working on? Eh, wa, tumapatifanya video this week. Ah, ina anguga this week, amando na fanya this week. Video na fanya this week, um, probabili, next week apu. Tungo jack it. For YouTuber. Um, na, kolabuz, umefanya. Kolabuz ziko, kolabuz ziko sofa, but, ah, as you go ready, as you go ready, say the, say the promise. Amazing. Ah, what do you consider in a musician when you're picking um, an artist for kolabo? Okay, one thing, ziki blend, we can do, ah, na, ina tegemi nojia ni liyambia mtu, diza time, mtu ali niyambia, na fortiliya, all about kolabuz, but, mtu ali niyambia, e niya jena hida. The only thing you can do, umba sana, dutfanya kolabu. So, me says yambia, I'm saying no na. Na, because, ni, aduwa kia anguwa ma, through God, ni me fikamalim bakam sana, ni tisha kolabu, no na. So, the only thing you can say, ziki blend through, ya, we see what you can do for God, ya, ma munguwa si fiwe. Ah, I'm saying, when do you see your music, in the few years to come? Not even years. Ah. This is my hair. Jamaani. This is my hair. 2024, ni ni ni waluwa ni, you come and declare. This is my hair. Mwaka kia anguwa, ni ni ni wakusema, I possess 2024. Ah, ni ni wasema this is my hair. So, we should do it for something. We should do it for a major shakeup. Ya, kuna wa tota niza biga pia, wa miswama na, ni ni kaki. Uta wa biga, uta wa biga pia, na very few, na very short while. Na goza.  We approach almost the end of the conversation. Uneza mbe ni ni vijana, mtu wa kwa panje. Anataftana nanzi awapi, aneza jituma aje. Kiki ni za sema wan. God is the only one aneza ku, aneza fade ya. Wa zazi, muza zuna pata, ame, ame give birth, kumto hi, ame machako street maybe, because it is in provider. The same parent pia na depend on God. So the only person aneza kusahidi aneza God. Aneza kwa kia through, aneza sa idea familiar ya kuhu. Because without God, suji tunge kwa api. Because you end up taking time yet on how to skizanga, time to me fall, pia, time to me succeed, pia yendu aneza kwa anga apu. Ato kifota the Bible, kia nga liya, se niwa konga kubi. Bila tu sa, niwa misaksidi. Aneza kwa vichu angumu. Kwa vichu angumu, lakini through, bado God alwa, penda tu bilewa kuhu. Amazing. Any parting shots for you? Iel kwa yangumu, nil kwa nongil live jana. Do you have something you want to say? Aneza, aneza wambia, aneza wambia, from the book of Hebrews 31, inasema late, the brotherly lab continue. So, penda jirani aneako, penda rafiki aneako, kwa nga, in situation you need to go now Kenya, people are suffering pia, wato wana lag food pia, support your neighbor, you never know. Significa your time. Tu aneza, tu nezakpata wa pikom tanda, we can get your music and then to really come in and you biga people. Hey... the yu masa?  Ha you are looia. Uden yu alunce ya yu wadapenda masalamу ibo Ha ha, chanu yama. Ha ha ha apana tamu kabila, apana tamu kabila. Repake a. Yawna, We used to get tea to pay basalaam Okay, ocha konza ni Koza naitua naitua naitua NIDA music Naida ya N-Y-W-D-A-H, music at the end of the music C-C-N-Q, also shu media NIDA music Niza penana bangu piya, NIDA anafanya branding piya Facebook NIDA music, Twitter NIDA music, IG NIDA music, TikTok piya NIDA bir Kingi pryesi NIDA music M-M-M, nani watia nusibo na nani M-M-M-M-M-M-M, stu biha nandika piya Kupata awadu bengaregiment mezo semani 07, 180, 1871, 07, 180, 1871 Masha Rao? Hei Hei My team, my team My host that took us out of the key, big up my team Okay, my shout out goes to Mawin B.C. food restaurant My team, my family Wa many welcome feet here I make around one year there Thank you so much Mawin B team My manager Misha kula Mawin B So wacha ni fikiru ya nichiwa Kama ni foodi ako nilukola Jamaliz ako takushara Sorry Tima bimiki Sharao toa bimiki Ame kwa supportive sana Pati awadu bengaregiment piya Wa kina kathrin kei Hei, wa kina my manager A team kubu, wa kina unique Only the team is big, wa kina resi big The team is big Amazing Thank you so much for your time We really appreciate you Thank you for talking to us Thank you for encouraging us And they define us this morning It means a lot God bless you I did the music Doing an amazing job In the gospel music industry And he is a professional chef Ya, you know me na food Sijasama kitu Lakini, we are taking a very short break We will be coming back It more