Hey mate 40 here, so I'm only live streaming tonight instead of kicking back watching the football with the sound off listening to Michael Wolfe's biography of Rupert Murdoch on audible and enjoy some high-quality football But I'm ticked off because I was trying to help somebody out today And I did what he asked but much of what he asked me to do he doesn't Recollect correctly, and it's just so frustrating like I I followed directions. I was trying to help some dude out and It did not go well Bloody hell so So I wanted to come online and I just want to yell at somebody And you notice a lot of live streamers, right? They they they seem to get a great deal of power they get to you know vent a lot of Prostrations in their life by just yelling at somebody and Chris Kavanaugh made this point rather profoundly on Decoding the gurus We're gonna do like some of the streamers destiny has an Abbey these type of people because it's an interesting Ecosystem, and it's an ecosystem which is right for parasocial Nebulations and and egomaniacs running wild so it's a good location for secular gurus But yeah, the result is that I ended up watching these the cult drama channels Like they're basically like they're YouTube channels which exist to talk about YouTube drama like between creators this kind of thing Not the worst of them not like not like the ones that are completely like what's the equivalent in the old media like What do you call on TV or that channel is just all about celebrities like what are you wearing on the red carpet and you know? ETB or something like that. Yeah, like Paris Hilton Or something cool Yeah, so there's like YouTube channels like that the channels that I saw are not that bad But they're kind of like here is some bad creator look at all the bad things. He does look kind of familiar.  They're just like a disembodied.  Hey, what if you mooncat?   You just want to genocide the world you stupid It's like that and then but obviously they have you know huge chat So just like a kind of interacting with a wall of text, but it I as I mentioned to you I previously saw a Stefan Mullin use and Interactions with his audience and it was very similar very very similar dynamic He would do call-in shows where people would call him in and ask for advice and the students They said something he didn't like he'd be like, yeah, that's why you're in this situation This is why you know blah blah blah and then yeah But people only abuse you really to the extent that you sign off on it, right?  I've never had braces that never had fake teeth These are just my my real fair dinkum teeth But I wear this retainer that brings my lower jaw forward But in the process it is widened the teeth. It am I lower my lower mandible? I think that's cool. So I have have gaps now in my lower teeth But I keep wearing this retainer at night because it brings the lower jaw forward And that's supposed to help open up the nasal passages or stuff like that But yeah, I get you know more likely to get teeth stuck in and the the bottom row is not as Clean and straight and compact as it was before I started in with this particular retainer That just brings my my lower jaw forward, but I identify with this right I I had one girlfriend who I yelled at it to the best of my knowledge is only ever been one girlfriend who I yelled at But there's something about the dynamic of our relationship that kind of led me to yell at her I'm not proud of that. I'm embarrassed about it, but I would yell at her when we were driving down the freeway, but She played a role in that and I played a big role in that and if people yell at you abuse you and lie to you On a regular basis. There's probably something that you're doing it Like it's a very dangerous thing to help somebody All right, because the need to be rescued and the need to rescue usually come out of the same sick place Now there's healthy helping of people and there's unhealthy Right, I remember I ran into this Holocaust survivor on a walk and he talked to me about how lonely it was and how You know it just make his life if I would come visit him in the evening So started to come visit him in the evenings All he wanted to do was to be left alone to watch Fox news, right? He wanted no interactions I visited him one two three evenings and he made it clear. He was not interested in my company.  It just feels really it just it's very Like traditional guru dynamics, you know, like hopefully does it actually help bringing my lower jaw forward to open up my nasal passages So I sleep better. I'm not sure I'm not sure but I do remember when I used to do a lot of live streams with Dennis Dale He's the only person so the best of my knowledge That I frequently yelled at so that they had to have been something about the dynamic between Dennis Dale and myself That I would speak to him in a more harsh tone Then I would I think more than any other regular on my show. So there's something about that relationship that long long long Dead relationship with Dennis Dale that often brought out, you know, really not nice part of myself Yeah, Dennis would have a reflex of saying I'm sorry and I think the more Dennis said I'm sorry The more I yelled at him and then the first time Ricardo caught in it was to say Dennis You got to stop saying I'm sorry because and Dennis Ricardo didn't say this but if you keep saying I'm sorry and if you keep like taking Unnecessary blame on yourself then people will just keep blaming you and yell at you, right? So on the one hand, it sounds like a great thing to do is like take responsibility. Oh, that's all my fault I'm sorry.  I I think I've become too vulnerable to I Don't know get out of you know complicated or demanding situations to create drama to try to create You know undo intimacy and intensity in my relations Just trying to you know make a shortcut to have good relations with people to wear my heart on the sleeve and in the process I have just way too vulnerable and then people Frequently treat me with disgust or just disrespect and I am inviting that all right I've got this habit of being overly vulnerable and then I don't like the results of that leadership Yeah, like you single people out for bastardization, right? Yeah, it is like a very old-fashioned Social control technique where if there's a big group of people you the big boss person will pick someone out and yeah bastardize them essentially and everyone else kind of observes and kind of Gets a bit of a thrill from from right if people are picking you out to yell at There's a good chance that you played a significant role when I have told my friends how various employers or Employers at the time were treating me most of my friends who are high functioning said I would not put out with that for 30 seconds But I put out the vibe that I could be abused because I was used to that because I was bounced off the walls growing up You know I smacked around I was used to to being abused so even into my 50s I Being abused by people in authority felt normal natural felt like I was at home When someone was berating me deriding me cutting me down for no good purpose They're just treating me terribly that felt like our home, right? We learn certain patterns certain habits certain things that feel comfortable to us And I learned in my childhood that being abused being smacked around verbally and physically that felt like home to me I Remember I used to do what one of these podcast shows 20 years ago my co-host James the Georgia said you'd make a good you'd make it you'd be a battered husband you'd just be a classic battered husband and all you do is would be whine and complain about it and Various pornographers who specialize in say no masochism But we're able to very quickly point out that I had a fetish for being you know verbally hurt I had a fetish for basically encouraging people to treat me with disrespect and Consciously no, you know, I hate being treated with disrespect I hate being hurt But I would consistently act and invite that sort of behavior not being the one being Yeah, Scott Adams did it right we heard it Scott Adams doing that in some of his content But but the thing is lots of these people are doing that in there and their politics are all over the map like Hasan Abby is like a leftist right and the the so it's this is actually useful for us because we could send You know, it would be good to look at people from the left side of the spectrum and problem is most of the IDW types They almost all identify a centrists or left-leaning people, but like they're not they're not really right But there are left-leaning people doing the power social exploitative stuff But I think a lot of them hang out on YouTube and Twitch. So yeah, we might find them there So yeah, anyway, the more I hear about this internet thinker, so let's not care for it You know that thing that went viral a while back where you have the Tik Tokers or whatever This is why they're they're kind of doing reactions when people pay like money. They're saying yum-yum like ice cream or whatever, right?  You can throw it down super chats I'm rumble right now. I'm on rumble backslash Luke Ford and They're gonna super chat.  So it's weird isn't it? It's like pure objectification, right? Like there isn't necessarily a Sexual component because people usually use that with a relation to that But I think the key I think it is like that it is abstracted away to such a weird degree that you know It's what it's what it's tickling But it's it's clearly objectification, right? The person is acting like a robot like an anime character and they're responding just like if you press a button You put the coin in the slot. That's just so odd Right so the the chat says, you know, I whack off.  I would never you know in real life get get off on that. So yeah, we all have a dark side and I was just talking to a sponsor about this a few minutes ago All that our self-destructive Adaptive behaviors like me being overly vulnerable. That's meeting a real need, right? The reason that we are maladaptively Doing things is because we are not meeting our needs through our regular life So why am I going around making myself like way too vulnerable for my own good? Because in all likelihood, I'm not meeting sufficiently my needs for intimacy Intense connection with other people through healthy ways. So I'm using unhealthy ways to try to meet those needs I mean Other blokes are not getting their intimacy needs and their needs for like intense closeness with people So they're you know going to glory holes or bath houses or you know, hiring Procedures or looking at pornography or getting high or doing drugs, right? So we have legitimate needs if we don't meet our needs Legitimately in healthy ways like through our say to us a recovery program up through our religion Throughout through our yoga through our spiritual practices, right?  So I have a need for drama and so I Think I make myself unnecessarily vulnerable. I try to create inappropriately intense relationships in many contexts I like to you know, play play a lot of games with Some some people in my life because I like to feed my my need for For drama, but there are healthy ways to feed my need for drama such as by doing these informative provocative Thralling entertaining live streams. That's like a healthier way for me to meet my need for drama I have a great need for freedom. And so I have consistently self-sabotage relationships Work situations commuter commuter all situations so that I could feel free because all human Interactions are gonna get messy like all human interactions are gonna touch on parts of you that feel awkward And that you don't want to be reminded that you have these vulnerabilities And so I have consistently in the course of my life Now I wanted to just drop, you know flames and petrol and gasoline and Cigarettes and lighters and just blow things up so that I could feel free again because I was feeling hemmed in captured You know parts of me were feeling very awkward because of some you know ongoing interaction I have such as a job or friendship or a communal relationship. So instead I can healthfully create that feeling of freedom by saving money by overcoming my various emotional addictions by setting aside time for myself and for doing what I want Getting clear about what's important to me and pursuing those goals Okay, so yeah, if we if we don't meet our needs through healthy ways We're gonna meet them through very sick, you know maladaptive ways But when we find out we were stuck in some in a self-destructive pattern We have to ask like what legitimate what real needs is this meeting? How is this seemingly self-destructive maladaptive trait character trait behavior habit pattern? How is that serving me then? How is it hurting me? How would I benefit from being in the opposite of it like hipster sing be in London before like it had kind of emerged from What it is? So it's Charlie Brooker like Yeah, a guy being with like, you know, basically vice and magazines like that and Just noticing how it likes a professional student It's very good What's it? Nathan Barley Yeah Yeah, it's very good. If you like our place and stuff, you'll like that. Oh, yeah. Yeah, look see Brian is right Um, it is true and I was gonna put this out like oh, yeah Look, I'll give you a few of your comedy that helps you I'm not like basal quality and stuff. They you know, they are in the lineage of that, right? I'm a bit more of a commentary but the whole point is kind of even dad's army and stuff like that in You know the kind of what's I push the push the wrong link There we go Well, Mark Lincoln is making a good point that like, you know, you have the people in the street performers Right who are dressed up like statues and move around when you Yeah, but there's some people don't think there's anything creepy about the street performers acting like that Yeah, there's there's something about that words, I guess I guess this is it. Unfortunately, you're right Mark That that is probably right. I have a need to perform right if I don't perform on YouTube, right? I might perform in some very inappropriate places in inappropriate ways with inappropriate audiences with inappropriate levels of audience Interaction with my performances to the analogy that this is just the online version of that But it's just so weird. Um, what do I use to groom my beard so precisely? okay, and I Was up I went to bed at seven and I got up at 3 37 a.m. This morning I'm not sure I got this queued up, right? I sure hope this is correctly Hold on because I've listened to that and I think he knows Arabic or he knows, you know, he definitely knows Arabic speakers But he said ah, yeah, this is this is this is good. This is really good from decoding the gurus Chris Kavanaugh Matt Brown interview with bags or us the Norwegian comedian for his podcast I don't think it's I get like definitely talked about this with him But and I told you about And it will come up if we do the Sam Harris episode that Sam was talking about people may or may not have heard this recording of a Hamas terrorist calling his family back in Gaza and kind of probably People that he's killed and and the transcript of the conversation Like one, it's very clear that the Hamas guy is very proud of killing this really civilians He's telling people look on the phone. You can see the 10 Jewish people. I killed with my own hands I killed them, you know, this is great And but the read the additional layer that was added on to that analysis is that the parents and the family Seem happy and they're not responding in horror, right? So this is more horrific because it's something describing doing horrific actions But their family are not reacting in horror and and this is a potential concern because it would speak to like All right So most people they're thinking just goes down certain tracks They get certain stimuli and then they just you know inevitably go down a certain track They don't really take the time to consider what's what's really going on They just sees what's immediately appealing and feeds their needs the level of like The general community but yeah when Sam rears this so if you look at the transcript There are very things where the parents say things like, you know Priests be dollar or something like this right and Graham would the journalist who has more specialism in this said whenever Sam Rears this topic with him said actually Hold on because so Graham would wrote a profile of Richard Spencer. He kind of specializes in jihadi terrorism He's a thoughtful thoughtful journalist, right to the Atlantic I've listened to that and I think he knows Arabic or he knows, you know, he definitely knows Arabic speakers But he said I actually think that that you're misinterpreting that because if you listen they are using stock freezes that you hear You know the same way someone might say Jesus Christ or oh my god Right, but they're not invoking Priests be to the most high Jesus Christ I say it but it's because of the you know, Islamic culture just there's lots of stock freezes that reference Whatever the case might be and then Graham which says to me it sounds like they're reacting out of disbelief and Chuck and they're kind of saying What are you talking about? Like, you know, where are you what's going on? Oh and like instead of it being Priests be the allies like You know, like Jesus Christ. What what are you talking? You know and the mom is crying at once the age and like Sam presented that as like tears of joy It doesn't sound like that in that but in any case, I don't know So when I saw the transcript online, I had the same reaction of Sam like initially where I was like, oh, this looks Concerning right that there isn't the odd reads But then when I heard somebody who knows a bit about the topic and I might understand the language better reads that actually it's a misinterpretation I thought oh, I don't know I shouldn't pass judgment and that is possible But Sam in the next episode that he released and does a long segment With the same interpretation that he initially had of the call and at the very end he says a Graham wood has an alternative But I'm not so sure about that for something and it moves on and it's like wow like yeah It just speaks to his thinking being on rails and you know, we're dunking on sand But there's like a general principle to be absorbed here, right, which is that when you've got too strong And you could call it either logical or you could call it theoretical But you got too strong a mental framework that you wanted to filter all the information through then what would you clearly do is you just ignore The disconfirming evidence that doesn't fit and you and you persist with a model as if all the evidence is coming in It's fitting your model perfectly and that makes you unable to to learn new things basically and it becomes kind of boring Yeah, because one thing that Yuval Was emphasizing that conversation was like, you know, there's religious extremists on the Israeli side Right the ones who are promoting the West Bank settlement and actually a lot of Netanyahu's government, right? Like he was appealing to the far right of Israeli politics and the ones that and are at least support I think that phrase thinking on rails since I heard it this morning. It just hasn't left my head I think it's a really useful way of understanding some very common human tendencies did by religious demagogues and But the way Sam had freeze that was, you know, the kind of one side has the religious fanatics and the other side Just an ideal Yeah, but so the position though was just it's just more reasonable to I'm not saying that therefore it's completely equivalent, right? but it's more like and Comment in the chat from Hasidic belt Daphine these guys Heading the gurus are the worst. I don't know why Luke likes these insufferable morons so boring, right? That they're not as exciting as a Nick Fuentes or Richard Spencer and Ethan Ralph Frequently the truth Frequently profound truth is not immediately exciting. It's not a thrill But I think that what they have to say is incredibly important here It's complex and there are religious extremists on both sides and there are moderating forces on both sides and like that Yeah So basically the black and white like it's just jihadism That's the only ideology that we really haven't an issue with and you know, again You've always the point that like plenty of people in the 20th century seem to do a lot of extreme activities for secular Ideologies that didn't posit an eternal afterlife, right? The millions of people died in the furlough ends of those objectives So it's not that that isn't an ideology martyrdom and so on that is a problem But it is that it's not the only potential driver for like conflicts and you know, you're creating Russia It's not relying on no fundamentalist thing. I mean, unless you try to Yeah, this is what a shoehorn nationalism into that. Yeah. No, that's right I mean realities, you know messy and complicated and that's deeply unsatisfying. I think to everybody, right? It'd be really nice. It's really nice. I have a nice simple set of heuristics and I simple like mental key that explains every problem like wouldn't be great if you know Everyone that we covered Chris, they're all bloody grifters. That's what it is. They're all grifting, right? They're all grifters, right bang You know, if you want to you know, if you wanted to you could you pay attention to particular bits of evidence And that could be the key that explains everything that's happening in this fear, but unfortunately not it's a bit more complicated Yes, it's an element. It's just one of many some of it hangs together comfortably other things just don't really fit So yeah, even even in the case of narcissism, which we often emphasize Yeah, like that you you could completely Exercise that and focus on some other element like like for example the flows of money and ecosystems and I That wouldn't be wrong, right? It would be giving you a partial perspective and the same thing would apply if you completely ignore the financial incentives that are in play and the network dynamics So like it's yeah, I see that as well Actually, sorry, we're now we keep elaborating on this point But you see a crop up in so many different ways like I got a lot of friends online who fall into that kind of you know Liberal free speech forever attitude, right? Yeah, so they see, you know, you know free speech as this is fundamental You know principle that is that is so important. Okay. I enjoyed that little burst there from decoding the gurus Also listening to the Doran making the point that that we had a way out of this Ukraine crisis We didn't have to get into this mess once we were into the mess There was basically an agreement reached between Zelensky and Putin But the Biden administration and the Boris Johnson administration in Britain said to Zelensky No way you've got to get all your territory back You can't compromise at all even though we could have ended this war, you know shortly after it began And so a lot of politicians like Joe Biden and the head of NATO, right? They have their egos on the line They think it will be good for their reputation, right for their career prospects to keep this bloody slaughter going on in Ukraine This is from the Doran podcast to read Kiev, which as we now know is a complete fiction I mean, we discussed that before the Russians was drew as part of the diplomatic deal Which the West sabotage they talk about Harkov and her son region of Harkov offensives Being reversed and the health zone offensive is at a standstill and the losses Ukraine suffered as a result of those were horrendous But the realities today on the battlefronts anyway are completely different with Stoltenberg You won't talk about that Annalena Bebov won't talk about that what she's doing instead is warning people about not being fatalistic about Ukraine They want let's get one Still supporting Ukraine giving Ukraine everything so that you can continue the war until it is finally destroyed I mean the Russians say, you know that it's until the last Ukrainian and that's what it's beginning to look like Yeah, it's almost like they want to I guess it's like destroying the scene of the crime I guess, you know, they just I think Stoltenberg, von der Leyen, Annalena, Zelensky, Yermak, all these people They're so up to up to their neck and so much just just crap, you know, just nasty crap that they just they decided Let's just destroy the whole thing and Russia did it Blame it all on Putin blame it all on the Russians when Ukraine is destroyed all this You know hundreds of thousands of people have been killed. It's all Putin's fault And because it's all Putin's fault, we must take even more steps to insulate and protect and defend Europe from And clamp down even more on anybody in Europe who says otherwise So that that is the agenda now Yeah, let me just just wrap up the video Let me read you a quote and I want your thoughts your human psychology right input So much of the drive for suppressing speech online and accusing anyone who differs from the you know ruling regime with regard to incentivizing and Subsidizing Ukraine's war with Russia is oh, you know, we need to restrict speech so that we don't give soccer to our enemies So we we create this horrific situation in Ukraine and then try to restrict speech so that Those who are subsidizing and directing this horrific situation in Ukraine They get more protection from being criticized on this just so we understand how these people think and this has to do with Brexit, but I think you'll be I think you'll be able to relate this to you great So Ursula von der Leyen she gave an interview or made some comments about Brexit and how the UK is is now Looking to move back into the European Union. That's their trajectory of things and she said she said this I keep telling my children and she's talking about Brexit. I keep telling my children. You have to fix it We goofed up you have to fix it So I think here too the direction of travel my personal opinion is clear I just read that quote we goofed up and I just think you know, this is the way these people think This is how they can explain everything when when it all collapses just gonna be like, you know What are your thoughts on that just the psychology of these these globalists in these in these institutions is It just sickens you but anyway, that's that's how you see the world That is exactly what they're gonna do. You know that we acted out of good faith It was a mister. We made it be made mistakes as we did with Iraq That's we did with Libya, but we acted with the best of intentions all along and if everything in the end turned out bad Well, it was not our fault. It was because there wasn't enough Will and determination people didn't give as much money as they should have done They didn't give us much weapons as they should have done they could have given more never explained how that could have happened And of course in the end in this particular crisis, it's absolutely not our fault It's the fault of the horrible man in the Kremlin and these terrible people around here Putin and his accomplices They are the people who ruined our beautiful dream and you know The only responsibility you take is that you made certain mistakes you goofed you goofed up You still want all those hundreds of thousands of students and women to go to the battlefronts That's but that's only a mistake if they had died It's only a mistake on your part if they if they died I mean, it's good that we make these programs now because when those excuses are made Right this war would not have happened if Donald Trump had been in the White House I don't think there would have been a massive Hamas attack on Israel and therefore an Israeli invasion of Gaza if Donald Trump had been in the White House and we've been unnecessarily provocative with China over Taiwan We could get into an absolute mess there as well. This is the the most seemingly competent but really the most incompetent foreign policy administration that the United States has had in 70 plus years We have programs like this as a public record of what it was really of what it really all amounted to Before we finish just wanted to say I noticed that in Britain and I mentioned it on my program of my own general yesterday They're now resurrecting the story that it was actually Putin who turned down the prospects of peace last year There was this mysterious deal that nobody knows anything about that was negotiated with Cossack You know Cossack Putin's official that he did some kind of a deal with the Ukrainians and that Putin rejected it There is absolutely just to say again There is absolutely no evidence whatsoever for that story, but it again tells you the deed down The British know full well what they actually did in March and April of last year when they Knocked away the chance Ukraine had to agree to a piece We've seen the same comments now being made by out of storage out of store which is confirmed has confirmed that as well The Ukraine had a good peace deal then and it was all thrown away and he said very good very favorable peace deal He says you actually said the Russians made a lot of concessions Exactly so very very good piece there was made last year the British played an instrumental role in throwing it away But that they're starting to get nervous that people are starting to start pointing the fingers at them So they're now falling back again on this fictitious story about this other deal that was supposed Why do I make about all the assassination talk with regard to Donald Trump? Well, I think the Atlantic didn't they just have something like 40 different intellectuals right essays and why it'd be a disaster to have Donald Trump as the next president of the United States. So Yeah, there's There there are all these incentives being laid just like there were incentives laid for the massive increase in violent crime We've had since George Floyd. We have all these incentives laid For an assassination of Donald Trump.  This is Tim Heidecker on Joe Rogan.   It's yes two to four fold increase in the Instances of myocarditis. Yes, but you know what the hospitalization You know that there's an increased risk of myocarditis and among that age cohort from getting COVID as well Which exceeds the risk of myocarditis from the vaccine. I don't think that's true I don't think he doesn't think it's true Who are you myocarditis from people catching COVID that are young versus Increased risk of myocarditis from the back Listen to this Joe Rogan say myocarditis What I don't even know that is Why should I I? Just go to the doctor and the doctor tells me what to do right and Hopefully it all works out for the best right there is this but let's look that up because I don't think that's Where are you look at it up in the New England Journal and that is it was this with children in Grey's Anatomy what?  They're lost. They're just lost with children because there's so much information Well, no, we don't know there's so much information and support Joe Rogan. His brains Just melting with all this information. He can't dissect it.  Who's you talking to Ted Nugent Ted Nugent about hunting And goggles and everything eating meat stop your show go enroll at Austin University's medical Fucking's University, right and Yeah, good good question in the chat from Elliot black Why did certain countries like Sweden and Denmark and I believe the state of Queensland in Australia? Ben the Madonna Vox Vax citing myocarditis because there were studies revealing that there was a chance of some kind of myocarditis Reaction among a tiny tiny number of people to the vaccine What these countries did not take into adequate account is that the risks of myocarditis much much higher for people who catch COVID? So people see a risk with doing a certain procedure and they go, oh We should we should not have that procedure done what they frequently don't consider is What's the risk if you don't do the procedure or you don't take the vaccine or if you don't engage in that activity? Yeah, everything comes with a risk what needs to make prudent choices on what type of risk you want to take this is Tim Heidegger on Bill Maher What's what what is the part of it that that bums you out the most the part that gets me is Seeing a casual Bill Maher where yeah, he's got the the t-shirt Yeah underneath the button-down shirt, you know very close to the Steve Busce me, you know Hey kids. Yeah, exactly like he's And then that sad table with it just packed to the gills Everything's ready to follow fall over. That's all and it's also just like clinking. Yeah He's like reaches over. So he's like a real compulsion to like light things and He'll be talking to you Well, he'll what he'll do is he'll ask a question. Mm-hmm. Let me do it here Yeah, so so what have you been up to this summer? Well, you know really been It's immediate, yeah, like you should do it while he's talking. Yeah, you do it when you're exactly So the little things like that are amazing and then just his his general point of view is just turned into grumpy man Get off my lawn. Yeah, and his Unnit, he's not interested in what the other person has to say. Oh, he's combative. He's he's fighting He's he's he's closed shop. Yeah, everything. I've come up with is the answer Yes, the new rule has been no room stone. No room for anything else and I'm going to be weirdly petulant about it that you might dare to not see it the way I see it Yeah And then the guests don't seem to know that like none of the guests have watched the show They might now they start have maybe caught up But yeah in the first bunch you could feel that that they were not expecting to be sabotaged like where they're just like houndstown They're like wait, this is what this is. Yeah HBO thing like they're checking the address. They're driving. Yeah, they do Bill Mar show. Yeah, and then suddenly I'm going to CBS television city or I could you they'll be like in the hills to be just like Two tenths of a mile before I'm here. Where am I going? That has to be wrong Okay, some interesting comments in the chat Here we go Hasidic bell Daffy now I'm watch as Luke Ford anymore because he hates his viewers and things that people like Douglas Marry and Murray is shallow. There's a lot of truth to that. I am not you know going to do a show that Just pandas to people's, you know dumb Prejudices I'm not going to do a show where I'm just telling you that, you know You're so great and your favorite right wing intellectuals are just amazing if they're not and I'm not going to say that You know the the deep state is you know responsible for most of the problems in our lives and The elite are trying to destroy Western civilization. I'm not going to give you that that crap You've got hundreds of right wing shows that were just dish out the crap All right, you want to be lied to right you want to go on a live stream so that you can have You know some intellectual masturbation where just you know, or your knee jerk 100 IQ prejudices are reinforced There there are a lot of other shows that are much better for that than than this show right we go deep here Is there really inconclusive evidence that the Vax actually prevented is There really conclusive evidence that the Vax prevented COVID well no one's smart There are no scientific studies to the best of my knowledge of any prestige arguing that the Vax prevents COVID but they argue is that it reduces the severity of COVID and reduces the transmission of COVID and Reduces infection rates with COVID my entire family is Vax max every single one got COVID Yeah, so what I mean This is just reasoning from anecdote either COVID reduce the COVID vaccines reduce the intensity of COVID Reduce death from COVID reduce hospitalization from COVID or it doesn't and so it's just a matter of the studies Yeah, the deep state supports this channel Absolutely vaccines never promise immunity All right vaccine a fat efficacy lasts about eight weeks as the chat Well, there's some efficacy at reducing the severity of COVID and reducing the number of people who Even catch COVID and die from COVID. I think the evidence is pretty clear that vaccines that are approved by United States and other first world governments are overwhelmingly safe and More effective than doing nothing, but I'm not an expert enough on vaccines So I'm not gonna I'm not gonna belabor that that point I just simply don't know enough, but the the durens absolutely right thinking about, you know, how Our leaders for the sake of their own prestige and political prospects have subsidized this war in Ukraine and Wouldn't you know just as I go to play that link the player player crashes a little bit of a Discursion here by Chris Kevin or Matt Brown on their favorite Yeah, a lot of people including a lot of Americans just have absolute contempt for America or for American culture and American comedy And there's a lot of great American TV. There's a lot of great American culture There are a lot of great things about America Just as there are great things about Britain and England and France and Denmark and an Australia and New Zealand and Japan as well But I mean Richard Spencer just has its knee jerk contempt for you know, all things American But America makes them you know pretty good comedy Like Broad and obvious and Yeah, that's a really common critique Particularly among Australians and Europeans that American comedy is just broad and stupid When I was trying to go to Benny Hill give me tingles that is Chris I'm not saying that not me. I was not Um There are plenty of things on children's But you know Apologies he just exists in the culture. He doesn't doesn't judge it. All right, a little bit more from you Talking about diversity and inclusion statements I think I think we should be talking about your actual podcast In fact that you're spreading this academic knowledge to those people who are not in the academy and but you are right that you know On some level there is still just you needing to learn how to write to promote yourself Which is a big part of that again brand writing in general But also it's a part of you know another thing at the same time to do and again So Chris Cavadro and Matt Brown they met up on Twitter because they both it was somewhat heterodox while loathing the intellectual dark web So they're they're basically center left liberals who both tire of liberal left hypocrisy But also have disdain for the low IQ intellectual dark web This is kind of just another hoop to jump around some level is the fact that you're meant to try to look at your past and Align it with like the overall admission state of the university things like that However, it's also important to note that part of your job as a professor Is to do that at the national level when you're writing credits or international But you need to look at the organizations like actual mission statement what you know for like the national state of America that fund research You need to look at you know this year. What are they really trying to hype up? And so on some level needing to go to the school website and look at all those things is selecting for someone who's going to be able to Right so a lot of these tests where there are diversity and inclusion statements They're really just tests are you willing to follow directions are you willing not to be a dick and to get along with people?  I Think you're right. I think I think it does perform this function I've kind of said this before which is like I think and this isn't really a dig It's more just like a sociological observation that it is like a it is like back in the Victorian era where they would sat there Yeah, people that wanted to become part of the British Civil Service and and get into that that the sort of rungs of power Would get sounded out Did they go to the right clubs and did they have the right opinions and whatever and I'm not that sounds more pejorative than I mean it To be but I think there is some of that right so in a university Like if you want to become a dean or deputy vice chancellor or whatever a lot of it is like our universities of corporations Just like Berkeley, I assume and frankly they are they are primarily concerned with not having scandals not not having people that are going to become a massive problem and Part of it is actually demonstrating that you're not going that you're not a weirdo and you're not gonna like swim against the stream and Right, this is like most jobs the number one reason people get fired as they become seen as a liability They're just weird off putting that they make other people uncomfortable that they're not willing to you know Play nicely with others massive problems and I think I think that's just a that's not a political observation That's just a like a sociological observation and I think I think a lot of those statements can yeah, sorry go ahead Yeah, yeah, yeah, I think that the part where everyone can class pounds is over the fact that University system is like pretty cynical and business orientated and like exploitative like, you know post-doctoral labor Right so Businesses employers what you to show that you're willing to play nicely with others, right? You're willing to get along not be too weird and Be willing to submerge your own opinions and your own preferences to play nicely with the group a little bit more from this show Really seems to every time he has a big appearance like on broken or whatever. He has to tear up at some point He's just talking about Jordan Peterson. It's like he's not very well. He's a very he's a very odd man like in so many respects and yeah, it's a Yeah, I think he's got progressively stranger, but he's definitely now If somebody regards him as his role model now and they're still watching what he's doing it kind of like I don't know that there's that much hope But I think this whole kind of like sort of rabbit going down a rabbit hole thing that sounds really like Stupid from the outside, but when you're I sort of realized that as I was kind of so what happened was I lost my job because of COVID lockdowns And I think is people don't really if it's not affected you He don't doesn't sort of Right if your life was, you know severely diminished If you lost your your job, I mean through COVID lockdowns There are all sorts of incentives for why you'd be much more likely to believe in Conspiracy theories. You don't sort of realize how big a thing is so it's kind of that sort of being vulnerable being stuck in this situation And not knowing what's going to happen next makes you more skeptical about Like what's going on who's got your best interests at heart and blah blah blah Um, but I mean I was kind of lucky enough that I got a new job fairly recently fairly quickly after that And so I kind of I've gradually gradually start to move away from this kind of content But I think what the what decoding the gurus is different from the stuff that I would kind of listen to before Was more, you know, like majority of report apart from being like so so focused on American politics is that it's just it just takes piss out people And so and if and if there's one area which you think okay, I maybe I agree with them about, you know American, you know medical insurance or guns or whatever you agree with them but then they say something really exaggerated about like transgenderism or about like I don't know vaccine Forcing people to get vaccines or whatever Then you kind of can't really fully subscribe to it because you feel like they're they're so and especially with the majority report now I can't I can't watch them because They just they don't give people the benefit of the doubt and they're really vitriolic So I think it's really much more useful to really look at what are these people actually saying and what is true and what is Just complete exaggeration Then I think yeah, you go ahead Matt. You've been silent I'm just gonna say it's true, isn't it? Like like if you've lost your job as a result of the COVID lockdowns and a lot of people did Um, and you know, it hits differently than if you're someone that's just oh, I'm working from home now for a little while Right. I mean COVID didn't didn't affect Didn't negatively affect my life like I enjoyed the opportunity to just read more and I mean I I'm on easy street compared to tens of millions of people Who intensely suffered from the lockdowns so of course Being open to the lockdowns were a good idea as I am open to to that You know, I'm not committed to it But from the available evidence it seems to me that in general the the lockdowns at certain times were a good idea But I didn't suffer from the COVID lockdowns And um, and I was one of the lucky ones. I could just work from home And it was no big deal of basically experience no impact from it whatsoever But I could hear second hand from peeps of people Who were like really adversely affected by it and it takes it's true what you say it takes actually a leap of A leap of empathy to go. Okay.   Where are you going to pay the bills, you know, right? These are three phd speaking. All right. These are three academics All right people who you know, generally center left But this woman saying due to the devastation of COVID lockdown She started to entertain many of the conspiracy theories on the right not thinking about like what's the best policy for Oh, yeah, maybe I don't need to buy food because um, you know to stop some people getting infected with the virus, you know Those things happen all the time. Um, you have to make those kind of sacrifices, but it just feels like, you know Why why? No, I I think that's very understandable and like a part, you know, a kind of intuitive and reasonable reaction to that situation and I think that like uh In the positive aspects the some of the people we covered do express, you know, like genuine sympathy for people in those and Um, and I think people notice that but on the other hand, it's like I I also see a cynical expectation of of people who are genuine So, yeah, some people think I hate my viewers and that I lack empathy and sympathy


Welcome to the lecture on semantic analysis. We will be studying many topics such as attribute grammars, attributed translation grammars and how exactly semantic analysis is done with such attributed translation grammars. These are the main topics and as we go along we will see the subtopics as well. To put the semantic analysis module in the correct perspective, let us look at the overview diagram once again. So, we have completed lexical analyzer, syntax analyzer and studied their properties, different types of such analyzers and so on. So, one from the syntax analyzer, the syntax tree is input into the semantic analyzer module which outputs these annotated syntax tree after validating the semantics of the program. So, let us understand what exactly semantics of a program mean, how they are checked etcetera etcetera. So, basically semantic consistency that cannot be handled at the parsing stage is actually the one that is handled here. For example, parsers cannot handle context sensitive features of programming languages. So, there are two types of semantics that programming languages have. One is known as the static semantics and the other is known as the dynamic semantics. Static semantics as the name indicates you know they do not depend on the run time system and the execution of the program, but they are dependent only on the programming language definition whereas, the dynamic semantics again as the name indicates they are the properties of the programming language systems that occur at run time and we need to check such properties only during execution time of the program. For example, the static semantics can be checked by that can be checked by a semantic analyzer or you know there are many examples here. So, our variables declared before use if so everything is ok otherwise an error message has to be provided. Then do the types of the expression and the variable to which it is assigned match on the two sides of an assignment statement and do the parameter types and number of parameters match in both the declaration and use. So, these are few examples of static semantics of programming languages whereas, you know for dynamic semantics compilers can only generate code to check such a you know meaning of the program. For example, whether an overflow will occur during an arithmetic operation. So, whether array limits will be crossed during execution whether recursion will cross stack limits whether heap memory will be sufficient. So, really speaking we should say you know the properties are these and the checks will be done by the semantic analyzer and similarly you know there are properties of the numbers and if the variables you know if the number exceeds a particular range then an overflow is set to occur. Similarly, the array will be defined with say 0 to 10 or 0 to 20 and if the program really crosses these limits then the array limit violation is set to occur. So, that the violation should not happen is the semantics of the program whereas, the check will be performed only at the runtime. So, let us take some examples of the semantic checks static semantic checks that can be done by a compiler. So, consider this you know simple function and main program which calls it. So, this is a function to calculate the dot product of two arrays. So, int x and int y these are the two arrays of integers. So, the program is very simple you know it has a loop i equal to 0 i less than 10 i plus plus and then d accumulates the dot product d plus d equal to d plus x i star y i sorry turn d. So, this is the simple you know dot product function and in the main program we have two arrays a and b of size 10 each and we call dot product function with these two arrays as parameters the sum is actually taken in p. So, what are the possible static semantic checks that can be performed on this program? For the main program here is a simple you know list. So, types of p and return types of the dot product function they should match. So, for example, p is being assigned the value of value return by dot product and p's value is integer. So, the value of the return value of dot product is also of integer type. So, these two match and there is no question of error here. Do that number and type of the parameters of dot product the same in both its declaration and use yes in this case. So, here is the usage in the usage we have two parameters and in the declaration of dot product also we have two parameters. Secondly, the two parameters are arrays in the declaration and they are arrays in the usage as well. So, this particular you know this thing property is also satisfied then is p declared before use similarly is a declared before use is b declared before use etcetera etcetera. So, yes definitely p is declared and then used a and b are declared and then used. So, all these properties are satisfied for the main program. So, let us see how it is for the erroneous program. So, the same dot product let us not worry about the dot product function. So, I have just you know given you only the declaration of the header in the main program there are many errors here and the error messages given out by the GCC compiler are here. So, for example, we have a and b as before and then we are trying to call dot product with a single parameter. Here we are trying to call it with three parameters here we are calling it you know with two parameters properly, but unfortunately the p into which we are trying to accumulate the dot product is not a single integer, but is an array type. So, let us see and of course, print f says print an integer and p an array is provided as a parameter for the print f statement. Let us look at the errors which are given out. So, statement three two few arguments to function dot product. So, it requires two, but we have given only one. So, the semantic analyzer in the compiler has got the error and then statement four it says too many arguments to function dot product it requires two, but we have provided three again an error and statement five incompatible types in assignment. So, p equal to dot product p is an array whereas dot product returns an integer. So, the types do not match on both sides. So, that is the error which is being printed out here and this is a warning really for the fifth one for the print f statement. So, format percent d expects type int, but argument two has type int star. So, p is an array. So, it is considered as type int star and that is the reason why it says has type int star. So, these are the examples of errors in the main program. Continuing the same program in the function dot product again there are many semantic checks possible even though it is a repetition let us just go through it to drive home the point. So, r d and i declared before use. So, d is being initialized here sorry d is being declared here and assigned here. So, the declaration happens before usage i is declared here and then used here. So, its property of declaration before use is satisfied again the same is true for even you know the x and y because x and y happen to be appearing as parameters. So, it is in some sense a declaration of these two variables. Then type of d matches the return type of dot product. So, again d is being returned by the function. So, the return value is of type int for the function dot product and what is being returned is an integer again int. So, this property also is satisfied. Then type of d matches you know result type of star as well. So, for example, here we say d equal to d plus x i star y i. So, that means we are multiplying x i and y i adding it to d and then you know the result is again the value is stored in updated again and again in the for loop. So, star is operating on two integers and it produces an integer and then it is added to d. So, int plus int is again a valid combination. Therefore, this property also holds elements of arrays x and y are compatible with star. So, again this is a proper match because x i and y i are integers and star between two integers is valid. So, these are some examples of static semantic checks in the function dot product. So, let us you know consider some of the dynamic semantic checks in dot product. So, value of i does not exceed the declared range of arrays x and y both lower and upper. So, x and y in the main program have been declared with size 10 and for some reason if we say this is size 11 or 12 i less than 11 or i less than 12 then you know we would be accessing x 11 and y 11 x 12 and y 12 etcetera which are not within the range of the declaration. So, there would be a run time error at this point. There are no in this case of course, x you know i goes from 0 to 9 and that is only 10 iterations. So, everything is well within the you know declaration of the two arrays x x and y. There are no overflows during the operations of star and plus in d equal to d plus x i star y i. Again the integers that we are if the values of the variables a and b the arrays of a components of a and b happen to be extremely large values then the multiplication x i star y i could actually cause an overflow to occur. Similarly, again if these values if there are if the arrays are too large and too many components are being multiplied and added into d then d could again you know cross the limit and cause an overflow. But in this case assuming that a and b have small values such overflows will not occur. So, these are some examples of what exactly are dynamic semantic checks in programs that cannot be done by the compiler, but a compiler can definitely generate code to perform these. For example, what happens is to check the you know array going out of bounds at run time the index value of i is checked to be less than 10 if it is then the iteration is allowed to go further otherwise an error is caused and the program stops. So, the another type of dynamic semantic check that can take place is again demonstrated with the use of a recursive function in fact. So, this computes factorial of a number. So, if n equal to 0 return 1 otherwise return n star fact of n minus 1 this is a very well known program. So, there is no need to explain it further. So, p is an integer and p is equal to fact 10. So, we are trying to compute 10 factorial. So, does the program stack overflow due to recursion. So, here when we say fact of 10 it comes here 10 into fact of 9 then again 9 into fact of 8 etcetera. So, there are really 10 invocations of fact. So, therefore, will the stack permit 10 instances of the activation records which are required to execute the function fact that is the question. So, if it does not then there will be an overflow otherwise the program will go through 10 is a small number. So, there is no need to worry about overflow in this particular case there is no overflow due to star in n star fact n minus 1. So, again if n into fact of n minus 1 goes beyond the range of representable integers then there would be an overflow at this point. So, that is an introduction to what exactly are semantic checks. So, let us see what exactly semantic analysis. So, during semantic analysis the type information of the variables whether they are ints or arrays or pulleons or characters etcetera is stored in what is known as the symbol table or the syntax tree. So, it can be stored in the symbol table or it could be stored in the nodes of the syntax tree itself. Usually the symbol table option is better because syntax tree takes much more space than the symbol table usually we store it in a symbol table and then place a pointer to the appropriate entry in the symbol table in one of the fields in the node of the syntax tree. So, what is the information that is stored? Types of variables function parameters array dimensions of course, the variable name etcetera are all stored in the symbol table. So, these symbol tables are used not only for the semantic validation or semantic analysis, but they are also required and used for subsequent phases of the compilation. For example, during intermediate code we will definitely access the symbol table to check and you know access get the information regarding the size of the arrays, the dimensions number of dimensions of the array etcetera type of the elements of the array all these are required for code generation even intermediate code generation and that would be our purpose to access the symbol table during intermediate code generation. During machine code generation again we will need to know the types of the variables in order to allocate space for them etcetera etcetera. So, optimization again requires the information about variables for movement of code etcetera etcetera. So, all these are uses of the symbol table during other phases of compilation. Then if the declarations you know need not appear before use as in the case of the language C plus plus then semantic analysis requires more than one pass. The point is when you write a class declaration in C plus plus you put the member functions and then you know usually you write all the declarations of the variables that are used within the methods. So, in such a case when we try to pass the methods or member functions we will not know the type of the variables because the declarations appear later. There is the only way to handle it is to go through the program once create the symbol table and then go through the program a second time and perform semantic analysis. So, we will see more of this towards the end of this lecture. So, static semantics of programming languages can be specified using what are known as attribute grammars. So, we will see how to check the static semantics of programming languages and how to specify them using attribute grammars. Semantic analysis can be generated semi automatically from attribute grammars. So, we write the semantic you know specifications for the program for the programming language and then we could use a generator which generates them from such an attribute grammar. The reason we say semi automatically is that the semantics are usually specified in a programming language like notation it is not a pure side effect free notation. So, that is the reason why it is called semi automatic where programmer has to sequence the semantic checks appropriately and then submit that to the generator. In fact, Yacht also is a semantic analyzer generator if we supply the semantics checks appropriately in C. Attribute grammars are extensions of context free grammars. So, now let us move on and study attribute grammars in some detail. It so happens that attribute grammars require some terminology to be understood before we pick up an example and study it. So, let us go through some terminology understand it and then proceed with an example. So, let G equal to N T P S be a context free grammar as I said attribute grammars are nothing but extensions of context free grammars. So, the base is definitely a context free grammar and let the set of variables V of the grammar be N union T. For every symbol of for x of V we can associate a set of attributes denoted as x dot a x dot b etcetera etcetera. That is why the name attribute grammar there are two types of attributes inherited attributes which are denoted as a i of x. So, inherited attributes of x and synthesized attributes which are denoted by a s of x these are really sets of attributes. Each attribute takes values from a specified domain it could be a finite domain or it could be an infinite domain and we call the domain you know such a domain as its type. For example, even in programming languages we say int of x. So, x integer domain is the domain from which the value of x we provide values for x in our program. So, we could say int is the type integer is the type of the variable x the same notion is carried over to attributes as well. So, typical domains of attributes are integers, reals, characters, strings, booleans, structures etcetera. Now, given some basic domains such as integers, reals, characters and booleans we could actually construct new domains from the given domains using mathematical operations such as cross product, map etcetera. So, even union intersection all these are permitted on these domains. There are two examples which I provide here one is for an array the other is for a structure. So, you can think of a single dimensional array as a map from the domain of natural numbers to the domain of our objects. So, n to d. So, basically for every natural number we provide the object which is to be placed in the array location. So, if we say a is an array a of 1 would contain some object that we want a 2 will contain some other object we want and so on. Where n and d are domains of natural numbers and the given objects respectively. So, we could place restrictions on the number of elements in n define a finite subset of n here and then similarly this will also be a finite set. So, in that case we would have a finite map. If we want two dimensional arrays then instead of a single domain here you would probably have a cross product of domains i cross j cross k you know that would mean i comma j comma k that would be from n cross n cross n to d. So, you take two or three dimensions then appropriately the cross product is also provided here. If you take a structure then it can be obtained using a cross product operation just like an array was obtained using a map operation. So, the cross product is a 1 cross a 2 cross a etcetera a n where n is the number of fields in the structure and a i is the domain of the ith field. So, if you have a structure with two integers and one character then a 1 would be integer a 2 would be integer and a 3 would be care. So, these would again be finite objects or infinite you know finite domains or infinite domain as the example requires. Now, a production P has a set of attribute computation rules or functions. So, this is basically the rule which is provided to compute a value for appropriate attributes of the production. So, rules are provided for the computation of synthesized attributes of the left hand side non-terminal of P and inherited attributes of the right hand side non-terminals of P. So, for example, you cannot compute the inherited attributes of the LHS non-terminal. Similarly, you cannot compute the synthesized attributes of the RHS non-terminals of the production P. So, this will become clear as we go along. These rules can use attributes of symbols from the production P only. So, in other words they are strictly rules are strictly local to the production P there are no other side effects as well. So, you cannot access attributes of other symbols from different productions you can access the attributes of various symbols within the production. Restrictions on the rules really define different types of attribute grammars. For example, we are going to study the LA-tributed grammars we are also going to study SA-tribute grammars, but we will not worry about the other types. So, there are order attribute grammars, absolutely non-circular attribute grammars, circular attribute grammars etcetera. There must be more than half a dozen such varieties possible. So, now let us understand what exactly are synthesized attributes and inherited attributes. So, an attribute cannot be both synthesized and inherited, but a symbol can have both types of attributes. So, if x is a non-terminal it can have a as a synthesized attribute and b as a as a inherited attribute, but a single attribute cannot be of both types. Attributes of symbols are evaluated over a parse tree by making passes over the parse tree. This is a very important point to note. So, in general the parse tree is always assumed to be available from the parsing stage. Then the various nodes in the parse tree internal nodes are all non-terminals and the leaves are all terminal symbols. So, they will be associated with many attributes. So, these attributes must get appropriate values through computations. So, that means we must also provide an order in which these attributes will be evaluated over the parse tree. Synthesized attributes are computed in a bottom up fashion from the leaves upwards that is why they are called synthesized. So, always synthesized from the attribute values of the children of the node and leaf nodes which are terminal symbols have only synthesized attributes. They really cannot have inherited attributes and these you know synthesized attributes are initialized by the lexical analyzer and cannot be modified. So, for example, if you take a name the character string associated with that name is returned by the lexical analyzer and the token corresponding to the name say identifier would have an attribute synthesized attribute which is the character string for that particular name. Similarly, if you take an integer constant then the token const int const would have an attribute which is the value of that particular constant and again this value is returned by the lexical analyzer. An attribute grammar with only synthesized attributes is an S attributed grammar. This is a very important class of attribute grammars and it so happens that the Yacht tool permits specification of only S attributed grammars. It does not permit specification of inherited attributes at all. Inherited attributes on the other hand flow down from the parent or siblings to the node in question. So, let us study the synthesized attributes first and then move on to the inherited attributes. So, let us take an example to understand how these synthesized attributes and in general how an attribute grammar is specified. Take a context free grammar S going to A, B, C, A going to A, A or A, B going to B, B or B, C going to C, C or C. This generates the language a to the power m, b to the power n, c to the power p where m, n and p are greater than or equal to 1 and observe that there is no relationship between m, n and p. Each one of them varies depending on the string. Suppose we want to generate a to the power n, b to the power n, c to the power n that is the counts of A, B and C are equal and n greater than or equal to 1. Let us define this is obviously known to be a context sensitive language. It is definitely not context free. So, no matter what modifications we make to this context free grammar to get another context free grammar we will never succeed. So, the no context free grammar can never generate a, n, b and c, n, but it so happens that an attribute grammar based on this context free grammar can be defined so that the language a, n, b and c, n is generated. For this grammar the synthesized attributes are the only ones we require. So, the synthesized attributes of s just one the equal the attribute name is equal the arrow here indicates up arrow indicates that is a synthesized attribute. Similarly, down arrow would indicate that it would be an inherited attribute. The value the domain of values for this attribute is t comma f true or false a finite domain. The non-terminals a, b and c again have just one attribute count. So, a has an attribute count, b also has an attribute count, c also has an attribute count, c also has an attribute count. It does not mean that they share the attribute they are different attributes, but the name is the same that is perfectly any terminal or non-terminal all of them can have attributes with the same name, but it does not mean that they it is they are shared. Count is a synthesized attribute and the domain of values is that of the integers. So, any integer value is possible for count. So, typically when we generate the basic idea is this when we generate a's using the rule a going to little a or a we associate attribute computation rules such that the number of a's is counted the same is true for b and c. And when we come to the root we check whether the number of a's equal to number of b's equal to number of c's if so then the string is accepted otherwise the string is rejected. So, here is the attribute grammar this also shows how attribute computation rules are positioned within the grammar. So, we will come to this diagram after we understand the attribute grammar the rule says a's going to a, b, c the context of the grammar rule. So, now within these flower brackets we write the attribute computation rule. So, the remember that the synthesized attributes of the left hand side non-terminal need to be provided with attribute computation rules, but we do not have any inherited attributes on the right hand side we have only synthesized attributes. So, there is no need to provide any rule for the computation of attributes of a, b and c. So, just one rule here so s dot equal that is the notation we use to indicate the attribute of s the up arrow indicates that it is a synthesized attribute. So, this is computed as if a dot count equal to b dot count and b dot count equal to c dot count then true otherwise false. So, the rule is very clear if a, b and c a dot count b dot count c dot count are all equal then s dot equal becomes true otherwise it becomes false. So, if s dot equal is true then the string is in the language and if s dot true is false then the string is not in the language. For the production a going to a we say a dot count equal to 1 because this is generating exactly 1 a for the production a going to a, a we are differentiating the two occurrences of the capital A. We provide a rule for the computation of a 1 dot count we do not provide any rule for the computation of a 2 dot count because that is a synthesized attribute on the right hand side. So, a 1 dot count is whatever is the number of a is already generated by this a 2 plus 1. So, a 2 dot count plus 1 similarly the rule for the number of b is b 1 dot count equal to b 2 dot count plus 1 and for the c is it is c 1 dot count equal to c 2 dot count plus 1. Now, let us look at the parse tree and understand how the attributes are positioned on the nodes of the parse tree. So, the here are the leaves. So, there are two a's two b's and two c's. So, the sentence is indeed in the language. So, here this is a dot count because this is the non-terminal a and here this is again another non-terminal a. So, this has the attribute a dot count etcetera. So, similarly b dot count c dot count s dot equal etcetera to begin with the attribute instances do not have any value because we have not carried out any attribute evaluation. The attribute dependences are all shown in red. So, for example, the a dot count in this particular node requires the value of a dot count at its child node. So, this is very clear from the production that is used. So, the production used here is a going to a a. So, if you look at the production a going to a a the attribute computation rule says a 1 dot count equal to a 2 dot count plus 1. So, this a 2 is nothing but the child node one of the children of the particular node a. So, this has two children a and this a. So, this count is required to compute this count whereas, the production used at this point is just a going to a. So, which has just a a dot count equal to 1. So, there is no need to use any other attribute value to compute this a dot count. The same holds for this b dot count this b dot count this c dot count and this c dot count. Finally, s dot equal requires the computed values of the three counts here that is the three children a dot count b dot count and c dot count. So, there are three dependences shown for s dot equal. So, let us now see how to evaluate these attributes. So, to be obviously, because this attribute requires this attribute it is necessary to evaluate this attribute before we go to the evaluation of this attribute the dependence indicates that. So, this attribute can be evaluated very simply as a dot count equal to 1. Similarly, the b attribute can be evaluated as b dot count equal to 1 and the c this attribute can be evaluated as c dot count equal to 1. So, the three attributes 1 2 and 3 can be evaluated you know in three steps in any particular order, but they must be evaluated first before we go to the next level. So, this is what we mean by a bottom up evaluation in the step number two. So, this was already computed we compute these attributes. So, this a dot count is this a dot count plus 1. So, this becomes 2 similarly, this also becomes 2 and this becomes 2 as well. So, we can compute 4 5 and 6 these attributes in any particular order you can compute 4 first then 5 then 6 or you could compute 4 then 6 then 5 or you could do 5 6 4 it does not matter, but we must complete the evaluation of the children before we go to this particular level. Once we have completed the evaluation at this level now we are ready to compute the you know attribute value at the root. So, these have been completed the s dot equal rule says if a dot count b dot count and c dot count are equal then true else false in this case all these three are equal. So, it is true. So, what we must observe here is the local dependence of the attributes in the attribute evaluation rule. So, for example to compute this we require the counts only at the next immediate level we will never try to access the attributes at two levels lower. So, to compute this we require this attribute which is one level lower etcetera. So, this is what we mean by the locality of the attribute computation rule. So, let us move on and now we are going to look at the attribute computation in general. So, let t be a parse tree generated by the context free grammar of an attribute grammar g.  So, you I am sure you realize that the attributes can be located on the parse tree and only then can they really be evaluated. So, we are assuming that the parse tree is computed by the syntax analyzer and parsed on to the semantic analyzer and then onwards we take over and compute the attributes over the parse tree. So, let t be a parse tree generated by the c f g of any g g. Now, we must define the attribute dependence graph or dependence graph for short for t. So, we have shown it informally in the previous example. So, the d g t is a graph v comma e where v is the set of b such that b is an attribute instance of some tree node. So, all the attribute instances of the nodes happen to be you know the nodes of the vertices of this particular direct graph and the set of edges is b comma c where b and c are in v and b and c are attributes of the grammar symbols in the same production p of b and the value of b is required for the used computing of computing the value of c in an attribute computation rule associated with production p. So, if we go back to this example these red ones are all the dependence graph edges. So, 3 plus another 3 here. So, these 6 edges actually belong to the dependence graph. So, the attribute instances are all labeled with numbers here. So, those are the vertices. So, remember even though the parse tree has other terminals a b and c these are really not part of the attribute dependence graph because they are not required in the computation of the attributes. In case these terminal symbols carry attributes which are required for the computation of some attributes then they would also be those attributes of the terminal symbols would also be a part of the dependence graph. So, that is the dependence graph, but what about it an AGG is called as a non-circular attribute grammar if and only if for all trees T derived from the grammar G the dependence graph T of T is the dependence graph T of T is a cyclic. So, this is quite you know easy to perceive because if the dependence graph is cyclic then you know we may not be able to find an order in which the attributes have to be computed. So, you know I will just assume that s dot is equal s dot equal is required for the computation of a dot count as well at this level. So, then there would be a net here in the downward direction and we would have a cycle. So, that means the attributes on the cycle cannot be evaluated that is the reason why we place this property of circularity. So, non-circular attribute grammars are the only ones which can be used in practice, but still even checking for non-circularity is a very expensive algorithm. So, exponential in the size of the grammar therefore, our interest will be in the sub classes of attribute grammars whose non-circularity can be determined very efficiently. So, this will become as we clear as we go along assigning consistent values to the attribute instances in the dependence graph of T is called as attribute evaluation. We have informally seen what is attribute evaluation. So, let us look at attribute evaluation algorithm in general. The process is simple construct the parse tree, then construct the dependence graph perform topological sort on the dependence graph and obtain an evaluation order. Evaluate attributes according to this order using the corresponding attribute evaluation rules attached to the respective productions. Multiple attributes at a node in the parse tree may result in that node of the parse tree to be visited multiple number of times, but each visit resulting in an evaluation of at least one attribute of that particular node. So, here is a formal algorithm which tells you the same thing. So, input is a parse tree T with un-evaluated attribute instances and the output is T with consistent attribute values. So, let V comma E is equal to D G of T. So, we have constructed the dependence graph. Now, initialize a Q W or a work list W with instances of attributes B such that B is in V and the in degree of B is 0. That means you do not require any other attribute to compute B. So, these are the ones which can be computed first. So, these are the lowest level in the parse tree as we saw before. So, while W not equal to phi do this is a very general algorithm and it holds for any non-circular attribute grammar. Remove some attribute B from the Q W. The value of B is value defined by the appropriate attribute computation rule. This will become clear in the next example. Now, that we have computed the value of B. So, for all B comma C in E that means B is required for computation of C. So, you reduce the in degree of C by 1 and if in degree has become 0 then add C to the Q. So, now C can also be C is eligible for you know to compute. So, it gets its chance in the Q sometime. The order in which we compute the attributes you know once they are in the Q is not very important, any order will do. So, let us take the same example and understand the evaluation possible. You know in a better way. So, there are many attribute evaluation orders possible here. So, 1, 2, 3, 4, 5, 6, 7. So, this is 1, 2, 3, 6, 5, 1, 4, 7. So, 2, 3, 6, 5, 1, 4, 7. So, we never violate the dependences and then 1, 4, 2, 5, 3, 6, 7 is another 1, 4, 2, 5, 3, 6 and then 7. So, this is an order which can be used with L R parsing. Really speaking we do not have to construct the parse tree explicitly in this case because the parsing order is actually the order in which the attributes are also evaluated and we will never visit that part of the tree again. So, if we use the order 1, 4, 2, 5, 3, 6 and then 7 we can do it using the L R parsing strategy that is because the parser you know goes in this way. So, it shifts A onto the stack then shifts this A onto the stack reduces to this A then these two together are reduced to this A and then it does the same with these B's and gets this capital B. Similarly, these two C's and then it gets this capital C. So, now it reduces to S and winds up. So, as we go along we are really traversing bottom up upwards and we will never go down again. So, it is possible to do the attribute computation as we go along and store the attribute value in the record of the non-terminal on the stack itself. So, here is the rightmost derivation and the reverse of this is used by the L R parser. So, let us understand how the attribute computations happen in this case. So, node number 1 which is here. So, A dot count equal to 1. So, that is the evaluation the A dot A to A is the production and A dot count equal to 1 is the rule. So, similarly for this particular node the value of A dot count is 2 and that is obtained because of this production and its associated computation rule A 1 dot count equal to A 2 dot count plus 1. So, this is the order in which we go ahead. So, here this is the quite clear and you can go through this example in detail later. Here is another example very interesting one attribute grammar for the evaluation of a real number from its bit string representation. So, for example, if you have a binary string here 1 1 0 dot 1 0 1. So, here is the binary point corresponding to a decimal point. So, 1 1 0 is 6 that is very clear and this 1 0 1 the weights actually go in this direction. So, the first one has minus 1 weight, second one has minus 2, third one has minus 3. So, 2 to the power minus 1 is 0.5 and 2 to the power minus 3 is 0.125. So, the value is 0.625. So, 6.625 is the value of this particular string. So, if you consider the context free grammar which generates bit strings of this kind at the highest level you would have n going to l dot r, l generates the left part r generates the fraction.  So, just like the count of the a generator a counts here it generates bits. So, any number of b is here and each b can go to either 0 or 1. Similarly, r also generates any number of b is here with each b going to either 0 or 1. So, now we have a context free grammar which generates strings on this side and strings on this side and joins them with a dot here. So, given this context free grammar here is an attribute grammar which evaluates the string and gets you this particular value. Again this attribute grammar requires only synthesized attributes. So, a's of the non-terminal n is the same as the synthesized attributes of r and that is in turn same as the synthesized attributes of b. So, all these three have the same name attribute called value which is from the domain of real numbers. Whereas, the non-terminal l has two attributes one is length which is an integer and another called value which is a real number. So, the basic idea is as we generate these b's. So, this l would have accumulated certain value and a b is placed to the left. So, therefore, the b should get a value which is equal to the length of the bit string here which is the length of l. So, that is why we require both length and value for this non-terminal l. So, and similarly r generates b r. So, this b is generated fresh r would have some value of its own, but since this is on the right hand side of the dot it implies that the value of r is now reduced by 2 and the value new value is assigned as the sum of the values of b and r. So, let us go through it and see.   So, that is very simple again because whatever b is either 0 or 1 is the value of l.  So, this is the new value of l 1 here.   So, here this would have generated certain number of bits here and we have actually now said a new bit is being generated r has a certain value which is already old. So, take the value of r add the value of b and divide the whole thing by 2 because b now has a value which is always 0.5 the maximum value of the bit after the dot is 0.5. So, that is the reason why we say a b dot value plus r dot value by 2. So, b 2 0 and b 2 1 have b equal to 0 and b dot value equal to 1. So, this is the attribute grammar as far as valuation of real numbers from the bit string is concerned. So, we will stop here and in the next class we will consider the parse trees for this particular attribute grammar. Thank you.