Concurrent constraint logic programming

Concurrent constraint logic programming is a version of constraint logic programming aimed primarily at programming concurrent processes rather than (or in addition to) solving constraint satisfaction problems. Goals in constraint logic programming are evaluated concurrently; a concurrent process is therefore programmed as the evaluation of a goal by the interpreter.

Syntactically, concurrent constraint logic programs are similar to non-concurrent programs, the only exception being that clauses include guards, which are constraints that may block the applicability of the clause under some conditions. Semantically, concurrent constraint logic programming differs from its non-concurrent versions because a goal evaluation is intended to realize a concurrent process rather than finding a solution to a problem. Most notably, this difference affects how the interpreter behaves when more than one clause is applicable: non-concurrent constraint logic programming recursively tries all clauses; concurrent constraint logic programming chooses only one. This is the most evident effect of an intended directionality of the interpreter, which never revise a choice it has previously taken. Other effects of this are the semantical possibility of having a goal that cannot be proved while the whole evaluation does not fail, and a particular way for equating a goal and a clause head.

Constraint handling rules can be seen as a form of concurrent constraint logic programming,[1] but are used for programming a constraint simplifier or solver rather than concurrent processes.

Description

In constraint logic programming, the goals in the current goal are evaluated sequentially, usually proceeding in a LIFO order in which newer goals are evaluated first. The concurrent version of logic programming allows for evaluating goals in parallel: every goal is evaluated by a process, and processes run concurrently. These processes interact via the constraint store: a process can add a constraint to the constraint store while another one checks whether a constraint is entailed by the store.

Adding a constraint to the store is done like in regular constraint logic programming. Checking entailment of a constraint is done via guards to clauses. Guards require a syntactic extension: a clause of concurrent constraint logic programming is written as H :- G | B where G is a constraint called the guard of the clause. Roughly speaking, a fresh variant of this clause can be used to replace a literal in the goal only if the guard is entailed by the constraint store after the equation of the literal and the clause head is added to it. The precise definition of this rule is more complicated, and is given below.

The main difference between non-concurrent and concurrent constraint logic programming is that the first is aimed at search, while the second is aimed at implementing concurrent processes. This difference affects whether choices can be undone, whether processes are allowed not to terminate, and how goals and clause heads are equated.

The first semantical difference between regular and concurrent constraint logic programming is about the condition when more than one clause can be used for proving a goal. Non-concurrent logic programming tries all possible clauses when rewriting a goal: if the goal cannot be proved while replacing it with the body of a fresh variant of a clause, another clause is proved, if any. This is because the aim is to prove the goal: all possible ways to prove the goal are tried. On the other hand, concurrent constraint logic programming aims at programming parallel processes. In general concurrent programming, if a process makes a choice, this choice cannot be undone. The concurrent version of constraint logic programming implements processes by allowing them to take choices, but committing to them once they have been taken. Technically, if more than one clause can be used to rewrite a literal in the goal, the non-concurrent version tries in turn all clauses, while the concurrent version chooses a single arbitrary clause: contrary to the non-concurrent version, the other clauses will never be tried. These two different ways for handling multiple choices are often called "don't know nondeterminism" and "don't care nondeterminism".

When rewriting a literal in the goal, the only considered clauses are those whose guard is entailed by the union of the constraint store and the equation of the literal with the clause head. The guards provide a way for telling which clauses are not to be considered at all. This is particularly important given the commitment to a single clause of concurrent constraint logic programming: once a clause has been chosen, this choice will be never reconsidered. Without guards, the interpreter could choose a "wrong" clause to rewrite a literal, while other "good" clauses exist. In non-concurrent programming, this is less important, as the interpreter always tries all possibilities. In concurrent programming, the interpreter commits to a single possibility without trying the other ones.

A second effect of the difference between the non-concurrent and the concurrent version is that concurrent constraint logic programming is specifically designed to allow processes to run without terminating. Non-terminating processes are common in general in concurrent processing; the concurrent version of constraint logic programming implements them by not using the condition of failure: if no clause is applicable for rewriting a goal, the process evaluating this goal stops instead of making the whole evaluation fail like in non-concurrent constraint logic programming. As a result, the process evaluating a goal may be stopped because no clause is available to proceed, but at the same time the other processes keep running.

Synchronization among processes that are solving different goals is achieved via the use of guards. If a goal cannot be rewritten because all clauses that could be used have a guard that is not entailed by the constraint store, the process solving this goal is blocked until the other processes add the constraints that are necessary to entail the guard of at least one of the applicable clauses. This synchronization is subject to deadlocks: if all goals are blocked, no new constraints will be added and therefore no goal will ever be unblocked.

A third effect of the difference between concurrent and non-concurrent logic programming is in the way a goal is equated to the head of a fresh variant of a clause. Operationally, this is done by checking whether the variables in the head can be equated to terms in such a way the head is equal to the goal. This rule differs from the corresponding rule for constraint logic programming in that it only allows adding constraints in the form variable=term, where the variable is one of the head. This limitation can be seen as a form of directionality, in that the goal and the clause head are treated differently.

Precisely, the rule telling whether a fresh variant H:-G|B of a clause can be used to rewrite a goal A is as follows. First, it is checked whether A and H have the same predicate. Second, it is checked whether there exists a way for equating with given the current constraint store; contrary to regular logic programming, this is done under one-sided unification, which only allows a variable of the head to be equal to a term. Third, the guard is checked for entailment from the constraint store and the equations generated in the second step; the guard may contain variables that are not mentioned in the clause head: these variables are interpreted existentially. This method for deciding the applicability of a fresh variant of a clause for replacing a goal can be compactly expressed as follows: the current constraint store entails that there exists an evaluation of the variables of the head and the guard such that the head is equal to the goal and the guard is entailed. In practice, entailment may be checked with an incomplete method.

An extension to the syntax and semantics of concurrent logic programming is the atomic tell. When the interpreter uses a clause, its guard is added to the constraint store. However, also added are the constraints of the body. Due to commitment to this clause, the interpreter does not backtrack if the constraints of the body are inconsistent with the store. This condition can be avoided by the use of atomic tell, which is a variant in which the clause contain a sort of "second guard" that is only checked for consistency. Such a clause is written H :- G:D|B. This clause is used to rewrite a literal only if G is entailed by the constraint store and D is consistent with it. In this case, both G and D are added to the constraint store.

History

The study of concurrent constraint logic programming started at the end of the 1980s, when some of the principles of concurrent logic programming were integrated into constraint logic programming by Michael J. Maher. The theoretical properties of concurrent constraint logic programming were later studied by various authors, including Martin Rinard and Vijay A. Saraswat.[2]

See also

References

  1. ^ Frühwirth, Thom. "Theory and practice of constraint handling rules." The Journal of Logic Programming 37.1-3 (1998): 95-138.
  2. ^ Saraswat, Vijay A. (1993). Concurrent Constraint Programming. The MIT Press. doi:10.7551/mitpress/2086.001.0001. ISBN 978-0-262-29097-5.

Bibliography

Read other articles:

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Oktober 2022. Hector dilihat dari Stokes Hill Wharf di Darwin menghadap Barat Laut pada jarak sekitar 80 km (foto HDR) Hector dilihat dari Gunn Point, Northern Territory Hector adalah julukan untuk awan petir cumulonimbus yang terbentuk secara teratur hampir se...

 

 

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Januari 2023. Yang Berbahagia Puan Sri DatinJanaky Athi NahappanLahirJanaky Devar25 Februari 1925Kuala Lumpur, Malaya Britania (sekarang Malaysia)Meninggal9 Mei 2014(2014-05-09) (umur 89)Kuala Lumpur, MalaysiaKebangsaanTamil MalaysiaPekerjaanAhli politik, aktiv...

 

 

English daily newspaper published from Srinagar Kashmir ReaderTypeDaily newspaperFormatBroadsheetOwner(s)Haji Hayat MohammadFounder(s)Haji Hayat MohammadNews editorBilal BhatFoundedMay 15, 2012LanguageEnglishHeadquartersSrinagarWebsitekashmirreader.com Kashmir Reader is an English-language daily newspaper published from Srinagar, and is owned by the Helpline Group. It was launched in May 2012[1] with the motto of Nothing But News. Kashmir Reader[2] has published articles by we...

معهد الأمم المتحدة لبحوث نزع السلاح معهد الأمم المتحدة لبحوث نزع السلاح‌ شعار معهد الأمم المتحدة لبحوث نزع السلاح المقر الرئيسي جنيف،  سويسرا تاريخ التأسيس 1980؛ منذ 44 سنوات (1980) النوع معهد أبحاث المنظمة الأم الجمعية العامة للأمم المتحدةالمجلس الاقتصادي والاجتم�...

 

 

Cunard beralih ke halaman ini. Untuk kegunaan lain, lihat Cunard (disambiguasi). British and North American Royal Mail Steam Packet Company beralih ke halaman ini. Untuk Royal Mail Steam Packet Company berbeda, yang kemudian menjadi Royal Mail Lines, lihat Royal Mail Steam Packet Company. Cunard LineJenisAnak perusahaanIndustriPengapalan, transportasiDidirikan1840; 183 tahun lalu (1840) (dengan nama British and North American Royal Mail Steam Packet Company)KantorpusatCarnival House, Sou...

 

 

Greek politician and revolutionary leader Asimakis FotilasPortrait by Ioannis OikonomouBorn1761Kalavryta, Ottoman Empire (now Greece)Died1835Kalavryta, GreeceNationalityGreekOccupationGreek revolutionary leader Asimakis Fotilas (Greek: Ασημάκης Φωτήλας) (1761–1835) was a Greek politician and a revolutionary leader. Biography He was born in Kalavryta and was a primate of Kalavryta, who later took part in the Greek War of Independence. Nearly two months before the start of the ...

William Zeckendorf, Sr.Zeckendorf di New York, 1952Lahir(1905-06-30)30 Juni 1905Paris, Illinois, ASMeninggal30 September 1976(1976-09-30) (umur 71)New York City, New York, ASKebangsaanAmericanPekerjaanPengembang lahan nyataSuami/istriIrma Levy (bercerai) Marion Griffin (sampai kematiannya) Alice Odenheimer BacheAnakwith Levy: --William Zeckendorf, Jr. --Susan Zeckendorf Nicolson William Zeckendorf, Sr. (30 Juni 1905 – 30 September 1976) adalah seorang pengembang lahan ny...

 

 

Egyptian hermit-saint SaintVitalis of GazaSaint-Vitalis Orthodox IconographyHermitBornGaza, PalestineDiedc. 625 ADAlexandria, EgyptVenerated inEastern Orthodox ChurchRoman Catholic ChurchFeastJanuary 11April 22 (Orthodox Church)Patronageprostitutes, day-laborers Saint Vitalis of Gaza (died c. 625 AD) was a hermit venerated as a saint in the Eastern Orthodox Church and the Catholic Church. He is the patron saint of prostitutes and day-laborers. Life A monk of the monastery of ...

 

 

Jennifer McCannJunior Minister Assisting the Deputy First MinisterIn office12 June 2012 – 25 June 2016Serving with Jonathan Bell, Michelle McIlveen and Emma Pengelly[a]Deputy FMMartin McGuinnessPreceded byMartina AndersonSucceeded byMegan FearonMember of the Legislative Assemblyfor Belfast WestIn office7 March 2007 – 6 December 2016Preceded byDiane DoddsSucceeded byÓrlaithí Flynn Personal detailsBorn (1960-03-01) 1 March 1960 (age 64) [1]Twinbrook...

Part of a series on theCulture of the Philippines Society History Language sign language People ethnic groups indigenous peoples Religion Value system Kinship Honorifics Arts and literature Architecture Arts Comics Dance Fashion and clothing Literature Music Other Cuisine Cultural Properties Folklore Historical markers Media newspapers radio cinema TV Internet Mythology Public holidays festivals Sports Symbols Anthem Bird Coat of arms Flag Flower Gem Great Seal Language Motto Sport and marti...

 

 

Si ce bandeau n'est plus pertinent, retirez-le. Cliquez ici pour en savoir plus. Cet article ne cite pas suffisamment ses sources (mai 2021). Si vous disposez d'ouvrages ou d'articles de référence ou si vous connaissez des sites web de qualité traitant du thème abordé ici, merci de compléter l'article en donnant les références utiles à sa vérifiabilité et en les liant à la section « Notes et références ». En pratique : Quelles sources sont attendues ? Comme...

 

 

此條目可参照英語維基百科相應條目来扩充。 (2021年5月6日)若您熟悉来源语言和主题,请协助参考外语维基百科扩充条目。请勿直接提交机械翻译,也不要翻译不可靠、低品质内容。依版权协议,译文需在编辑摘要注明来源,或于讨论页顶部标记{{Translated page}}标签。 约翰斯顿环礁Kalama Atoll 美國本土外小島嶼 Johnston Atoll 旗幟颂歌:《星條旗》The Star-Spangled Banner約翰斯頓環礁�...

Sri Lankan murderer (1949–1975) This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Maru Sira – news · newspapers · books · scholar · JSTOR (September 2020) (Learn how and when to remove this message) Maru Siraදෙද්දුවා ජයතුංගලාගේ සිරිපාලD.J. Siripala in police ...

 

 

Istana Kehakiman Putrajaya (tampak depan). Istana Kehakiman Putrajaya merupakan gedung yang terletak di Putrajaya. Gedung ini dijadikan tempat bagi Mahkamah Rayuan Malaysia dan Mahkamah Persekutuan Malaysia. Pemakaian Istana Kehakiman seiring dengan pemindahan dari Gedung Sultan Abdul Samad. Ini merupakan hasil dari pemindahan pusat pemerintahan Malaysia dari Kuala Lumpur ke Putrajaya. Pembangunan Istana Kehakiman diserahkan kepada perusahaan arsitektur bernama Qidea. Pembangunan Istana Kehak...

 

 

Gereja Santo Paulus, MedanGereja Katolik Paroki Santo Paulus Pasar Merah MedanGereja Katolik Paroki Santo Paulus Pasar Merah Medan pada tahun 2023LokasiPasar Merah, Medan, Sumatera UtaraDenominasiGereja Katolik RomaSitus webhttps://archdioceseofmedan.or.id/paroki-medan-pasar-merah/SejarahPendiriBeatus PeperArsitekturStatus fungsionalAktifTipe arsitekturGerejaAdministrasiKeuskupanKeuskupan Agung Medan Gereja Santo Paulus Medan atau Gereja Katolik Paroki SPPM Medan adalah gereja Katolik yang be...

ملك هولندا ڨيليم ألكساندرWillem-Alexander (بالهولندية: Willem-Alexander)‏  الملك ڨيليم ألكساندر[1] فترة الحكم30 أبريل 2013 – الآن ولي العهد الأميرة الأميرة كاتارينا أماليا الملكة بياتريكس   معلومات شخصية اسم الولادة (بالهولندية: Prins Willem-Alexander Claus George Ferdinand der Nederlanden, Prins van Oranje-Nassau, Jonkhee...

 

 

2015 biographical drama film Experimenter:The Stanley Milgram StoryThe theatrical release posterDirected byMichael AlmereydaWritten byMichael AlmereydaProduced byUri SingerFabio GolombekAimee SchoofIsen RobbinsDanny A. AbeckaserPer MelitaJoseph WhiteMichael AlmereydaStarringPeter SarsgaardWinona RyderJim GaffiganEdoardo BalleriniJohn PalladinoKellan LutzDennis HaysbertDanny A. AbeckaserTaryn ManningAnthony EdwardsLori SingerJosh HamiltonAnton YelchinAdriana L. RandallDonnie KeshawarzVondie Cu...

 

 

Irsee. Irsee adalah kota yang terletak di distrik Ostallgäu di Bavaria, Jerman. Kota Irsee memiliki luas sebesar 17.47 km². Irsee pada tahun 2006, memiliki penduduk sebanyak 1.395 jiwa. lbsKota dan kotamadya di OstallgäuAitrang · Baisweil · Bidingen · Biessenhofen · Buchloe · Eggenthal · Eisenberg · Friesenried · Füssen · Germaringen · Görisried · Günzach ·...

This article does not cite any sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: HaShalom Stadium – news · newspapers · books · scholar · JSTOR (March 2019) (Learn how and when to remove this message) HaShalom StadiumAl-Salam StadiumLocationUmm al-Fahm, IsraelCapacity5,800SurfaceGrassTenantsHapoel Umm al-FahmMaccabi Umm al-Fahm HaShalom Stadium (Hebrew: אי...

 

 

Giancarlo FisichellaFisichella di Monza 2009.Lahir14 Januari 1973 (umur 51) Roma, ItaliaKarier Kejuaraan Dunia Formula SatuKebangsaan ItaliaTahun aktif1996–2009TimMinardi, Jordan, Benetton, Sauber, Renault, Force India FerrariJumlah lomba231 (229 start)Juara Dunia0Menang3Podium19Total poin275Posisi pole4Lap tercepat2Lomba pertamaGrand Prix Australia 1996Menang pertamaGrand Prix Brasil 2003Menang terakhirGrand Prix Malaysia 2006Lomba terakhirGrand Prix Abu Dhabi 2009Klasemen 200915th (...