講解:CSC8105北戏、CS/Python、software漫蛔、Python/JavaSPSS|R

CSC8105: Coursework Project(2018/2019)Aims To assess student’s ability to model and validate high-level prototypes of software used toimplement communicating systems. To become familiar with a computer-aided tool for the specification and verification of communicatingsystems.GeneralThere are four arrays of N byte values each, A, B, C and D, stored in processes P rA, P rB,P rC and P rD, respectively. These values are used to calculate a password. Your have beenasked to design a validated communication scheme to produce an array R of N byte values (thepassword), to be stored in process Rcv. The new array (the password being calculated) shouldsatisfy R[i] = max{A[i], B[i], C[i], D[i]} for all 0 ≤ i network is given in the diagram below.PrA PrBPrD PrCRcvIt is assumed that: message passing is the only means of interprocess communication; process Rcv is not allowed to carry out any calculations involving the data received; message passing is assumed to be asynchronous, i.e. it is carried out using buffered channels,which are assumed to be error-free in Task 1; a single message can carry at most one byte data value used in calculations; the four outer processes can communicate and the design should allow data received, say, byP rA from P rD, to be forwarded to P rB (unless P rA is certain that P rB does not need thisdata); any of the four outer processes can calculate and send the values of array R to Rcv.Project Tasks(1) Develop a highly concurrent symmetric solution to the above problem, using as few messageexchanges as possible. Write a PROMELA program which would provide a validation modelfor your solution. Formulate the relevant correctness requirements and verify, using SPIN,that they are indeed satisfied. Start with N = 2 (or even N = 1) and see what is the largestvalue of N for which the validation task can still be carCSC8105作業(yè)代做嗜愈、代寫CS/Python編程設(shè)計(jì)作業(yè)、代寫software留學(xué)生作業(yè)莽龟、代做Python/Java課ried out in ‘reasonable’ time.(2) It turned out that the channels outgoing from PrA can duplicate messages. Modify yoursolution to cope with these problems. Again, formulate correctness requirements and validatethem using SPIN.Marking Scheme Task 1 (75% in total): design: 25%, PROMELA code: 40%, and validation results andexplanations: 10%. Task 2 (25% in total): design: 10%, PROMELA code: 10%, and validation results andexplanations: 5%.SubmissionThe assignment must be submitted to NESS in a single .zip file by8.45am on Monday, 26th November 2018In your submission you should provide, for each of the two tasks: PROMELA program; brief explanations of how your solution works; validation results produced by SPIN.HintThe following can be used as rough template while working on your solution. Note that P rA hasmy id equal to 0, P rB has my id equal to 1, etc.#define N 2byte init_data[8];proctype proc (byte my_id, next_id, previous_id; chan to_next, from_previous, to_receiver){ byte my_data[N]; byte i=0;/* declare more variables *//* initialise the array for this process */do:: i my_data[i] = init_data[my_id*N + i]; i++:: i==N -> breakod;/*add communication etc */}proctype receiver (chan from_A, from_B, from_C, from_D){ byte result[N] ;/* declare more variables *//* add communication etc */}init {chan AtoB = [N] of { byte }; chan BtoC = [N] of { byte }; chan CtoD = [N] of { byte };chan DtoA = [N] of { byte }; chan AtoR = [N] of { byte }; chan BtoR = [N] of { byte };chan CtoR = [N] of { byte }; chan DtoR = [N] of { byte };atomic{init_data[0]=2; init_data[1]=0; init_data[2]=5; init_data[3]=8;init_data[4]=4; init_data[5]=1; init_data[6]=3; init_data[7]=9;run proc (0,1,3,AtoB,DtoA,AtoR); run proc (1,2,0,BtoC,AtoB,BtoR);run proc (2,3,1,CtoD,BtoC,CtoR); run proc (3,0,2,DtoA,CtoD,DtoR);run receiver(AtoR,BtoR,CtoR,DtoR)}}轉(zhuǎn)自:http://ass.3daixie.com/2018111035043751.html

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末蠕嫁,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子轧房,更是在濱河造成了極大的恐慌拌阴,老刑警劉巖,帶你破解...
    沈念sama閱讀 222,104評論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件奶镶,死亡現(xiàn)場離奇詭異迟赃,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)厂镇,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,816評論 3 399
  • 文/潘曉璐 我一進(jìn)店門纤壁,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人捺信,你說我怎么就攤上這事酌媒∏烦眨” “怎么了?”我有些...
    開封第一講書人閱讀 168,697評論 0 360
  • 文/不壞的土叔 我叫張陵秒咨,是天一觀的道長喇辽。 經(jīng)常有香客問我,道長雨席,這世上最難降的妖魔是什么菩咨? 我笑而不...
    開封第一講書人閱讀 59,836評論 1 298
  • 正文 為了忘掉前任,我火速辦了婚禮陡厘,結(jié)果婚禮上抽米,老公的妹妹穿的比我還像新娘。我一直安慰自己糙置,他們只是感情好云茸,可當(dāng)我...
    茶點(diǎn)故事閱讀 68,851評論 6 397
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著谤饭,像睡著了一般标捺。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上网持,一...
    開封第一講書人閱讀 52,441評論 1 310
  • 那天宜岛,我揣著相機(jī)與錄音,去河邊找鬼功舀。 笑死萍倡,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的辟汰。 我是一名探鬼主播列敲,決...
    沈念sama閱讀 40,992評論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼帖汞!你這毒婦竟也來了戴而?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,899評論 0 276
  • 序言:老撾萬榮一對情侶失蹤翩蘸,失蹤者是張志新(化名)和其女友劉穎所意,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體催首,經(jīng)...
    沈念sama閱讀 46,457評論 1 318
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡扶踊,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,529評論 3 341
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了郎任。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片秧耗。...
    茶點(diǎn)故事閱讀 40,664評論 1 352
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖舶治,靈堂內(nèi)的尸體忽然破棺而出分井,到底是詐尸還是另有隱情车猬,我是刑警寧澤,帶...
    沈念sama閱讀 36,346評論 5 350
  • 正文 年R本政府宣布尺锚,位于F島的核電站珠闰,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏缩麸。R本人自食惡果不足惜铸磅,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 42,025評論 3 334
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望杭朱。 院中可真熱鬧,春花似錦吹散、人聲如沸弧械。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,511評論 0 24
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽刃唐。三九已至,卻和暖如春界轩,著一層夾襖步出監(jiān)牢的瞬間画饥,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,611評論 1 272
  • 我被黑心中介騙來泰國打工浊猾, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留抖甘,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 49,081評論 3 377
  • 正文 我出身青樓葫慎,卻偏偏與公主長得像衔彻,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個(gè)殘疾皇子偷办,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,675評論 2 359

推薦閱讀更多精彩內(nèi)容

  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc閱讀 2,874評論 0 0
  • mean to add the formatted="false" attribute?.[ 46% 47325/...
    ProZoom閱讀 2,701評論 0 3
  • pyspark.sql模塊 模塊上下文 Spark SQL和DataFrames的重要類: pyspark.sql...
    mpro閱讀 9,464評論 0 13
  • 當(dāng)稚嫩卷入命運(yùn)齒輪 噪音用富有深意的誘惑 推搡 如若拋卻亙古的景象 我立于原點(diǎn) 伸手 接受是非與莫名 埋沒善水 等...
    花與俗閱讀 128評論 0 1
  • 我們都曾懷念那個(gè)鮮衣怒馬艰额、白馬長槍的英雄。 …………………………………………………………………………… 內(nèi)馬爾從巴...
    麥迪_88f1閱讀 486評論 3 4