Abstract
The weakest specifunction has been introduced to generalise the notions of weakest prespecification and weakest parallel environment. It calculates the weakest specification function whose value refines the target specification when applied to a given component; thus it forms the basis for compositional refinement, an essential ingredient in program derivation. But unlike those previous calculi it is able to deal with several unknown components simultaneously and hence has wider applicability. In this paper we extend the general theory of the weakest specifunction, identifying those spaces in which it behaves miraculously. The par-seq specifunction places an established component in parallel with a required component and the result in sequence with another required component to meet a given specification. We extend the study of the par-seq specifunction in the context of log s, an intermediate-level language for reactive computing in an abstraction of the PRAM and BSP models of computation, and provide a single complete law for its use in program derivation. The resulting calculus is applied to the derivation of a distributed algorithm for dynamic load balancing.
Similar content being viewed by others
References
Back, R.J.R.: A calculus of refinements for program derivations. Acta Inform. 25, 593–624 (1988)
Back, R.J.R., von Wright, J.: Refinement Calculus: A Systematic Introduction. Springer Verlag (1998)
Chen, Y., Sanders, J.W.: Weakest specifunctions for BSP. Parallel Processing Letters 11(4), 439–454 (2001)
Chen, Y., Sanders, J.W.: Top–down design of bulk-synchronous parallel programs. Parallel Process. Lett. 13(3), 389–400 (2003)
Chen, Y., Sanders, J.W.: Logic of global synchrony. TOPLAS 26(2), 221–262 (2004); Conference Version: 12th International Conference on Concurrency Theory, Springer Verlag, LNCS 2154:487–501 (2001)
Dijkstra, E.W.: Guarded commands, non-determinacy and the formal derivation of programs. Communications of the ACM, 18, 453–457 (1975)
Fortune, S., Wyllie, J.: Parallelism in random access machines. In: Proceedings of the 10th Annual ACM Symposium on Theory of Computing, pp. 114–118 (1978)
Foster, I.: Designing and Building Parallel Programs, Addison-Wesley (1995)
Hildebrand, F.B.: Introduction to Numerical Analysis. Tata McGraw-Hill (1978)
Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall series in Computer Science (1985)
Hoare, C.A.R., He, J.: The weakest prespecification I, II. Fundamenta Inform. 9, 51–84, 217–252 (1986)
Hoare, C.A.R. He, J.: Unifying Theories of Programming. Prentice-Hall series in Computer Science (1998)
Lai, L., Sanders, J.W.: A weakest-environment calculus for communicating processes. In: Fritzon, P., Finmo, L. (ed.) Proceedings of the 4th Nordic Transputer Conference: Parallel Programming and Applications, pp. 381–395. IOS Press, Ohmsha (1995)
Lecomber, D.S.: Methods of BSP Programming. Oxford University Computing Laboratory, D.Phil. Thesis (1998)
Liu, Z., He, J., Li, X.: Contract-oriented development of component software. In: Proceedings of the IFIP International Conference on Theoretical computer Science, pp. 349–366 (2004)
Meyer, B.: Object-Oriented Software Construction, 2nd ed. Prentice-Hall series in Computer Science (1997)
Morgan, C.C.: Programming from Specifications, 2nd edn. Prentice-Hall series in Computer Science (1994)
Roscoe, A.W.: The Theory and Practice of Concurrency. Prentice-Hall series in Computer Science (1997)
Valiant, L.G.: A bridging model for parallel computation. Communications of the ACM 33(8), 103–111 (1990)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Chen, Y., Sanders, J.W. The weakest specifunction. Acta Informatica 41, 383–414 (2005). https://doi.org/10.1007/s00236-005-0163-5
Received:
Revised:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00236-005-0163-5