My name is Lina Beydoun, Director of Development at the American University in Cairo and I will be moderating the discussion today with five gender experts. The webinar today coincides with the anniversary of the declaration of COVID-19 as a global pandemic, a year during which women have been disproportionately impacted by violence, displacement, unemployment and increase impoverty. The panelists will examine the distinct effects of conflict on women in the MENA region and the ways to ensure gender equality and peace. Each panelist will speak for about 10 minutes followed by a 30 minutes of discussion, question and answers with the audience. Please type any questions you may have for the panelists in either English or Arabic in the Q&A box that you will find at the bottom of your screens. Now I will turn this over to Dr. Eli Abouaou. He is the U.S. Institute of Peace MENA Programs Director. He will give some opening remarks before we start. I turn it over to you, Dr. Eli. Thank you very much, Dr. Abouaou. Good morning, good afternoon everyone depending on where you are and thank you all for joining us from all over the world for this important discussion. First I'd like to thank the American University and the MRAs for co-organizing and co-hosting with us with the U.S. Institute of Peace this event. As a MENA regional office we're really proud of this first collaboration with AUE and we hope that this will lead to many other fruitful collaborations. I'd like also to thank all of our distinguished panelists who have taken the time to be here with us today and to share their insights and experiences on the topic and especially thanks to Nahla for her vision and dedication to putting this event together as well as my colleague Molly Gallagher who was also the lead person from our end. This event coincides with the week of International Women's Day on March 8th, a day that we honor and reflect upon the strength, courage and brilliance of women in our lives. It's also a day upon which we seek to elevate the plight of those women who are not yet safe from harm or not free. We remember also that there are still a great many women sorry there are still many great women and girls who are actually because of their or because of them being women actually they've been held captive exploited underestimated and excluded. These harmful dynamics are worsened when conflict erupts obviously and we're seeing this all over the region in all in all the conflicts that are ongoing in the region we are seeing the heavy impact on women and girls more specifically. So the event today seeks to explore how the international community the practitioners and policymakers can work together for a better protection of vulnerable women especially in conflicts across the MENA region. So I do hope that at the end of the event we will learn you know new ideas or new tactics about improving protection for women and girls. So I really look forward to the discussion and the insights that everyone will share with us and over to you you know thank you. Well thank you so much again Dr. Ilya Bouan representing U.S. Institute of Peace. Now I turn it over to Dr. Nahla Yasin Hamdan who is representing the co-organizer of this event the American University in the Emirates. The floor is yours Nahla and just briefly Nahla is the assistant professor in the College of Security and Global Studies at the American University in the Emirates AUE. She is a certified mediator and international relations expert and the co-author of Arab Approaches to Conflict Resolution Mediation Negotiation and Settlement of Political Disputes. The floor is yours Nahla. Good afternoon for those who are in our region. Good morning for my friends and everyone in the U.S. Canada. Thank you so much for the chance and I apologize on behalf of the President of the University. It was suddenly an emergency happened it seems and it didn't make it to the here we'll probably hear later from our Provost or the Dean Dr. Marius. Thank you so much and also I would like to start by saying starting this webinar it's a very important and timely webinar as Dr. Ili has just mentioned and what was more important then it's coming now the CSW from Mission the Stars of Women in New York coming soon the 15th of March till the 23rd probably whatever it is here in this field that is very timely now we're going to talk about and the theme but but the theme that I'm going to talk about actually all of us I'm going to start talking about is the theme is this year women in public life equal participation in decision making and violence achieve gender equality so my presentation today will be about gender equality and of course in specific I want to talk about gender inequality in the Arab world which is the meaning and also having said that the gender inequality we're going to talk about I'm going to use the UNDP definition of that meaning I'm going to be talking about the gender inequality index which is grounded in a theory that's poses that that poses that it will diminish with economic development improvements in healthcare education attainment labor force participation and political empowerment so these are the facts that I measured actually statistically that there is no time to talk about all these things and concentrate on the importance of the economic empowerment and the labor force so therefore gender equality is a global problem actually and it's a barrier to human development where the average of human development index for women is six percent lower than that of men in general so the the gender equality inequality in the Arab world I will argue that females in some Arab countries have achieved parity really with mainstream education that's true especially in the in this region in literacy the race of participation in the paid the paid labor force unfortunately are the lowest in the world and I have the statistics recent statistics as of 2021 january 29 seeing that to me see the 15 percent of the female labor force uh iraq 12 libya 34 and year 17 Yemen six of course we will see how the you know um variation of course in Arab countries according to their capital income UAE is 52 since we're here Qatar 57 is the highest actually Qatar 57 percent and that's uh you know upon the statistics to understand the variations in the indicative Arab countries themselves 22 Arab countries so I will concentrate also about you know how to do to uh to study about the model of gender equality in the Arab world where I found the important significant uh in the measuring the uh power person capacity for women which is reflecting the importance of economic empowerment and inclusion of women in the labor force as we just mentioned the most important finding and that's uh uh found that the relationship of corruption index and gender inequality index that's of course uh that the higher level of corruption tends to have of course high scores of inequality so corruption is a patriarchal practice however not everything is there is you know back to the corrupt to the role of patriarchy in the Arab world is to be the main reason for the this gender empowerment therefore we are there are now new studies has been shown that you know there are intersections of vectors of social inequality and uh that's what I'm going to talk about also the new uh form that's a literature coming up about gender justice that was proposed actually back in 2017 I remember correctly in the declaration of muscat declaration human rights to talk about gender justice so this is a new form actually coming in the Arab world which is you know making the urgent need to consider this gender empowerment as issue of human rights and that's the link is very important I have some statistics here with you from my research also that I found a lot of of course the corruption index also was of course high most of the corruption in most countries of that are of course conflict ridden when I found that the corruption index was for the average for the Arab countries which was 33.4 which is meaning in statistics means that the lower the score the higher the corruption and it is it has was 33.4 half of that of the I measured and I compared with OECD countries organization of economic cooperation and development and they have average of 68 percent so more corrupt countries tend to have lower per capita incomes that's the conclusion and of course the this will give us the information that what could be done what kind of policies of the Arab world has to be to address this inequality and less of the corruption and also the relationship will be also showing in the nowadays with the countries especially like Yemen Libya where women are not you know in higher positions also even though there are you know struggles in their societies so also that will give us a conclusion that representation is not enough we have seen that also have women in parliaments and politics is not enough to drive the general empowerment we need probably to have more global movement like the SS level stuff to share ideas and the also we need to then the driver of inequality may not be as I said patriarch we have to look into these facts I look to corruption and the political empowerment through economic independence so labor participation is very important as I know and that will and more more problems arise also for general empowerment in the after COVID-19 of course where women has you know the most targeted group that have informal kind of work that they give them more exposure to COVID we have no resources for health resources and give them at a very high percentage of of poverty action COVID-19 women also they have also there have been studies that have seen there this region of having COVID-19 also women are being subjected into the kind of harassment and eventual violence gender based violence so I will I think I finished me I still have three minutes I still have three minutes so I would like to conclude my presentation by saying there is no question does gender equality is the key to economic growth and we should invest more women's collective rather than individual empowerment thank you and you know thank you so much for listening thank you so much Nahlah before I move on to our second speaker professor Valentine Mugaddam she was offering also some possible reasons why we have a higher female labor force participation in places like Qatar and the UAE the United Arab Emirates could you possibly elaborate a little bit on that before we move on this this is quite interesting although in general I mean the numbers are very dismal in the MENA region why is it that we have higher labor force participation in thank you for the question good very good question because more corrupt countries have my research and the analysis that have found that more corrupt countries tend to have lower per capita incomes and in my also I found that seven very corrupt Arab countries have average index values less than 20 which is Syria, Yemen, Libya, Iraq, South Sudan, North Sudan and Somalia so this is this is it's noted that women hold little or little power positions there I mean political power only two Arab countries as I said in the index I've studied has values less over greater than 60 which are Qatar and the United Arab Emirates hence it explains the Arab countries variation per capita incomes very important hence Arab governments can empower women in poor countries I have in my paper of course a lot of things to talk about if I have time about in agriculture they can promote women of local produce empower women in poor societies they can do a lot to to create some job opportunities for especially in rural areas especially so that's you know that's significant yes so corruption is really linked to gender equality high and of course you know that that uh of course I mean gender inequality and means law development means it's conflict so they are the correlation between the three obviously knows that so and that's proven to be correct thank you thank you again so much Nahla and I will give an opportunity for uh professor uh Valentine and others on this panel to also weigh in on this particular issue because I think it's really bit relevant to the discussion so now I uh I will introduce professor Valentine Mogaddam she is a professor of sociology and international affairs at northeastern university in Boston among her many publications professor Mogaddam is author of modernizing women gender and social change in the Middle East that has been published and published again at least three times and the award-winning globalizing women transnational feminist networks please I turn it over to you thank you very much Dr Beydoun it's really a pleasure to be part of this very important discussion and to be among such illustrious speakers as well and Dr Yasin Hamdan just emphasized gender gaps in education and labor force participation as barriers to human development and women's political empowerment alike as a compliment to her analysis I want to emphasize militarism specifically very high rates of military spending by Middle East North Africa Mina countries and the massive arms flows to the region emanating largely from western states as barriers to gender equality as well as to peace reconciliation and security in the region may I just remind you that in the past two decades alone the region has experienced conflict war or failed states in Iraq Bahrain Libya Syria Yemen and there's also the overlong Palestinian Israeli contention the Syrian refugee crisis and Yemen's humanitarian catastrophe are but two of the outcomes both of which have had disastrous effects on households women and girls security council resolution 1325 national action plans have been crafted but only in a few countries and even those are but ink on paper according to a recent report so let me begin with a summary review of the feminist literature on international relations the feminist IR literature I will then briefly go over patterns of military spending in Mina countries drawing on data from the Stockholm International Peace Research Institute also the World Bank and UNDP and then I will offer some concluding thoughts I should say that my presentation today is based on a paper that will be published next year okay key points in feminist IR literature since at least the pioneering work of Cynthia Enlow feminist scholars have examined the close link between militarism and patriarchy as Enlow argued militarization affects women's lives in both the private sphere of the household and the public sphere of states markets and institutions research also links militarization with what RW Connell theorized as forms of hegemonic masculinity and emphasized femininity which tend to perpetuate women's subordination and vulnerability to violence through what for example Cynthia through what other scholars have called militarized masculinity and manly states so the clear connection between very high military spendings a very large role for the military and of course the perpetuation of patriarchy at different levels macro mezzo and micro so militarism and gender inequality are thus mutually reinforcing first military spending crowds out social spending such as on education and health including financing for the advancement and welfare of women and girls and that would include for example migrant labor and poor girls you know women from poor households etc conflicts wars and any and refugee status have a disproportionate impact on women due to persistent gender inequality in access to economic and political resources which we just heard about from Dr. Yasin according to the woman's stats project patriarchy and gender inequality are themselves causal factors in civil conflict and interstate conflict so this is what i mean by this mutually reinforcing relationship and then the result of this is what Cynthia Coburn has called the continuum of violence from domestic violence to sexualized violence in conflicts and wars so for scholar and ticker therefore security equals the absence of violence whether military economic or sexual in a word the feminist i r literature has emphasized the gendered nature of social relations institutions power and world politics itself including regional politics so quickly on military spending in nina it's always been very very high sickry that stock home institute for peace research stock home international peace research institute provides data and analysis on military spending arms production export and import and it shows that since 1991 average regional military spending has been higher in the nina region than other developing regions between 1988 and 2003 the largest proportions of gross domestic product allocated to the military were found in israel jordan syria yemen and the gcc countries exceptionally high levels of military spending are found in saudi arabia and oman and i have a graph that shows that in 2015 for example in saudi arabia 13 percent of gdp was spent on military and arms procurements but there also are high levels in kuwait batting and algeria um the ua e does not provide um you know adequate and timely uh data on um on its military spending but in 2010 according to the world bank and the un dp military spending consumed fully six percent of gdp two or three times more than what the ua e spent on health or education now those are the rich countries let's look at the poorest country in the region yemen the figures for yemen's military spending over the same period were quite problematical the figures exemplify what i mentioned earlier about that tradeoff between militarism on the one hand and social spending and women's advancement on the other under president saudi yemen had become an ally of the u.s war on terror and thus its military spending as a percentage of gdp was almost seven percent in 2002 and 2003 it fell to five percent in 2004 still very high but remaining steady at around four percent still very high um in 2013 2014 but yemen's spending on health care consumed just 1.3 percent of gdp in 2010 compared to um you know four and five percent on the military at the same time yemen's maternal mortality rate per 100 uh thousand live births was 210 twice as much as the next country in the region morocco which had a maternal mortality rate of 110 um per 100 per 100 000 live births just 36 percent of births in yemen were attended by skilled health personnel yemen's mean years of schooling were just 2.5 years and of course we know that heavy veiling um and child marriage were uh widespread in uh in yemen so who supplies all the weapons to the region in short it's the u.s and the uk and france us weapon sales to saudi arabia have include cluster bombs and other munitions that have been used to hit densely populated areas schools and even a camp for displaced people in yemen so those countries that have very high military spending and getting a lot of arms from the u.s britain and france saudi arabian ua e the richest countries in the region are also attacking the poorest country uh in the region so militarism affects gender equality or inequality in other ways as well not just the trade-off between um military spending and social spending us military bases are found across the globe but also in the middle east um and then a very interesting paper by the princeton scholar um amani jamal shows that u.s military deployment in the middle east is negatively associated with the status of women because the regimes that host u.s military personnel and bases feel compelled to modify their conservative constituencies in what jamal terms the woman's bargain among arab countries tunisia stands out for its low military spending and higher status of women certainly in that whole period before the arab spring countries in fact in my own study of the gender outcomes of the arab spring in a paper that was published in um 2018 i think i found that only tunisia with its low military spending and vocal and visible feminist organizations and much better gender indicators in 2010 2011 than any of the other countries had the most favorable outcomes for women it's no surprise so the covid 19 crisis has exposed critical underinvestment in health and social protections in many countries and i'm very happy to hear that eskwa under mernaz's capable leader leadership in that sector will be focusing on this issue in minna countries the billions of dollars spent on arms purchases could be invested in the strengthening of local regional and global mechanisms for the realization of economic and social rights and for promoting peace and people's resilience to crises and the pandemics in the midst of the pandemic u. n secretary general antonio gutter ish appealed for a global ceasefire that has yet to transpire in the summer of 2020 eskwa called for a regional solidarity fund to support the poorest and most vulnerable groups and countries an excellent appeal but to my knowledge no moves have been made in that direction to date so the conflicts continue as do gender inequalities as seen in the gender gap report of 2020 and very quickly i'll just point out as a compliment to what dr nacho was also saying that in terms of economic participation and opportunity the minna countries are clustered at the very bottom um 132 out of 153 countries on the list educational attainment as she pointed out is better it starts at 81 with jordan but yemen and iraq are at the very bottom these are conflict countries obviously in terms of political empowerment tunisia tunisia is ranked 67 on that list higher than korea at 79 higher than america at 86 and higher than greece at 87 and the narratives and another one of the figures on in that gender gap report of 2020 sorry shows that nina still has the widest gender gap of any region 61 gender gap so to conclude many arguments have been put forward to explain the wide gender gaps in the region including the strength of social norms and the regional oil economy my presentation has posited that the region's high military spending and the massive flow of arms into the region reinforced patriarchal institutions and norms male domination and the persistently wide gender gaps and the violence and conflicts that harm women and girls in turn the absence of women from the levers of political power enables misguided decision making and policies such as the recourse to militaristic state behavior in a type of vicious cycle the challenge for us is to propose ways of turning that vicious cycle into a virtuous one thank you thank you so much professor val for your insights into this i will move to the third speaker but before i do there is a question posed from the audience that i think i i i need to address right now regarding your concept of militarized masculinity it suggests that this perhaps is a little bit deterministic to link military spending to gender inequality there may be other factors that play a role or contribute to gender inequality including social norms and cultures around women and gender in many of the arab countries particularly so also another question is how is it that israel which is the fifth globally in terms of military spending fairs better in terms of gender equality according to thank you for that question according to israeli scholars feminist scholars women's status women's legal status is still is problematical especially in terms of the country's religious based family law and and in other aspects as well the kinds of professions and occupations that women enter into is still subject to a kind of sex segregation as it were occupational sex segregation so israel has very high military spending and i think that if you compare israel to some other countries with lower military spending for example tunisia the status of you know of women would be very different on the other hand remember also that militarism i'm not arguing that militarism and high military spending is the only factor behind gender inequality i myself have worked on social norms i myself have worked on economic factors but but i i i wanted to highlight that because for example let's take the united states the united states has the biggest military in the world and the highest military expenditure of any country and and higher than the next set of countries that also have high military spending and if you compare gender equality or inequality between the us and some of the other for example oecd countries the united states doesn't score well whatsoever i i already gave you the example of the political empowerment score where even you know tunisia is much higher on political empowerment than the united states we know that the united states has consistently ranked lower in terms of women's political empowerment and you know not to mention the wage gap and so on so i think that there is really something to be said for this connection between militarism and and patriarchy and i'm happy to discuss this further later thank you thank you so much for that clarification uh professor val and we will certainly get more questions during the q&a session i will now move to our third speaker marina ziawadi she is the director of the gender justice population and inclusive development cluster at the un economic and social commission for western asia esquah her current research areas include gender mainstreaming combating violence against women and gender justice in the arab world the floor is yours marina's thank you lina so much and thank you for everyone in my intervention i'm going to focus on some enabling factors that would allow for increased women participation in conflict prevention and in post conflict and recovery the first thing is the socioeconomic situation of the entire society so we cannot really disassociate the situation of women from the entire situation of men and the entire economic in the society and some examples are before covered for example women used to earn about 79 percent less than men in the Arab region and about 39 of women were not active in the labor market in the Arab region and 66 of working women in the region were in the informal sector with no social protection schemes whatsoever then covid came to hit the world with serious socioeconomic implications and our estimates at esquah shows that the world had paid about 19 trillion dollars for stimulus and fiscal packages and the global growth deteriorated by about six percent with a tremendous increase in poverty and unemployment if we look at the Arab region we estimated that esquah a loss of 180 billion dollars only in 2020 in the gdp due to covered we also estimated additional 18 million people to fall into poverty in addition to those of course as my concern even if the country is not in conflict okay so that's the first point i wanted i want to say that the situation of women is really associated and go hand in hand with the situation of the country in general the second point or the second factor is that the engagement of women in times of conflict is an extension of their engagement before conflict and in public life in general so if women had been actively engaged in public life in times of peace there is a great possibility that this is extended in case of a natural disaster or economic disaster or in the case of covid and here we're not talking only about representation as dr nahla was saying but i'm talking about actual participation and not only representation i'll give two examples two country studies from tunisia and from lebanon on how the woman peace and security agenda was shaped and the nap was shaped because i know our colleague dr susanna is going to talk about iraq so i'm not going to mention that the significant participation of tunisian women in the uprising and the transition to democracy mirrors a long legacy of women's human rights gained since the country's independence in 1957 as dr muqaddam was saying so tunisia is known for that women in tunisia in the tunisian parliament make up about 24.7 percent and ran 75 in the latest 2019 election and now make up 47 percent of the local council positions in tunisia following the may 2018 election which is the highest in the arab region after the political developments of 2010 tunisian women were included at all level of the transitional justice so what i'm trying to say they were active before any conflict happened and this activism had continued after the conflict so during the conflict women played an active role in drafting the new constitution tunis there were also quota for women's participation and representation in the technical committees and national consultations of the truth and dignity commission the meaningful engagement of women's civil society organizations in the commission provided support to women by conducting outreach and making the overall process more accessible and sensitive to their needs the increased participation of women helped give voice to the experiences of other women tunisian women are also playing a unique role in addressing violent extremism which is reflected in the national action plan for 1325 what was very helpful also in the case of tunisia is that the national women peace and security plan which was issued in 2018 laid the ground for this the nap was done first in a very participatory manner it is a very good practice what tunis had done they have identified a range of national priorities for actions under the prevention protection participation relief and recovery and and advocacy pillars of the nap the priorities were based on the ongoing sectoral plans and strategies but we believe that despite these challenges that the nap might have which is from our point of view the first thing is the nap does not really have a very solid monitoring and evaluation framework attached to it which is a problem and make it sometimes ink on paper as dr mokad was saying the second is that there is no coasting that was done for the nap so we don't know exactly how much it is going to coast if we want to implement the entire nap however due to the long history of participation of tunisian women there is high expectation that they will be able to implement the nap in a good manner lebanon is another completely different story due to many things which most of you might know due to the politics in lebanon and everything but historically speaking women in lebanon had been absent from the formal conflict resolution and recovery processes the 2008-2012 national dialogue which resulted in the declaration was mainly attended by political leaders and with almost complete absence for women women representation in the cabinet and parliament had always been among the lowest in the arab region and sometimes with only one woman it's very recent when lebanon started appointing more women in the cabinet and in the parliament and had the first arab minister in the arab region as a minister for interior and minister for defense however there is a great possibility that this change is not for the purpose of achieving gender equality it could be for many other things like quotas for example among political parties and other reasons looking at the blast that hit by rude in august 2020 is another example of how women had been systematically excluded from sincere and formal participation so for example the women's the women involvement in the response was mainly through civil society and mainly through un agencies who work together to identify the needs of women during these difficult times i will now come to the nap which was endorsed in 2019 preparing the nap in lebanon we viewed in eskwa as the best nap that was done i'm talking here about the papers i'm not talking about implementation but i'm talking about the process and the end result they had an excellent participatory process which is very difficult in the case of lebanon to reach consensus about something like that and it was endorsed by the prime minister um it had participation it had consultation first to to be done with all stakeholders in lebanon including academia political parties government civil societies and it was done with the support of eskwa un woman un dp un fpa almost all un agencies in lebanon and it also included a particular emphasis for the protection of syrian refugees which is a great thing uh it includes a direct reference to women's participation and leadership in effective early warning systems to prevent conflict and violence and extremism one of the strengths of the lebanon nap which we are trying to advocate for in other countries is that it has a very strong monitoring and evaluation uh framework and it has we have coasted how much the nap is going to be uh to take to implement it completely so the four-year plan which starts from 2019 until 2022 was estimated to take about 15 million dollars and this budget was shared with all donors in lebanon in a several uh meeting so it was very clear to them if you want the nap to be done if you want this specific activity this is how much it's going to uh to cost and then that's how donors started to get engaged and started to fund specific activities to make sure that it is complemented and the nap was done in a way that everything else would go under that so it's the chapeau or the umbrella so a virus against women's strategy which we have also developed with the government goes under the nap so it became as i'm saying like a national uh agenda that everything is going under that to make it uh happen and being implemented we're hoping that despite the very minimal representation of women in lebanon across time that the strong and solid plan will help uh in implementing it and to sum up these are only two factors which i've identified here but there are many but these are like uh things that i wanted to share with you is the overall uh status of the society in general and the situation of women prior to any conflict however there are others that are going to just say very quickly and tap on them one of them is it's very important to to invest in evidence-based research to have a real participation for women in uh conflict and after that uh so for example this kind of research would tell us that when women participate in peace processes the resulting agreement is more durable and better implemented the presence of female signatories among conflict parties positively positively impact the quality and the durability of peace second countries also need to work sincerely on reforming the discriminatory legal framework and these are mainly i would say in the family marriage nationality rights but others like the equal pay like many things and not only the reform in laws but also in implementing them uh and of course everybody knows about the necessity to change the conservative social norms that are hindering that another factor that is very important is developing a national action plan for women peace and security as of December 2020 89 countries across the world have developed women peace and securities uh plan and only seven of them of these 89 are in the Arab region which are Iraq Palestine Jordan Tunisia Lebanon Yemen and Sudan while others are making their plans currently including Algeria Egypt Kuwait Morocco Syria and UAE from our experience to have these plans implemented and not being inked on paper they have to be associated with a solid monitoring and evaluation framework a coasting that is very detailed and it has to be in a participatory manner and fully endorsed by the government and by civil society because they do play a very important role in the implementation and I'll stop here and we'll be happy to answer any questions thank you thank you so much Dr. Marina's um before I move to the fourth speaker there's always this country that comes up in every discussion on gender in the Mina region and that's Tunisia is Tunisia the exceptionalist you know country is it playing that role of exceptionalism here what is it about Tunisia that makes it stand out from the rest of the countries in the Mina region and that relates to a question from the audience about how come Tunisia as a struggling democracy has managed to you know be able to be better and fair better in terms of women's empowerment and this is a question for both Professor Val and Dr. Marina since you work you both work in Tunisia uh you want me to start yes please okay I wouldn't say Tunisia is the exception but it is faring well compared to others but if we're talking about each country I would say in the Arab region has a good example and a good practice in something like we have never thought before that the Gulf countries for example are going to be doing national action plan for women peace and security now they're all doing if you're talking about violence against women most of the countries now in the Arab countries are having uh uh violence against women national strategies and programs for that however I would say that Tunisia usually take a leading role they usually start and then other northern countries north african countries would follow and then others would go and plus Tunisia as I was saying they have a long history in women empowerment I wouldn't say that uh because they're struggling with democracy they're having problems because we see now the US for example is also struggling with democracy okay so there is pros and cons for everything for that and I leave it to Dr. Valentine to comment on that as well thank you thank you um I will just build on what Dr. Mehnaz has just said about the fact that you know democracy has to deliver it has to deliver social rights and economic benefits to its citizens otherwise it's imperiled that is the problem in Tunisia Tunisia came out of the Arab spring um as the one um success story in terms of a democratic transition um however as you know I explain in um a forthcoming book with my friend and colleague um Dr. um Shemi Raimako um that um unlike third wave democratic transitions um Southern Europe Latin America South Korea Philippines etc this fourth wave democratic transition and especially the democratic transition in Tunisia uh after the Arab spring took place in the middle of the great recession which um actually harmed um Tunisia um tremendously and other countries too and then the global pandemic which also has had very serious economic and and financial impacts so its democracy is uh imperiled precisely because it lacks those important investments from within and also from outside which would generate jobs for its many many unemployed um young people in particular but as Dr. Mehnaz also pointed out um Tunisia has many decades of um strong a strong civil society and in particular within that civil society a very strong feminist movement and they and those feminist organizations the older ones and the new ones were able to say touch par mes aquí do not touch my achieved rights um and and and they have now accomplished some um other quite impressive legislative initiatives thank you so much to both of you uh for um elaborating more on Tunisia as a case study um certainly an interesting one we may have more questions from the audience regarding that and maybe some more regarding Lebanon later on now I move on to the fourth speaker uh it's Dr. Kathleen Keynast she is the director of gender policy and strategy at the US Institute of Peace she has focused on the UN Security Council Resolution 1325 and has been part of the international vanguard of introducing the concept of engaging men in conflict countries in the championing of women's rights so more about collaboration and coordination between men and women uh taking a positive spin on how they can work together for gender equality and peace the floor is yours Kathleen thank you so much it is really a pleasure and an honor to join you today and thank you for the opportunity to say a few words about gender policy and addressing the global challenges facing us today I hope to share an practical approach of gender analysis that we have implemented at the US Institute of Peace to broaden our set of understandings about gender and peace building it's an effort to bring the best of the academic research to the field of practice in peace building my work as an academic anthropologist and as a peace builder converged over a decade ago at USIP in Washington where I work on the impact of violent conflict and violent extremism on the lives of men and women boys and girls I'm often asked what exactly is a director of gender policy and strategy and as I tell my children what I do every day is to help make the invisible visible that means bringing the world of women who are mostly invisible into the halls of policy and into the field of practice and to ensure and to ensure that women are counted as key decision makers and peace builders in fact the very role that they actually play each and every day in their societies indeed webinars like this are key to bringing visibility to the many gaps in our understanding of gender and women in men it is difficult to change the narrative about gender because gender is invisible yet an intense organizing force in all our lives we accept it usually without question gender roles are like the air we breathe and sometimes we use the term gender as another name for women but it is important to embrace the social science definition of the word gender which is the expression of how a society organizes its expectations norms and values of men and women and sexual and gender minorities through its social and economic institutions its laws its schools religious institutions and familial processes we know that violent conflict and the condition of violent states push gender relations often to extremes we see it in men who have notions of hypermasculinity and lead to extreme violence including sexual violence both in the home and on the front step of war these stresses in society do disrupt gender norms but we also believe that this disruption can and should open opportunities for restructuring gender relations for gender equality and so when we say that gender is not only a name for women we know that to actually change the gender equation we need to also include men in the stored board of this change and so we challenge the very narrowly defined notions of gender roles for men are men only protectors and providers or can a society support that men can also embrace more expansive roles as caregivers and the notion of peaceful masculinity and so these powerful dynamics that exist within our societies between men and women are something that of course the recent research by promundo un women through their images survey have helped us pay more attention to what it is in violent conflict and its aftermath that we can help better focus our gender equality efforts we see that often men's coping strategies seek to avoid and reduce feelings of vulnerability often resulting in frequently use of increased alcohol substances abuse and resort to domestic violence of course we see this right now where we are looking at what are two pandemics the pandemic of COVID-19 and also the unbelievable increase in gender-based violence we found this early on that in bringing a gender analysis that is inclusive of men we saw it in Ukraine we went to Ukraine in looking at how conflict was affecting women but in fact what we were surprised by was that actually the women were working quite well in collaboration in cooperation they had connections through their children's schools through other civil society but it was the man especially that middle age group who were not on the front fighting that were feeling terrifically isolated depressed as a result of emasculated feelings and a sense of vulnerability and suicidal thoughts it is at this point we realize that one of the best things we could do to help women was to begin to address some of these issues found in the men in their society we think that one of the problems with women peace and security agenda is that it lacks a full spectrum gender analysis and thus it sometimes limits our understanding about the immediate and long-term consequences of international actions that may also result in victimizing those groups who might be potential allies so we have really worked to go beyond policies of just adding women through quotas or other gender balancing means which we fully support we suggest that they are incomplete in terms of our efforts towards gender mainstreaming and peace building we think that having gender mainstreaming include an analysis of the roles of men and the opportunities in which we might engage them at this locus of intensity especially in violent conflict that this may force out further social change in around two years study usip conducted on lessons learned on women's programming both implemented in iraq with my good colleague susan araf and also in afghanistan one of the most recommended and consistent comments for insurance sustainable programs for women during war is to consider the role of men as gatekeepers especially in highly sex segregated societies so how do we engage men in the pursuit of gender equality and so also to make sure they're not kept in a separate silo so one of the ways we have done it in addressing a cultural culture of violence at usip is a peaceful masculinity project with men that we piloted in afghanistan what we saw was for societies in which violence had gone on for decades we understood that adult manhood became fused with violent rights of passage we sometimes refer to a un special rep uh zina bangura who once said it's not enough to take the guns out of the hands of young men at the end of a war but we have to take those guns out of their minds so i want to just share very briefly with you a very quick to use tool that usip has created for our own staff and for anyone who wants to use it it's on our website it's called the gender inclusive framework and theory otherwise the acronym is known as the gift it is also now available in arabic this approach examines how violence affects the norms of masculinity and the consequent normalization of violence by men and boys for solving problems in their society masculinity is the behaviors attitudes and values that societies expect of men and boys and most of the combatants in wars are men and they perpetuate and perpetrate most of the violence in times of peace however at the basis of this peaceful masculinities approach is the assertion that men are not inherently violent and this approach acknowledges that violence and violent conflict have long-term impacts on men and boys and therefore also need to be addressed a peaceful masculinity's approach shifts the narrative from the idea of men as inevitable perpetrators of violence to understanding that masculinities are socially constructed and can be shaped around peace i would add we say that masculinities aren't reserved for men because certainly we as women have inculcated masculinities into everything we do because we live in a very masculine world so it's important to not only associate men and masculinity but as women understand that part of our own world so programs like the young man's initiative in the Balkans who aim to reshape social norms by working with young men through schools summer youth camps vocational training uh to promote nonviolent conceptions of manhood including the respect for individuals of diverse social orientation and gender identity peaceful masculinity questions men's acceptance of violence as a part of their masculinity and seeks to disassociate violence from understandings of manhood or masculinity this approach does not seek to shame men or boys but to illuminate alternative peaceful ideas of what it means to be a man and what that might mean to sustaining a more peaceful society and more importantly he too peacefulist society is gender equality i will stop there as i think my minutes are up but i look forward to entertaining any questions about this very practical approach to gender analysis incorporating women peace and security and peaceful masculinities thank you for your time thank you so much dr kathleen um this is really really interesting and it it made me think how can we reconcile the concept that professor val introduced uh in this panel regarding militarized masculinities with the concept you're working on which is more of peaceful masculinities would you mind just sharing your thoughts on that yes oh i was listening with great uh admiration for uh professor val uh i think it's really a whole of society's shift and i think we're actually talking about the same thing uh peaceful masculinity's uh asserts that you know we need to begin talking about uh especially among youth into adulthood that right of passage are there alternatives to obtaining a sense of manhood without the use of violence without the use of arms as a way of defining security uh how and it you know it goes much deeper into the literature about security and our understandings of that but i'll stop there thanks again dr kathleen and now uh to our final speaker uh miss susanne ariff she is a human rights activist and founder and director of women empowerment organization in iraq since 2012 she has been playing a leading role in developing and implementing the iraqi national action plan for un scr 1325 which was adopted by both governments in iraq and Kurdistan in 2014 the floor is yours susanne could you unmute yourself please just a minute thank you lina good morning and good afternoon to everyone it is indeed a privilege to join you today to speak about the gender dynamics in conflict affected mina countries but first please allow me as we are celebrating the international women's day i would like to wish a very happy woman's day to the strong intelligent and talented woman in the world uh going back to our topic like the gender dynamics in conflict affected countries and as you know all that iraq is for many years armed conflicts including wars and terrorist groups have caused tragic levels of death destruction and disorder in iraq in all conflict the adverse effect for disproportionately on women and girls conflict increases that privilege of gender-based and sexual violence and it is restrict the mobility of women and girls to access essential services and jobs violent extremism ideologies often target women's right and their physical integrity gender-based violence is included in the strategic and ideology of terrorist groups using is a tool for destroying societies and promoting recruitment and financing this can be a simplicity seen in the wars waged by Daesh and how the terrorist groups formed their campaigns against the civilian Daesh committed mass killing of Yazidi men and boys and created slavery markets for women and girls who were sold and bought and then were imposed with sexual slavery moreover the escalation of the covid-19 crisis globally has been mirrored in iraq affecting all aspects of life in the country including the ability of humanitarian actors to respond to the needs of vulnerable people the pandemic has created also condition and factors exposed women and children to more violence in addition to that the pandemic was a combined by an economic rise and recession resulting from the significant decline in oil prices which constitute most of iraq's imports and coincided with protest movement and political unrest waking the government's ability to efficiently respond to the pandemic according to the GBV assessment which was produced by the EU trust fund medet and the women empowerment organization the percentage of women exposed to violence increased as a result of the separate of the epidemic and the measures taken to content it from 35 before the pandemic to nearly 60 percent the displaced women and refugees were more exposed to violence compared to women from the host community and women outside the camps were more exposed to violence of course this is we mean the women IDPs refugees outside the camps both before and during the pandemic like 64 percent of women outside the camps reported their exposure compared to 56 percent of women inside the camp so 64 it is for the outside camp and like 56 for women inside the camps it's shown by the assessment that most of the violence cases are cases of domestic violence committed by the husband or one of the family members the result of the survey indicate that 47 of the violence comes from the husband followed by the brothers 13 especially violence committed against a single woman then father 12 percent some of the displaced women in the in and outside the camps have complaint of harassment stigmatization and discrimination that comes from the host community's residence reflecting their refusal to the presence of the displaced in their areas and that they have become a source of threat to the host communities although Iraq was the first mean a country that adopted the national action plan to implement to implement the UN Security Council resolution 1325 in 2014 but gender-based violence discrimination in law and inequality are still exist as a civil society organization we are committed to work supporting women peace and security agenda in Iraq and the second national action plan we are aiming at empowering women and girls from host community IDPs and refugee by strengthening their participation in peace building decision-making and leadership through developing their capacities and skill in the public sector in and camps since the establishment of the women empowerment organization we work to renders its services as a part from for four main sectors economic empowerment livelihood political participation legal and social advocacy gaining support and lobbying the organization played an important role in prioritizing and advocating for women peace security and leading initiatives to develop the national action plan for UN Security Council resolution 1325 through building partnership with different entities international agencies and organization NGOs and public sector and we have to say like it was the initiative of the women organization that Iraq became the first country in mean a region having their first national action plan certainly we are working on the registration of the alliance of 1325 under the name of woman peace security agenda to become an official entity that is responsible for monitoring and supporting the implementation of 1325 as well as we are building the capacity of the public sector in the Kurdistan regional government on better implement and monitor the implementation of the second national action plan in partnership with USIP in addition to that we are targeting the IDPs and refugees women in camps and vulnerable women of host communities through improved access to resources cover basic needs providing referral services in the context of the COVID-19 but I have also to highlight some challenges that we are facing through our work and for to achieve the women peace security agenda the most important challenges that we are facing is the lack of budget and the lack of political well I think it's connected since there's a lack of political well it means there's lack of budget allocation so this is how that it is the one of the most like important challenges that we are facing and also lack of women machinery and clear mechanism that responsible on women issue within the executive authority the existence of discriminatory laws that affect the achievement of gender equality example the failure to pass the law of combating domestic violence law and this is also it is indicator the political participation of women is still ineffective and the Kota mechanism is utilized in favor of the political parties because if we have a meaningful participation of women we have 25% of women participation in the parliament but they are most of them they are against the domestic violence law so this is it mean that the Kota has been utilized in favor of political parties not for women the lack of effective judiciary prosecution for the preparators of sexual abuse especially the survivor of the conflict from Daesh insufficiency of human rights mechanism to subject the members of state to to account due to the lack of commitments related to the agenda of woman peace security the impact of COVID-19 on the work of civil society organizations specially service provision and advocacy activities decrease in women's number in the labor market according to the World Bank report it's only 15 percentage of women are involved in the labor market to also give some recommendation on this so we believe that woman peace security and the national action plan should be seen as a central to the recovery and rebuilding of Iraq with a localized and inclusive approach to ensure the ownership women leadership and their meaningful participation is essential to reflect women perspective in all spect and authorities level I think this is related to all like women participation women leadership if we can guarantee uh women leadership in all the aspects so we can see the gender mainstreaming and institutionalize of women peace security agenda in all the levels so the the main problem it is that still we don't have the meaningful participation of women consulting woman rights organization in all phases of responding to the pandemic and into the crisis developing and implementing economic policies to support those affected by the pandemic and protect workers in the non-governmental sector from poverty giving the priority to the women who are supporting their families developing a mechanism to allow victims to report violence in emergency and crisis situation launching awareness and education campaigns targeting the grassroots and community leaders aiming to discourage individuals from engaging a harmful practices against women and lead to an actual change in traditional behaviors that discriminate against women establishing national plan to develop mental health services provided that these services are integrated into primary health care centers to ensure women's access to them secure the presence of women the presence of women organization networks and women activists at the local regional and international levels and highlight the role of women peace makers thank you and I'm happy to respond to any question thank you so much Suzanne and we only have 10 minutes left so what I want to do is pose a question from a member of the audience to you and you can take that question and use it as part of the closing remarks that I will invite each panelist to essentially make the question to you Suzanne is Iraqi women status is not isolated from the rest of the Iraqi society how does your organization work on improving the circumstances of the society as a whole including women and I also want to ask you if you can possibly weigh in on how the pandemic is possibly contributing to essentially lack of gains in women and gender equality in the MENA regions as you make your closing remarks and I'm going to start in the order that we started the presentation with Dr. Nahla and final comments so do you want me to respond now or after Dr. Nahla why not why not respond now and then we'll go back to Nahla yes so in regard to your question as I mentioned in my speech that we are working on different levels on the level of the grassroots raising awareness campaigns supporting the leader women leadership in the communities and also providing services but also we are working on the advocacy level and service provision and also working on policy level for advocacy and gender mainstreaming changing all the discriminative laws that we have to achieve the gender equality and of course for pandemic this is affected negatively on women's situation and also affected on the work of women organization and on the development programs so this is how we were able to work on assessment to see the road causes and also what's the recommendation so this is how now we are working at advocating on the recommendation how to involve women in the crisis cells that they establish the committee but there's lack of women participation so how to have women out and how to have women perspective in those decisions so this is what we are trying to do and this is how we are supporting on this thank you so much Susan and now I move on to Dr. Nahla for your closing remarks in one or two minutes yes very interesting everybody thank you so much and I thank you SIP for this opportunity as well a project for the president not existing and also I took notes from everyone of you and really be everybody come went to the other and I see I'm very positive in when the COVID-19 is over I think we will have a new cycle of probably a new dynamics for the gender I think empowerment I'm very positive about it because I realized that all this work with the United Nation and what Dr. Mahinez said about Esq and I like her comments on Lebanon very well I didn't know about this details thank you so much Dr. Mahinez and Dr. Bair also about this all this everybody added a little for my information as well and you know and I think this the future is for gender parity is coming soon most importantly that we have as I said in the beginning that we cannot only just say presentation of women in parliament or whatever we need to have more a global move we need to have gender norms to be changed we can institutions stuff like that only the number of women to increase empowerment not enough as we have seen throughout this because the word very survey I had just read yesterday has a new formation about the gender egalitarianism it's very slow since 25 years till now so that's predicament that's something has to be done it's not enough there you know not enough to have you know this means we need a game changer probably but Dr. Kathleen has said probably is a very nice gender dynamics in you to include men and the he for she is part of the process that start with the United Nations so that's a very promising I would say I will leave it this positive note thank you so much again Thank you Dr. Nahlah and now Professor Val for closing remarks Yes thank you again it's been such a pleasure to be part of this scintillating discussion and conversation look our region is has just wonderful aspects and elements to it the cultural heritage the cuisine the hospitality the music and I'd like our region to be known more for those things than for the fact that it has the highest military spending of you know any other developing region and low female labor force participation and these wide gender gaps and gender inequalities as a first step and of course this is a complex issue and I think each of us has addressed this issue of gender inequalities from different angles and in my case it had to do with military spending and militarism so as a first step let us have less investment in militarism more on social development more on programs and policies for women and girls including refugees including migrant workers more solidarity across the region as well so state priorities should change especially in terms of state budgetary and fiscal priorities and also the international community can help out by stopping the arms flow to the region thank you thank you so much again Dr Val Dr Kathleen thank you so much just in closing again it's been a great honor to share this hour and a half with you all looking at the how we translate academic research into practice I still remain hopeful that gender equality becomes the norm not just outside the home but also inside the home and one way this has to happen is beginning at a very young age in terms of how we understand gender as a mechanism of how society organizes itself it is not written in stone it is malleable and there are opportunities that we need to engage in here thank you thank you again and finally Dr Mary Nats thank you and I want to close by saying that working on one element alone is not sufficient so one piece of the buzzard is not going to solve it it is the collective and comprehensive approach that brings in change Suzanne had mentioned for example that Iraq is the first country in the region that had done a woman peace and security in a national action plan and had also endorsed the second generation yet violence against women had increased in Iraq and this is because they're only working on one piece of the buzzard so it's the collective approach the legal reform going hand in hand with a solid nap with monitoring and evaluation framework with an understanding of the coast of this plan investing in participation and making it survive and not only representation we had very excellent examples during the uprising five women in Egypt being in the constitutionary reform panel like amending the constitution and writing it which never happened before in Yemen in the national dialogue 30% were women but it did not last long so it's the sustainability of these and building on these great examples all together not one at a time thank you thank you you know we are remain hopeful that we are on the right track in terms of achieving gender equality in the Mina region I want to thank again the co-organizers the U.S. Institute of Peace and specifically Dr. Ili Abouan and Molly who was working behind the scenes to make this possible and also I want to thank the American University in the Emirates and specifically Dr. Nahlah Yasin Hamdan for co-organizing this event thank you all it was really an honor to be moderating this panel have a good day


All right. Good afternoon. Thank you for coming. I'm Eugene and I will talk about my project that I have been working on for some time. So, what is the problem? So, we have this interpreters and compilers, right? So, we know these methods and use them frequently. So, interpretation is very, so both of these methods are good in their own ways, right? So, the interpreters, the main strengths is that they are very close to program semantics. So, if we are implementing a program in language, it has some rules that it is for evaluation of the language. They are very cleanly expressed as an interpreter, right? That means that leads to very clean code. So, we can explore the interpreter, we can debug it very easily, we can test it, right? But on the other hand, it has some downsides. So, by its nature, it has to wrap all of the instructions in some glue code, and that leads to the overhead, right? So, how do we do that? We write compilers instead and compilers are awesome. They basically operate in two stages. So, they split execution into the compiler stage and the execution stage, right? So, the compiler stage now takes only the source program, right? And it produces some kind of target code that attains the rest of the arguments to this program, right? And that's all good, but unfortunately, compilers are also harder to develop and maintain because they require a specific style of coding, where we don't talk about the operations, we talk about ways to generate these operations, right? And also, they require use of some complex libraries and programming APIs, right? And no matter how easy a compiler infrastructure makes it to write compilers, it will always be harder than to write an interpreter, right? So, we can't pick and choose different components or different advantages of these approaches. So, we have to either pick an interpreter and we get clean code, but slow execution. Or we can pick a compiler and we stuck with a code that is harder to grasp, right? But what if we could pick and choose? So, what if we could pick direct a translation semantics property and that would lead to code that is easy to explore, to debug, to extend, but also get the multi-stage execution with the corresponding properties for performance? And luckily, this still exists for quite some time since the 70s and it's called partial evaluation. So, what is a partial evaluator? It is a program that takes not the program and some of the arguments to the program. And it produces a representation of another program that takes the rest of the arguments. So, the arguments are split into two groups, right? The first group is passed to the partial evaluator and the second group is passed to the program produced by this partial evaluator. And we already see that if we apply it to our interpreter with the source program as one group and arguments is the other group, what we get is pretty close to multi-stage execution that we used a compiler for, right? And all of the, so here, all of the analysis we're done at this first stage that it takes only the source program and the compiler stage, it doesn't have access to the program and it doesn't have any analysis and transformation passes. And here we can achieve the same result. We can embed all of the analysis and transformations in the first stage and the compiler program will be free of these extra overhead layers, right? So, right, well, first the remark it requires all the arguments to be separated, right? So, if we want to apply this method to any interpreter we need to specify which arguments go to which stage, okay? And here we say that source program is stage zero or static as it's traditionally called and arguments are in stage one or dynamic, right? We have to make some additions to that, some adjustments. So, first of all, we don't really want this mix here so this partial evaluation because the program here, the source program is just another argument to our interpreter. And since the main application of this is for JITs, right? The program will be bound at runtime. We don't know it in advance, right? But here in the above picture we have to partially evaluate the interpreter every time to a reprogram, right? And that is its own level of interaction and its own interpretation overhead. That is exactly what we want to avoid. So, instead we're going to use a specialized generator in the picture below, right? So here we have this generator that produces a two-stage program, right? So, we can run it at compile time and produce our two-stage specializer that then it takes the source program in one stage, the arguments in the second stage and produces the result, right? Yeah, and also why not generalize to multiple stages, right? And for example, we could have a system where that processes some queries to a database, for example, right? And it can have multiple levels of parameters, right? So, in one stage we can have, like, prepare statements. So it is a broad description or a plan of a query or of some kind of query or procedure that we want to interpret. And we can already specialize our interpreter with respect to this prepare statement. And then for each query, the parameters that we get, like from a system of some component, we can emit code pretty fast and the resulting code will be specialized to our query. And so what we want is we want for our generator to emit a multi-stage program, right? Okay, so let's build it, right? For a LLVM, right? So why this is the focus of the project, right? It's kind of complicated here, but this is LLVM, right? So, why LLVM? First of all, there are some existing partial evaluators for some languages like C and ML family languages, but they are all kind of forced to implement the same algorithm, essentially, all right? And what is the better place to implement this algorithm than in a language independent optimizer, right? So let's put it there, right? And that will enable lots of languages. So with little additions to the front ends of these languages, we can take advantage of this common functionality in the optimizer. And what we get is a way to build a multi-stage generator for each of these languages, all right? So the project is an extension to LLVM, right? It has some attributes and intrinsics, and the main part is the two passes. So we have an analysis pass and a transformation pass, right? So first of all, how do we represent annotations? Well, as I said, we have to annotate the program in order to tell the system which arguments go to which stage, right? So we have to, what we want is to split a function into like, in this case, two functions. One will take Y and the other will take X, right? So here we add some attributes to the parameters, right? So we say that X is stage one, it goes there. The result is also a stage one, and we also have the attribute on the function itself. That may seem redundant, but it's not because it is natural to wish for the last stage to not take any arguments at all. So for example, we can have a function at the very last stage that doesn't take any arguments, but instead it accesses some memories and or like it may call some external functions for certain operations, right? For example, it can drive to disk or like store some, it's a memory and we compose a string of letters or something like that. Right, what is the interface here? So the intrinsic takes a function pointer and the arguments, right? And it produces the program. And in clan, right? So there is some extension to clan. So we have this attribute on the function, declaration, and the result of this function attribute will be the body for this function. So we don't have a body in the source code, but a clan will generate as four, will generate one for us using the intrinsic. Right, and how do we use this? Well, we say we have some interpreter in C, right? So we draw some interpreter for language or maybe it's something like an interpreter like maybe we match some grammars. So we have some grammar descriptions and a string, right? So we add the attributes to the arguments to declare which arguments go to which stage, right? And then we add this function declaration with the mix attribute that references the function, right? And then we need to have some layer that translates the representations of programs into object code, right? So we can just work for that. And of course we can, so the function will create IR representation of a specializer in some context. And we can manipulate this context, we can create like in our application either a single context for everything, for everything or multiple context for different situations. So it's very flexible in this case. Yeah, so now we'll talk about implementation for a bit. So here we have, so what happens in clan is that it creates this body using the intrinsic, right? Next, the intrinsic in the optimizer will be replaced expanded into a function call. So this function is actually like the main power horse. So it takes the stage 0 arguments and it returns another function that takes a stage one arguments and so on, right? So this is actually our specializer, right? And at the high level what we want is we want to split a function that takes arguments of various stages into a chain of functions, right? Each function will take arguments of each stage and return the representation of the next function that takes arguments of the next stage and so on, right? So we apply a certain transformation a number of times and all of this, all this transformation does is that it fills off the arguments of the last stage, right? It removes them from the original function and it creates, it replaces the result with the function or representation of the function that takes this field of arguments and returns the old result, right? Let's go down to IR. So yeah, we have a function F here with the arguments X, Y and Z. The arguments that is in the second stage, stage two, right? And after one transformation we get this function G that doesn't have that but instead it returns a value pointer, right? Which is actually a function pointer, right? And this function G creates this new function that takes Z, right? And you may also notice this context argument which is used for accessing the current IR module context and so on. Okay, after the next step we get this function H that takes arguments in one stage. So this is one missing argument here, it's X, right? So it doesn't have Y anymore, it only has X. Okay, on the level of a basic block, so on the left we have an example of some control flow in our source program and if we, on the right is the example basic block of this specializer. So in the example we have three blocks, A, B and C. Block A is in stage zero and two instructions in stage C, in basic block C are also in stage zero, right? And everything else is in stage one, so dynamic. And what we see in the generated code here is that we have one block for A because A is the only static block and we have only two instructions that are copied from the source, from the original function and the rest is replaced with calls to the MC API, right? To recreate this control flow graph. So we have these calls and basic block here that create, these calls create blocks B and C and we have some instructions like build binary operations here that creates the add, yeah, the add in block B. All right, and in general, all static basic blocks are transformed into basic blocks in this specializer. All instructions that static or offstage less than the current stage are replaced, are copied as is essentially and everything else is replaced with calls to LVMC API, right, to recreate this in the next stage. Yeah, so with calls, so we would like to support not only one function but a set of functions because the interpreters are written as a set of functions typically, no, yeah. And what we want is we want to to stage all these functions at once. So first of all, we gather the set of functions that form the interpreter, then we apply this transformation once so we lower all the functions at once and while doing that, we replace the calls with pairs of calls. So the first call will go to the function that is a specializer for this stage. So here we have a call to f.mix here but this is a generated function that specializes this function f, right? And it returns a function for the next stages, right? So it only takes x here and it returns a function that takes y. And so we build calls in the next stage that call this returned function on the previous stage, right? Yeah, so we have the pair of calls. This is the normal call and we have a long build call here to recreate this call later. So what happens to the control flow graph? Yeah, so we have some control flow graph at the beginning. It is truncated, but you can see the idea. So we have some basic blocks. So green blocks are of stage zero here, red blocks of stage one and white of stage two. And what happens after one transformation we eliminate all white blocks, we fold them into the block A, A1 here or like C1 here, right? So on the next stage we fold all the red blocks that are left into block A0, right? So block A0 will create these blocks. Actually what happens is that it won't recreate this graph exactly, it will unfold it, right? It will create the control flow graph from the basic blocks of the corresponding blocks here, unfolded blocks, right? So here we have not the loop, but the unfolded loop with two iterations. And on the next stage we get a similar kind of graph, right? So now we talk about buying time analysis. So we assumed, so the previous section talked about how we separate one function into a chain of functions, right? Now I'm going to talk about how do we know which instructions go into which stage, right? So how do we actually know which instruction built where or when, right? And so for basic blocks, right? So this analysis it provides just that information so it assigns an unsigned like stage number to every instruction into basic blocks, right? And the way it works is that first of all, it assigns stages to parameters, like if parameter is declared with a stage attribute like all parameters are, right? For this to work, it assigns that number, right? Or if we have an external code that we know nothing about, we can assign it to the last stage, right? And then it runs this minimum fixed point algorithm to propagate the stages to all of the other values in the function, right? And it can reach a contradiction, so it can learn that the annotations are inconsistent and it will report an error. Or it can find an ambiguity in trying to resolve this errors and it will report them, yeah? So here's the example with optimized. So which instruction gets a stage and blocks also get a stage, yeah? And yeah, these are the rules that it tries to satisfy. I won't talk about all of them. But for example, the rule on the right most rule at the top says that the stage of an instruction should be the same or greater than the stage of the argument, which makes sense because the instruction that depends on the current must be executed at least then or later, right? But I want to stop it in one rule in particular, right? So this rule states that if we start from some stage number, right? And from any basic block. And we trace the branches from this block, yeah. So we should have exactly one atteminator that we can reach through atteminators of greater stages. So of all, a dynamic stages, right? Yeah, so here on the left we have an example. We have basic block A, right? And there is only one atteminator that is reachable from block A on atteminators of stage one, right? So if we traverse the graph starting from block A and go in on all edges with a stage one or greater, then we reach exactly one atteminator. It's in block C. And this atteminator goes right here. So it is atteminator of the specializer, right? If we had two, we couldn't build this specializer this way. Yeah, and we can prove termination. So if the resource program terminates, then the specializer also terminates. And this is, it's very easy to remove some of the rules and to get to the situation where we have a specializer that doesn't terminate, but the source program did, right? And that would be a problem. Okay, so the approach so far works great until it doesn't work. And this is because it really, it is really strict about mixing static and dynamic computation, right? So here we have an example. So we have a function eval that takes some pointer to a node, right? And you can think of it as an ast node. So we know everything about this node at compile time. But here we get an error because the loop in this function f goes through all the nodes until the node returns a nonzero value. And since this condition is dynamic, the branch is also dynamic and the few functions in this loop header are also dynamic, right? This falls from the rules of binding times, right? And it means that we have a contradiction here because the parameter to eval is of stage zero as declared, but the argument is of stage one, right? So how do we deal with that? Well, we added, we had it built in. So the problem was that this call, this call, it combined both the static and dynamic parts, right? So we evalated both calls at once in one block and controlled by the same condition, right? But we can separate it into two parts, right? So we can have one loop that is very static, right? That goes through all the nodes and stores, yeah. And it only performs the call to the specializer and it returns the function pointer to the next stage, okay? So we can store this function pointers in a very, very decoray in C and in the next loop, we can call these pointers instead of the eval function. And this way on this line, we can specialize eval to every node, right? And here we just call these function pointers, right? So one caveat, this doesn't work with the normal code gen because it requires a gen, right? So this means that previously we could maintain the same code base for our interpreter and for the specializer. But now we, in some cases, we have to diverge, we have to introduce another function or two just for a specializer to deal with some issues, right? This is the residual code, right? So the first loop is completely unrolled and the second is a normal loop. So now I'm talking about some examples. So this is the best case sort of. So we have some expression tree of operations and we specialize it to some particular expression, right? And on the left, we have a recursive function with the switch, right? And on the right, we have a single basic block. Yeah, so, and the similar example with conversions. So we have our four nested loops and we can replace the two innermost loops with one basic block that just applies that is very specialized to our kernel. Okay, so it only has like nine operations. Okay, string formatting, similar. Yeah, so in these cases, we have some improvement. So here, like in three or four times or even like bigger, yeah. Now I'm going to show some of the... Yeah, the example with the dynamic control problem. So here we have a bytecode interpreter and it has some instructions that operate on some register machine. So we have some registers, we have some operations to load a value into a register to add them and so on. And all is good until we have this jump instruction. Jump on a condition, right? And it exemplifies this dynamic control because now this block approaches either to the end of the loop header or to this block with this operation. And this jumps back to the header. So from this operation, we kind of have two static determinators that jump to the loop header. And we can have two because we have to pick one to move it to the specializer, right? So what happens is that nothing here gets in the counterflow optimized, right? And we get, yeah. And we get on the modest improvement, right? But let's go back. So how can we deal with that? Let's apply our built-in. Let's first display it into two functions. The first function just returns the offset to the next instruction, right? And we have our dynamically controlled loop here. Okay, so let's apply our trick with the built-in. Right, so we have now the array of function pointers and we call this built-in, right? And now on this line, this loop is completely unrolled and we store, we specialize this event instruction with respect to every instruction in our sequence of instructions, right? And then we call our function pointers in a loop, right? So this is an improvement over the interpreter, right? But it's nothing of an improvement over the original interpreter. It is slower, right? So let's go back again, right? So here is our test program, the Fibonacci program that takes, yeah, so. And the first four instructions are shown on the right. So this is the specialized code to each of these four instructions. And we may know that each of these instructions, aside from the last one, jumps to the next, right? And this is very inefficient because each of these instructions or functions are very like small, right? But we have lots of function calls, a function calls between them that are indirect, right? So let's go back. We can change our function in C. We are staying in the interpreter length, right? So everything here, it can be run as an interpreter aside from the drive function, right?  Yeah, and we got an improvement over the original, right? So we got 36 seconds in our optimized version and 87 from before. All right, this is a toy example, but it shows some of the features and some of the features of our interpreters that we have to deal with and how can we deal with them in this way? Okay, so these are all toy examples. I want to apply this to some kind of real program, right? Some size, right? And there's also one thing that with annotations because we have to annotate every function that we, with our interpreter calls and that we want to specialize, right? Instead, what if we have some inference inter-procedural that we can apply to propagate these annotations across functions? Okay, and yeah, we have only one front-end for C. Like, it's very easy to write because it doesn't have to do anything. Just have to translate these attributes down to IR, right? But I only have one front-end to show and yeah, that must be it, yeah. Okay, we have any questions, okay? Other, any bounds on the increase in code size? That's a special answer, right? In code size, yes, there is an increase. In code size, I didn't measure it, but yeah, there is an increase. That's more, is there anything limiting the increase? So the question is, is there something limiting the increase in code size? No. Currently, there is nothing like that. So the code size can explode significantly. Yeah, this is a problem, but actually. Any other question? Okay.  So theoretically, I could use LLVM-NICS to specialize the interpreter and wind up with like a much more specialized block of like for the E-Val routine.  Or even like a Game Boy emulator or other kind of emulators. I think so, yes. Like, are we happy to help if there is anything and any problem with that? I should know that this is all like a prototype so it doesn't work like on all optimization levels and so it doesn't kind of like a debug info and stuff, but yeah, this is just a proof of concept of such a tool. Okay, any other question? Okay. You did say you plan to next look at real-world examples. Yeah. Do you think is a real-world example that requires the least amount of work to go from where you are now to improve a real-world example? And what do you think the hardest real-world examples might be? Okay, the question is what are the potential real-world examples that they can start from? And well, previously I have been working for a query compilation in databases, right? So this is kind of inspired by the domain. So I think I will start from some kind of small database engine or some query engine and try to specialize that, right? Because they have this program that is a SQL query and they have an interpreter that interprets this program. So it's kind of a fit for this approach. So for example, I think Postgres now has some Palo Alto generator bolt and does it make that better or? Ah, well. I think it would be an alternative. I wrote that. Oh, okay. I think it would be an alternative because we manually generate the IR and do the specialization by hand basically. Right. But there isn't an interpreter that you could enroll with the input program in theory, yeah? Yeah, so there is an engine compiler in the latest Postgres version, yeah, for expressions and for queries, even, like some parts. And of course, this only works with compilers. I'm sorry, with interpreters. So we can take the earlier interpreter that there was in Postgres, or there may be still is, right? And we can work with that. And actually, like one of the early versions of this tool was specifically built for the Postgres, yeah. But it was built differently. It wasn't like, it was a different tool, right? Any other question? Right. Termination, what are the directs that somebody programmed for your specializing to terminate? It will terminate, so the question is, what are the some prerequisites or conditions on the program that are needed for termination? And the answer is, if it passes the binding time analysis without errors, right? So then it will terminate, right? Because the analysis enforces a set of rules, right? And the termination is a condition on these rules, right? So as long as these rules hold true, then the specializer will terminate, right? But it is very possible to try it on patients in such a way that they are inconsistent, right? So we can pass a dynamic argument to a function that takes an argument in an earlier stage, right? So it is possible to write this code, but it won't pass the checks in the analysis, right? And as soon as it passes, like, it will terminate then after that. Okay, any other question? Previous attempts? Yeah, there is, so the question is, if this relates to previous attempts for partial evaluation in LVM, like LPE. Yes, there is LPE, which is built a little bit differently, like very differently. It works without the analysis part. So we cannot, the difference as I can describe it is that the LPE, it works in a single stage. It is an online partial evaluator, right? So we don't have the intermediate annotated representation to explore what parts will be executed in which stage, right? And the second part is that LPE doesn't have memory annotations, and it is hard for them to add them because it kind of requires this compiler integration, right? And what this project has is you can annotate some types or some fields in some structs or some variables in such a way that we can partially evaluate laws and stores to these variables, right? And in general, LPE is more focused for input and output partial evaluations of some files or some like input that the program can take and be specialized to. And this is kind of more, it has a different focus. It is a focus more on interpreters that are not a standalone programs but are parts of some other program, yeah. Yeah, okay. Have you done any analysis, how much performance you gained by doing the specialization in multiple passes rather than one combined pass? Well, so the question is what are specialization benefits of having multiple stages, right? And it all depends on application, right? So if we take this, for example, for example, with query a compiler, right? If we take multiple parameters for one query, then it is profitable to specialize it multiple times, right? And each time we do it, we either pay this additional overhead if we don't have the previous stage in between. So can maybe jump to the slide, right? So it only makes sense to add, for example, stage P1 here. If the code that is returned from the stage will be executed more than once. If it is executed a thousand times, then it is obviously more profitable to add this stage here. And likewise, for stage P0, it is only profitable to add this stage if this stage will be executed many times, right? So with query processing, we can have one query that is a parameterized multiple times in some session or some execution session. And then each query will then take multiple parameters from the database. And so it has this kind of structure, right? It all depends on application. In some applications, it doesn't make sense to split these stages because they are not split in real life, like you have one block of arguments that you pass at one point in time, yeah. Time is up, but there are small questions for the speaker. I'm sure you can find them afterwards. Okay. Thank you very much.


Running not only invites me to listen to my body, but it often demands that I do so. Every bit of agony and ecstasy, every sore and stretched muscle, every breath and gasp and feeling of, can I keep going only to discover that yes, in fact, I can. And whether you run or not, the invitation is the same. Listen to your body. There is more to you than the mind that is processing these words. You are all of you, not just a disembodied collection of neurons and synapses. Release your flesh, live into your bones, and listen to your body.