Sha256: 7b30cb691e7bd2472a1bfa8c6be514f09488f4aa2215f5bd4a8fe463fbd28b2b

Contents?: true

Size: 981 Bytes

Versions: 2

Compression:

Stored size: 981 Bytes

Contents

class Machine {
	running is false
	address is ""

	procedure start {
		conditions {
			this.running is false
		}
		effects {
			this.running is true
		}
	}
	procedure stop {
		conditions {
			this.running is true
		}
		effects {
			this.running is false
		}
	}
}

class VM extends Machine {
	created is false

	procedure start {
		conditions {
			this.created is true
		}
		effects {
			this.running is true
		}
	}
	procedure stop {
		conditions {
			this.created is true
		}
		effects {
			this.running is false
		}
	}
}

class Cloud {
	running is false

	procedure create_vm(vm isref VM) {
		conditions {
			this.running is true
			vm.created is false
		}
		effects {
			vm.created is true
		}
	}
	procedure delete_vm(vm isref VM) {
		conditions {
			this.running is true
			vm.created is true
		}
		effects {
			vm.created is false
		}
	}
}

class Client {
	refer isref Service

	procedure redirect (s isref Service) {
		conditions {
		}
		effects {
			this.refer is s
		}
	}
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sfp-0.1.1 test/cloud-classes.sfp
sfp-0.1.0 test/cloud-classes.sfp