Operation contracts

Operation contracts


Operation contracts are formal constraints defined over software operations. These are created during the domain-modeling phase.

Typically, an operation contract consists of 4 components:

  • Operation name: A name for the operation
  • Cross-References: List of use-cases that refer this operation
  • Preconditions: State of variables/system before this operation is invoked
  • Postconditions: State of variables/system after successful completion of the operation

Typically, the Postconditions can be of 3 kinds:

  • Instance creation
  • Attribute modification
  • Associations broken/added


A UML Operation contract identifies system state changes when an operation happens. Effectively, it will define what each system operation does. An operation is taken from a system sequence diagram. It is a single event from that diagram. A domain model can be used to help generate an operation contract. The domain model can be marked as follows to help with the operation contract:

Green - Pre existing concepts and associations. Blue - Created associations and concepts. Red - Destroyed concepts and associations. Operation Contract Syntax

Name: appropriateName

Responsibilities: Perform a function

Cross References: System functions and Use Cases

Exceptions: none

Preconditions: Something or some relationship exists

Postconditions: An association was formed

When making an operation contract, think of the state of the system before the action (snapshot) and the state of the system after the action (a second snapshot). The conditions both before and after the action should be described in the operation contract. Do not describe how the action or state changes were done. The pre and post conditions describe state, not actions.

Typical postcondion changes:

Object attributes were changed. An instance of an object was created. An association was formed or broken. Postconditions are described in the past tense. They declare state changes to the system. Fill in the name, then responsibilities, then postconditions.


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Operation Big Coon Dog — was an investigation by the United States Federal Bureau of Investigation (FBI) and the Internal Revenue Service (IRS) into alleged corruption surrounding the use of federal and state disaster recovery funds by public officials in Buchanan County …   Wikipedia

  • Contracts of Employment Act 1963 — Parliament of the United Kingdom Long title ... Statute book chapter 1963 …   Wikipedia

  • Operation 40 — was a Central Intelligence Agency sponsored undercover operation in the early 1960s, which was active in the United States and the Caribbean (including Cuba), Central America, and Mexico. It was created by President Dwight D. Eisenhower in March… …   Wikipedia

  • Operation Osoaviakhim — was a Soviet operation which took place on 22 October 1946, with NKVD and Soviet army units recruiting thousands of military related technical specialists from the Soviet occupation zone of post World War II Germany for employment in the Soviet… …   Wikipedia

  • Operation Megaphone — Date 30 July 2000 to 6 August 2000 Location Off the coast of Newfoundland, North Atlantic Belligerents …   Wikipedia

  • Operation Wasteland — was an undercover investigation into organized crime control of the waste disposal industry in New York City. The investigation resulted in the indictment and conviction of over one hundred participants in price fixing and bid rigging of waste… …   Wikipedia

  • Operation Ill Wind — was a three year investigation launched in 1986 by the United States Federal Bureau of Investigation into corruption by U.S. government and military officials and defense contractors. About 12 government officials were convicted of various crimes …   Wikipedia

  • Operation AntiSec — An image that Anonymous has used to represent the operation; it contains elements of symbols used to represent both Anonymous and LulzSec. Not to be confused with Antisec Movement. Operation Anti Security, also referred to as Operation AntiSec or …   Wikipedia

  • Operation Paperclip — A group of 104 rocket scientists (aerospace engineers) at Fort Bliss, Texas Operation Paperclip was the Office of Strategic Services (OSS) program used to recruit the scientists of Nazi Germany for employment by the United States in the aftermath …   Wikipedia

  • Operation Soberanía — The Beagle Conflict Main: Beagle conflict 1881–1970: Beagle Channel cartography 1958: Snipe incident 1971–1977: Beagle Channel Arbitration 1977–1978: Direct Negotiations …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”