1. Express the following statements in propositional logic and derive the relationships between the monitoring state,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Express the following statements in propositional logic and derive the relationships between the monitoring state, the test state, and the fact that the reactor is operating. (2 point) A. The reactor is either in the monitoring or test state. It cannot be in both states. The reactor is functioning normally only when it is in one of these states. B. If a reactor is functioning normally and is not in the test state then the reactor can be regarded as being operating. Two propositions must be defined one for each A and B. 2. Given the following inference rules, show that the following proposition is true (i.e., tautology). Denote which rule is applied in each step. (2 points) (ChannelOpen / ReceiverReady (LineClosed ChannelOpen ⇒-Receiver Ready))⇒-LineClosed Inference Rules: pl → p2 p1V p2 p1 Apt false p1 Vp1 p1 p1 p1 V p2 = impl = or 1 "(01/02) = contr(Contradiction) = or 5 p1 Vp2 p1 V true true pt A false false DeM A p1 Vp1 = or 2 true and 3 A p1 / (p2 v p3) (p1 ^ p2) V (p1 / p3) p1 = exmid (Tautology) p1 V false - or 3 =dist AV p1 v (p1 / p2) p1 - 04 3. Suppose the following requirements: A. If the operator types the ALARM command, then the subsidiary alarm will be activated and an alarm message will be written to the log file. B. Whenever the subsidiary alarm is activated, the main valve is closed and shut-down is started. C. If the main valve is closed, then the reactor can be regarded as being in a non-operational state. Express the requirements in propositional calculus. Using the inference rules in Question 2, show that if the alarm command is activated under the propositions, the reactor will be in a non-operational state. (2) points) 4. Supposed that a procedure update has two integer parameters-flag and valve. The procedure examines the first parameter flag and depending on the value of flag, the second parameter valve is set. If flag lies between zero and 10 then valve is set to zero. Otherwise, valve is unchanged. (2 point) A. Write the post-conditions in the predicate logic. B. Model the post-conditions as a predicate in Alloy. C. Run the model (e.g., "run predicate-name for 3 but exactly 2 Valve, 5 int"). D. Observe the first instance and check if the instance satisfies what you intended in your model. If not, fix it. E. Capture the screen of the first instance found. 5. Supposed that a procedure search has three parameters - vals, searchfor, and found. vals is an integer array with a range of 1..5. searchfor is an integer parameter. If searchfor is in vals, then found is set to one. Otherwise, it is set to two. (2 point) A. Write the post-conditions in the predication logic. B. Model the post-conditions as a predicate in Alloy. C. Run the model (c.g., "run predicate-name for 3 but exactly 5 Vals, 4 int") D. Observe the first instance and check if the instance satisfies what you intended in your model. If not, fix it. E. Capture the screen of the first instance found. 6. Complete the Academic Records model by specifying the following requirements (5 points): A. Eliminate any redundant prereqs (see the lecture notes for an example). B. Create a signature of grades with a constraint of which student has a grade in each course taken. C. Divide grades into exactly A, B, C, D, and F. D. Change graduation condition so student must pass (C or better) in each required course. E. Write assertion that if a student can graduate, they must have passed all required courses as well as transitive prerequisites of required courses. Fix the model if any counterexample is found. F. Allow departments multiple sets of required courses, and student can fulfill any one of those sets. G. Canonicalize required sets so that they do not have the same set of required courses (see the List example in the lecture notes). Note: Turn in the model and screen captures of the "canTake Course" and "canGraduate" predicates. Clearly comment the model with the above labels. 1. Express the following statements in propositional logic and derive the relationships between the monitoring state, the test state, and the fact that the reactor is operating. (2 point) A. The reactor is either in the monitoring or test state. It cannot be in both states. The reactor is functioning normally only when it is in one of these states. B. If a reactor is functioning normally and is not in the test state then the reactor can be regarded as being operating. Two propositions must be defined one for each A and B. 2. Given the following inference rules, show that the following proposition is true (i.e., tautology). Denote which rule is applied in each step. (2 points) (ChannelOpen / ReceiverReady (LineClosed ChannelOpen ⇒-Receiver Ready))⇒-LineClosed Inference Rules: pl → p2 p1V p2 p1 Apt false p1 Vp1 p1 p1 p1 V p2 = impl = or 1 "(01/02) = contr(Contradiction) = or 5 p1 Vp2 p1 V true true pt A false false DeM A p1 Vp1 = or 2 true and 3 A p1 / (p2 v p3) (p1 ^ p2) V (p1 / p3) p1 = exmid (Tautology) p1 V false - or 3 =dist AV p1 v (p1 / p2) p1 - 04 3. Suppose the following requirements: A. If the operator types the ALARM command, then the subsidiary alarm will be activated and an alarm message will be written to the log file. B. Whenever the subsidiary alarm is activated, the main valve is closed and shut-down is started. C. If the main valve is closed, then the reactor can be regarded as being in a non-operational state. Express the requirements in propositional calculus. Using the inference rules in Question 2, show that if the alarm command is activated under the propositions, the reactor will be in a non-operational state. (2) points) 4. Supposed that a procedure update has two integer parameters-flag and valve. The procedure examines the first parameter flag and depending on the value of flag, the second parameter valve is set. If flag lies between zero and 10 then valve is set to zero. Otherwise, valve is unchanged. (2 point) A. Write the post-conditions in the predicate logic. B. Model the post-conditions as a predicate in Alloy. C. Run the model (e.g., "run predicate-name for 3 but exactly 2 Valve, 5 int"). D. Observe the first instance and check if the instance satisfies what you intended in your model. If not, fix it. E. Capture the screen of the first instance found. 5. Supposed that a procedure search has three parameters - vals, searchfor, and found. vals is an integer array with a range of 1..5. searchfor is an integer parameter. If searchfor is in vals, then found is set to one. Otherwise, it is set to two. (2 point) A. Write the post-conditions in the predication logic. B. Model the post-conditions as a predicate in Alloy. C. Run the model (c.g., "run predicate-name for 3 but exactly 5 Vals, 4 int") D. Observe the first instance and check if the instance satisfies what you intended in your model. If not, fix it. E. Capture the screen of the first instance found. 6. Complete the Academic Records model by specifying the following requirements (5 points): A. Eliminate any redundant prereqs (see the lecture notes for an example). B. Create a signature of grades with a constraint of which student has a grade in each course taken. C. Divide grades into exactly A, B, C, D, and F. D. Change graduation condition so student must pass (C or better) in each required course. E. Write assertion that if a student can graduate, they must have passed all required courses as well as transitive prerequisites of required courses. Fix the model if any counterexample is found. F. Allow departments multiple sets of required courses, and student can fulfill any one of those sets. G. Canonicalize required sets so that they do not have the same set of required courses (see the List example in the lecture notes). Note: Turn in the model and screen captures of the "canTake Course" and "canGraduate" predicates. Clearly comment the model with the above labels.
Expert Answer:
Answer rating: 100% (QA)
Here are the steps to solve the questions 1 A Let M the reactor is in the monitoring state T the rea... View the full answer
Related Book For
Statistics Principles And Methods
ISBN: 9781119497110
8th Edition
Authors: Richard A. Johnson, Gouri K. Bhattacharyya
Posted Date:
Students also viewed these general management questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
For the universe of all integers, let p(x), q(x), r(x), s(x), and r(x) be the following open statements. p(x): x > 0 q(x): x is even r (x): x is a perfect square s(x): x is (exactly) divisible by 4 f...
-
Assume that you have been hired as a consultant by CGT, a major producer of chemicals and plastics, including plastic grocery bags, styrofoam cups, and fertilizers, to estimate the firms weighted...
-
Why is each significant capital project usually financed and accounted for through a separate Capital Projects Fund?
-
Describe various types of slotters in brief.
-
Show that any two statistically independent random variables have a correlation coefficient that is zero.
-
Arrow Distributing Corp. (See Table) likes to track inventory by using weeks of supply as well as by inventory turnover. (a) What is its weeks of supply? (b) What percent of Arrows assets are...
-
Would a transformational leader make a more successful strategic leader? Why should a transformational leader be better suited to do, as they work toward that common goal of inspiring individuals of...
-
You recently received the following e-mail from a client and friend: Hey Great Student, I cannot believe it is almost year end! Only a few days before its 2019. As you recall, I was lucky enough to...
-
ABC Mega Catering Sdn Bhd (ABC) was established in 2005 by Ali, Baba and Chong. Thecompany reported more than RM1 million losses in the year 2020 and the figures expected to behigher for this year....
-
Have you ever in the course of your work reviewed a report that had been annualized? If so, did you agree with how it appeared to be annualized?
-
If so, how do you think these legislative requirements have affected that facility?
-
What is wrong with listing roles in the business plan organization structure section as "to be announced"?
-
If you reviewed a budget at your workplace, do you think the major increases and decreases could be explained? If so, why? If not, why not?
-
Describe how the Merit-Based Incentive Payment System (MIPS) and the Advanced Alternative Payment Model (APM) are illustrative of pay-for-performance.
-
Constitutional Law in Contemporary America, Volume 2: Civil Rights and Liberties (2017 edition) David A. Schultz | John R. Vile | Michelle Deardorff West Academic Publishing Read the Furman v....
-
What are some of the features of the Unified Process (UP)?
-
From the probabilities exhibited in this Venn diagram, find P(A), P(AB), P(B C), and P(BC). A .3 .1 .02 .18 .4 C B
-
Cities must find better ways to dispose of solid waste. According to the Environmental Protection Agency, in a recent year, the composition of solid municipal waste was (a) Determine the percentage...
-
A new study is widely reported to show that dog owners benefit by being more agreeable and extroverted than cat owners. Comment in light of facts that, on average, dogs cost more to maintain and that...
-
The payments set out in Table 9.9 have been made during the year in relation to a non-current asset bought at the beginning of the year. What cost figure should be used as the basis for the...
-
Outline three different depreciation methods and appraise them in the context of the definition and objectives of depreciation.
-
The following actual and estimated figures are available. Based on these figures, evaluate the following. a. Calculate annual depreciation under the straight-line method. b. Calculate the...
Study smarter with the SolutionInn App