1. Homepage
  2. Homework
  3. COMPSYS 705 Formal Methods For Engineers - Assigment 2: LTL and SMT Solver
This question has been solved

COMPSYS 705 Formal Methods For Engineers - Assigment 2: LTL and SMT Solver

Engage in a Conversation
AustraliaUniversity of AucklandCOMPSYS 705Formal Methods For EngineersCOMPSYS705CS705

COMPSYS 705 – Formal Methods For Engineers Assigment – 2 CourseNana.COM

Submission Format: 1 file called <your-upi>.tgz containing the following: CourseNana.COM


CourseNana.COM


CourseNana.COM

a.) A promela file, including the LTL formulas for Q1. CourseNana.COM

b.) A python script encoding a working SMT formulation for Q2. CourseNana.COM

c.) A pdf file/report explaining the results obtained from SPIN/SMT solvers for Q1 and Q2. CourseNana.COM

NOTE: Your code should be well commented CourseNana.COM


CourseNana.COM


CourseNana.COM

Q1.) This question relates to your understanding of model-checking LTL properties on concurrent processes. CourseNana.COM

Part-A
CourseNana.COM


CourseNana.COM

Model Petersons mutual exclusion algorithm as described below in Promela. CourseNana.COM

The basic idea behind Peterson’s n-process mutual exclusion algorithm is that each process passes through n−1 stages before entering the critical section (cs). These stages are designed to block one process per stage so that after n−1 stages only one process will be eligible to enter the critical section (which we consider as stage n). The algorithm uses two integer arrays step and pos of sizes n − 1 and n respectively: pos is an array of 1-writer multi-reader variables and step is an array of multi-writer multi-reader variables. The value at step[j] indicates the latest process at step j, and pos[i] indicates the latest stage that the process i is passing through. (Peterson uses Q for pos, and TURN for step.) The array pos is initialized to 0. The process id’s, pids, are assumed to be integers between 1 and n. The code segment for process i is given in Figure 1. CourseNana.COM

Figure – 1 CourseNana.COM


CourseNana.COM

Part-B CourseNana.COM


Represent the following properties in LTL and verify them against at least 2 processes from above.
CourseNana.COM

Property-1 (Safety property): Multiple processes cannot enter the ciritical section together. Property-2 (Liveness property): If a process is waiting, eventually it will enter the critical section. Property-3 (Liveness property): Any process not in the critical section will eventually enter the critical CourseNana.COM

section.
CourseNana.COM


CourseNana.COM

Q2.) This question relates to your understanding of using SMT solvers for hardware verification. CourseNana.COM

Majority voter is a protocol used in fault tolerant systems. Consider 3-processors A, B, and C, carrying out the same computation simultaneously. Any of these processors might suffer from transient faults during processing. In the majority voter protocol, an output Y is set depending upon the majority result produced from the processors. The truth table below describes the majority voter protocol: CourseNana.COM

ABCY 0000 0010 0100 0111 1000 1011 1101 1111 CourseNana.COM


CourseNana.COM

The boolean equation:
Y = (¬A /\ B /\ C) \/ (A /\ ¬B /\ C) \/ (A /\ B /\ ¬C) \/ (A /\ B /\ C) – (1)
CourseNana.COM

gives the functional description of the truth-table above. A hardware engineer states that he/she will implement the above circuit using the equation below: CourseNana.COM

Y' = (A /\ B) \/ (B /\ C) \/ (A /\ C) – (2)
Prove using the SMT solver that Equations (1) and (2) are equivalent. If they are not, show why not?
CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
Australia代写,University of Auckland代写,COMPSYS 705代写,Formal Methods For Engineers代写,COMPSYS705代写,CS705代写,Australia代编,University of Auckland代编,COMPSYS 705代编,Formal Methods For Engineers代编,COMPSYS705代编,CS705代编,Australia代考,University of Auckland代考,COMPSYS 705代考,Formal Methods For Engineers代考,COMPSYS705代考,CS705代考,Australiahelp,University of Aucklandhelp,COMPSYS 705help,Formal Methods For Engineershelp,COMPSYS705help,CS705help,Australia作业代写,University of Auckland作业代写,COMPSYS 705作业代写,Formal Methods For Engineers作业代写,COMPSYS705作业代写,CS705作业代写,Australia编程代写,University of Auckland编程代写,COMPSYS 705编程代写,Formal Methods For Engineers编程代写,COMPSYS705编程代写,CS705编程代写,Australiaprogramming help,University of Aucklandprogramming help,COMPSYS 705programming help,Formal Methods For Engineersprogramming help,COMPSYS705programming help,CS705programming help,Australiaassignment help,University of Aucklandassignment help,COMPSYS 705assignment help,Formal Methods For Engineersassignment help,COMPSYS705assignment help,CS705assignment help,Australiasolution,University of Aucklandsolution,COMPSYS 705solution,Formal Methods For Engineerssolution,COMPSYS705solution,CS705solution,