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:
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...
-
Insurance companies and pension plans hold large quantities of bond investments. Brighton Insurance Corp. purchased $2,300,000 of 10.0% bonds of Scanlon, Inc., for 114 on January 1, 2012. These bonds...
-
Record the transactions in E6A in the general journal. In E6A a. Collin Ferdinand opened Ferdinand Repair Service, Inc., by investing $8,600 in cash and $3,200 in repair equipment in return for...
-
Which document lists the components needed to manufacture a specific product? a. operations list b. master production schedule c. bill of materials d. production order
-
In the year just ended, Callaway Lighting had sales of $5,000,000 and incurred a cost of goods sold equal to $4,500,000. The firms operating expenses were $130,000 and its increase in retained...
-
Mary purchased 200 shares of Sweet Pea Co. stock at a price of $81.35 six months ago. She sold all stocks today for $95.18. During that period the stock paid dividends of $3.80 per share. What is...
-
You are the owner of a small business that manages the program, food, and merchandise sales at the Excel Center, where the local professional basketball team plays. In addition to basketball games,...
-
Some in the music industry think that this industry should be driven by the eyes, ears, and gut instinct of industry tastemakers rather than by math and algorithms. Do you agree?
-
2. The Leaning Tower of Pisa is 50 m tall and about 7.7 m in radius. The top is 4.7 m off center. Is the tower in stable equilibrium? If so, how much farther can it lean before it becomes unstable?...
-
A 1055-cm3 container was evacuated, and 0.01031 mol of NO and 0.00440 mol of Br2 were placed in the container; the equilibrium 2NO(g) + Br2(g) 2NOBr(g) was established at 323.7 K, and the final...
-
a) Explain the purpose of each of the bits in the TMOD register. b) The 8081 comprises two timers, Timer 0 and Timer 1. i) [3 Marks] State the bits that need to be set/cleared in the TMOD register if...
-
What is the issuance price for a 8 % , 2 - year, $ 2 3 6 , 6 7 6 bond issued when the market / effective interest rate was 6 % ? The bond pays interest semi - annually on July 1 and December 3 1 ....
-
During a wrestling match, a 150.0 kg wrestler briefly stands on one hand during a maneuver designed to perplex his already moribund adversary. By how much does the upper arm bone shorten in length?...
-
Anupam B. Jena, Tomas J. Philipson, Endogenous cost-effectiveness analysis and healthcare technology adoption, Journal of Health Economics, Volume 32, Issue 1,2013, Pages 172-180, ISSN 0167-6296,...
-
Tarick Toys Company manufactures video game consoles and accounts for product costs using process costing. The following information is available regarding its June inventories. The following...
-
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...
-
Schenk, Inc., sells desk lamps and desks. The following information is from the June income statement. Schenks management is interested in knowing the number of lamps and desks it must sell to earn...
-
Ratliff Corporation produces lawn fertilizer spreaders. Ratliffs income statement shown has been prepared for August of the current year. Instructions: 1. Prepare Ratliffs August income statement...
-
Millard, Inc., sold 68,000 computer printers last year with the following results. Complete each of the following instructions independently of the others. Instructions: 1. Millard projects that it...
Study smarter with the SolutionInn App