Article View: comp.specification.z
Article #8Building up a big schema from little ones (was: Renaming etc.)
From: Jon Jacky
Date: Mon, 03 Aug 1992 23:53
Date: Mon, 03 Aug 1992 23:53
82 lines
2813 bytes
2813 bytes
hallam@zeus02.desy.de (Phillip M. Hallam-Baker) writes:
|> I have a problem in which I want to build up a master schema from a lot
|> of little ones. The problem is tat a lot of my little schemas are going
|> to be the same. the problem comes when trying to define operations on
|> the composite system which consist of operations on two sub schemas
|> which are essentialy the same.
|>
|> For example say I have a file server system, I have a schema which
|> defines the state of the file serving robot "ROBOT" and operations
|> "MOVE_ARM_LEFT" "MOVE_ARM_RIGHT" etc. Now the complete system has two
|> robots called Fred and Harry, I want to specify the operation
|> "ALL_WAVE_ARMS" in which Fred does a MOVE_ARM_LEFT and Harry a
|> MOVE_ARM_RIGHT.
|>
|> (What about generic schemas? renaming? ... )
This king of problem comes up often, and the usual solution does not use
renaming or generic schemas. Instead, it goes like this. First, your
robot state schema:
+-Robot-----
|
| ...
|
+-----------
Then, for your bunch of robots you define a state with a function from
identifiers to robots:
[ID]
fred, harry: ID
+-Factory------
|
| assembly_line: ID -+> Robot
|
+--------------
|
| { fred, harry } \subseteq assembly_line
|
+---------------
Then you define operations for robots:
+-Wave---------
|
| \Delta Robot
| ...
+--------------
Then you define something called a "framing schema" that is used to express
robot-level operations in the larger factory world. Note that the identifier
of the robot is an input to this schema:
+-Factory\PhiRobot---
|
| \Delta Factory
| \Delta Robot
| id?: ID
+------------------
| \theta Robot = assembly_line id?
| \theta Robot' = assembly_line' id?
+------------------
Then you can "promote" any robot-level operation to the factory level so:
FactoryWave =^= Wave /\ Factory\PhiRobot
For example,
FredWave =^= [ FactoryWave | id? = Fred ]
Whoops! My system's about to go down - have to close now... I was going to
explain how to do AllWaveArms - write me if it isn't obvious.
- Jon Jacky, jon@radonc.washington.edu, Univ of Washington, Seattle, USA
Technical Details
Message-ID:
<1992Aug3.235353.25073@beaver.cs.washington.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!gatech!rpi!batcomputer!cornell!uw-beaver!jonShow Full Headers
Complete Article Headers
Newsgroups: comp.specification.z Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!rpi!batcomputer!cornell!uw-beaver!jon From: jon@cs.washington.edu (Jon Jacky) Subject: Building up a big schema from little ones (was: Renaming etc.) Message-ID: <1992Aug3.235353.25073@beaver.cs.washington.edu> Summary: "Promotion" is a better alternative than renaming. Keywords: Formal specifications, Z, renaming, promotion, framing Sender: news@beaver.cs.washington.edu (USENET News System) Organization: Computer Science & Engineering, U. of Washington, Seattle Date: Mon, 3 Aug 92 23:53:53 GMT Lines: 85