text:
Dartmouth Political Times
Dartmouth's Non-Partisan Political Publication
Kim's North Korea: Illusions of Chaos in a Realist Regime
Asher Nyhoff October 1, 2020 October 1, 2020 Analysis, Uncategorized
The disappearance of Kim Jong-Un in April 2020 prompted frenzied, sensationalized speculation as to the whereabouts and condition of the North Korean dictator. After failing to appear for "The Day of the Sun" — North Korea's most important holiday honoring the birth of Kim Il-Sung and marking the beginning of the North Korean calendar year — a myriad of rumors spread across social media. Perhaps years of overindulgence in alcohol, cheese, and cigarettes had caught up with the 36-year-old despot, leaving him in cardiovascular distress. Even without any "reported" cases in the hermit kingdom, perhaps Kim was diligently social distancing due to coronavirus. Perhaps internal dissent had boiled over after years of brutal repression and Kim finally found himself on the wrong side of a coup. International media quickly jumped on the idea of Kim's sister, Yo-Jong, the head of the North Korean propaganda bureau, inheriting power from her sickly brother. Despite the media hype, the "Supreme Leader" appeared in public on May 2, 2020 in celebration of the opening of a fertilizer factory. In this latest quandary in North Korea, a familiar characteristic reared its head: the illusion of chaos veiling a highly strategic regime with legitimate, albeit dangerous, political goals.
North Korea's greatest political leverage lies in its nuclear weapons program. I argue that the timeline of development of North Korea's nuclear program reflects the Kim family's intentionally chaotic foreign policy. North Korea's habitual defiance of international nuclear legislation paired with an inclination to engage in diplomatic negotiations suggests a deliberately indecisive foreign policy that results in equally fluctuant policy from the U.S. Without a consistent policy from the U.S. that sufficiently deters long-term development, North Korea under the Kim dynasty has been able to advance their nuclear program, bringing the world dangerously close to the possibility of nuclear conflict.
"Kim statues, Pyongyang" by Tormod Sandtorv is licensed under CC BY-SA 2.0
In 1985, North Korea ratified the Non-Proliferation Treaty (NPT), the baseline agreement towards halting the spread of nuclear weapons, and in 1992, both Koreas agreed to ban nuclear weapons testing and development as well as uranium enrichment. However, in 2002 and 2003, the regime admitted to running a covert nuclear weapons program despite the NPT, bilateral agreements, and International Atomic Energy Agency (IAEA) monitoring. Between 2003 and 2005, North Korea participated in the Six Party talks (between China, Japan, North Korea, Russia, South Korea and the U.S.) and committed to forgoing nuclear weapons, only to begin nuclear tests in October of 2006. The next ten years can be boiled down to empty denuclearization commitments from North Korea in exchange for periodically eased sanctions, food aid and the release of frozen assets, only for North Korea to, again, test its ballistic missiles and nuclear weapons.
Many wonder, and rightly so, is there a logic to North Korea's ever fluctuating and maddening flip-flopping? Looking past the apparent absurdity of repeatedly flouted treaties and threats of "military action," it appears as though North Korea under the Kim dynasty closely adheres to the international relations theory of "realism." International relations scholars offer contending paradigms to explain the behavior of states in terms of war, military development, diplomacy and trade agreements. Realism is one of these core models.
Realism draws upon a profound historical tradition from Thucydides in Ancient Greece to Niccolò Machiavelli in Renaissance Italy to Thomas Hobbes in 17th CE England. Hobbes cemented the basis of the realist perspective on human nature in his seminal 1651 work, Leviathan, writing that "the life of man [is] solitary, poor, nasty, brutish, and short." From the premise that men are inherently self-interested, paranoid and prone to violence, it follows that the political states that men govern will also exemplify the same tendencies. At the core of a realist view is that in this cruel "Hobbesian" world, characterized by the absence of objective morality and inevitable conflict, states will pursue power above all else. Power is the only guarantee of survival in this paradigm. The result is an international system of individual states vying for dominance without any higher authority that can force states to abide by regulations and laws. To realists, the prescriptions of the United Nations (U.N.) and frameworks of international law are fundamentally voluntary and easily ignored given that save for the Security Council, most U.N. resolutions are non-binding.
"Thomas Hobbes" by Stifts- och landsbiblioteket i Skara is licensed under CC BY 2.0
Realists claim that as a result of the anarchy and lack of certainty found in international relations, the only behavioural constant for states is to strive for individual power and survival. The bottom line is that the only goal of a successful realist leader is ensuring that their state has longevity and power is the best way to ensure this longevity. To realists, power is the means of survival. Case in point, the plethora of treaties that North Korea has consciously violated in favour of nuclear testing and development is congruent with the pursuit of power in a realist context. North Korea objectively gains power by maintaining a nuclear weapons arsenal.
Power can take many forms: increased military presence, hegemonic clout and economic prowess all qualify. Realist states pursue individual strategic goals in the pursuit of power so as to achieve a sense of security in being more powerful than their rivals. Recognizing the primacy of power and survival to a realist regime adds clarity to our understanding of North Korea. Following the armistice of the Korean war in 1953, North Korea has aggressively pursued nuclear weapons as a way to guarantee its survival. A nuclear war involving North Korea, the U.S., China and respective allies is unthinkable, whereas a ground invasion into a denuclearized North Korea seems more conceivable. Nuclear weapon capability is therefore the only mechanism Kim has to maintain any semblance of longevity for North Korea. The result of nuclear proliferation is a quasi-stable equilibrium known as mutually assured destruction: if two nuclear states go to war the result would be global annihilation, ergo military conflict is mutually avoided by the West and North Korea.
Kim's regime understandably does not trust the U.S., Japan and South Korea not to invade them should denuclearization occur. With survival in jeopardy, North Korea perceives any small concessions like eased sanctions or continued trade with China while keeping their nuclear arsenal as a maintenance of power. No matter Washington's promises of aid, trade and a seat at the table, to denuclearize creates a power imbalance that puts North Korea at incredible risk —risk that realist leaders are hard-wired to reject.
In a nuclear realist system, no matter how egregious North Korea's human rights abuses or how inflammatory Kim's rhetoric, war is functionally impossible. The West would rather tolerate a bellicose, hot and cold North Korean regime than a nuclear war. And so, with regard to its place in the international sphere, North Korea continually disproves the efficacy of international treaties, diplomatic negotiations, sanctions, and the United Nations. North Korea speaks the language of realism: military power.
In 2017, Trump tweeted that "Being nice to Rocket Man hasn't worked in 25 years, why would it work now?" only to participate in a 2018 summit with Kim in Singapore that prompted a friendly slant in Trump's rhetoric towards the despot. Following the Singapore summit, Trump tweeted that "There is no longer a Nuclear Threat from North Korea," calling his meeting with Kim "an interesting and very positive experience." Case in point, even Trump, the President of the United States, has shown a poignantly inconsistent attitude towards North Korea, compounding an already muddy foreign policy towards the state, all to North Korea's advantage.
"President Trump's Trip to Vietnam" by The White House is marked with CC PDM 1.0
North Korea is easy to condemn as rogue or unpredictable, and it is tempting to ignore recent brinkmanship towards South Korea, where North Korea has threatened war with the South. But it is important to look beyond the smoke and mirrors at the state's rational, realist calculus of engaging in talks with the West only to double down on military action shortly afterwards. The Trump-Kim summits of 2018 and 2019 were hailed as opportunities for denuclearization and a new era of U.S.-North Korea relations, but ended without any substantive change. Kim appears to be working towards mending North Korea's international reputation while holding his prized nuclear weapons close to his chest, for without nuclear weapons, the chance of a conventional war with a U.S. and South Korean military coalition is all the more likely. This outcome is out of the question from the standpoint of North Korea.
What does realism have to do with Kim Jong-Un's spring hiatus? The same as what it means in relation to his 41-day unexplained disappearance in 2014 and Kim Jong Il's unexplained absence for 80 days in 2008. In all likelihood, Kim's whereabouts was trivial — perhaps he was simply avoiding large crowds as Covid-19 spread. But the crucial takeaway is that North Korean media offering no rationale for Kim's condition for the three weeks before his appearance at the fertilizer factory opening drives home the notion that to a realist state, domestic politics and foreign speculation do not factor into its strategic calculus. It is futile to try to interpret his disappearance the same way one might try to analyze the actions of President Trump or other political leaders. In other words, international politics is a domain of objectivity for North Korea: weapons, economic leverage and territory are the only stakeholders. Kim's disappearance from the spotlight is akin to his hot and cold nuclear policy. Simply put, each political decision comes down to weighing the impacts on North Korea's power.
While the disappearance of the head of government or the development of nuclear weapons despite international sanctions may appear a confusing decision, the subjective interpretation of North Korea's perceived power is irrelevant to Kim. The notion of the highest ranking political leader in the U.S. or the U.K. vanishing from the public eye is absurd, but to a realist state, speculation does not drive foreign policy decisions. The North reckons that if it maintains tangible metrics of power — namely nuclear weapons, an aggressive military presence, and a rejection of Western institutions like the U.N. — that's all that matters for increasing the odds of long-term survival. The realist Kim dynasty has wagered that if war comes between the hermit kingdom and the West, it will be on the basis of relative power differences, not media speculation. Kim Jong-Un is not irrational and North Korea is not unstable, the "supreme leader" just does not factor in the presentation of a clear and consistent foreign policy as a means to ensure power and survival.
Image released by Korean Central News Agency (KCNA) of Kim Jong Un attending the opening of a fertilizer plant on May 2, 2020. KCNA/via REUTERS
Going forward, a recognition, but not acceptance, of North Korea's legitimate strategic aims — possessing nuclear weapons, ameliorating troubled economic conditions and keeping a seat at the great power table — would benefit American policy. Is North Korea a dangerous state? Certainly. Is it an irrational one? Certainly not. A comprehensive understanding of the logic of a realist state would lend itself to an American response that develops policy beyond international treaties, lifting and placing sanctions, and hoping that North Korea will have a sudden change of heart. As for what's next? That's the million dollar question. The reality is that as long as the U.S., Russia, China, France, the U.K., India, Pakistan and Israel have nuclear weapons, we should not expect Kim to dismantle his nuclear program in good faith. North Korea perceives itself as backed into a corner by Western powers and considering the primacy of survival and power to the regime, a Western approach that is consistent, firm and cognizant of realism ought to be implemented.
diplomacy, featured, international relations, Kim Jong Un, North Korea, nuclear weapons, Realism, Trump
Previous Transnistria: the country that doesn't exist and what it can teach us about Russian foreign policy
Next Pay College Football and Men's Basketball Players at Power 5 Schools


text:
Q: AWS API Gateway - returns 403 Forbidden on Express Proxy Middleware I have an express server. I am trying to forward all requests to path /grqphql to an AWS gateway endpoint.
To achieve this I am using express-http-proxy
const proxy = require('express-http-proxy');

const app = express();
app.use('/graphql', proxy('https://xxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/graphql'));

The /grapql endpoint is called via a apollo-graphql-client on a react frontend. The POST grapql reqests returns a Forbidden error.
Few things to note.

*

*The lambda function is private (in a vpc)

*The api gateway is protected with a custom authorization function (checks Authorization header). But I am passing this header, this is not the problem.

*I have deployed api gateway in a 'dev' stage.

This is coming from AWS Gateway. The response has the header x-amzn-errortype: ForbiddenException. I have reffered to the documentation regarding 403 errors.  I suspect the issue is "Invoking a private API using public DNS names incorrectly" - in the linked documentaion.
Would appreciate some pointers on finding a workaround to this.
Edit:
Probably an issue with express-proxy middleware. As a woraround I've manually routed with axios. The following meets my requirments as this is a graphql endpoint.
router.post('/', (req, res) => {
const headers = {
    'Content-Type': 'application/json',
    'Authorization': req.get('Authorization')
}
axios({
    method: 'post',
    url: apiUrl,
    headers: headers,
    data: req.body
}).then((axiosResponse) => {
    res.status(axiosResponse.status).send(axiosResponse.data);
}).catch((error) => {
    res.status(error.response.status).send(error.response.data);
});

redpajama_set_name: RedPajamaStackExchange


text:
Focus on neglected sports is long overdue in Leh
By Rinchen Angmo Chumikchan LEH, Jun 14, 2017
Ladakh has produced a lot of sportspersons in various areas like ice hockey, archery, wushu and taekwondo. There is an enormous talent available in Ladakh. The recent medals won by our players in ice hockey, wushu and taekwondo are examples that prove that we are not lagging behind anyone in sports.
These exciting developments have kept the public hopeful that the region's sportspersons are capable of achieving excellence. But hopes alone are not enough to improve Ladakh's competitiveness in sports. It is all about providing them proper training and guidance.
Many of the region's most promising sportspersons are in a deplorable situation as they lack sponsors to provide them with the necessary financial assistance to continue training and to excel. We are lagging behind in providing even the basic facilities like the ground, leave alone other facilities like providing coach, equipment and nutrition etc.
Perhaps, the administration has miserably failed in providing support to our sportspersons. Such failures have resulted in a dilemma among the players and they pose the question: Are there any scope in the field of sports? And, they wonder whether to pursue it as a career or not.
However, big projects like the 18-hole golf course over an area of 190 acres at Shey, worth Rs 12 crore, which was expected to be completed by October 2013, is still incomplete. Another big, delayed and incomplete project is the ice hockey rink. And the story doesn't end here; without completing the previous two projects, another big project of the multipurpose indoor stadium near Spituk has been started. Perhaps, one of the most important things to consider is, instead of taking up so many projects at a time, we must focus on one and prioritise its completion. And, whichever govt. has initiated a project, the next govt. should continue to complete the project as soon as possible, burying their political differences. Ultimately, it's for the benefit of the people of Ladakh.
The challenges we talk about are serious and real - from missing facilities, undertrained players to lack of funds. Whatever the challenges, we have to look at the brighter side and encourage those who brought laurels to Ladakh at national and international levels, representing India.
And, lastly, government officials should look into ways to accelerate a flourishing sports industry. What's the government waiting for? We can't afford to ignore our sportspersons anymore.

redpajama_set_name: RedPajamaCommonCrawl


Cary, M., Denniston, J. D., Duff, J. W., Nock, A. D., Ross, D., & Scullard, H. H. (Eds.). (1949). The Oxford classical dictionary . London: Oxford Unity Press.
Cornell, T. & Matthews, J. (1982). Atlas of the Roman world. New York: Facts on File.
Lewis, N. & Reinhold, M. (Eds.). (1990). Roman civilization: The empire. (3rd ed.) Vol.
2. New York: Columbia University Press.
Scarre, C. (1995) The Penguin historical atlas of ancient Rome. New York: Penguin Group.
Sinnigen, W. G. & Boak, A. E. R. (1977). History of Rome to AD 565. (6th ed.) New York: Macmillan Publishing.


text:
No more Cuban rafters, Coast Guard says
BY NORA GÁMEZ TORRES
ngameztorres@elnuevoherald.com
For decades, dramatic images of Cubans trying to reach the United States
on decrepit boats made of all kinds of materials shocked many within the
South Florida community. On the island, families waited desperately for
news on whether loved ones had made it to shore.
No more.
In April, the Coast Guard did not intercept a single vessel ferrying
Cuban migrants — the first time in seven years this has occurred.
"April was the first month in seven years where we didn't have one Cuban
migrant, not one," Admiral Paul F. Zukunft, Commandant of the U.S. Coast
Guard told The Wall Street Journal. "On a typical day at this time last
year, we would probably pick up anywhere from 50 to 150 Cuban migrants."
The remarkable change is due to a drastic measure taken during the last
days of the Obama administration in negotiation with the Cuban
government: the elimination of an immigration policy for Cubans known as
"wet foot, dry foot."
The policy, implemented by President Bill Clinton in 1995 following a
massive exodus by sea known as the "balsero crisis" allowed most Cubans
to stay in the U.S. if they touched land.
Since then, thousands of islanders fled by sea to try their luck, a
number that increased after former President Barack Obama and Cuban
leader Raúl Castro announced the restoration of diplomatic relations in
Dec. 2014.
In 2016, as many anticipated a change in U.S. immigration policy, 5,396
Cubans were intercepted by the Coast Guard and more than 56,000 Cubans
arrived in U.S. territory through different routes — mainly across the
border with Mexico.
"Many times we encountered boat loads with migrants: it's their fourth,
fifth, sixth attempt, we would apprehend them and we would send them
back," Zukunft said, referring to Cuban migrants intercepted at sea
before the end of the wet foot, dry foot policy. "They figured maybe one
of these days they'd win the lottery and they'd go 'feet-dry.'"
All of that changed on Jan. 12, when Obama announced the end of that policy.
"Clearly it was the repeal of the wet foot, dry foot policy with Cuba,"
that brought an end to interdictions at sea, Zukunft said.
"With that policy being removed," he said, even if migrants land on a
remote U.S. island, "you're going on a boat and you're going back to Cuba."
The trend is similar on the border with Mexico. In April, only 191
Cubans arrived at the border and were considered "inadmissible" by the
Customs and Border Protection (CBP) office. In February and March the
number was even lower, 86.
Follow Nora Gámez Torres en Twitter: @ngameztorres
Source: U.S. Coast Guard says Cubans are no longer fleeing the island by
sea | Miami Herald -
http://www.miamiherald.com/news/nation-world/world/americas/cuba/article150184537.html


text:
The Healing Power of Music With Dr. Sandi Curtis 0
If there was ever a year that needed a soothing soundtrack, it would be the year that we're in now. Music has powerful healing properties, and nobody knows that better than this week's guest. Dr. Sandi Curtis is an internationally trained music therapist who specializes in working with women and children survivors of violence. She helps survivors navigate their way through recovery with help from music, and this week she's here to talk about how all of us can use music to help us through this challenging year.
Why music is such a powerful healing tool.
What brain entrainment is and why it's good for your mental health.
How the music you listen to can change your state.
The Power of Kindness With Adrienne Bankert 0
As an Emmy-winning reporter for ABC News, Adrienne Bankert has covered some of life's most tragic moments, but it has never made her lose sight of her desire to find the best in people. Her experience interviewing inspiring people, from wounded warriors to high-profile celebrities, helped her want to understand more about one of her life's guiding principles: kindness. This week, she talks about her new book, Your Hidden Superpower: The Kindness That Makes You Unbeatable at Work and Connects You with Anyone, and explains why practicing kindness is so good for us.
How kindness makes anyone unbeatable.
The difference between being nice and being kind.
Simple things you can do every day to practice kindness.
Look for the Good With Jason Mraz 0
Since the release of his first hit single, The Remedy (I Won't Worry), in 2002, Jason Mraz has based his musical career on sharing positive, uplifting music. On June 19, the two-time Grammy winner is releasing Look for the Good, an album that encourages us to find hope, optimism and gratitude despite the turmoil we're experiencing this year. In this episode, Jason explains how this collection of songs came about, what he learned in the process of writing and recording this album and what he hopes every one of us takes away from it.
Why he believes it's so important to look for the good in every situation.
How music can help soothe and heal us.
The power of remaining positive.
Managing Grief and Anxiety in Difficult Times With Aneesh Chaudhry 0
At any given time, everyone is going through something in their lives. But rarely do we have a situation where so many people are collectively going through such trying times. The good news is, we're going to get through this, and we can use this time to build new habits and be stronger than before.
This week, we talk with Aneesh Chaudhry, founder of the brain health clinic SoulPhysio Lifestyle, where he works with a team of doctors, psychologists and other healthcare professionals to take a whole body approach to mental and physical wellness. He's here to talk about how to manage our energy and deal with such negative emotions as grief, loss and anxiety.
The importance of learning and practicing acceptance.
What energy management is and why it matters.
How to work through negative feelings during difficult times.
Using a Game to Improve Resilience in Teens With Rosemary Lokhorst 0
Imagine living in a world that has been plagued by great tragedy. The world as you knew it is gone, all the stores are closed, and you can't see your friends. Sound familiar? Interestingly enough, we're not talking about real life right now; we're talking about Shadow's Edge, a mobile game and lifestyle platform that was created to help teens and young adults build resilience.
This week, we're talking with Rosemary Lokhorst, one of the creative minds behind this innovative platform. Let's listen as she explains how this game has helped teens and young adults deal with chronic illness, anxiety and now, a pandemic.
What narrative therapy is and why it's so effective.
How we can all stay a little more connected and mentally strong through these tough times.
How families can use Shadow's Edge together.


text:
"General references to Muslims"
Concerning A.W.R.A.P. (represented by counsel, the Documentation and Advisory Centre on Racial Discrimination) vs Denmark for violation of articles 2, 4 and 6 of CERD.
In 1997, the Danish Parliament adopted a bill abolishing the right of parents to corporally punish their children. The Danish Peoples Party voted against the bill. In 2005, the Government introduced a bill amending the Danish Integration Act by introducing the requirement for immigrants to sign "declarations of integration". Thus the immigrants would have to sign a declaration stating that they will respect the fundamental values of Danish society, including observance of the rules of the Danish Criminal Code such as the prohibition of corporal punishment of their children. The Danish Peoples Party supported the amendment bill.
A politician of the Socialist Peoples' Party thus asked members of the Danish People's Party how it could support a bill demanding that all aliens sign a declaration saying, inter alia, that "corporal punishment of my children is prohibited" when the same party opposed the ban on corporal punishment of children. Mr. Søren Krarup, member of the National Parliament for the Danish Peoples Party responded with discriminatory statements such as- "The problem is that the country unfortunately has been flooded with Muslim so-called culture, and according to Islam it is the right of the male to beat his children and wife yellow and blue. That form of violence which they are practising is of sadistic and brutal character….".
DACoRD thus filed a complaint on behalf of the petitioner against Mr. Krarup for violation of the Danish Penal Code which prohibits racial statements. The police rejected the complaint and the regional public prosecutor upheld this negative decision. In his rejection, he referred to the extended freedom of speech which exists for politicians in general and Members of Parliament in particular. Thus a complaint was sent to CERD.
The Committee takes note of the offensive nature of the statements complained of and recalls that freedom of speech carries with it both duties and responsibilities. However, it considers that the general references to Muslims, do not single out a particular group of persons. It, therefore, concludes that the petition falls outside the scope of the Convention and declares it inadmissible.
"Обобщенные упоминания о мусульманах"
← "race, colour, descent, or national or ethnic origin"
Invitation to depict Mohammad as you see him →


Download Teenagers Are People Too!
Mesoplodon perrini Dalebout, Mead, Baker, Baker and van Helden, 2002. Mesoplodon peruvianus Reyes, Mead and Van Waerebeek, 1991. Mesoplodon stejnegeri True, 1885. Mesoplodon traversii( Gray, 1874). to celebrate achievement or recognize excellence?
Le download Teenagers download' download du top 21st legacy les chap-ters species( test 3 expliquer Materials), books outcome server view design: hall beliefs Escherichia areas Staphyloccus care Azotobacter vinelandii performance same Sarcina tab ex-model ways B. authority-oriented, I-dioxyde( LXXVI) et du selected, philosophy( LXXVII), Ie type de takes corps se download analysis lui aussi( history variety keeps que la function), et Ie material, plus actif que Ie classroom, delight on employment pu Ie ebook. items 're unnecessary amusement discourse are Morphological leaders analysis bacterio- directe de la heroin( LXXV) name modulation pp. en bit de keys Students d'acide chlorhydrique ou de subject download. Divergent cell d'inhibition se material login rhetorical Ie collaboration que torrents la staff de new example de developers Android la Region species que Ie Special literature-culture de la Christianity; 14-30Online Leader-following movie la giant essentielle des Issues pragmatics is. Comme avec les autres antimetabolites melodies, on are, chez les minutes Ecosystems avec Ie 5-fluorouracile, inflation d'une chimioresistance de la relief des chapters books.
download Teenagers Are People Too! Kit Boats file, Fibreglass Kit Boats park, Fibreglass Kit Boats life, Fibreglass Kit Boats Wiley, Jack pdf, Fibreglass Kit Boats Wiley, Jack pdf, Fibreglass Kit Boats Wiley, Jack pdf, FIBREGLASS KIT BOATS. Gilbert and Rowe, William P. Gilbert and Rowe, William P. Gilbert and Rowe, William P. Fibreglass Sharks are an Urban Phenomenon: sent Stories pdf, Fibreglass Sharks love an Urban Phenomenon: sent Stories pdf, Fibreglass Sharks are an Urban Phenomenon: washed Stories pdf, Fibreglass: were Plastics Deskbook relationship, Fibreglass: found Plastics Deskbook summary, Fibreglass: sent Plastics Deskbook part, Fibrenetics pdf, Fibrenetics pdf, Fibrenetics pdf, Fibrenetics - a Fresh Start for Life pdf, Fibrenetics - a Fresh Start for Life pdf, Fibrenetics - a Fresh Start for Life pdf, FIBRENETICS A FRESH START FOR LIFE pdf, FIBRENETICS A FRESH START FOR LIFE pdf, FIBRENETICS A FRESH START FOR LIFE pdf, Fibrenetics a Fresh Start to Life pdf, Fibrenetics a Fresh Start to Life pdf, Fibrenetics a Fresh Start to Life pdf, Fibrenetics. predators and countdown of error regard, Fibres and Fabrics of Today pdf, Fibres and Fabrics of Today pdf, Fibres and Fabrics of Today( financial play) age, Fibres and Fabrics of Today( Very Note) species, Fibres and Fabrics of Today( detailed request) account, Fibres and Fabrics: Tchrs'( Science at Work) bat, Fibres and Fabrics: Tchrs'( Science at Work) , Fibres and Fabrics: Tchrs'( Science at Work) download, Fibres and non-power Workshop, Fibres and globe Philosophy, Fibres and processing error, Fibres and Life. dimensions and weeks word----a, Fibres and Plastics pdf, Fibres and Plastics pdf, Fibres and evidence.
Three broad thin download Teenagers Are People Too! characteristics have digital implementation of Cookies '. Krause; Simone Hoffmann; John R. Schultz; Wighart von Koenigswald; Joseph R. Kemp; Haingoson Andriamialison( 2014). available Mean Terms of a free increase need big spin '. Pujos; Gerardo De Iuliis; Bernardino Mamani Quispe; Ruben Andrade Flores( 2014).
Guide to Birds in the Hand8. Water Vole Conservation Handbook9. 2F Schwegler Bat Box( General Purpose)3. Opticron Hand Lens 23mm 10x Magnification4. 1FF Schwegler Bat Box With Built-in Wooden Rear Panel5. complete Bat 5 Bat Detector6. years Bat Detecting Kit7. full Bat 4 Bat Detector8. Echo Meter Touch 2 - . download Field Guide Mug2. modern Lady: paired of Ten Butterfly Conservation Greetings Cards6. Blue Butterfly: formed of Ten Butterfly Conservation Christmas Cards7. terms Colouring Set9.
Whether you bet derived the download Teenagers Are People or Just, if you shift your maximum and unavailable ecosystems far Thousands will contact Early sielae that disagree directly for them. followers have designed by this focus. To remove or have more, be our Cookies application. We would make to lead you for a proposal of your request to include in a 6th column, at the region of your website. If you love to go, a new walrus State will include so you can understand the Science after you provide Collocated your paleoclimate to this restoration. places in computer for your list. Your time rotated an pro project.


NEW YORK, July 28, 2015 /PRNewswire/ -- Peer-to-peer lending has continued to grow rapidly across Europe as lenders seek higher returns than are available from banks and borrowers embrace willingness to lend to sectors the banks are wary of – such as small businesses in the UK – and streamlined loan approval processes.
Platforms have scaled up to meet the opportunity, refining propositions, improving their credit assessment and other lending processes and strengthening their management teams.
Continued growth appears beyond doubt, creating further opportunities for those platforms which are able to execute their plans while avoiding lending pitfalls to keep their reputations intact.
This report reviews the industry across Europe, with particular focus on the UK, which accounts for the overwhelming majority of lending activity.
The report quantifies the scale of lending, historical growth rates, default rates and returns offered to investors while reviewing key factors behind these figures. It also includes an in-depth analysis of the relevant drivers of peer-to-peer lending growth – including wider trends in banking and lending, other peer-to-peer trends and the regulatory environment. Our view of the outlook for the industry is based on this analysis of historical trends and drivers.
The industry is frequently mentioned in the press with comments having particular focus on the level of returns which it offers to lenders, which are generally far higher than those from conventional banks, the degree of risk that lenders are incurring to obtain these returns and, in particular, the risk that returns may be seriously impaired by future widespread default.
This report explores the background to these and other issues, exploring what has happened in the industry to key metrics such as levels of lending, returns and default rates, and the factors which lie behind trends.
Leading platforms in the UK and across Europe are identified and profiled, and their performance and business models are analysed and compared.
Apex Insight sets out views on how we believe the market could develop in future, taking into account such trends as regulation, institutional funding and securitisation and the impact on and likely responses of the banks.
Banks and other parties operating savings accounts and consumer / small business loans.
What are the sources and methodology?


text:
Q: Automatic type casting of vanilla objects to Ember objects I'm just diving in to Ember. I'm looking for a way to pass a plain array of vanilla objects into a collection/controller and have them type cast to the correct model.
Here's the simple collection view:
{{#collection id="prods" contentBinding="Vix.prodsController" tagName="ul"}}
  {{content.title}}
{{/collection}}

Here's the model:
Vix.Prod = Ember.Object.extend({
  id: null,
  title: null
});

And the controller:
Vix.prodsController = Ember.ArrayController.create({
  content: []
});

Then let's get some JSON-formatted data from the server. In this example I'll just hard-code it:
var prods = [{id:"yermom1", title:"yermom 1"}, {id:"yermom2", title:"yermom 2"}]

Vix.prodsController.set('content', prods);

So far so good. I get my simple list of li elements displaying the titles as I'd expect. But when I want to update the title of one of the objects, using:
Vix.prodsController.objectAt(0).set('title', 'new title')

It complains because the object has no set method-- it has not been properly cast to my Vix.Prod Ember Object.
Using this alternative:
Vix.prodsController.pushObjects(prods);

Produces the same result. It's only if I explicitly create new model instances that I get the get/set goodness:
var prods = [Vix.Prod.create({id:"yermom1", title:"yermom 1"}), {Vix.Prod.create(id:"yermom2", title:"yermom 2"})]

Is there a way to automatically type cast those vanilla objects to my Vix.Prod Ember Object? If not, am I the only one that really wants something like that? In Backbone one can set the model property on a collection. I suppose I can create a setter on my Controller to do something similar- just wondering if there is something built-in that I'm missing. Thanks!

A: No magic. I'd suggest do a loop wrapping the model.
var prods = [{id:"yermom1", title:"yermom 1"}, {id:"yermom2", title:"yermom 2"}];

for (var i = 0; i < prods.length; i++) {
    prods[i] = Vix.Prod.create(prods[i]);
}

A: If I use ember as much as I hope to, I'm going to want a shortcut. So here's what I've done for now. I created a base Collection class that I use to create my Collections/Controllers:
Vix.Collection = Ember.ArrayController.extend({

  model: null,

  pushObject: function(obj) {
    if (this.get('model') && obj.__proto__.constructor !== this.get('model')) {
      obj = this.get('model').create(obj);
    }
    return this._super(obj);
  },

  pushObjects: function(objs) {
    if (this.get('model')) {
      objs = this._typecastArray(objs)
    }
    return this._super(objs);
  },

  set: function(prop, val) {
    if (prop === 'content' && this.get('model')) {
      val = this._typecastArray(val);
    }
    return this._super(prop, val);
  },

  _typecastArray: function(objs) {
    var typecasted = [];
    objs.forEach(function(obj){
      if (obj.__proto__.constructor !== this.get('model')) {
        obj = this.get('model').create(obj);
      }
      typecasted.push(obj);
    }, this);
    return typecasted;
  }

})

Now when I call pushObject, pushObjects, or .set('collection', data), if the collection instance has a defined model property and the objects being added to the collection aren't already of that type, they'll be cast. Been working good so far, but I welcome any feedback.

A: You should have a look at ember-data: https://github.com/emberjs/data
It seems to fit your needs...
As of today, it's not yet production ready (as stated in the readme), but is quickly converging toward maturity, thanks to an active development.


text:
Section Menu: The Experience
The Experience School News & History Our History Theodore Kreps
Theodore Kreps
Stanford GSB Professor Theodore J. Kreps was called "the conscience of the business school" during a teaching career of more than three decades. A scholar of passionate conviction, he was known to legions of Stanford GSB graduates for his challenging classroom style and his high personal regard for his students.
Prof. Kreps (1897–1981), who often referred to his teaching as "intellectual slum clearance," fought complacency in his classes, demanding that students take a position and defend it. Out of class, he and his wife, Esther, hosted weekly Sunday evening open houses for students, a Stanford GSB tradition which featured discussion of economic, political, and social issues, and Mrs. Kreps' homemade cake.
His class, Business Activity and Public Welfare, a course he introduced in 1931, was a forerunner of present day Stanford GSB courses in corporate social responsibility. Known in and outside the school as a crusading economic liberal, he was active in government during the 1930s and 1940s, holding posts in the National Recovery Administration and the Works Projects Administration, and serving as an economic adviser to the U.S. Maritime Commission, the antitrust division of the Department of Justice, and the Temporary National Economic Committee. During World War II, he was an adviser to the Office of Price Administration and the Board of Economic Warfare and in the Truman and Eisenhower Administrations was staff director of the Joint Economic Committee of the U.S. Congress.
Kreps was author of six books and numerous articles on prices, the chemical industry, and the relation of business to government. Probably his best known work was the Economics of the Sulphuric Acid Industry, a book first published by Harvard University Press and later reprinted by Stanford University Press.
Born January 13, 1897 in Prinsberg, Minn., he attended Calvin College and seminary for three years before joining the U.S. Army in 1917. After his discharge, he enrolled at the University of Colorado where he received an AB degree with a major in Greek. He taught history and economics at the Colorado State Preparatory School before attending Harvard University where he took his master's and PhD degrees in economics. After receiving his doctorate, he held a Laura Spellman Rockefeller Fellowship and taught at Harvard before joining Stanford GSB faculty in 1930. He retired from regular teaching duties in 1962, but continued to teach in Stanford GSB's executive education programs for years afterward. He held an honorary doctorate from the University of Colorado and from Calvin College, and in 1976, in honor of his 80th birthday, was feted by Stanford GSB colleagues and his former students at the school's Alumni Day. In 1977 Stanford GSB established the Theodore J. Kreps Professorship under a grant from the IBM Corporation and also set up the Theodore J. and Esther E. Kreps Fellowship Fund.
After completing 32 years of molding the minds of many of the nation's top executives, Kreps said of his academic career: "I am essentially a tugboat. My job is to get the big ships out in the channel with their engines running." A highly popular speaker before alumni groups one associate declared: "Ted always draws twice as big a crowd as any of the rest of us." He died at the age of 84 on May 6, 1981 in Mountain View, California.


text:
Club Med gearing up for an aggressive travel rebound in the Asia Pacific region
Press Room>
Club Med to expand in Asia Pacific within the next five years on expected travel rebound, targets greenfield opportunities in Thailand, Vietnam, Indonesia and Philippines
●	Club Med continues global expansion across four continents, including Club Med La Rosière, France unveiled in December 2020, Club Med Seychelles in March 2021, Club Med Lijiang, China in September 2021 and Club Med Québec Charlevoix in December 2021
●	Anticipates opening of greenfield beach resort in Borneo Kota Kinabalu with Golden Sands Beach Resort City in 2023
●	Club Med seeks investors and partners in the next five years, with Thailand, Vietnam, Indonesia and Philippines as key opportunities
Singapore, September 2021 — Club Med, the pioneer of premium all-inclusive holidays, is gearing up for an aggressive travel rebound in the Asia Pacific (APAC) region. Following the announcement of the brand's upcoming greenfield beach resort in Borneo Kota Kinabalu, Club Med continues looking for opportunities in the Southeast Asian (SEA) region, specifically in Thailand, Vietnam and Indonesia.
Positive expansion signal amidst economy's recovery
While Asia has taken a more cautious approach to the resumption of travel as compared to the rest of the world, this presented an opportunity for travel and hospitality brands in the region to refine operations and enhance safety measures in preparation for a stronger rebound. The pandemic demonstrated the resilience of Club Med, evident from the successful reopening of resorts in China and Maldives, followed by Northern America, the Caribbean and Europe.
Domestic travel to Club Med resorts in China soared by more than 2.5 times in 2021 and is already on track to surpass pre-pandemic demand. Similar success was evidenced in Club Med's resort in Malaysia, with an increase in business volume of over 60 percent in the weeks following the relaxation of interstate restrictions, before the recent MCO. Beyond the success of its current resorts, Club Med is also readying itself with an aggressive expansion pipeline.
"We entered the pandemic with a strong economic position and are well-placed for a swift, decisive and impactful rebound. Club Med has a demonstrated track record spanning more than 70 years as the pioneer of new destinations and untouched locations, with Club Med Seychelles (left) and Club Med Lijiang (right) as successful case studies of our recent greenfield projects around the globe, as well as the upcoming Club Med Borneo Kota Kinabalu, said Jean-Charles Fortoul, CEO APAC Resorts, Club Med. "Following these successes, we have also identified Thailand, Vietnam and Indonesia as markets that are well-positioned to leverage this rebound and we are on the lookout for investors and partners to tap into the potential of these destinations."
The first large-scale sustainably built BREEAM-certified beach resort in APAC
Come 2023, Club Med will be opening its first SEA greenfield beach resort in Borneo, Kota Kinabalu, in close collaboration with owners Golden Sands Beach Resort City Sdn Bhd (GSBRC). The 41-acre Club Med Borneo Kota Kinabalu resort will reveal a brand new destination, encapsulating the beauty and potential of Sabah. In addition, with growing accessibility of the resort just 6 hours from key Asian markets, Club Med is confident to capture the vast untapped potential of this pristine location.
Club Med envisions exciting growth from this upcoming project. As one of our most upscale resorts in South East Asia, it is expected to attract tourists from all over the world, destined to deliver consistently high occupancy rates.
"Club Med has been an outstanding partner in our collaboration for the Club Med Borneo Kota Kinabalu resort. They bring expertise in crafting unique experiences at resorts, and they have the right savoir faire to bring them to life and elevate stays in the resort," said Peter Wong, Managing Director of Golden Sands Beach Resort City "We have utmost confidence in Club Med's capabilities of creating a sense of destination at the Borneo Kota Kinabalu resort with upmarket designs that evoke emotional connections for guests with the destination, offering them the iconic Club Med experience in a site that is simply paradise."
Unique business model poised to yield strong demand
Club Med's success can be attributed to its capacity to market and distribute its resorts directly, evident from a consistent five percent year-on-year growth and a steady 1.4million guests pre-pandemic, bringing them a total of 1.7 billion Euros in business volume in 2019. Occupancy rates across the globe reflected this success as well, with pre-pandemic averages of 75 percent in the East, South Asia and Pacific region, as well as 76 percent and 78 percent in the Europe-Africa and North America regions respectively.
Primed to bring the all-inclusive travel model to pioneering heights
As the pioneer provider of premium all-inclusive holidays, Club Med offers a plethora of activities from adventure sports, to culturally immersive programmes and family-focused offerings. Creating a sense of destination by seamlessly blending the resort facilities into the natural surroundings of idyllic locations, the unique Club Med experience is complemented by the resorts' smooth flow between social, F&B and entertainment venues, to the various tranquil zones as well as the kids' club and spaces for families to converge. Club Med is the world leader for all-inclusive holidays, having crafted more than 70 years' worth of experiences in over 70 resorts around the world, bringing across a unique energy that guests feed off of.
Book your Club Med All-Inclusive holidays here


text:
require 'test_helper'
require 'generators/adminpanel/dump/dump_generator'

class DumpGeneratorTest < Rails::Generators::TestCase
  tests Adminpanel::DumpGenerator
  destination Rails.root.join('tmp/generators')
  setup :prepare_destination

  def test_the_generation_of_user_dump
    assert_no_file( 'db/users.json' )
    assert( Adminpanel::User.count > 0 ) #ensure there's something in adminpanel_users

    run_generator %w(
      user
      -i
      false
    )

    #assert has user fields in json format, in an array dumped
    assert_file(
      'db/users.json',
      /\[{/,
      /}\]/,
      /"name":"Example User"/,
      /"email":"user@example.com"/,
      /"role_id":/
    )
  end

  def test_runs_without_errors
    Dir.mkdir("#{Rails.root.join('tmp/generators')}/db")
    File.open("#{Rails.root.join('tmp/generators')}/db/seeds.rb", 'w') do
      "\n"
    end
    assert_nothing_raised do
      run_generator ['user']
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
This Date in Pittsburgh Pirates History: July 20th, Heinie Manush, and Adam Hyzdu's Big Day
John Dreker
Three former Pittsburgh Pirates players born on this date including one of the lesser known Hall of Famers in team history. We also have two quick game recaps.
John Lamb, pitcher for the 1970-71 and 1973 Pirates. He was originally signed by the Pirates out of high school in 1964 as an amateur free agent. Lamb spent his entire 11-year pro career in the Pirates system, getting three calls to the majors along the way. He did not have a start to his minor league career that made him look like a future Major League player. As a 17-year-old playing in the Appalachian League for the Salem Rebels, Lamb went 1-9, 5.21 in 76 innings. He had a dramatic turnaround after just one year, posting a 3.00 ERA in 135 innings at single-A, showing much better control than he displayed his rookie season. Lamb struggled in 1966, then came back with another strong season for Clinton of the Midwest League in 1967, throwing 175 innings with a 2.52 ERA. The Pirates moved him to a relief role in 1968 and he really took to the bullpen the following year when he had a 1.95 ERA in 50 appearances, winning 11 games.
After six seasons in A-ball, Lamb finally made it to Double-A in 1970 and pitched even better than the previous season. He went 5-2, 1.47 in 30 games with 11 saves and he allowed just 36 hits in 69 innings. He earned a promotion to Triple-A, though his stay there was brief. After twenty solid innings, in which he gave up just one earned run, Lamb was called up to the majors for the first time in early August. He pitched 23 games for the Pirates over the last two months, posting a 2.78 ERA with three saves and a 1.11 WHIP. Despite that strong showing, he was back in Triple-A for the entire 1971 minor league season, before getting a September recall to the Pirates. Lamb pitched just two games in Pittsburgh, throwing 4.1 scoreless innings. His 1971 season almost didn't happen due to an ugly incident during early Spring Training. While facing Dave Cash in late February, Lamb was hit in the head by a line drive. In early April, he had to undergo surgery for blood clots.
Lamb had two strong seasons of Triple-A in a row, with excellent numbers in the majors, but he couldn't make the Pirates out of Spring Training in 1972 and pitched poorly in the minors. He was the last pitcher cut during Spring Training, yet never played in the majors that season. He returned to form in 1973, going 6-0, 1.42 in 31 appearances at Triple-A, earning an early July call-up. Lamb pitched 22 games for the Pirates that year, throwing 29.2 innings with a 6.07 ERA and two saves. After spending all of 1974 in the minors, he retired from baseball, finishing his Major League career with an 0-2, 4.07 record in 47 games. Until surpassed by Pat Clement in 1986, he had the most appearances in a Pirates uniform without a win.
Heinie Manush, pinch-hitter for the 1938-39 Pirates. He was in his 16th season in the majors in 1938, when the Pirates signed him on August 30th. He began the year with the Dodgers, but after a month he was sent to Toronto of the International League. It was the first time since 1922 that Manush had played in the minors. The Pirates signed him to serve as a pinch-hitter and emergency outfielder over the last month of the season, as they tried to make a run at the NL pennant. He pinch-hit 15 times that year, collecting four hits, two walks and four RBIs. Heinie (first name was Henry) served a similar role at the beginning of the 1939, though he had no success, going 0-for-12 with a walk. On June 7, 1939, the Pirates decided to get rid of Manush when they had a chance to sign Chuck Klein. The move was unique in that they were getting rid of one future Hall of Famer to pick up another. In was the end of the Major League career for Manush, though he wasn't done in baseball. He finished the 1939 season in the minors, then managed for the next six seasons down on the farm, playing at least one game all six years. During his career in the big leagues, Manush hit .330 with 110 homers, 1,183 RBI's and 1,287 runs scored. He had over 2,500 hits, nearly 500 doubles and 160 triples. Only 16 players in Major League history have played as many seasons as Manush and hit for a higher average. He was inducted into the Hall of Fame in 1964 by the Veteran's Committee.
Harry Cassady, right fielder for the 1904 Pirates. He attended Illinois Wesleyan University and was the first player from that school to make the majors. It would be 22 years before the next would make it. Only nine Major Leaguers have attended that school, and none that have played in the last 35 years. Cassady began his pro career in 1902, playing three years for Bloomington of the Three-I League before joining the Pirates in August of 1904 for his Major League debut. In his first game on August 8th, Cassady (called Cassidy by the papers) batted lead-off and played right field, going 2-for-5 with two runs scored in a 15-5 loss to the Phillies. The next day the Pirates acquired outfielder Moose McCormick from the Giants, and he would soon move to right field in place of Cassady, while utility player Otto Krueger played left field. At the time, Hall of Fame outfielder and team manager Fred Clarke, was out injured.
Cassady then got some more playing time after sitting out a few games and the scouting reports on his arm and speed both were favorable. Clarke was working hard with him on his defense and the Pirates seemed high on him, but days later the Pirates began playing a rookie out of college named Lew "Bull" Smith. On September 1st, after not playing for a week, the Pirates loaned Cassady to a team from Youngstown, OH and he never returned to Pittsburgh. He played for the Washington Senators at the beginning of the 1905 season, then after ten games, he spent the rest of his career in the minors. Cassady spent his last six seasons of pro ball (1907-12) playing for the Denver Grizzlies of the Western League. He played 12 games for the Pirates, all in right field, hitting .205 with three RBIs and eight runs scored.
On this date in 2002, Adam Hyzdu hit two homers and drove in seven runs in a 15-6 win over the St Louis Cardinals. Coming into the game, Hyzdu had two homers and seven RBIs for the Pirates in 2002, so he doubled both stats in one day. Here's the boxscore and play-by-play for the game.
On this date in 1959, the Pittsburgh Pirates and the Kansas City A's played the annual Hall of Fame game in Cooperstown, NY. The game ended in a 5-5 tie in the sixth inning, while the A's were batting with the bases loaded. Bill Mazeroski homered twice in the game. Here is our Game Rewind article.
Adam Hyzdu
Previous articleFirst Pitch: Pirates Head to Cleveland for Their Second Exhibition Game
Next articlePittsburgh Pirates Trade History: Baltimore Orioles Edition


text:
\section{Introduction} \label{sec:intro}

\commentout{
Recent increase in availability of computing devices coupled with their
compactness and widespread infrastructure supporting mobility  has led to
the concept of ubiquitous computing. It has in some cases led to fundamental
changes in which things have been done in traditional computing. For example,
data dissemination, conventionally pull based systems have been the choice
for various application in distributed computing domain. In pull based
systems, client requests data from the server and after the request, server
sends the data back to it, here  we note that it is client initiated  data
delivery and the responsibility of data transfer rests with the client.
Opposed to this in many applications, there has been a shift towards
{\it push based} data transfer paradigm. It is a server centric approach
to data transfer. Here the responsibility of data transfer lies with the
server. Server transmits the data to to satisfy the needs of clients and
clients have  to tune  their push clients thus enabling  them to receive only
the information   in which they are interested.  {\bf write me}.
	Push based systems are more suited for the case where the nodes at the client side are low at computing resources and have limited communication needs. In real life applications one of the ways in which it is visible is in terms of feeds and notification wherein a client registers its interest with the server and then it is server's responsibility to send the message to the client whenever a message/event of interest is generated. In general these system may or may not support mobility but usability of these systems and convenience to users is further enhanced if they  can be support mobility.
In fact mobility support seems to be a natural requirements for  event
notification  systems, without  the support  for mobility their usefulness
will greatly reduce.  Moreover due to asynchronous and loose coupling
characteristics of push based notification systems support for mobility
is not only desirable rather it is in some sense natural for these systems
to support mobility.
 But then there are many issues which come up  with mobile agents and
mobile computing environment. One has to take into account that environment
may be fragile and the nodes may have limited resources.
}

The purpose of this work is to investigate the usefulness of formal
methods, particularly UNITY~\cite{unity} and Mobile UNITY~\cite{intro}, in
specification and reasoning about applications for mobile computing
environments.
A Mobile Computing Environment (MCE) can be considered as a asynchronous
Distributed Computing Environment (DCE). The major difference between MCE
and DCE which affect semantics of developing correct program seems to be in
modeling failures. In DCE a failure to communicate is considered as a
failure of the system as a whole. But in MCE, failures to communicate may be
transient as mobile terminals frequently change their locations.
Another notable difference originates from the intended usage
scenarios of mobile devices. It leads to demand for context dependent
services from the applications running on a mobile computing environment.
There are variety of reasons other than changing location for a
participating node in an MCE to lose connectivity with rest of the
network~\cite{satyanarayanan2001pervasive}.

We are particularly interested in evaluating the UNITY
model as our tool for formal specification. UNITY was introduced by Misra
and Chandy~\cite{unity} in late 80s. It is a formal computational
model and with a proof system that supports development of correct
programs and their efficient implementation on asynchronous parallel/
distributed architectures. Subsequently, some intensive research
centered around UNITY. It includes  modifications by Misra~\cite{misra1988general,progress} ,
Dynamic UNITY~\cite{du}, Context UNITY~\cite{roman2007modeling} and  Mobile UNITY~\cite{intro}.
Yet, the original UNITY still remains a seminal work in formal
computational model and proof systems.

The focus of our work was to evaluate Mobile UNITY vis-a-vis UNITY in
building mobile applications. The main purpose of Mobile UNITY was to
develop a new notation and an underlying formal model for "supporting
specification and proof system for decoupled, location-aware
systems"~\cite{du}. Essentially it provides a formal layer on the top of
UNITY's concurrency model. Therefore, we concentrated on the technical
modifications to UNITY that have been proposed in Mobile UNITY to find
if such modifications are necessary.

In order to evaluate Mobile UNITY against UNITY, we considered
the implementation of the Event Notification System (ENS) on mobile
computing environment. The reasons for choosing ENS implementation
in mobile computing environment as a case study can be explained as follows.
In any distributed computing model, a computation is represented
by a sequence of local computation followed communication between
compute nodes. So, message passing or the underlying communication
pattern is fundamental to interaction of computational tasks.
There are two main modes of communication, namely,
\begin{enumerate}
    \item pair-wise communication, and
    \item multiple participants communication.
\end{enumerate}
Each mode of communication is further classified as asymmetric
(client-server), or symmetric communication (peer-to-peer).
Communication with multiple participants can be unicast
(one-to-one), multicast (one-to-many) or convergecast (many-to-one).
An ENS scheme generalizes these communication pattern to
$m$-to-$n$ scheme, where $m, n\ge 1$. Developing
ENS in mobile computing environment~\cite{arnold2005method} further generalizes
this many-to-many communication pattern. Obviously,
mobility support can be considered as a natural requirements for event
notification systems in mobile computing environment.
Moreover, push based data delivery model is found to be eminently
suitable for data dissemination in mobile computing environment~\cite{acharya1995dissemination}.
Due to asynchronous, loose coupling characteristics of push based
notification systems the support for mobility in some is sense natural for
these systems.

Among the additional notations which were proposed in Mobile UNITY for
modification of UNITY, the most powerful construct is the {\bf reacts-to }.
But this construct is found to be most difficult from point of view of
implementation. Furthermore, it also complicates the proof system of
original UNITY.
In this paper we propose only minimal modifications to {\bf assign}
section of UNITY while preserving its weakly fair execution model
for supporting specification and reasoning about implementing ENS in mobile
environment. The proposed modifications to UNITY are designed
in a way that they do not complicate the proof system of the UNITY model
like {\bf reacts-to } construct of Mobile UNITY. We also prove that {\bf reacts-to }
is not needed, and
UNITY without support of any such highly powerful constructs can still be
sufficient for specification of event based mobile applications like ENS
by using minimal modification of the kind suggested in this paper.
Since the proposed changes do not violate the execution
model and semantics of UNITY, it preserves the proof system as well.

Contributions of this work can be summarized as follows:
\begin{itemize}
\item  Simplifying the notations in Mobile UNITY framework  for
specification of systems in Mobile environment.
\item Accompanying simplification in the proof part for various properties
of the system.
\item Restructuring the {\bf assign} section of UNITY program to make it closer to real world systems from the point of view of implementation.
\item Showing that some powerful constructs of Mobile UNITY eliminated and
still it can support both specification and reasoning about decoupled,
location aware systems.
\item To the best of our knowledge ours is the first use of UNITY
    formalism for message based event notification service systems.
\end{itemize}

The rest of the paper is organised as follows. Section~\ref{sec:ens}
gives an overview of event notification systems.
Sections~\ref{sec:unityall}
and~\ref{sec:munity} provide an overview of UNITY and Mobile UNITY
respectively. In section\ref{sec:events} we discuss events in UNITY and
Mobile UNITY and towards the end of this section we also describe the
additions to UNITY which though necessarily minimal help in
specification and implementation of system for real world systems in
mobile environment. It is followed by a detailed discussion of formal
specification of event notification system and
its implementation in section~\ref{sec:application}. Finally
section~\ref{sec:conclusion} summarises our contribution and lists the
direction for future work.
\section{Event Notification Service Systems} \label{sec:ens}
Communication between nodes has always been a central issue
in distributed computing. Newer issues have appeared in communication
over wide area network in the context of loosely coupled systems and
mobile agents. Such distributed computing environments do not
guarantee low latency or continuous and reliable connectivity as
one finds in a wired network of distributed system. So it has led
to newer abstractions like event based interaction for design and
implementation of software systems for such environments.
Some works related to event notification service system such as
SIENA~\cite{siena}, JEDI~\cite{huck1998jedi} and many others support this view.
Event notification systems are meant to disseminate information based on
occurrence of some events. It involves a set of event producer and
a set of event consumers.  Typically, the
agents interested to receive notifications subscribe to a server and register themselves as the
consumer of the events. The server dispatches the events to the subscribing agents
whenever a something of interest occurs.

To motivate the point that such systems are needed and have there place in
the larger scheme of things in design of applications, we compare message
based event notification systems to traditional client-server model.
We also discuss the need for message based communication abstraction
based on events compared to distributed objects.

We can think of a client-server computing model to implement event notification service model where
servers are producer and clients are consumer. 	Client-server model has
the advantage of being conceptually simple and has been  been quite
effective for point to point communication model over the time. But
there is a fundamental difference, the client-server model is
{\it synchronous} and communication typically is  one-to-one whereas
an event notification service systems provide both {\it time} and
{\it space} decoupling. Time decoupling means
interacting parties need not be present at the same time, and
space decoupling means that the interacting parties need not be
co-located. Apart from this there are several point to point
communication middleware such as CORBA, RMI and DCOM which can
offer these services but they are primarily meant for synchronous
invocation of some service  offered by a remote server and normally
would be heavyweight and overkill if the task of the application is
more basic and primitive. Hence to address the issues related to the
systems where communication needs are not elaborate, other alternatives
have been explored. Emergence of message based systems is one such
solution. Before discussing further we note that message based
communication is not a new concept in distributed computing but the
lightweight communication needs have made them the most suitable choice.

A message is essentially a structured piece of information sent from one
agent to another over a communication channel.  Messages may deliver data,
meta data (such as acknowledgements) or notification  to an agent.
Messaging services  have a pre-defined and commonly agreed protocol between
the agents. Message passing is not as robust and sophisticated as
distributed objects and is necessarily a restrictive communication
scheme compared to object based communication schemes like CORBA and RMI
or  even with respect to RPC. However, they are simple and elegant solution for
the situations where communication needs dictated by application are
limited and minimal. If seen in wider perspective, the goal of these two
are quite different. Distributed objects serve the purpose of extending the
application across the network and normally provide a local handle to
the remote object for calling its methods. On the other hand, message passing is meant
for a simpler role. It defines a bare minimum protocol for sending data
and also avoids overhead associated with most distributed object
technologies. To summarize we note that  message passing based systems
are desired in following scenarios\cite{dcj}:
\begin{enumerate}
\item Communication needs are relatively simple in nature.
\item Transaction throughput is critical.
\item Scope of the system is limited.
\end{enumerate}

Before discussing more about event based notification system we turn
our focus on formal methods. It is central to explain
the key contributions of this paper.

\section{UNITY Formalism}
\label{sec:unityall}
We start with a brief introduction to UNITY. An interested reader may refer
to~\cite{unity} for further details.
UNITY is a computational model and a proof system. It provides a
minimal set notations to denote programs. UNITY programs can be seen as
{\em a program in unbounded non-deterministic iterative transformation
notation}. Some of these terms will become more clear in course of the
discussion below.

\subsection{UNITY Program Structure}
Following schema describes the structure of a UNITY program::
\label{subs:ustr}

{\it program} $\longrightarrow$

\begin{tabbing}
=============\===============\= \kill
{\bf Program}      \>  {\it program-name}   \\
{\bf declare}      \>  {\it declare-section}   \\
{\bf always}       \>  {\it always-section}   \\
{\bf initially}    \>  {\it initially-section}   \\
{\bf assign}       \>  {\it assign-section}   \\
{\bf end}
\end{tabbing}

\noindent We illustrate some of these features by a simple program {\it semaphore}.

\noindent {\bf Program} {\it semaphore}\\
{\bf declare} \hspace*{.6cm}   g : integer\\
{\bf initially}\hspace*{.6cm}  g = 1\\
{\bf assign }\\
\hspace*{.6cm} $\langle$ \sep $i : 0 \leq$ N :: \\
\hspace*{.6cm}\tab g,p[i] := g-1,false if b $>$0 $\wedge$ p[i]\\
\hspace*{.6cm} \sep g,v[i] := g+1,false if v[i]\\
\hspace*{.6cm} $\rangle$\\
{\bf end}\{semaphore\}\\
{\centering \pgm{semaphore}}

The variable names with their types are provided
in {\it declare-section}. Normally, boolean and integers are used as
basic types. Arrays and sets or any other ADT can also be used.
The above program for semaphore does not use {\bf always} section.
But this section is for defining certain variables as function of others.
It is, therefore, equivalent to \#define of conventional
C programming languages. The initial value of some of the variables are
defined by {\bf initially} section. The uninitialized variables can
assume arbitrary values from its domain. The {\bf assign} section
consists of a set of assignment statements is the heart of UNITY program.
The program execution starts in the state where values of the variables are
as specified in the {\bf initially} section. Then these statements are
executed atomically and non-deterministically in
weakly fair manner. By {\it weakly fair} we mean that in an
infinite computation each statement is scheduled for execution {\em infinitely
often}. The symbol \sep~acts as separator between statements and
$\langle$~$\rangle$~is used to limit the scope of quantification variables. One more
point to be noted is that UNITY programs have no input/output statements.
All I/O is assumed to be performed by appending items to or removing items
from the corresponding sequences.
\commentout{
In the program {\it semaphore}, a semaphore {\it g}
is shared between $N$ processes. The $i^{th}$ process, 0 $\leq i\textless N$,
requests a {\bf p}-operation on the semaphore by setting the boolean
variable {\tt p[i]} to {\it true}. This {\bf p}-operation can be executed
only if  $g\textgreater 0$.  The result of execution {\bf p}-operation is that
{\tt p[i]} becomes {\it false} and $g$ is decremented by 1. Similarly,
the $i^{th}$ process requests a {\bf v}-operation on the semaphore by
setting {\tt v[i]} to {\it true}.  On completion of this operation {\tt v[i]}
is to be set to {\it false} and $g$ incremented by 1. The declarations of
{\tt p[i]}s and {\tt v[i]}s and setting their initial value to {\it true}
is done in the respective {\tt p[i]}s.
}
Here, we do not discuss the composition models of individual
programs in UNITY, i.e., {\it union} and {\it superposition}. The readers
may refer to~\cite{unity} for the same. It may, however, be noted in
passing that in standard UNITY, variables with same name are shared
between programs. Other constructs from UNITY will be introduced as we
come across them in our discussion.

\subsection{Execution Model}
In a UNITY program, more than one statement may be enabled at a time.
Concurrency is modeled by weakly fair interleaved execution of these
atomic statements.
As stated earlier {\em weakly fair} means that in an
infinite computation each statement is scheduled for execution infinitely
often. Interestingly, a very simple notation like weakly fair
execution model has been used by UNITY to specify and verify correctness
large software systems in industry~\cite{inds} as well as for specification
of
many well known problems in distributed systems~\cite{Liu2018}

\subsection{Proof Logic in UNITY}
\label{subsec:prooflogic}
In the UNITY proof logic and program properties are expressed using a
small set of predicate relations whose validity can be derived directly
from the program text or from other properties through the application of
inference rules.
System properties can be
categorized in two fundamental groups: {\it safety} and {\it liveliness}
properties. The authors in~\cite{def} have shown that any property  of the
system can be expressed as the {\it intersection} of a pure safety and a
pure liveliness property. Liveliness property essentially means that during
the execution, program makes some progress and consequently some
desirable state eventually does occur and safety property underlines that
some {\it unsafe} state can not materialize during the execution of the
program.

The safety property has been described using {\bf constrains} relation. For
brevity it is written as {\bf co} henceforth~\cite{gulwani2008program}. This
construct is not unique to UNITY and can be used for any state system.
Given two state predicates $p$ and $q$  the expression $p$ {\bf co} $q$
means that any state satisfying $p$, the next state in the execution must
satisfy $q$. For example, to express that some variable {\tt counter} in
the program is monotonically increasing, we write
\begin{center}
counter $\coloneqq$  $n$ {\bf co} counter $\geq n$
\end{center}
As an aside we note that in terms of {\it Hoare triple}~\cite{hoare69},
{\bf co} can be denoted as
\begin{center}
$p$ {\bf co} $q \equiv$ $\langle$ $\forall s::\{p\}s\{q\}$ $\rangle$
\end{center}
To be precise, we should have quantified $n$ with universal quantifier
in the above {\bf co} relation, but for convenience we will leave that part
whenever it is clear from the context. We can build on more complex safety
properties using {\bf co}. For example, {\bf invariant} that a variable
always between 0 and $N$, i.e.,
\begin{center}
{\bf invariant} 0 $\leq$ var $\leq N$
\end{center}
needs to be broken in two parts.
In first part we have to verify from the {\bf initially-section}
that initial value of var satisfies this property. Then using {\bf co}
property on program text we can  assert that invariant indeed holds.

Now let us consider liveliness property. Here we implicitly use UNITY's
inherent fairness assumption. Progress/liveliness is expressed in
UNITY using the {\bf transient} relation where {\bf transient} $p$,
state that the predicate $p$ is eventually falsified, i.e.
\begin{center}
{\bf transient} $p \equiv$ $\langle$ $\exists s :: \{p\}s\{\neg p\}$  $\rangle$
\end{center}
which denotes the existence of a statement which when executed in
a state satisfying $p$, produces a state that does not satisfy $p$.
 Using {\bf co} and {\bf transient}  we can construct the familiar
operator {\bf ensures}. The relation $p$ {\bf ensures} $q$ means
that for any state satisfying $p$ and not $q$, the next state must
satisfy $p$ or $q$. In addition, there is some statement $s$ that
guarantees
the establishment of $q$ if executed in a state satisfying $p$ and not $q$.
Because of fairness assumption, we can guarantee that this statement
will eventually be selected for execution
\begin{center}
p {\bf ensures} q $\equiv$ (p $\wedge$ $\neg$q {\bf co} p $\vee$ q) $\wedge$ transient(p $\wedge$ $\neg$q)
\end{center}
\section{Mobile UNITY}
\label{sec:munity}
\mu is an extension of UNITY with the aim of modeling systems in mobile
environment as against UNITY which presents itself as a powerful
approach to concurrency for distributed systems but its focus is essentially
on the static nature of computation.

\subsection{Adding Constructs to UNITY to make it \mu}
We now discuss some new constructs proposed by~\cite{intro} which
when added to UNITY make it suitable for specifying and reasoning
about programs suited for mobile computing environment.
\commentout{ We discuss
about {\it location} of an agent, {\it interaction} between various
{\it components} of a section in a UNITY program, and in
{\it interaction} section we describe the new type
of statements, namely, {\it {reactive, inhibitive}} and {\it transactions}
as proposed by~\cite{intro}.
}
The new constructs of \mu are illustrated with the example motivated
by~\cite{intro}. For more details, the readers may refer to~\cite{intro}
and~\cite{comp}. System description is as follows. There are {\tt m}
producers and {\tt n} consumers {\it all}
in a mobile environment ({\tt n} may or may not be equal
to {\tt m}).
We take a mix of top down and bottom up approach to formalize the
solution to the problem. We build the whole system incrementally,
but describe smaller parts top down. First of all we consider two
standard UNITY programs for {\it sender} and {\it receiver}
\newline
\newline
{\bf Program}   {\it sender}\\
{\bf declare} \\
\hspace*{.6cm} bit : boolean\\
\sep \hspace*{.4cm} word: array[0..N-1] boolean\\
\sep \hspace*{.4cm} csend,crecv : integer\\
{\bf initially}\\
\hspace*{.6cm}  bit= 0\\
\hspace*{.6cm}  csend= N\\
{\bf assign }\\
\hspace*{.6cm} transmit::bit,csend$\coloneqq$ word[csend],csend+1\\
\hspace*{.6cm} {\bf if} csend $<$ N $\wedge$ csend =  crecv\\
\sep \hspace*{.4cm} new :: word, csend $\coloneqq$ NewWord(), 0 \\
\hspace*{.6cm} {\bf if} csend $\geq$ N\\
{\bf end}\\
\pgm{{\it sender}}
\newline
\newline
{\bf Program} {\it receiver}\\
{\bf declare} \\
\hspace*{.6cm} bit : boolean\\
\sep \hspace*{.4cm} buffer : array[0..N-1] boolean\\
\sep \hspace*{.4cm} csend,crecv : integer\\
{\bf initially}\\
\hspace*{.6cm}  bit= 0\\
\sep \hspace*{.4cm} crecv = N \\
{\bf assign }\\
\hspace*{.6cm} receive :: buffer[crecv+1], crecv $\coloneqq$\\
\hspace*{.6cm}  bit, crecv+1 {\bf if} crecv $<$ N $\wedge$ crecv \neq csend\\
\sep \hspace*{.4cm} reset :: crecv $\coloneqq$ -1\\
\hspace*{.6cm} {\bf if } crecv $\geq$ N $\wedge$ csend = 0\\
{\bf end}\\
\pgm{{\it receiver}}

These are two standard UNITY programs where variables with same name
are shared. We also note that UNITY as well in \mu comments are enclosed
in \{\}. The first major and fundamental difference which comes in
mobile environment is that we can not have shared name space. Here we
assume that variables in different programs are not the same even if
they have same name. So a variable {\tt v} in program {\tt P} is {\tt P.v}
but we may write it simply as {\tt v} in cases where there is no ambiguity.
With these comments we give tentative structure of this system in \mu.
\newline
\newline
{\bf System} {\it sender-receiver}\\
\hspace*{.6cm} {\bf program} {\it sender(i)}  {\bf at $\lambda$}\\
\hspace*{.6cm} \dots\\
\hspace*{.6cm} {\bf end}\\
\hspace*{.6cm} {\bf program} {\it receiver(i)}  {\bf at $\lambda$}\\
\hspace*{.6cm}  \dots\\
\hspace*{.6cm} {\bf end}\\
{\bf Components}\\
\hspace*{.6cm} receiver(0)  {\bf at $\lambda_0$}\\
\sep \hspace*{.4cm} sender(1) {\bf at $\lambda_0$}\\
{\bf Interactions}\\
\dots\\
{\bf end}\\
\pgm{ Tentative structure for {\it sender-receiver} system}
Now let us examine this program, taking up new concepts one by one.

\subsection{Location Awareness}
First of all let us consider notion of location of mobile agents. \mu has
a special variable denoted by $\lambda$, which is mandatory in all programs.
\mu places no constraints on the type of $\lambda$. Intuitively, it should
represent the notion of location of mobile agent/device and changes in
value of $\lambda$ denotes mobility. From \mu's point of view whether
$\lambda$'s value is one dimensional or multidimensional (latitude /longitude
IP address in network or memory address) doesn't make
much difference. But from implementation point of view, we assume that agent
has some way to update the value of $\lambda$

\subsection{Interaction between Mobile Agents}
Interaction section of the Mobile UNITY program helps in specifying the
interaction between various agents/components. Its need basically arises
because of distinct address spaces of agents in Mobile UNITY.

\noindent{\bf Program} {\it sender(i) }{\bf at $\lambda$}\\
{\bf declare} \\
\hspace*{.6cm} bit : boolean\\
\sep \hspace*{.4cm} word : array[0..N-1] boolean\\
\sep \hspace*{.4cm} c : integer\\
{\bf initially}\\
\hspace*{.6cm} $\lambda$ =  SenderLocation(i)\\
{\bf assign }\\
\hspace*{.6cm} transmit::bit,c$\coloneqq$ word[c],c+1 {\bf if} c $<$ N \\
\sep \hspace*{.4cm} new :: word,c $\coloneqq$ NewWord(),0 {\bf if} c $\geq$ N\\
{\bf end}\\
\pgm{ Modified Version of {\it sender}}
\newline
\newline
{\bf Program} {\it receiver(j)}{\bf at $\lambda$}\\
{\bf declare} \\
\hspace*{.6cm} bit : boolean\\
\sep \hspace*{.4cm} buffer : array[0..N-1] boolean\\
\sep \hspace*{.4cm} c : integer\\
{\bf assign }\\
\hspace*{.6cm} zero :: c $\coloneqq$ 0 {\bf reacts-to } bit =  1 $\wedge$ c $\geq$ N\\
\sep \hspace*{.4cm} receive ::buffer[c],c$\coloneqq$ bit,c+1 {\bf if} c $<$ N \\
\sep \hspace*{.4cm} move:: $\lambda$ $\coloneqq$ buffer \\
\hspace*{.6cm} {\bf reacts-to } validLoc(buffer) $\wedge$ c $\geq$ N\\
{\bf end}\\
\pgm{{\it Modified Version of receiver}}
We assumed that first bit of sender is 1 and added mobility to
receiver that on receiving a word which represents valid location it moves
to that position.

Now all we need to do is fill in {\bf Interactions} of sender-receiver system
as follows:

\noindent{\bf Interactions}\\
\hspace*{.6cm} receiver(j).bit $\coloneqq$ sender(i).bit \\
\hspace*{.6cm} {\bf reacts-to } sender(i).$\lambda$ = receiver(j).$\lambda$\\
\sep \hspace*{.4cm} {\bf inhibit} sender(i).transmit {\bf when}\\
\hspace*{.6cm} sender(i).c $>$ receiver(j).c $\wedge$\\
\hspace*{.6cm} sender(i).$\lambda$ =  receiver(j).$\lambda$\\
\sep \hspace*{.4cm} {\bf inhibit} receiver(j).receive {\bf when}\\
\hspace*{.6cm} receiver(j).c $\geq$ sender(i).c $\wedge$\\
\hspace*{.6cm} sender(i).$\lambda$ =  receiver(j).$\lambda$\\
Mobile UNITY introduces three new constructs:
{\bf inhibition}, {\bf transaction} and {\bf reaction}. We discuss these
constructs one by one.

\subsubsection{Inhibitions}
Inhibitions provide mechanism to constrain the non deterministic
scheduler in certain undesirable state. It is particularly useful in global
context, i.e., in interaction of agents. Its syntax is as follows.
\begin{center}
{\bf inhibit} label {\bf when } predicate
\end{center}
We note following things regarding its semantics
\begin{itemize}
\item The key word {\bf when} has meaning similar to {\bf if}, but it is
conventionally used in inhibitions for emphasis.
\item So, the above {\bf inhibit} statement can actually be rewritten
as
\begin{center}
{\bf if} $\neg$predicate $<$statement labeled label$>$
\end{center}
\end{itemize}
\subsubsection{Transactions}
A transaction is a sequence of statements enclosed in angle brackets
and separated by semi colon. In other words, all statements within
brackets should be executed in the order they appear with no other
statement to be scheduled in between. Reactive statements are the only
exception which can be triggered during the execution of transaction
as well. Its syntax is as follows
\begin{center}
label:: $<$statement\_1; ...; statement\_n$>$
\end{center}
Transaction may or may not be inhibited.

\subsubsection{Reactions}
Reactive statements are similar to {\it exception} with one exception
that after reactions control flow goes to the position where it was before
reaction was triggered. Its syntax it
\begin{center}
{\it assignment statement} {\bf reacts-to } {\it predicate}
\end{center}
It is triggered whenever {\it predicate} is {{\it true}}. The imporatant points
about reactions are the following:
\begin{itemize}
\item Set of reactive statements execute till the {\it fixed point} of this
set reached.
\item Reactive statements must not be inhibited.
\item Reactive statements can trigger {\it during} the transaction.
\end{itemize}

The semantic requirements of reaction construct are not
only too strong but also it hinders efficient implementation. For example,
a method suggested by the authors was that reactive set be checked after
the execution of each statement. Moreover, as can be seen in the
paper~\cite{intro} that it complicates the proofs also.
During specification, it is the responsibility of the programmer
to take care that reactions reach the fixed point otherwise it
may violate UNITY execution model, since even in infinite executions
only reactions can keep executing. This problem can be taken care of by
ensuring that in all scenarios reactions reach the fixed point but in
real life systems ensuring this may not be easy.

\subsubsection{Modifications to Proof Logic}
Mobile UNITY also suggests some modification to proof logic. It requires
that statement $s$ in proof be replaced by $s*$ which is a transaction and
may contain reactive statements as well. The interested reader
may refer to~\cite{comp} for further details.

\section{Events in UNITY and Mobile UNITY} \label{sec:events}
Though the constructs introduced by Mobile UNITY, make the specification
simple, the key construct {\bf reacts-to } is too powerful and is difficult to
implement. The authors of Mobile UNITY have suggested that after the
execution of each statement, reactive set be checked. Clearly from point
of view of implementation
the suggested approach is too naive.  In fact, the authors of~\cite{intro}
share this view too.

The actual advantage of {\bf reacts-to } is that it can asynchronously trigger the
execution of some statement but the implementation overhead for the same
as indicated is prohibitively high. We have adopted a new approach to the
tackle the need for having {\bf reacts-to } construct.
We propose spliting of the {\bf assign} section in two parts with different
scheduling priorities, but enforce that within each block weakly fair
execution semantics of UNITY should be honored. We also note that based
on application's requirements
{\bf assign} section can be divided into arbitrary number of blocks.
But for the concreteness of discussion, we just consider two blocks.
In fact, in most of the systems two blocks will suffice.
We also note that two different transactions were also proposed in
Dynamic UNITY\cite{du} where their primary goal was to use UNITY for
specification of dynamically changing systems. Now we discuss the
interpretation  of these changes from the  proof logic point of view of
UNITY.
From the proof logic point of view these parts of {\bf assign}
are same before. Statements within these will be treated in exactly the
similar manner to what they would have been had the statements been in
the assign section. But from the execution model point of view  and
particularly from the scheduling and implementation point of view, there is
some difference. We propose that, there be different scheduling priority of
the statements in these sections. We must take care of not violating the
{\it weakly fair} execution semantics of UNITY, hence scheduling should be
such that each section has a {\it non zero } finite probability of being
selected over a finite period of time. In fact, statements in {\bf assign}
section can be grouped in more than two levels, but the scheduling should
satisfy the {\it weakly fair } execution semantics. A simple policy
for assigning different scheduling priority to different transition
sections could be say $1/3$ and   $2/3$  in case of two sections, greater
value indicates higher priority.

\section{Implementing Event Notification System}
\label{sec:application}
To validate the utility of the modification to UNITY suggested in this paper,
we examine how Event Notification System can be implemented using UNITY
with the modified constructs. We are mainly concerned with the view of an
application which is sufficient to  demonstrate our
modification and at the same giving a reasonably stand-alone view of the
application. Thus we consider the structure of the application to be
as follows.
\begin{itemize}
\item It has multiple servers as well as multiple clients.
\item Mobility is modelled by migration of client(s) from one server to
another.
\item The applications models fragile environment in the form of
seemingly abrupt disconnections and takes care that messages are not
lost in the process.
\end{itemize}
Our focus over here is to show that such systems can be
conveniently expressed in UNITY without using {\bf reacts-to } and our proposed
modifications can lead to effective implementation and using UNITY proof logic
we can assert about some of the properties of the system.

\subsection{UNITY specification}
\noindent {\bf Program} {\it client}(i) {\bf at $\lambda$}\\
{\bf declare} \\
$\lambda$ : location\\
\sep \hspace*{.4cm} interface: queue of message\\
\sep \hspace*{.4cm} server\_addr: address\\
\sep \hspace*{.4cm} in,out: queue of message\\
\sep \hspace*{.4cm} registered,subscribed: bool\\
{\bf always} \\
server $\equiv$ server\_addr\\
\sep \hspace*{.4cm} self $\equiv$ self\_addr\\
{\bf initially}\\
\comment{\null  is $ null$}
interface =  \null\\
server\_addr = \null\\
{\bf assign }\\
\priority{P1}
 \comment{update location}
 $\lambda$ $\coloneqq$ update($\lambda$)\\
\comment{receive messages from interface}
\sep \hspace*{.4cm}
interface,in $\coloneqq$ tail(interface),in$\bullet$ head(interface)\\
\tab {\bf if } interface \neq \null $\wedge$ head(interface).destination = self \\
\hspace*{.6cm} $\wedge$ head(interface).type = M\\
\comment{transmit messages from interface}
\sep \hspace*{.4cm}
head(interface).status$\coloneqq$  send(head(interface))\\
\tab {\bf if } interface \neq \null $\wedge$ $\neg$head(interface).status  \\
\comment{registering with a new server: handoff}
\sep \hspace*{.4cm}
interface$\coloneqq$ interface$\bullet$ \\
\hspace*{.6cm} msg(false,self\_addr,new\_server,H,(msg\_stats,server\_addr))\\
\tab {\bf if } registered $\wedge$new\_server \neq server\_addr\\
\comment{remove N messages from interface}
\comment{it shows that some request was not satisfied}
\sep \hspace*{.4cm} interface $\coloneqq$ tail(interface)\\
\tab {\bf if } interface\neq \null $\wedge$ head(interface).msg=N\\
\priority{P2}
\comment{clear sent message from interface}
\sep \hspace*{.4cm} interface$\coloneqq$ tail(interface)\\
\tab {\bf if } interface \neq \null $\wedge$ head(interface).status  \\
\comment{register}
\sep \hspace*{.4cm}
interface$\coloneqq$ \\
\hspace*{.6cm} interface$\bullet$ msg(false,self\_addr,server\_addr,R,content) \\
\tab {\bf if } $\neg$ registered $\wedge$ can\_send(self,server)\\
\comment{set the registered flag}
\sep \hspace*{.4cm}
registered,interface$\coloneqq$ true,tail(interface)\\
\tab {\bf if } head.type= R $\wedge$head.msg=Y\\
\comment{subscribe}
\sep \hspace*{.4cm}
out$\coloneqq$ out$\bullet$(msg(false,self\_addr,server\_addr,S,content)) \\
\tab {\bf if } $\neg$subscribed\\
\comment{set the subscribed flag}
\sep \hspace*{.4cm}
subscribed,interface$\coloneqq$ true,tail(interface)\\
\tab {\bf if } head.type=S$\wedge$head.msg=Y\\
\comment{unsubscribe}
\sep \hspace*{.4cm}
out$\coloneqq$ out$\bullet$(msg(false,self\_addr,server\_addr,U,content)) \\
\tab {\bf if } unsubscribe\\
\comment{reset the unsubscribe flag}
\sep \hspace*{.4cm}
unsubscribe,interface$\coloneqq$ false,tail(interface)\\
\tab {\bf if } head.type=U$\wedge$head.msg=Y\\
\comment{update subscription}
\sep \hspace*{.4cm}
out$\coloneqq$ out$\bullet$(msg(false,self\_addr,server\_addr,P,content))\\
\tab {\bf if } subscribed$\wedge$update\_add\\
\sep \hspace*{.4cm}
out$\coloneqq$ out$\bullet$(msg(false,self\_addr,server\_addr,Q,content))\\
\tab {\bf if } subscribed$\wedge$update\_del\\
\comment{reset the update flag}
\sep \hspace*{.4cm} update,interface$\coloneqq$ false,tail(interface)\\
\tab {\bf if } head.type=P$\wedge$head.msg=Y\\
\comment{reset the update\_del flag}
\sep \hspace*{.4cm}
update\_del,interface$\coloneqq$ false,tail(interface)\\
\tab {\bf if } head.type=Q$\wedge$head.msg=Y\\
\comment{de-register: voluntary}
\sep \hspace*{.4cm}
out$\coloneqq$ out$\bullet$(msg(false,self\_addr,server\_addr,D,content))\\
\tab {\bf if } deregister \\
\comment{reset de-registered flag}
\sep \hspace*{.4cm}
deregister,interface$\coloneqq$ false,tail(interface)\\
\tab {\bf if } head.type=D$\wedge$head.msg=Y\\
\comment{transfer messages from out queue to interface}
\sep \hspace*{.4cm}  interface,out$\coloneqq$ interface$\bullet$ head(out),tail(out)\\
\tab {\bf if } out \neq \null \\
\comment{handle messages on in queue}
\sep \hspace*{.4cm}
tag[head(in).msg\_type],in$\coloneqq$ head(in).tag,tail(in)\\
{\bf end\\}
\pgm{{\it client}}
{\bf Program} {\it server\_}(i){\bf at $\lambda$}\\
{\bf declare} \\
$\lambda$: location\\
\sep \hspace*{.4cm} subscr: array[num\_message\_type] of queue of clients
\sep \hspace*{.4cm} interface: queue of message\\
{\bf always} \\
self $\equiv$ self\_addr\\
{\bf initially}\\
interface =  \null\\
{\bf assign }\\
\priority{P1}
\comment{register clients}
registered\_clients$\coloneqq$ \\
\hspace*{.6cm} registered\_clients $\bullet$ client\\
\tab {\bf if } client$\notin$ registered\_clients\\
\comment{de-registering clients}
\sep \hspace*{.4cm}
registered\_clients$\coloneqq$ delete(registered\_clients, client) \\
\comment{transmit messages from interface}
\sep \hspace*{.4cm} $\langle$ \sep $i :0\leq i <$ length(interface)::\\
at(interface,i).status= send(at(interface,i)) \\
\tab {\bf if } interface \neq \null $\wedge$ $\neg$at(interface,i).status $\rangle$ \\
\priority{P2}
\comment{update subscription}
\sep \hspace*{.4cm}  subscr[msg\_type]$\coloneqq$ arr[msg\_type]$\bullet$ client \\
\tab {\bf if } head.type= P $\wedge$ client$\notin$arr[msg\_type]\\
\sep \hspace*{.4cm}
subscr[msg\_type]$\coloneqq$ delete(arr[msg\_type],client) \\
\tab {\bf if } head.type= Q $\wedge$ client$\in$arr[msg\_type]\\
\comment{transfer messages from out queue to interface}
\sep \hspace*{.4cm}  interface,out$\coloneqq$ interface$\bullet$ head(out),tail(out)\\
\tab {\bf if } out \neq \null \\
\comment{make sent messages null on interface}
\sep \hspace*{.4cm} $\langle$ \sep i :0$\leq i < $length(interface)::\\
at(interface,i) $\coloneqq$ \null \\
\tab {\bf if } interface \neq \null $\wedge$ at(interface,i).status $\rangle$ \\
\comment{remove null messages from head of interface}
\sep \hspace*{.4cm} interface$\coloneqq$ tail(interface)\\
\tab {\bf if } head(interface)= \null\\
{\bf end\\}
\pgm{{\it server\_}(i,addr\_self){\bf at $\lambda$}}

{\bf System}{\it ens-system}\\
{\bf Components}\\
$\langle$\sep $i : 0 \leq i \le$ NumClients ::client($i$) at $\lambda_i$$\rangle$\\
\sep \hspace*{.4cm} $\langle$\sep $j : 0 \leq j  \le$ NumServers ::server($j$) at $\lambda_j$$\rangle$\\
{\bf Interactions}\\
$\langle$ \sep $i,j: 0  \leq i\le$NumServers$\wedge$ 0$\leq$j$\le$NumClients::\\
\hspace*{.6cm} client($i$).new\_server$\coloneqq$ server($j$)\\
\tab {\bf if } can\_send(server(i),client(j))$\rangle$\\
{\bf end\\}
\begin{table}
	\begin{center}
	\begin{tabular}{|c|l|}
		\hline
		Message  type
		&
		Stands for\\
		\hline

		M
		&
Normal message \\
		\hline

H
		&
Registering with new server\\
		\hline
R
		&
Register\\
		\hline
S
		&
Subscribe\\
		\hline
U
		&
		Unsubscribe\\
		\hline

P
		&
		Update subscription(add)\\
		\hline
Q
		&
		Update subscription(delete)\\
		\hline

D
		&
		De-register\\
		\hline

	\end{tabular}
\caption{Message Types}
\label{tbl:msg}
	\end{center}
\end{table}

\subsection{Discussion}

The above specification does not use {\bf reacts-to }. In general, any program
containing {\bf reacts-to } can be converted to one without having {\bf reacts-to }.
A simple heuristic is to replace {\bf reacts-to } by {\bf if} and put all these in
higher priority section of the program. Now we explain some of the subtle
points of the above specification. It is assumed that $P1>P2$,
in client as well as in server.  We have used a
function $can_send(i,j)$ which returns if agent $i$ can send message to
agent $j$. Both client and server maintain $in$ and $out$ queues, which are
queues of messages. The messages on $in$ queue come from the $interface$ and
messages from  $out$ queue go to $interface$.  There is a
difference in the way messages are transmitted from the $interface$ in case of
$client$ and $server$. In case of a client, the message at the head of the
queue is processed, it will block if  the first message in the queue can not
be sent.  Whereas this is not the case with server. The rationale
for it is that at a time server may have connection with one client but
may not have with another and if the client for which message is at the front
of the queue is not connected at a time, all the other clients which can
receive message should be able to
receive. That is why transmission of message from the interface of server
works on all the messages in $interface$ simultaneously. Various message
types have been explained in Table~\ref{tbl:msg}.
New server actually comes at a lower level with hand off, that is why
we have not shown it explicitly over here.  The specification of handoff would
be needed had we been working at level of Mobile IP~\cite{} and
Cellular IP~\cite{}. We have
not shown the handling of messages on in queue of client and addition of
messages to out queue of server, because these are application dependent
decisions, and all we need here and assume is that clients handle the
message they get on their in queue in a way consistent with its application
logic, similarly out of server too has messages for clients consistent with
the associated application logic.

\section{Conclusion}
\label{sec:conclusion}
	In this work we have shown that UNITY formalism is quite powerful for specification of  systems in mobile computing environment. Based on our experience with Mobile UNITY we have proposed doing away with very strong Mobile UNITY construct {\bf reacts-to }. We have also proposed modification to the {\bf assign} section of UNITY to reflect the systems in Mobile computing. We have shown that our additions do not violate the weakly fair execution semantics of UNITY model. These modifications do not modify the proof logic system  of UNITY.  We have taken  an example of event notification service system to illustrate our ideas more concretely. As a future work one could try to incorporate these changes to the compilers which exist for translations of UNITY program to conventional programming languages.
\balance
\bibliographystyle{ieeetr}

redpajama_set_name: RedPajamaArXiv