Docsity

Practice Homework 3 Solutions - Service-Oriented Computing | CSC 750, Assignments of Computer Science

Toggle sidebar
bg1
CSC 750
Service-Oriented Computing
H3
2/3/2006 (Write your name above)
Problem 1 2 3 4 5 6 Total
Points: 15 20 15 15 20 15 100
Score:
This homework assignment has 6 problems, for a total of 100 points.
1. This problem deals with some of the main concepts of service-oriented computing.
(a) (5 points) Services are best applicable in settings
A. That require loose coupling among components as long as they are built using object technology.
B. Where the components are located in different enterprises.
C. Where the components are located in the same enterprise.
D. That require loose coupling among components, whether interenterprise or intraenterprise, and
independent of how the components are implemented.
(b) (5 points) The main difference between agents and objects is that
A. Agents are implemented in specialized environments like JADE whereas objects are implemented
in J2EE and .NET.
B. Agents are programmed via rules but objects are not.
C. Agents can say “No!”
D. Objects instantiate classes but agents instantiate nothing.
(c) (5 points) An agent promised to give a refund if the goods it delivered were returned. The goods have been
returned and now the agent is expected to give a refund. Based only on this scenario, which of the following
statements is true?
A. Agents should give refunds because that is the right thing to do.
B. This expectation to issue a refund illustrates a prima facie duty of the agent.
C. If all agents would issue refunds, the world’s trade would occur much more efficiently.
D. Issuing refunds for returned goods has excellent consequences for building trust and attracting
customers.
Page 1 of 5
pf3
pf4
pf5

Partial preview of the text

Download Practice Homework 3 Solutions - Service-Oriented Computing | CSC 750 and more Assignments Computer Science in PDF only on Docsity!

Service-Oriented Computing 2/3/2006 (Write your name above)

Problem 1 2 3 4 5 6 Total Points: 15 20 15 15 20 15 100 Score:

This homework assignment has 6 problems, for a total of 100 points.

  1. This problem deals with some of the main concepts of service-oriented computing. (a) (5 points) Services are best applicable in settings A. That require loose coupling among components as long as they are built using object technology. B. Where the components are located in different enterprises. C. Where the components are located in the same enterprise. D. That require loose coupling among components, whether interenterprise or intraenterprise, and independent of how the components are implemented. (b) (5 points) The main difference between agents and objects is that A. Agents are implemented in specialized environments like JADE whereas objects are implemented in J2EE and .NET. B. Agents are programmed via rules but objects are not. C. Agents can say “No!” D. Objects instantiate classes but agents instantiate nothing. (c) (5 points) An agent promised to give a refund if the goods it delivered were returned. The goods have been returned and now the agent is expected to give a refund. Based only on this scenario, which of the following statements is true? A. Agents should give refunds because that is the right thing to do. B. This expectation to issue a refund illustrates a prima facie duty of the agent. C. If all agents would issue refunds, the world’s trade would occur much more efficiently. D. Issuing refunds for returned goods has excellent consequences for building trust and attracting customers.

Service-Oriented Computing 2/3/2006 (Write your name above)

  1. This problem deals with setting up coordination requirements among three events, e, f , and g. In rough terms, e and f trigger g under the constraints specified in each part below. The correct solution would be an expression in the formal language I that captures the informal requirements. (a) (5 points) If e and f occur in any order, then g occurs after both e and f. A. e ∨ f ∨ (e ∧ f ) · g B. (e ∨ f ∨ e · g) ∧ (e ∨ f ∨ f · g) C. e ∨ f ∨ e · g ∨ f · g D. g ∨ e ∧ f (b) (5 points) If e or f occur in any order, then g occurs after either e or f. A. e ∨ f ∨ e · g ∨ f · g B. e · f ∨ f · e ∨ e · g ∨ f · g C. g ∨ e ∨ f ∨ e · g ∨ f · g D. e ∨ f ∨ e · g ∨ f · g (c) (5 points) g occurs only if e precedes f. A. g ∨ e · f B. e · f ∨ g C. e ∨ f ∨ f · e ∨ g D. e · f g (d) (5 points) If e precedes f , then g occurs too. A. e ∨ f ∨ e · f ∨ g B. g ∨ e · f C. e ∨ f ∨ f · e ∨ g D. g ∨ e · f ∨ e ∨ f
  2. This problem deals with event classes. (a) (5 points) We are given some dependency D which, based on event e being immediate, is strengthened to a dependency E. (We don’t know whether e occurs in D.) Which of the following statements is necessarily true? A. If E 6 = 0, then E/e 6 = 0 B. E/e = > C. E/e = 0 D. E/e 6 = 0 (b) (5 points) Given that e is immediate, the dependency (e∧f )∨(e∧f ) strengthens to the following dependency: A. e ∧ f B. (e ∧ f ) ∨ (e ∧ f ), i.e., no change C. (e · f ) ∨ e · f D. (e ∧ f ) ∨ e · f (c) (5 points) The guard for event e with respect to the dependency (e ∧ f ) ∨ (e ∧ f ) is A. 3 f ∨ 3 f B. 2 f C. 3 f D. 2 f ∨ ¬f

Service-Oriented Computing 2/3/2006 (Write your name above)

  1. We are given agents who can represent facts and rules, and can reason with those facts and rules to produce new facts. The agents represent justifications in the usual manner. Now consider the following situation in which three agents have the following knowledge initially (label additional derived facts as f3, and so on):

Agent 1 Agent 2 Agent 3 f1: P r1: P ⇒ Q f2: R r1: P ⇒ S r2: (P ∧ R) ⇒ V r3: R ⇒ S r4: S ⇒ V

(a) (5 points) Suppose that Agent 1 shares f1 with Agent 2. Agent 2 uses forward chaining to make all possible conclusions from its knowledge. Show the effect of Agent 1 sharing f1 on the status, shared with, and justification fields for all data in each agent.

(b) (5 points) Now suppose Agent 3 shares f2 with Agent 2. Show the effect of sharing this knowledge on the status, shared with, and justification fields for all data in each agent.

(c) (10 points) Now suppose that Agent 1 retracts f1 by making f1 have status OUT. Show the changes on the status, shared with, and justification fields for all data in each agent.

Service-Oriented Computing 2/3/2006 (Write your name above)

  1. Someone proposes a new operation on commitments, called elevate. The way elevate is used is as follows. The creditor of a given commitment (presumably unhappy at the debtor’s performance) can elevate the commitment to the debtor’s boss. Assume once the given commitment has been elevated to the boss, that the boss would discharge it. Describe the message patterns involving the debtor, the creditor, and the debtor’s boss under the following cases. (For reference, you might recall the message patterns for the operations delegate and assign as described in the textbook.) The expected solutions are sequence diagrams showing vertical lines for each of the parties involved and the messages sent and received as horizontal lines with arrows. (a) (5 points) Show the fewest messages that ensure that the vector timestamp of the discharge message for a commitment is element-wise greater or equal to the vector timestamp of the create message of a commitment.

(b) (10 points) Show the fewest messages, such that the boss can be sure that the original debtor has not already discharged the given commitment before the boss discharges it.