So we'll go ahead and get started. So welcome everybody today, thanks for joining us. This is saying more with OSF metadata to support data sharing policy compliance. So hi everybody, my name is Gretchen Gigan. I'm a product owner here at the Center for Open Science and I'm gonna be talking with you today about metadata. Just as a heads up, we are monitoring the chat and the question screen. My colleague Mark is here on the line with me to monitor those things. I'd say if you have a specific question, please put it in the Q&A, which you can find in your Zoom tools. Other kinds of just commentary can go in the chat, but if you put things in Q&A, then we can keep track of whether or not the questions get answered. So today we're gonna talk about metadata. This is inspired by the release of some new metadata related features here at OSF. And this is really just the beginning. We'll be adding more to these features in the coming months, but today we wanna talk about our new features and we'll talk about metadata in general to get started, what it is, why it's important. And then we'll do a tour of the new metadata features in OSF and we will talk about what's coming next after that. So let's start with a little review of metadata. So very simple definition that's often given about metadata is that it is data about data. And that's very pithy, but it isn't always easy to understand. So I thought we could take a look at some examples. So a classic example of metadata starts with some data text in this case, a book about metadata as it turns out. So the text itself is the data. And then the metadata is, oops, excuse me, the metadata is the metadata about the book, the information about the book. So in this case, it's the record in the catalog or other kind of system. So that metadata record includes a listing of details about the book, the title, the year of publication, ISBN, language, things like that. So book metadata is actually pretty easy to understand and it's often really easy to find. We interact with it pretty readily. But other metadata can be kind of hidden. So for example, every email is data in and of itself, but it also has a header with information about who sent the message and when. And then there's also usually metadata that's hidden from our view that tracks identifier numbers and IP addresses. So sometimes we don't always necessarily see metadata. And of course, metadata isn't only for text. This is a picture of my cat Clementine who was also sleeping on this couch right back here. So in this case, the picture is data. And the metadata that's encoded in the JPEG file is shown in the screen on the side here. This is from a tool called Adobe Lightroom that shows you the metadata embedded in images. So there's some obvious stuff there like file name, the date and time created and technical characteristics of the image like the size and the file format. But my camera also captures things that I didn't realize it was capturing like the geo coordinates of where the picture was taken. And then if I want to using a tool like Lightroom, I can go in and manually add even more information like a title, a caption or a copyright statement. So finally then we can see that in OSF objects, we also have both data in the files and components or other elements, but we also have metadata titles, contributors, activity logs, information like that. What we'll talk about today are some additional metadata elements that have been added to OSF objects and how you can use them to increase the impact of your research. So let's take a step back and talk about how metadata fits into the landscape of research. This image takes the imagery of an iceberg and applies it to research. So our work has lots of elements under the surface, lots of actual data and materials, but the metadata and the data management plan are the two aspects that bring that to the surface and make it findable. And it leads us to all of that good data that's underneath. So it's true that some databases and search engines allow you to search the actual content that's under the surface, but metadata still plays a crucial role in a couple of ways. So in the most obvious case, metadata provides searchable text for non-textual materials like we showed with the image, but metadata also gives you the opportunity to synthesize and summarize and can allow you to give a kind of simpler overview or introduce the entirety of material in ways that it doesn't explicitly say for itself. And it gives you a place to say even other information that may not be in there at all. So who funded your research or what the types of materials are that you have, is this a conference proceeding or a journal publication? Is it raw data or anonymized data? Metadata gives us a place to put all of that information. And metadata is then a fundamental part of the whole research process, not only creating metadata, but that metadata then allows you to tie your work together as you move through the process. So if we start out by using things like persistent identifiers and standards for creating our metadata, that makes our information more easily identifiable, which then makes our data more open and easy to interpret. It can then also help link your data to the other materials that are relevant like protocols and scripts. It helps to fully document things like your preregistration and helps you to tie your preprint or your final output or outcome to all of the pieces of research that led to it. So before we move on to the demo of new features, I wanna talk a little bit more about why metadata is the specific tool we wanna advocate for. So the first thing we wanna talk about are the FAIR principles. So FAIR is a guideline that helps us make sure our metadata is as complete as it can be, but it also articulates the benefit of having metadata, what metadata can do for us. So FAIR is an acronym for findable, accessible, interoperable and reusable. So specific aspects of metadata contribute to these factors. So earlier I gave the example of metadata for an image. In that case, the text may be the only thing that makes that data findable. And even textual data is far more easily found when metadata is descriptive and uses known identifiers or terminology. Another important part of sharing research is being able to define how data can be used. So metadata is the place where we can describe how data can be accessed and used in things like licensing, for example. Having metadata also makes it possible for OSF or any other system to share data with each other. When we have good metadata about OSF objects, for example, it makes it possible for us to share that data in an interoperable way, helping your research show up other places like data site commons or Google Scholar. And ultimately, all of these practices lead to data that's reusable by explaining how resources are structured, collected or generated, or how to read or use them. Metadata turns materials from single use to multi use. So that's all really nice. This is all nice, but largely theoretical. It's a best practice, but that's really changing in ways that lead to another really tangible benefit of metadata. The past few years have seen a number of mandates and policies from major funding and governmental agencies that these best practices be followed in order for projects to be recognized and funded. So a new data sharing policy from the NIH just went into effect on January 25th. And that calls for sharing a set of common data elements, including the funder and the resource type information that our new metadata changes in OSF will support. In addition to specific guidelines like those, other agencies and institutions are supporting the creation of more mature infrastructure and data sharing. So a recent policy from the White House Office of Science and Technology Policy and the UNESCO recommendation on open science, both envision a research ecosystem that will need enhanced metadata to function. So metadata is becoming not just a best practice, but a requirement. So metadata in the OSF will now allow you to meet those mandates and to follow best practices to make your data fair. Metadata in OSF follows the data site, metadata screen schema, which is an increasingly de facto standard for research repositories. It allows you to input terms from controlled lists, ensuring that the metadata you create is interoperable with other systems and requirements. So those include standardized lists of resource types from the data site schema, funders from the cross-rep registry, licenses from Creative Commons and other licensing groups, a taxonomy of disciplines that are commonly used in institutional repositories, standardized formats for dates, author identifiers from ORCID, and institutional affiliations from ROAR, which is the research organization registry. In addition, materials themselves can be assigned persistent digital object identifiers, DOIs, and you can be sure that those will always be available. So the unique feature of OSF is that our infrastructure allows you to create relationships across the research lifecycle from preregistration through the creation of data and other project materials through the publishing of outputs like preprints. The new features will mean that behind the scenes will be creating metadata that follows a standards-based model for all of those materials, and that will create a web of interrelated data from the highest level at the kind of definition of the project down to individual files. So next I'm gonna do a little demo of what this actually looks like. So I'm gonna switch over here. This is a project that I have on OSF. It is the materials for a course that I teach on digital libraries at Penn West Clarion University. So this is the overall page for the class, and I'm gonna go into the lecture materials. So I had the lecture materials organized with a component for each unit in the course. So I'm going to, fittingly, go to the unit on metadata. So you can see right away, I have some metadata right here on the homepage. So I've got the title, myself as the contributor. Center for Open Science has my affiliation, date created. I have not created a DOI for this content, but I could. There's also another category here that is internal to OSF that I could use to categorize what this component is, a description, and a license. If we take a look at what the content is in the course, it's all kind of laid out in the Wiki. So I've got objectives, I've got a link to the lecture recording and slides, a list of readings, and a blog post that's some supplemental information that I include in the courseware. So if I wanted to add some additional metadata for this course, I can click on the new metadata tab at the top and come to a page that has most of the metadata that's already been created, but can now be edited, as well as some of the new fields. So one of the new areas is resource information. And this is where we describe the kind of material we're sharing in a human and machine readable format. So this allows a search engine or an index to index these terms and know exactly what type of materials and the language of materials that are being added here. So this, I just click that edit button and I have a list here. As you can see, the list is pretty wide ranging. This comes directly from the data site schema. So there's some really specific items in here, data set, data paper, conference proceeding, dissertation. If the material doesn't conform to one of these really specific areas, there are also some generic terms. So image and text, and I'm gonna choose for this collection. Since it's a number of materials. And then I can also choose a language. And you can see I can type it in to quickly find the language. These languages are taking from a ISO list, International Standards Organization. So it's all standardized vocabulary. And I can go ahead and save it. And now the index knows that this is a collection of materials and that it's English. Another new area is the funding and support information. So if this was a funded project, I can actually search here directly for the name of the funder. Whoops, I forgot to put national in there. And this is doing a live search of the Crossref Registry. And it's probably a bit slow because I'm on Zoom today. Let me just start over. There we go. So I would find my organization from this list for the purposes of the demonstration. I'll just pick the first one. And I also have fields here to add in specific free text information about the award, the award URI, the award number, et cetera. And if my research is funded by more than one organization, I can actually add another funder. And you can add as many of these funders as is appropriate and it would help if I could spell. But you get the idea, the same thing again, and I could just keep adding funders until I add all of my information. Now, since this is an actually funded research, I'm gonna not save that. I also have here because I work for Center for Open Science, we're affiliated obviously in the OSF. Since I don't teach this class for Center for Open Science though, I'm gonna actually remove that affiliation from this resource. So I have the choice of having it affiliated or not. Things like date created and modified I can't edit because those are being recorded as I make changes in the system. And finally, for some additional information, I can add keyword tags. So I'll add metadata to this. And if you remember in the resource types, there wasn't a specific category for a curriculum, but I'm gonna add curriculum now so that that is part of my metadata. So we have most of the metadata here on the same tab. The only things you can edit here are the title, which you can edit on the homepage. Pardon me, one second, here we go. Okay, so I also want to show that in addition to things like registrations and project and project components, we can actually file down and actually edit metadata at the file level. So if I go and look at the files in this project, I currently don't actually have any files in the OSF storage for this component, but I do have it in some Google Drive files. So I can add metadata to both OSF materials and materials from my add-ons. So the metadata is actually stored in OSF, so it doesn't do anything to change your file and it's add-on storage location, but it does add the metadata to the OSF information representation for that document. So if I go ahead and open up, this is the blog post that I write for the unit on metadata for the class and it's in particular, it's about artificial information. So if I want to, I can now add a title, blog post for unit four, and I can, for the description, I think I'll just add some terms here, but if I wanted to spend more time on that, I could create something that's more like a small paragraph. And again, I have my resource types here. And again, for this, I'm just gonna choose a generic of text and I will add English to it and save. And now we have some more specific metadata, particularly about this particular item. So you can see that I'm only adding the metadata for the things that are unique to this specific file. The other information that comes from the rest of the component that this is from unit four on metadata, that is from this digital libraries course and it has this attribution or license is all inherited into the file. So you don't have to re-input all of this information. You only, you have the option of just adding the information that's truly unique to this item. So this has been kind of a quick demo of some of these new features. If you want to go in and start adding this information, which I highly encourage, we do have in our OSF support, which is available everywhere in OSF from the header. We do have some new guides with instructions and screenshots on how to add the new metadata and the new metadata features. They are under account and security where the rest of our data management information is and there's a new section on metadata. And we have four different guides right now adding metadata to your project, to your registration, to a file, and then a page that describes in some more depth what each of those resource types are. If we take a look at one of them, you can see we've got step-by-step instructions, lots of screenshots with pictures and arrows showing you exactly how to do that. So I'm going to jump back over to the slides and I want to talk about a few more things before we have time for some questions or some more demo if anybody would like to see some other features. So that again is the help guides, which are available. So once you've gone in and created this metadata, I want to give you a preview of the kinds of immediate impacts you can see from this. So this is an example of an OSF project that was updated only three weeks ago when these new fields were introduced with the new metadata fields. So looking closely at the record, we can see that the contributor there, if we were to click through, that contributor has been associated with an ORCID ID. The various fields that use the data site vocabulary have been filled in and the funder has been added and that was added using that crossref funder registry. So now if we go and search data site comments for this particular project, what we find is that already that data has been now populated in that record over at data site. So we can see the same thing, the data site fields, if we were to click through, we would see the ORCID identification and the crossref identification for that material. So within three weeks, that's already populated elsewhere outside of OSF and is findable in more places. Additionally, it also shows up on this contributor's ORCID record. So in the ORCID system, this is listed as the newest work there. So what that means is that the fair metadata that we're creating in OSF is making that data interoperable with other systems and that's increasing the spread of our information and it's also helping it to meet the requirements, not just of OSF, but of all of these other systems as well. So I wanna wrap up by talking a little bit about what we're gonna work on next related to metadata. So a lot of this project up to now involves creating backend infrastructure to enable kind of all of these features to be put in place and smoothing out and normalizing all of the metadata that's used across all of the different OSF objects. The next project we're gonna be working on and indeed have already started are improvements to our search interface to make it easier to find specific materials based on these new metadata fields. So that data is already there and is already searchable. You can input any keyword terms for different funders and find hits with those terms. If you're familiar with the Lucene search syntax, you can actually do advanced searches that will search only in those new metadata fields. But we're soon gonna release a new search page with actual filters and lists that will allow you to do this type of advanced searching without having to understand that Lucene syntax. We're also gonna start working on expansions to the metadata that's available to meet the needs of different communities. So right now the metadata in OSF is really discipline agnostic. It's fairly generic. It doesn't contain specific fields or information and terminology that's useful in specific communities or contexts. So we're gonna be starting a project later this year looking at some tools created by a group called CEDR, which is the Center for Expanded Data and Retrieval at Stanford. And they allow for the creation of community-developed metadata templates that could be applied to OSF materials. So CEDR tools allow communities to dictate exactly what metadata fields and terminology they wanna apply to their research objects. So adding these templates to the OSF will increase the richness of metadata tied to your work and will expand the findability and reusability of your work. So just to show some examples, CEDR makes it easy to create templates like this, which is created for biological samples. You can see there's really specific terms in here like strain or organism name. On the other hand, this template also created by CEDR gathers metadata about animal observation studies and has things like organisms named of the observed animal and the number of animals studied. So we've already started some work on gathering some requirements around this and we should be able to implement these tools by the end of the year. But in the meantime, I'll end with a request that you go out and start adding this data to your OSF projects, registrations and files, both the existing ones and brand new ones as you create them. Hopefully I've shown you that it's pretty easy to do, but that is very beneficial to you as well. And you can start seeing the results of that work as soon as possible. So with that, I'll say thanks. Here are some various links and addresses for support or questions or more information. We definitely have plenty of time if there are any questions. And it looks like there are. Mark, should I just walk through them or do you want to? I can go ahead and ask them out aloud. Okay, yes. So I'm just going chronological order is is the DOI capability within OSF only for components or can individual files be DOI within OSF? At the moment, DOI is only available for components for projects, registrations and preprints. DOI's for files is something that is a possibility in the future, but we're not there yet. If we did, we would have to require some certain pieces of metadata to allow you to mint DOI's for particular files. Thank you. Our next question is, can you explain what a registration is in OSF terms? I wonder if Mark, I should ask you to explain this. Registrations, let's go to the OSF registries.  And when you create the registration and you finalize it, it is immutable. You can come back in and you can make some minor changes that will be logged as a change was made on X, Y, or Z date. But the registration allows you to go ahead and just publicly state in a trustworthy way, like so a way that you can't just come back and change as you do your research and find that it isn't meeting your expectations. That this is what you plan to do. So OSF registries are tied to OSF projects. So if you start with a registry, it'll immediately create a project space for you where you can actually do your collaborative work. But anything associated with the registry will be recorded in time as a public sort of declaration of what it is that you're doing. Mark, is that a good enough description? Is there anything you can add? You're the expert on registries. I think you looked out of the park without going into the details, thank you. Great. All right, our next question is about institutional affiliation and metadata. So if a user adds their institutional affiliation to the metadata for their project, but they were not logged in through their institution, would their project show up in the institutional project list? So the way that institutions work in OSF a little bit complex. So your institution has to be a member of OSF, first of all for that institutional affiliation to show up. So we have on OSF the list of institutions that are members. So if you're a member of one of these institutions and you sign into OSF one time, at least one time, using the institutional login, then from that point forward, all of your projects will by default be affiliated with your institution and then you can choose to take that affiliation off or not. Once you log in through your institutional affiliation, if you already had say an existing OSF account through Gmail or something like that, you can merge those together. So that whether you log in through your Gmail or whether you log in through the institution, you'll still be all in the same account and that will all be affiliated with the institution. But the easiest way to make sure that it is is to sign in using the institutional affiliation, which just goes out to your institution single sign-on authentication service. If you have that, if you don't, it's by using the institutional email. And then once that account can have multiple emails associated with it, then you have the choice of sort of how you log in. But once you're affiliated with the institution, that affiliation stays there by default, but you can remove it from anything that you'd wanna remove it from. Some thank you and thank you Lucy for that question. Is it possible to search OSF by metadata field? Yes, so we don't have a guide for this up yet. I have the text of it written as a specific, where am I, sorry, I can't see everything on my screen. I can't see, sorry, okay, there we go. So this guide should be coming out pretty soon. But if I wanted to look for, let's say, Thunder name, National Science, excuse me. Okay, hold on. I gotta put some quotation marks around that. There we go. So we have four items so far that have identified the Thunder as the National Science Foundation. So there is some specific syntax you can put in for a couple of those fields, Thunder name, resource type, general affiliated institutions. I've written a guide for this that has been shared with some of our members to have it kind of test it out. Sorry, I lost my speaker. Okay, and we'll be adding that to the guides pretty soon. So in the interim, if you want to go in and learn how to do the advanced searching syntax, then you can search by these fields already. But if not, you can still search by National Science Foundation. And I get a lot more, but since this is in quotations that should be mentioned anywhere in the text. So this is probably picking up things that have that in that specific Thunder name field, but also have it in things like descriptions and in the description of a preprint and things like that. So the search updates we've already started working on those should be out within a few months and that will allow you to do this searching much, much more easily. Thank you. I am bouncing around now at this point because some of these things have themes. I'm gonna return back to your institutional affiliation question, which is, do you have any, well actually, I'm gonna change it up. I'm sorry, do you have any demo tips for metadata to link different parts of the project and their metadata? I'm not sure I totally understand the question. I would say one thing to keep in mind, like the thing that is nice about this is that if we're looking at a project, like I showed earlier, the metadata that I have here at the project level, if I go in and I look at the files, that information is immediately associated with all of these files to start with. So the nice thing about OSF and its structure is that if things are organized within projects or registries, if projects and registries are related to each other, it automatically builds for you that web of connections. And when the records like these are exported out to systems like data site or other through the API, other kinds of sharing mechanisms, the links between those objects remain. So you'll get a record for the project and it will say, these are the child components, these are the files that are associated with it, these are the registrations that are associated with it. So when you start to add information, when you start to have metadata into OSF materials and those OSF materials are linked to each other, then all of this stuff really starts to gel and become a kind of interconnected web of material about your research. Thank you. How can we implement controlled vocabulary terms? So for example, LC subject headings, but in particular, PIDs of these vocabularies within OSF? That's a great question. So right now we're not supporting vocabulary like Library of Congress. You can certainly add Library of Congress terms in the keywords, in the tags of projects. And you could add the identifiers in there as well and they would be searchable data along with everything else. I think that's a great example for something that might be really useful in the future for a Cedar based template. So if we were to create a template, then for projects that do wanna use LC subject headings or another controlled vocabulary, I'm familiar with art and architecture, the Sorus and cultural heritage ones, which may not be as relevant. But we could create the ability to create templates that would then use those terms and would sync with them. Right now, since this is metadata for all of OSF, we're not really requiring any specific subject scheme. So really keywords or tags is the way to do that at this point. Thank you. Speaking of Cedar, when will the Cedar tool be implemented? Well, that's still very much in development. We're in the early stages, but our goal is to really do this by the end of the year. That's as much as I know right now. We've kind of started the early stages of starting to do some interviews and gather some requirements to figure out how exactly it can be folded into OSF in the most effective way. And our final question is from Evan. He is a past Pin West Clarion Digital Library student. Oh. And he was asking, do you have any advice for, sorry, go ahead. Sorry, I know you Evan, hello. Do you have any advice for presenting and advocating for the use of these new metadata fields for information professionals working at scientific research institutions? That's a great question. Thank you for asking. Well, I think that probably the most effective, the most persuasive arguments are gonna be the things about the mandates that are gonna start requiring this information, that if you can go in and put in the actual, cross-ref registry funder number for NSF or NIH and your award title, then when NSF or NIH is checking to see that you did what you're supposed to do, they can find it right away because you've used that term and we will be creating the way for them to search by that. I think another really persuasive, hopefully, way is showing how like I showed with the example where metadata is created in OSF and then that metadata gets picked up into data site and gets picked up into ORCID and that creating the data in one place populates it out into the web, into all of these other places. So I know that a lot of times to researchers, it can seem like an extra step. We do wanna do some improvements to the UI to make it a little bit more seamless of an experience, but I think showing them the proof of the good that it does is probably the best way to advocate for taking the time to create this information. All right, that was our last question. Great. Well, thank you, everybody. We appreciate your attending today. I'll show this again. If you have any questions, you can contact myself or if it's more general, our support at OSF website. There's other places where you can find out more about OSF and Center for Open Science. We encourage you to create an OSF account and we encourage you to go in and start adding metadata to all of your materials that you have in OSF. So I guess that's it. Thank you all for attending and we'll talk to you later. Bye.


a unique meaning of the program, which everyone is going to interpret. And then we looked at certain optimizations, and once we looked at optimization, we were removing the element from the program without worrying about what are underlying elements of us. Then we started looking at the translation of the abstracts with text tree, which was disambiguated already by the semantic and the text. It was something which is closer to machine, and we looked at abstractions which are available to us at the source level, versus abstractions at the target level. Then we were looking at how to convert all these abstractions into machine abstractions. And we said that the process is going to be that all the identifiers, they are going to be mapped into certain locations, and then all the variable accesses, depending upon where these identifiers work, we were going to find out exact locations from where we could pick up all this information. Basically all the addressing mode information will come here, and then we want to map all the source operators to the target operators, and if there is no equivalent target operator, then we want to write some kind of macro for that, and then we want to convert all the conditionals and iterations into a sequence of test results. And after that we started looking at the parameter passing protocols, and this is where at least some discussion is required. So what we want to do with parameter passing is that we want to find out where are we going to put all the arguments, and we want to find out where we are going to pick up the return values from. So typically what may happen is that if I say call some function p, where the list of actual arguments, what is going to happen that somewhere in my machine I will have to say what is the place where the arguments are going to be, and I also want to find out the place where I am going to put the return value. Now I cannot put all this information at some arbitrary place, I need to put it at some fixed place and therefore we must have certain protocol which will say that where the parameter passing, how I am going to do parameter passing, where I am going to put all this information, what is going to be the layout of this procedure, where I am going to put activation frames and so on. So I must lay out the complete activation frame of the function, and when we do run time system and we talk about code generation and talk about the code generation for procedures and function, that time the layout of activation frames will become clear to you. And then we also must have some kind of interface to all the libraries which we have, so we may have mathematical libraries, we may have statistical libraries and so on, we may have all run time system, operating system and so on. So we must know how to make these, so compile that we have to find out appropriate mapping. Everyone is in sync with this, so once we do this, then like we had this filers structure to begin with, we said we are going to have front end phases, after front end phases we had certain optimization, then we started talking about code generation phases. We can also do little bit of optimization after code generation, so some optimization we were trying to do was, we were trying to remove all kind of redundancies which are present in the program, but some redundancies do come because of the code generation phase. When I am trying to do code generation, certain more redundancies will repeat and I would like to remove them and what kind of redundancies these may be. So I may generate information by saying multiply something by 1 or multiply by 0. And typically this kind of information will get generated when I am trying to do code generation for either arrays or for structures and records. And that point of time, if some such information gets generated, we would like to just remove them by doing a post code generation optimization. And we also try to use commutative properties of the operators we have, so for example, if I have an expression like this versus an expression like this, where I say x is sign x plus y or x is sign y plus x. Now you will see that try to use any c compiler and generate code for this by switching off all the optimizations and you will find that the two code sequences are going to be different. And what could be reason for that? Why these code sequences may be different? So normally my compiler is going to scan input from left to right and then it will be able to figure out that the first argument is same as the left hand side. And therefore, once I evaluate the second argument or the remaining argument, I will just pick up that value and add it to location where x has already stored. But when I am scanning this, it will first encounter y, then it will encounter x. Now x may be somewhere in the middle anywhere. So I could be even of this form. And therefore it will start loading this, start loading this, it will add the two and so on. So normally what we will try to do is this is the best possible way. And in fact C already uses a very concise notation for this and they have introduced an updated line. So the whole idea of writing a sequence like this is that I can generate a better code. So now I am going to actually what I am doing here is I am using certain properties of algebra here saying that x plus y is same as y plus x. In most cases, unless I am doing high precision numerical analysis. So this is really that is why I put this question mark that sometimes when you are trying to do high precision numerical analysis, then if you try to use commutative properties, it is possible that you will end up getting different results and such optimizations should not be there. And then I will start actually using construction selection. So once I have done the intermediate code generation, then I look at the complete syntax of the machine and try to find out how do I use the syntax of the machine for finding out adjusting mode of code and the people optimization and so on. And once that is done, what will happen? So this is where we work at the end of the front end. So I have the same example running through. This is the distributed abstract syntax tree. We had the end of the front end and now what happens is when I try to do intermediate code generation, it generates a code like this which is not with respect to any machine which is not like a particular machine but is close to many machines. So I may have something like this which may say that this variable b is actually stored at an offset of a with respect to certain frame pointer. This is a constant 0 and when I add a with the value in the frame pointer, what does it give me? It gives me address of where b is stored but I need the value of b. So I do a d reference here, I do a memory d reference and that gives me the value. I add the 2 and similarly on the right hand side when I look at a and a is stored at an offset of 4 from some frame pointer, b is stored again at a frame pointer with an offset of a. I add the addresses, d reference and then add the form. This is an assignment. So this is where the move takes place. So I am just taking this value moving into this address and then I am using an F statement here which is equal to a conditional term and so on. So there is a kind of intermediate tree I may get and when I do an optimization, now optimize as I say that I am going to put all these values in a register and not into memory location. So I may have registers like saying that this will occur in so b will be in register cx and a will be in register dx and therefore some optimization happens here. I do not have to do all these memory d referencing and then finally I may end up generating code like this. It just says compare cx with 0 and move on 0 cx to dx. If it is 0 then just move it. So starting from whatever I started with from expression to expression, I may finally generate code like this after going through many transformations in the code. Now you can see that all I have done is that I have changed the representation from whatever I started with but I am actually employing the same measure and I am not changing anything. So how does my compiler look now? This is where we left our compiler with the front end and we left this part of the block empty and if I now try to fill it in we will have an optimizer which is an optional phase and then we will have two phases of code generation. One is intermediate language code generation and then we have the code generation and this also is historically or traditionally known as the back end phase which is specific to the machine. So this is where the machine specific information starts coming into the compiler and this really completes your overall structure of the compiler. Questions, comments, anything? So right now we have no clue of what happens really here or how lexical analyzer works how syntax analyzer works and so on but we have some idea of that if I take a representation here and I apply these phases then what will be the representations here and what will be my final representation. At least that part is sort of clear to everyone. So let's move on and what may happen now is that there is some information which is lagging here. So for example when I look at something like this so let's just take a piece of code so if I say a is sin e plus c this is for which I am trying to generate code when I start converting this into a lexical analyzer what will be the sequence of code constituencies generated by the lexical analyzer which will be fed to the syntax analyzer or where is it this is my input right so what is the sequence so if this is my input this is the sequence of code which I take to my compiler what will be the outcome of lexical analyzer so what is it that I will see here what will be my token. Doesn't matter what types are right do I need to know types to find out what my tokens are so I don't need to know the types we need to define that will be declared upstream somewhere up in the program right so I am only looking at this part of the program and say tokenize this what will I get as total one by one somebody can raise their hand fifty of you start speaking where you are equal where you are equal where as A operator is equal where as B operator plus where as C is that what it will be hence the white spaces hence the white spaces white spaces do not accumulate anything to the means So I can ignore white spaces, I don't have to worry about the white spaces. But really this is not what happens. What happens is, I will say that these are all identifiers, now as far as structure is concerned, as far as syntax analyzer is concerned, to check structure whether this is a valid expression or not, whether this is a valid assignment or not, it need not know anything about what the variables are, all it needs to know is whether this is an identity identifier or not. So what I would like to pass on is, I will say identifier, assigned identifier, some class of operator which is addition operator and again an identifier, now as far as my syntax analyzer is concerned, this information is sufficient to do structural analysis. When it comes to type checking, at that point of time, it will need to know what is the type which is associated with this identifier, what is the type which is associated with this, what is the type with this and what is exact operators. This is what my semantic analyzer will do. When I come to core condition and I say, now assign certain memory locations to this, that time it will say, oh this particular variable is put into certain memory location. I will say that this was in an offset of 8, this was in an offset of, so let us say this was 4, this was 8 and this was 12. So there is a lot of information, if I look at this identifier, there is a lot of information which is associated with this identifier, one information is really the string which is this string, which I need to know that the string associated with this identifier is different than this. I also need to know the file, I also need to know the offset and maybe some other information, like the type I will also get by default information saying how many bytes it is going to take and I store it in memory. Now where do I store all this information? If this is the sequence of tokens I am passing, I cannot afford to use this information, I leave it at time of code definition. Where do I store this information? I need to store it somewhere. And for that what we have is that information which is required about the program variables during compilation, so I may have various kind of information whether this is a keyword, this is an identifier, what is the class, what is the type, amount of storage it requires addressing memory and so on. This I need to store somewhere and location for this information is, either it can be right here, so I can define this as a structure and I say that all this information is right here. But then you can see I get into obvious problems and what are obvious problems that suppose I change this to A, what will happen? This information will get duplicated. If I change anything I need to go and find out all these places where this information was and change them. Or I can say that I have something called a symbol table and I can say all the information corresponding to A is here and then all these are pointing to A here. So if I now create another data structure where information about all these are going to be stored, this is where we store it and this is a data symbol table. At this point of time we will not worry about what actual data structure I employ. You can just assume this is an array of records to begin with. Where each record is going to have information about each of the symbols that I have in my program. So how in my compiler book now that along with these phases of compiler I must have a symbol table where the symbol table can interact with all the phases. So what each phase will do, lexical analyzer will not have type information for example it will just say what is the lexical which is associated with the variable. So only thing lexical analyzer will know is this identifier has a lexical associated with this which is A. When it comes to type checker type checker will figure out what is the type of it and will put this information. When it comes to code generation or memory allocation, memory allocator will say if type of this is floating point I need to allocate 10 bytes for this. And memory allocator will immediately say that since I rate bytes for this let me assign certain address to this and it will give me the base address. When it comes to code generation code generator will again figure out where I need to put this information and I may need to associate certain registers with this. So all that information will keep going in the symbol table and therefore you see a bi-directional arrows here that all these phases will be able to write into the symbol table and will be able to read from the symbol. So this is additional information I need in addition to the flow of data in my compiler. Yes? Sir can you explain why writing in the symbol table? Why? Writing in the symbol table is required. Oh, so if I start reading this from left to right I encounter A first and lexical analyzer figures out that this is an identity file. Now where do I store string A? This A has to be stored somewhere. Where do I store it? In the symbol table. So if I cannot write into symbol table how will I store it? Similarly when I come to this phase which is symmetric analyzer phase and this figures out that type of A is a digit. Where do I store this information? I need to write it in the symbol table. Similarly when it comes to memory allocator, memory allocator says that I am going to assign this variable like an offset of 16 from some train pointer. Where do I store this information 16? I need to go back to my symbol table. So I need to be able to write and I should be able to read from the symbol table. So not all the information will be written by all the phases. So this each phase is going to write some information which is relevant to that particular phase. Is the question answered? Now so here is a model of compilation here. And interestingly as I pointed out when we were talking about history of compilers that this was the model which was used exactly as in 1957 compilers which was the first 4 print one compilers. That structure has not changed last 55 years. Now what are the advantages? There must be certain advantages otherwise we would have changed all the structure by now. So what are the advantages of this structure? And what are the disadvantages of this structure? Code will be modular. Code of compiler or code? Complete compiler. Complete compiler. So code will be modular. Good. So basically one advantage we clearly see here is that each phase is doing something which is a logical activity which is complete in itself. So like lexical analyzer is just tokenizing the info. My syntax analyzer is just taking structure. My type checker is just taking the types and nothing else. So you can see that we have highly modular code where each phase is doing something which is a coherent logical activity. That's really the good part of this. What are the other advantages? Other advantages of modular. Other than that? Modular. Yeah. I mean modular we have already listed. So other advantages. We would have to write the front end part for different machines. Different machines or different languages? Different machines. Let me elaborate on that. The same front end part can be used for a liner system. So if I have one language and I have multiple machines then the same front end can be used. Very good. And you should be able to apply it to the back end that if I have many languages and one machine then I should be able to use the same back end. Signs like very nice property that we have been able to employ. So these are the advantages. Also this is known as analysis synthesis model compilation where front end phases are known really in the analysis phase the front end is doing is basically taking an input analyzing it to find out whether this is a valid input with respect to the language definition or not and what is my back end doing is synthesizing a program which is a machine program for some correcting. And each phase has a well defined work and each phase also handles a logical activity in the process of compilation. Now you can see that I can just take this phase do something with it and in the process of debugging if I find that certain information is not correct then very precisely I know where to go back and start looking for possible bugs. I don't have to really look at the whole compiler. I just need to focus on part of it. Continuing on this and this is really what some of you already pointed out that I can use part of the front end, part of the back end and the whole compiler becomes retargetable. So suppose I am trying to write a C compiler for a new machine I don't have to rewrite the front end. I will pick up the front end as it is and we change the back end. Then my compiler gets retargeted to a new machine. Similarly if I have compiler for a machine and I say a new language has been designed then I just need to write a front end for this and then I can work with the back end which is already available. So source and machine independent code optimization is also possible because if you see optimization what I had that was independent of both source specification and the target machine. That was working on certain intermediate representation and therefore another advantage is that I don't have to plug in an optimizer to begin with. I can have a full compiler, a working compiler and then at some point of time I can say hell is now an optimizer which I am going to plug in and suddenly your code quality improves. The same compiler will continue to work. That's another advantage. So highly modular structure and optimization phase can be inserted after the both front end and back end have been developed. This is actually a clean model and this is how people do it in industry that you first have a functional compiler which will assure a functional correctness and then go for an optimizer which you are going to plug in at some later point of time. Now one of the various issues which you need to be alert about when we start designing a compiler. So what are the various issues we need to face? Structure looks fairly straightforward so far but as we start going deeper into it then you will start noticing the kind of problems we face. Now when I take each face specifically we will discuss the problems there of each face. So I talk about what are the fit faults you may notice in a laxical analyzer what are the problems you may notice in a syntax analyzer and so on. But in general we need to worry about for example suppose your input is incorrect how do you handle incorrect input? Now when I say input is incorrect what does that mean? It is not that you have a buggy program the program could be buggy it could have logical errors but what I am worried about is that with respect to the language specifications whether your input is correct or not because compiler has no way of figuring out whether they are logical errors or not. So now you have to worry about incorrect programs you need to do what we know as error reporting and error recovery. Now as your languages become more and more complex and as your architectures become more and more complex your compiler it is going to have an impact on the compiler I will not say whether it becomes simpler or more complex. So for example if I want to write compiler for programming language C versus a compiler for programming language like C plus plus the two are going to be very different the reason is that if I am trying to write C plus plus front end then I have to do so many things in my syntax analyzer and type checker that it could be virtually helped and then their languages which are even worse than that so if you try to go and google for language called chil or language called eda then suddenly you will find that they are much worse much worse in the sense let me not that sounds very negative they are more complicated and obviously some of you write guys are going to handle these as you input into some of you will be not all of you will get to write a C compiler some of you who are brave hearts they will pick up languages like eda and chil write the pilers so design of programming languages and architectures are going to have an impact on complexity of the compiler and then this immediately brings us to this issue of retargeting compiler so typically what may happen is or what is desired is that whenever there is a machine and whenever there is a programming language I must have a compiler for programming language for that machine and if you say that there may be 10 to 15 popular architectures and maybe 20 popular languages then I need about 200 compilers somebody will have to sit and code them now this is what is also known as classical m cross n versus m plus m problem what we are trying to do is we are trying to find out whether there is a situation so some of you really talked about saying front end and back end now if I use that situation what is the most critical part actually I have these front ends and I have these f n front ends and I have back ends which are let's say going from v1 to vn so I have these front ends and I have back ends now to connect to them I need something and what is that something I need I just cannot arbitrarily say that pick up this front end and pick up this back end so what you are talking about is some intermediate language and this can also be called as a switch box where you say that all front ends will be able to generate the same intermediate language and all back ends will be able to work with the same intermediate language so what I need now are just n front ends and n back ends so instead of having n cross n compilers I can just write n front ends and m back ends so m plus n and then life is simple but life is simple so long as I can design a universal intermediate representation because there is always a trade off the trade off here is that I should be able to design this switch box now now is that straightforward now suppose you have imperative language you have logical languages here programming languages you have functional languages all kind of complex languages may be there and you are saying that I should be able to translate everything into a single intermediate representation so is that reasonable is that realistic no then all this structure goes for a toss right so what we are talking about I can employ a front end and a back end and so on that will not work so what we are doing so typically this is n cross n compilers look and this is how my universal intermediate representation with all these front ends and back ends will look and prerequisite for this is that I must have a universal intermediate language what property is this universal intermediate representation must have that it should work for all languages and all possible machines and there does not seem to be much commonality between this large set of languages so interestingly this project started way back because people realize this problem way back when the first compiler was written in 1950 itself people started talking about it so because at that point of time itself people were saying that look up in IBM has one machine but other machines were getting developed and at least two, three other programming languages were quickly coming up so cobalt was there people were talking about Elgol and some other languages for there so this idea a linguistics switchbox actually materialized within an year of the first compiler an idea was that if I can come up with some kind of compilers that time it was called compiler oriented language universal computer language and so on people gave various names to this acronym computer scientists are very good in inventing these kind of terms very quickly but the whole idea was that I want some kind of linguistics switchbox which will be able to then do this translation and I was supposed to have certain properties and basically idea was to reduce the total development effort of compilers for different languages to mapping on different topic and it did not succeed so the whole effort I mean first one proposal was made in 61 to reduce this development effort yet another was made I mean people were talking about another effort was made and what happened was that it is next to impossible to design a single language to be different so if we do not succeed here do I go back to this model where I say forget about this box and have m cross m compilers very good if you know then what is the solution sir following languages are different there are different types of languages but they share some similarity so there can be a group of languages which share some similarity so we can design an intermediate language for those similar languages very good so really this was the solution which was proposed saying do not look for a general solution but look for a solution that will work for a subset of languages and for a subset of machines and this was the idea which was proposed and rather than saying that there are many literature part I have given here which you can read some point of time but idea was interesting saying do not look for a universal intermediate representation but find out languages which are similar and find out machines which are similar and design now an intermediate representation which will work for this set of machines so I may not have a solution for this n plus n problem but I have this solution for a subset of machines and a subset of languages and this is what was proposed so common idea for similar languages and similar machines have been designed so if you look at DCC for example DCC will find course on to many machines it can compile many languages and it has a common intermediate representation and in industry also when you use many of the compilers they use a common intermediate representation for a set of languages and a set of machines and that really is a working solution now another important question an important issue that we have to face is how do we know that the code which has been generated is correct and we already saw that there is no way I can prove that my compiler is correct now let's understand the scenario let's visualize the scenario when you started working maybe in first year DCC 101 which was the first time when you used C and when you compiled your C program and it did not work what was your first reaction check the check the redo the program right okay anyone else tried something else recompile but recompile recompile the same program nothing gets changed right so if a program is not working and you do the same behavior nothing changes Compile Compile to the different compiler but when you are sitting on that sitting on that computer and say what different compiler you have So you started debugging program this is one of the program you wrote but you did not have confidence in this program you were saying my program is incorrect I need to did you ever blame the compiler saying my program is correct I don't know who has written this compiler and therefore my program is not working did you ever blame the compiler why that means you have this confidence in compiler that whatever compiler is doing it is correct what I am doing is perhaps buggy and therefore I need to check my program that means somebody must have done a good job of testing the compiler or good job of convincing you that don't blame the compiler look at your program so how do you generate this level of confidence in your program compiler is yet another program right so can you generate similar level of confidence in your own program and if yes how do you do it I can tell you in our instructor when you are doing this course like equivalent of ESC 101 so when you wrote the program or instructor was professor sas budhe the professor will come to the lab so are you confident that your program is correct yes okay run it it will take some input and how do you give input he will just put his hand on the keyboard and most of the time your program is going to crash because some random input will go so if you are saying read in PGR and if your input is not in PGR what happens hold on you are taking some input but you are not checking whether this input should always be in PGR what happens if I give a character input straight away go for quarter what happens if you give incorrect input to compiler have you ever seen boredom in a compiler gives you a nice error message right so really compiler goes through not of testing and one way is obviously prove that it is correct but that is something you cannot do so program proving techniques do not exist at level of where compiler can be shown to be correct okay so what we need to do is we need to do a very systematic of finding out or systematic testing which is going to increase our confidence level okay and what is normally done is we have something known as test suit for programming language this test suit is independently designed by language designers they are not part of the compiler so what happens is that I have language I have a language specification and I have a test suit which is going to test any compiler which is going to be written for this language okay and what does this test suit contain this test suit contains thousands of programs okay sometimes it can run into tens of thousands of programs and each program is going to test a specific feature of the language and we will have a documented behavior saying if this is my input this should be the output of the program and it will also have buggy programs which will say if this is my input okay this is the kind of error message compiler should give we are going to be generating code for incorrect programs it should be able to test both for correct input and incorrect input okay so we have a test suit and what happens is that you have a test suit of program where you have expected behavior of each of the programs which is documented and this test suit is given to the compiler line saying test your compiler against this suit okay and all the test programs must be compiled using the compiler to the compiler right and normally this is not done by compiler writer themselves this is done by quality assurance team okay and there is a classical sort of observation in industry that you cannot find bugs in your own program to sort of trust it all the time so it is someone else's job really QA team is always a different team which is a I am just going to dissect it and find as many bugs as possible and they use these test suits so test suits are shared by this now how do I go through this testing okay suppose I give you 50,000 programs I give you a test suit which contains 50,000 programs and you start testing it okay now what happens you start test so suddenly you find that 5,999 programs are working correctly you come to 6000 program and it crashes gives me an error that your compiler now has a bug what do you do in such a situation you have to debug your compiler right now when you debug your compiler probability that you have removed that bug which was not compiling 6000 program or program number 6000 is gone it will now compile but what guarantee you have that the other programs which you already tested they will now compile you know correct right in fact I am in the classical again situation is every time you remove a bug perhaps you introduce two more and that is what you will notice in the week of April when you start checking your project code in the week of 15 everyone will come for demo because I was trying to remove some bug because bug is fine but now it doesn't work anymore this is half the teams will give me this reason in that week and you will notice it now so what you have to do therefore is whenever you are trying to remove bug you have to go through what is known as regression testing and what is this regression testing that whenever you find that there is a bug your program does not work you fix that and start from the beginning and go all over once again till you have compiled all the programs in the pursuit in a single go with a single version of the compiler and have observed whatever is the correct behavior whatever is the document which behavior of that particular program in the pursuit so this is also known as regression testing that you keep on doing it again and again till no program has till your compiler for all the programs in the pursuit gives me the documented result and how do we design pursuit so how do we design pursuits so we want to make sure that we do not have repetitive program for example another thing you will notice that when you start doing your project you will write a program and if I ask you how many programs you will use to test your compiler there is 5 programs so show me these 5 programs every program has a formula with different values so one will be for going i going from 1 to 10 another will be for i going from 10 to 15 now these 2 programs do not give me new information they are just repetition they are more of the same so you have to make sure that the test programs they are going to exercise different parts of the compiler so you have to do some amount of coverage analysis you have to make sure that most of your features of the compiler most of the language constructs of your compiler are exercised during the testing of this testing process and therefore test program should exercise every statement of compiler at least once and usually it is an art really I mean the people who design pursuits they are experts in that and they are exhaustive pursuits which have been constructed for some languages like EDA has an exhaustive pursuit and if you notice EDA is perhaps the only language which has a registered trademark or TM on top of that which is the language of department of defense and they are the one who have designed the pursuit and you say any EDA compiler in this world if you want to be call it EDA compiler must be tested by department of defense US otherwise it is not going to be called an EDA compiler so this kind of exhaustive pursuits do exist and people have used them to really test their compilers this is how you generate a lot of confidence into the compiler so now how do we reduce all this effort all the time what we are trying to do is we are trying to do things efficiently we are saying we have to write a compiler we have to test it we have to do various things and all the time I am trying to reduce this development and testing effort because I want to cut down on time and I want to cut down on cost so how do I do it so one simple solution is let us not write compilers we do not write compilers we do not have to do projects we do not have to worry about one sort of credit life will be simple but that is really not the solution that is an extreme position now if you do not write compilers what do I do I do not have to write compilers somebody has to write that so you get a compiler right there and what we say is let us not worry about writing compilers we will somehow have a black box now imagine a situation here is a black box I tell this black box I have two ports here and one port on this side I say Pascal, Motorola and what comes out is a compiler Pascal compiler for Motorola machine that would be great right I just put in two USB sticks here one has language specifications one has machine specifications and what comes out is a compiler yes no so can we think of black box like this you have already seen these black boxes you have seen port generators somewhere have you used port generators yes no okay so let us go back CS251 what are the things you did in CS251 you have done this for CS251 CS251 CS252 CS255 you have done CS255 okay so what are the modules you did in CS255 anyone who remembers CS255 and the modules in CS255 there is the class and later and there is the class somebody who remembers about blacks anyone from this side who remembers about blacks What was flex? What is the full form of flex? Have you read the manual? You remember reading the manual of flex? What was the title of the manual? Highly volatilized flex, a lexical analyzer generator and yet was yet another compiler, compiler, right? So what we were really doing was a compiler generator should be able to generate compiler, right? And you have seen simpler versions of this? What did lex do? What was input to lex? What was input to lex? Yeah, you want to say? Don't remember? A set of regular expressions, right? Specifications. And what was the output? C code, okay? And then you just compile it using some data, right? So similarly I can think of now compiler generator which will take language specifications, which will take target machine specifications and will give me a compiler. If I can create this box, then I don't have to write compilers, okay? So I can shift whole effort from writing compilers to writing a compiler generator and then if I can somehow write these specifications, then all I need to do is whenever I get a new language, write those language specifications, whenever I get a new machine, write those machine specifications and generate a compiler. Good job, right? Very quickly I can generate compilers, okay? Again, this looks like two types of things to do. Like we said, writing a full compiler and then taking it to various phases, okay? I cannot get to do it in a single step, I want to do it in multiple steps. Similarly, I want to do this activity also into multiple steps and saying that I have language specifications. When we say that we have specifications of source and target, but if I look at source specifications, what were the specifications I started looking at? When I was compiling languages, I said I must have a set of alphabets, then I must know how to brokenize, then I must know how to check the structure, I must know how to check the meaning and so on, okay? So language specification could be given at several levels of abstraction, okay? So various abstractions work into things like lexine, structure, semantics, etc. And for each component, I can write separate specifications. So when I talk of language specifications, I can write, I can say that when I say something is an identifier, I can use specifications in English which says it is a string of characters that has at least one alphabet, starts with one alphabet and starts with an alphabet followed by alphanumerics. And their concise language is where if you recall your language specifications, I can write something like this. I can say it is a letter, followed by letter or digit, zero or more occurrences of this. I am using 3D splotion, right? And if you say you may have underscore or dollar sign and so on, you can again just make changes to this. Now when I am saying I want to write a lexical analyzer, this is the only input I should take. I should not worry about more than saying that I use certain data structures, I read my input and so on, okay? Those are mundane tasks I have to do every time, only my specifications take, okay? So therefore, I can similarly write syntax and semantic descriptions and then I can also write target machine specifications, okay? We will see how to write these specifications and then I can go back to my compiler and say if I want to write lexical analyzer, don't worry about writing lexical analyzer, but use a situation, use a tool which is lexical analyzer generator, which you have already seen is a lex and all I need to do is give specifications of the lexics, okay? And this is what my regular expressions are, right? Similarly, I can have a parser generator. So instead of writing a parser, I can have a parser generator and I can write my specifications which are parser specifications. I can write my specifications in terms of context-free grammar. And what is the outcome? This is what I gave you, right? I wrote my context-free grammar specifications and what came out was C2, which was nothing but a parser, okay? So similarly, I can think about other phases and I can have tools for each of the phases and I can have specifications for each of the phases, okay? I can have specifications for code generators so I can have a code generator generator and I can have machine specifications, right? And what is the outcome now? I am not writing these phases, but I am using these tools and I am writing specifications all the time. Now will it make life simpler? Definitely as compared to this, the overall effort here will be reduced. How much reduced? Okay? So normally, we say that if I am using certain tools for code generation, in compilers we have seen overall effort can go down by almost two thirds, okay? So it's not that I can do it in one day because writing specification and writing tool is time consuming but if I add total x, effort x in writing the compiler by using the tools and using the specification I can do it in about 0.65x, which is lot of reduction. Then when you're saying 35% effort will be gone and then not just that effort in coding is gone but your testing becomes easier because now when you say that I want to deal with my lexical analyzer I just need to deal with this. I need to say that whether my specification is correct or not. I don't have to worry about data structures I don't have to worry about looping I don't have to worry about whether I was reading my input correctly or not. That is one thing we have noticed. Generates maximum number of errors. You are reading your input you either skip a character or read extra characters and suddenly you find that something cannot be tokenized. Your data structures are not correct. All those errors will be gone. They will be part of my tool which I need to test only once again, okay? And this also has certain more advantages because suddenly you find that this is not very efficient because tool is not generating good code. All I need to do is make this efficient. So if you see flex and you remember lex what is flex? Fast flex. Suddenly you found that lex was not giving me very good performance so we wrote flex. And then you generate the same code, same specification and you generate much efficient code for the same specification and you have more efficient code here, okay? So each of these phases can be made more efficient just by improving quality of the tools. So there is a kind of effort we are going to put in into writing compiler. We will not look at the code which goes in here but our effort is going to be that what are these tools and how do I write specification? This is where the focus of this course is going to be. So how do we retarget compiler? All I need to do is change machine specification language specification and our new compiler, right? So if I need to modify a phase I just need to change specifications here and tool based development can cut down your time by almost 30 to 40 percent, okay? And this is tool testing is only one time over, okay? And performance can be improved by improving the tool itself, okay? And this is the last point as far as this is concerned. How do compilers of 21st century look? We are talking about the first compiler of 1957 versus compilers of 21st century, okay? We said overall structure is same but what about the effort, okay? Overall structure is still the same but effort is now in back end because lot of optimizations happen there are different kind of machines where you talk about all these multi-core machines you talk about GPUs and various kinds of other machines for coming which were not presented in that era, okay? So most of the effort has really shifted into the back end and your runtime system integration, board optimization has become much more complicated than what it used to be 50 years back but front end is now much simpler because they are very standard tools they are good mathematical models for handling the front ends like backward languages and context free grammars and so on, okay? So total effort has, proportion of effort has changed since early days of compilations and earlier front end phases are more complex once and expensive parts but today back end phases are the one where more cost is involved and front end phases are now much simpler So this is where I close introduction and in next class we will start on really the needs of the phases of compiling So, let's begin


Hey everyone, what's going on? I am Greg Sossman, joined by our own game, Marenzie, who's here to help me break down week 12 with the six best bets of the week. What's happening, Gabe? Ready to rock, Greg. Only six weeks left of National Football League regular season of play. The holidays are around the corner. It's time to win. It's always time to win. So let's begin in the NFC South. The Panthers and the Saints, Saints are a big time favorite, but you don't like either side here. Well, you know what? When I first saw the number of this game, I wanted to take the Carolina Panthers and I'm still tempted to take the Carolina Panthers, but I can't overlook just how bad they are on the road. I also can't overlook the fact that Kyle Allen's now throwing eight interceptions in his last four football games. But what does stand out to me about this game, and you know, you'll often hear me talk about historical data and trends. And if you notice, I've been betting a lot of division games this year. Why? Because we have a lot of past history and the history of this series has been a pretty consistent one. The last 10 times they played, eight times it's gone over the number. 80%, that's right, eight of the last 10 times, these two teams have lined up against each other. It's gone over the number. The last five times that they have played in Bayou country, it has also gone over the number. Now the Saints were winning without Drew Brees with Teddy Bridgewater. And now Drew Brees is back. He's starting to get a little bit of a rhythm right now. They're averaging nearly 25 points a game in three games that he's come back. I expect the Saints to get into the mid-20s, probably into the high 20s, maybe the low 30s. I think this football game's total is too low. I think we're looking at a, you know, 30, 23 game, 27, 23, 28, 21. You know, the Panthers could backdoor this game but that's the problem. If we take the current line of Panthers here we're gonna kind of have to be hoping that the Panthers are able to climb the fence in the backyard and break in the backdoor. It's just not something I wanna do but we're gonna ride the numbers on this one. 46 and a half is more than a fair enough number. Let's go with the over 46 and a half. Two offensive teams going at it between the Saints and the Panthers. Maybe the Panthers get in there when it's all said and done. Let's not make that one of our best bets. Let's go over 46 and a half with Carolina and New Orleans. And Drew Brees, Drew Brees for you prop players and DFS players as well. I wanna know Drew Brees, 22 touchdown passes, just five interceptions this last seven games against Carolina. Always plays well. I expect them to play well on Sunday. Let's move on and we get to the Pittsburgh Steelers and the Cincinnati Bengals. Steelers are a six and a half point favorite. The total sits at about 38 and a half. Pittsburgh expected to be without James Connor, Juju Smith, Schuster potentially, Deontay Johnson and the Bengals. Will they just suck? What do you think, Gabe? Well, you know, it's not my job to be an NFL insider and give you breaking news like a Jay Glazer and Adam Schefter, but I will. My sources tell me that the Pittsburgh Steelers are actually getting players from Indeed.com right now this weekend. They don't have a choice. They have to outsource. So if you've ever dreamed of playing in a national football league game, this might be your chance on Sunday. Like right now there's a bunch of arena football league players calling the Steelers. Yo, I'm available. I'm available if you need me. Where do we even start here? Smith, Schuster out with a concussion. Connor out with a shoulder injury.   But with all that being stated, they're playing against the Cincinnati Bengals. And we talk about tank mode a lot and no player goes on a field one and lose a game. An organization might want to lose the game, but you know, people don't realize this. The players on the field, they don't want to lose so the team gets a better draft pick. So the team takes a player that replaces them, right? You know, if you just sort of do the math on this, you realize no player is going on the field wanting to lose. But the fact of the matter is, man, the Cincinnati Bengals are trying to lose. They've got Ryan Finley as their quarterback right now. Andy Dalton wasn't their problem. Ryan Finley is not their future. He's averaging 3.3 yards per pass play, guys. Like Greg Sussman is probably about, like, eight yards away from me right now. Like the distance that a camera is probably about five yards. Like Ryan Finley's averaging 3.3 yards per pass play, guys. That's all we need to say here. Joe Nixon rushed the ball, what, 45 times last week? What does that say about what they think about their quarterback? And the Pittsburgh Steelers are very good against the run as well. Cincinnati's gonna have a hard time moving the ball here. Meanwhile, Pittsburgh, as I mentioned, no conner, they don't have, you know, anyone really to throw the ball to. With all that being stated, I like, you know, I was just gonna bet the under of this game. I just don't see how they're gonna get the 39 points of these two teams. But ultimately, I think Pittsburgh's gonna find a way to win this game and cover the number as well. They've owned these guys. They've won eight straight times. There's six and two against the spread, against Cincinnati. Cincinnati's like one in nine, the last 10 times they played on their home field against the spread. The Bengals are a bad football team who are playing to get Joe Burrow right now. Joe Burrow, LSU quarterback, he's from Ohio, all right? He was like the football player, Mr. Ohio, type of deal in the state. He was at Ohio State before he transferred to LSU. He's a perfect fit for the Cincinnati Bengals. They don't even wanna win. Steelers need this. They get it. Ugly low scoring game. Steelers cover, it goes under the number. Neither of these teams have players as game so eloquently stated. And even though I'm not ready to go out there and play, Ryan Finley really isn't either. The points won't be there. So go under this number and Pittsburgh are good enough to get past these Cincinnati Bengals and cover the spread game. And if you're not convinced yet, I could go one. Both teams are four and one to the under in their last five games. The last three in the series have gone under the number. Get your shovel out. Start digging. We're digging for gold, all right? Black and gold. Give us the Steelers and give us the under. Up next, the Atlanta Falcons are taking on the other team in the NFC South. It's Tampa Bay Buccaneers. Falcons are a three and a half point favorite and they played a lot better as of late year game coming out of the buy. Defense has looked good as well. Tampa Bay's defense, not really. James Winston, a turnover machine. So going with the Falcons seems like an easy one but you also like the total here as well. Yeah, I find it interesting. Every week, a lot of handicappers and let's call it, you know, sort of the hipsters and the gaming community in the football betting world like the Tampa Bay Buccaneers. Remember about three weeks ago or so they were playing against Tennessee. Everybody loved the Bucs. Remember when Tampa Bay went into Seattle? Oh, it's a weird spot for Seattle at home. They don't cover it at home. Tampa, guys, the Tampa Bay, let's not over complicate things, all right?  The Tampa Bay Buccaneers are two and eight straight up. They're two and eight against the spread. You bet on the Bucs every year, every week this year. You have one twice, all right? Yeah, conversely, if you bet on the over every week with the Bucs, you've only lost twice, all right? This team's a pretty simple team. Let's not over complicate things, all right? So let's see, they're two and eight straight up. They're two and eight against the spread, all right? Check, let's bet against them. And they're eight and two to the over, all right? Now the Falcon defense has played better. They've only given up 12 points over the last two games. Blowout wins over the Panthers and Saints, no less, pretty impressive what the Falcons have done. Now, Dan Quinn hasn't fully saved his job yet, yet he's on his way. The Falcons have as much talent as anybody in the national football league. They were caught in some weird, like, Twilight Zone vortex. Yeah, it was like to be mute a triangle. They were lost in some sort of black hole, but they're back. And this isn't a team that's trying to play for draft picks or anything like that. The Buccaneers are playing a football team in Atlanta that's gonna wanna win their third consecutive game. I think they do actually. And I'll tell you what, the Falcons have been a good bet against division foes. They're on a 14 and four straight up division run right now. I think they win another. And once again, the betting public and the hipsters are taking a Tampa Bay Buccaneers. You know what, I've never really cared much for hipsters. Give me the Atlanta Falcons. Let's dance the dirty bird and soar with the over. We're flying with the dirty bird this week, going with the Falcons, going over the number. Old school. Because you can't lose if you go over the number with Tampa Bay as Gabe's expressed it a few moments ago. Going over and taking the Falcons. One last game to get to game of the day. It's the Cowboys and the Patriots. I know our own Frank Staple has been banging the table for the Cowboys outright in this game. Gabe, are you with them? You know what? I actually am with my main man, Frank Staple. But before we get to our pick here, I'm assuming Jim Nance is torn. Like I'm worried about Jim Nance, number one. I'm concerned. Like Jim Nance is gonna be as torn and as confused as to who to cheer for in this game as Meryl Streep was in Sophie's Choice when she had to decide which kid to give up. Like this is tough. Like I can imagine that like Jim Nance is like he's speaking to like a psychiatrist. I love both of them. I don't know what to do. I don't want to offend Mr. Kraft, but I also don't know what don't want to offend Mr. Jones. Yeah, this should be interesting. But all kidding aside, actually, I'm not kidding. I'm not kidding. Hard to overlook the coaching mismatch here, right? I mean, it's Jason Garrett versus Bill Belichick. Yet, you know, between these two coaches, one of them is 11-2 against the spread in the second game of back-to-back road trips. You know which one it is? Jason Garrett.  I'll take the team on Sunday with a better quarterback. So in other words, I'm taking a team from Texas. Give me the Dallas Cowboys. The Dallas Cowboys have better players at nearly every freaking position on the football field. Besides, like, I don't know, quarterback and Tom Brady, who's having a better year right now? Whose offense is clicking right now? Doc Prescott has four consecutive games, guys, of a QB rating of 100 or more. I read an article a couple of days ago on Nate Silver's website, 538, that Doc Prescott's having one of the best years in NFL history at the quarterback position. I don't know why people don't want to acknowledge him. He figures since he was a quarterback for the Cowboys, he'd get love. He's not. In the last three games, he's thrown for 1,098 yards and nine touchdowns.  You want to beat the New England Patriots? How do you beat the Patriots? You run the ball down their throat. You out-physical them. You intimidate them. You slap Brady around. You rush the quarterback. They can do all of this, all right? The Dallas Cowboys are young, aggressive.   It's not fun playing against the Dallas Cowboys. Their play calling can get bizarre at times, but who's doesn't in a national football league? I'm calling it right now. The Dallas Cowboys do win this game outright. They're going to go into Fox, bro. They're going to win the game outright. And then here's that part two of my Babe Ruth prediction. The Buffalo Bills will beat the Cowboys outright on Thursday. Thursday afternoon, you'll see. Cowboys are going to win this game. Skip Bayless is going to have a heart attack, and you're going to hear on Monday morning about how the Cowboys are going to win the Super Bowl. And this is as great as it's ever been. And three days later, they'll lose to the Buffalo Bills. But back press gots on the roll right now. The Pokes have scored 35 or more and three of their last four football games. We mentioned about how they're 11 and two against the spread in the second and back to back road games. They were in Detroit last week. You know, there's nothing to like about this Patriot offense right now. At worst, if they don't win the game, they cover the spread. So our official pick will be plus six and a half, but I don't have any problem at all of splitting the play into and playing the money line as well. The Dallas Cowboys win this game outright. That's me. The clapper, Jason Garrett, beating Bill Belichick outright says our own game already. Oh yeah, they're a little bonus. I like to always save one last like a court case. You know what I'm saying?  The last three times the Dallas Cowboys were underdogs of six points or more, they won all three games outright. Just saying. Cowboys are better in every facet of the game, says game RNC. And then of course, they go and lose the bills. That makes sense. That'll do it for us here in the band. No hurry up. At best of luck this weekend. Enjoy the games. Gabe and I will see you back here on Monday, to preview Monday night football between the Ravens and the Rams. Have a good one, everybody.


How's going on guys, right? It's Mark. I just wanted to make a quick video to check in with you guys about Domino's pizza Dpz is the ticker symbol, but before I get on to that just wanted to quickly highlight So this is my account year-to-date. We've just broken ten thousand dollars in equity. So we started the year of eight thousand Six hundred sixteen it says I put money in but I don't I don't remember doing that But we see this as I have then I have so yeah, we brought it to above ten thousand Which I'm pretty happy about so we've got an account anyway Let's have a look at my recent trades Which includes Domino's now if you've seen one of my older videos I said to never trade A stock before earnings and it's a pretty good kind of general rule of thumb. It's a little bit risky and there's a couple of reasons why I decided to do it on this occasion, which is What I'll go into now, so I'm first last earnings report Domino's Let's see if we can find it here. I believe I believe that's right So first last earnings report you can see that well, it's got this kind of common resistance around 292 and There there was growth in the report in terms of you know the amount of stores that they're open in and so on But it wasn't at the expected rate So we saw this massive pullback and then consolidate around this 242 where it's Where it's done this a few times Previously. Oh, by the way, if you're not familiar with anything I'm using link in the description to answer SMA EMA MACD RSI all the indicators I use And yes, you can see at the earnings it pulls back consolidates and then it's pushed up Right, so the earnings is if you're watching this is tomorrow on the 16th So it'd be 16 before the market opens Domino's pulled back today nearly 5% so 4.3% And then you can see that the SMA acted as a support that like this 269 level And you can see that it's acted as a support previously So the reason that I decided to buy in is because with this massive drop the day before earnings I felt that any kind of Bad news or any slowdown in growth Is you know potentially already kind of baits into that price maybe a little bit more to go But with this kind of support line shown On the SMA. I thought that'd be worth getting a small amount. It's only 2% the account Involved so just a little kind of You know to give you an idea on Domino's business more and that sort of thing So I've read a lot about and their fortress in method So basically what they want to do is open as many stores as they possibly can To be as close to customers as possible so delivery times are quick Pizza's always fresh Their targets is they don't actually give quarterly targets They do it like three to five year periods if you scale it back and break it down They should be opening anywhere between two and three hundred New restaurants every quarter So that's what people have deduced from it So as I say with the last earnings report There was still growth but just slightly slower than what people were anticipating And which is why it pulls back and I always like to buy When there's still growth it's just a little bit slower because you know Growth is always a good thing slow growth is not the same as a company That's you know regressed or going backwards in my opinion. Anyway, so yeah So just wanted to highlight this I'll be keeping eyes on it tomorrow If the report is a little bit slow or slightly negative and it does pull back I'll be happy to buy in all the way down to kind of this 242 level Obviously keeping eyes on it and seeing how aggressive How aggressively it pulls back Obviously, it fits, you know, it's terrible and they've had a massive net closure of stores And it's pulled back dramatically then, you know, probably not to get out But if it's, you know If it can either hold this and bounce off the sma or pull back and Consolidate in these areas where it has before I'm kind of happy to to slowly add to this position and and watch it You know curl back you can see it's consistently traded between this range So Nothing to worry about Um, and I think that's everything that I wanted to say for now. I'll probably kind of keep you guys updated I did close out of my etsy positions. I know my last video was about etsy Let's see how that's doing So yeah, we closed out it here. So it looks like it was well timed um So we closed out. Yeah, like perfectly So trading between this kind of 59 69 level. So we'll see how this plays out right now It's a little bit neutral. So we're not interested. We closed our positions Let's just get on the history so you guys can see Um, yeah, so that's etsy. We closed out a decent profit Um, we've also been slowly filtering out our Tesla positions as they come into profit Um, I know Tesla's what did Tesla it open closed above 250 Today, let me check Yeah closed above 250 today. Um, so if we to hold on to these positions, you know, we'd have made a little bit more Money, but I felt we was a little bit overexposed to Tesla. So, you know, I'm still made money So you can see all wrong We're also selling this again where I can see we've got a negative trade But I'll quickly go into some kind of digression a little bit, but I'll show you guys this the setup for this You can see it's kind of got this resistance At around 70 40. So I thought it was worth a small sale again only 2% of the account Matt, he's covered in our side of the song, but Yeah, so I thought that was uh, I hope that was helpful for you guys. Um, just to Kind of touch on domino's pizza Um, if you enjoyed the video give it a thumbs up Um, if there's any stocks that you're keeping your eyes on or or you know, there's anything that you think I do better Then you can reach me on eToro. You can reach me on instagram. You can reach me on youtube Um drop a message on any of those and I'll um get back to you for sure And apart from that I will catch you guys Um, probably tomorrow. Thanks for watching. Cheers. Bye


In an effort to maintain and enhance their readiness and support local fire departments, Army aviators at the Puerto Rico National Guard put their firefighting skills to the test on February 21, 2013. The aviators trained with the Bambi Bucket Firefighting Extinguishing Device on a simulated fire site from a UH-60 Blackhawk helicopter at the 140th Air Defense Squadron Site in Punta Salinas, Puerto Rico. Their goal is to prepare and certify their crews on the recovery, airlift, transportation, and dumping of the 550 gallons of water that fits in a Bambi Bucket. When asked about the training, Chief Warrant Officer Alberto Ponce de León said, Today we are securing a Bambi Bucket training as part of our state mission from the Puerto Rico National Guard. Today our crews are flying a Bambi Bucket carrying approximately 550 gallons of water to suppress fires in area needed. Wildfires are common in Puerto Rico during the summer seasons. Reporting for the Puerto Rico Army National Guard, 113th Mobile Public Affairs Attachment, I am Specialist Elias Edmelandis.