CASL
The Common Algebraic Specification Language
Summary

by The CoFI Task Group on Language Design

21 April 1998

The formatted body and appendices of this document are also available separately.
A draft of this document has been discussed by the Language Design task group at its meeting in Lisbon and on the mailing list (see the archives). The editor has tried to take account of the points made in the discussions when producing this final version. N.B. None of the changes are marked in this document! For the benefit of those who have read the draft version, an alternative document is provided, with all significant changes marked; the formatting and pagination should be otherwise (almost) identical.

Any complaints about changes that have (or have not) been made should be sent to the mailing list as soon as possible.

This document is available by FTP in various formats. It was converted to HTML using Hyperlatex 2.2.

Abstract

The language CASL is central to CoFI, the Common Framework Initiative for algebraic specification and development. It is a reasonably expressive algebraic language for specifying requirements and design for conventional software. From CASL, simpler languages (e.g., for interfacing with existing tools) are to be obtained by restriction, and CASL is to be incorporated in more advanced languages (e.g., higher-order). CASL strikes a balance between simplicity and expressiveness. The main features of its design are as follows:

Many-sorted basic specifications in CASL denote classes of many-sorted partial first-order structures: algebras where the functions are partial or total, and where also predicates are allowed. Axioms are first-order formulae built from equations and definedness assertions. Sort generation constraints can be stated. Datatype declarations are provided for concise specification of sorts together with some constructors and (optional) selectors. Subsorted basic specifications provide moreover a simple treatment of subsorts, interpreting subsort inclusion as embedding.

Structured specifications allow translation, reduction, union, and extension of specifications. Extensions may be required to be free; initiality constraints are a special case. A simple form of generic specifications is provided, together with instantiation involving parameter-fitting translations and views.

Architectural specifications express that the specified software is to be composed from separately-developed, reusable units with clear interfaces.

Finally, specification libraries allow the (distributed) storage and retrieval of named specifications.

This document gives a detailed summary of the syntax and intended semantics of CASL. It is intended for readers who are already familiar with the main concepts of algebraic specifications.

Brief Contents

  • About this document
  • I Basic Specifications
  • 1 Basic Concepts
  • 1.1 Signatures
  • 1.2 Models
  • 1.3 Sentences
  • 1.4 Satisfaction
  • 2 Basic Constructs
  • 2.1 Signature Declarations
  • 2.2 Variables
  • 2.3 Axioms
  • 2.4 Identifiers
  • 3 Subsorting Concepts
  • 3.1 Signatures
  • 3.2 Models
  • 3.3 Sentences
  • 4 Subsorting Constructs
  • 4.1 Signature Declarations
  • 4.2 Axioms
  • II Structured Specifications
  • 5 Structuring Concepts
  • 6 Structuring Constructs
  • 6.1 Structured Specifications
  • 6.2 Specification Definitions
  • 6.3 Views
  • 6.4 Symbol Lists and Mappings
  • 6.5 Compound Identifiers
  • III Architectural Specifications
  • 7 Architectural Concepts
  • 8 Architectural Constructs
  • 8.1 Unit Declarations and Definitions
  • 8.2 Unit Specifications
  • 8.3 Unit Expressions
  • IV Specification Libraries
  • 9 Library Concepts
  • 10 Library Constructs
  • 10.1 Local Libraries
  • 10.2 Distributed Libraries
  • References
  • Index
  • Appendices
  • A Abstract Syntax
  • A.1 Basic Specifications
  • A.2 Basic Specifications with Subsorts
  • A.3 Structured Specifications
  • A.4 Architectural Specifications
  • A.5 Specification Libraries
  • B Abbreviated Abstract Syntax
  • B.1 Basic and Subsorted Specifications
  • B.2 Structured Specifications
  • B.3 Architectural Specifications
  • B.4 Specification Libraries
  • C Concrete Syntax
  • C.1 Introduction
  • C.2 Context-Free Syntax
  • C.3 Disambiguation
  • C.4 Lexical Syntax
  • C.5 Comments and Annotations
  • D Display Format
  • D.1 Mathematical Symbols
  • D.2 Keywords
  • D.3 Identifiers
  • D.4 Comments and Annotations
  • E Examples
  • E.1 Specifications from the Bremen Proposal
  • E.2 Specifications from the Paris Proposal
  • F Finalization
  • Footnotes
  • Contents

  • About this document
  • Structure
  • Versions
  • Contributors
  • I Basic Specifications
  • 1 Basic Concepts
  • 1.1 Signatures
  • 1.2 Models
  • 1.3 Sentences
  • 1.4 Satisfaction
  • 2 Basic Constructs
  • 2.1 Signature Declarations
  • 2.1.1 Sorts
  • 2.1.1.1 Sort Declarations
  • 2.1.2 Operations
  • 2.1.2.1 Operation Declarations
  • Operation Types
  • Operation Attributes
  • 2.1.2.2 Operation Definitions
  • 2.1.3 Predicates
  • 2.1.3.1 Predicate Declarations
  • Predicate Types
  • 2.1.3.2 Predicate Definitions
  • 2.1.4 Datatypes
  • 2.1.4.1 Datatype Declarations
  • Alternatives
  • Components
  • 2.1.4.2 Free Datatype Declarations
  • 2.1.5 Sort Generation
  • 2.2 Variables
  • 2.2.1 Global Variable Declarations
  • 2.2.2 Local Variable Declarations
  • 2.3 Axioms
  • 2.3.1 Quantifications
  • 2.3.2 Logical Connectives
  • 2.3.2.1 Conjunction
  • 2.3.2.2 Disjunction
  • 2.3.2.3 Implication
  • 2.3.2.4 Equivalence
  • 2.3.2.5 Negation
  • 2.3.3 Atomic Formulae
  • 2.3.3.1 Truth
  • 2.3.3.2 Predicate Application
  • 2.3.3.3 Definedness
  • 2.3.3.4 Equations
  • 2.3.4 Terms
  • 2.3.4.1 Identifiers
  • 2.3.4.2 Qualified Variables
  • 2.3.4.3 Operation Application
  • 2.3.4.4 Sorted Terms
  • 2.3.4.5 Conditional Terms
  • 2.4 Identifiers
  • 3 Subsorting Concepts
  • 3.1 Signatures
  • 3.2 Models
  • 3.3 Sentences
  • 4 Subsorting Constructs
  • 4.1 Signature Declarations
  • 4.1.1 Sorts
  • 4.1.1.1 Subsort Declarations
  • 4.1.1.2 Isomorphism Declarations
  • 4.1.1.3 Subsort Definitions
  • 4.1.2 Datatypes
  • 4.1.2.1 Alternatives
  • 4.2 Axioms
  • 4.2.1 Atomic Formulae
  • 4.2.1.1 Membership
  • 4.2.2 Terms
  • 4.2.2.1 Casts
  • II Structured Specifications
  • 5 Structuring Concepts
  • 6 Structuring Constructs
  • 6.1 Structured Specifications
  • 6.1.1 Translations
  • 6.1.2 Reductions
  • 6.1.3 Unions
  • 6.1.4 Extensions
  • 6.1.5 Free Specifications
  • 6.1.6 Local Specifications
  • 6.1.7 Closed Specifications
  • 6.2 Specification Definitions
  • 6.2.1 Specification Instantiation
  • 6.3 Views
  • 6.3.1 Fitting Views
  • 6.3.2 Implicit Fitting Views
  • 6.4 Symbol Lists and Mappings
  • 6.4.1 Symbol Lists
  • 6.4.2 Symbol Mappings
  • 6.5 Compound Identifiers
  • III Architectural Specifications
  • 7 Architectural Concepts
  • 8 Architectural Constructs
  • 8.1 Unit Declarations and Definitions
  • 8.1.1 Unit Declarations
  • 8.1.2 Unit Definitions
  • 8.2 Unit Specifications
  • 8.2.1 Unit Types
  • 8.2.2 Architectural Specifications
  • 8.3 Unit Expressions
  • 8.3.1 Unit Terms
  • 8.3.1.1 Unit Translations
  • 8.3.1.2 Unit Reductions
  • 8.3.1.3 Amalgamations
  • 8.3.1.4 Local Units
  • 8.3.1.5 Unit Applications
  • IV Specification Libraries
  • 9 Library Concepts
  • 10 Library Constructs
  • 10.1 Local Libraries
  • 10.2 Distributed Libraries
  • References
  • Index
  • Appendices
  • A Abstract Syntax
  • A.1 Basic Specifications
  • A.2 Basic Specifications with Subsorts
  • A.3 Structured Specifications
  • A.4 Architectural Specifications
  • A.5 Specification Libraries
  • B Abbreviated Abstract Syntax
  • B.1 Basic and Subsorted Specifications
  • B.2 Structured Specifications
  • B.3 Architectural Specifications
  • B.4 Specification Libraries
  • C Concrete Syntax
  • C.1 Introduction
  • C.2 Context-Free Syntax
  • C.2.1 Basic Specifications with Subsorts
  • C.2.2 Structured Specifications
  • C.2.3 Architectural Specifications
  • C.2.4 Specification Libraries
  • C.3 Disambiguation
  • C.4 Lexical Syntax
  • C.5 Comments and Annotations
  • C.5.1 Comments
  • C.5.2 Annotations
  • C.5.2.1 Label Annotations
  • C.5.2.2 Display Annotations
  • C.5.2.3 Parsing Annotations
  • C.5.2.4 Semantic Annotations
  • D Display Format
  • D.1 Mathematical Symbols
  • D.2 Keywords
  • D.3 Identifiers
  • D.4 Comments and Annotations
  • E Examples
  • E.1 Specifications from the Bremen Proposal
  • E.1.1 PO
  • E.1.2 MONOID
  • E.1.3 NAT
  • E.1.4 SIG1
  • E.1.5 SIG2
  • E.2 Specifications from the Paris Proposal
  • E.2.1 FILE
  • E.2.2 PATH
  • E.2.3 LIST_WITH_ORDER
  • E.2.4 COMPOUND_SYMBOLS_ARE_NICE
  • E.2.5 LIST
  • F Finalization
  • Footnotes

  • CoFI Document: CASL/Summary --Version 0.99-- 21 April 1998.
    Comments to cofi-language@brics.dk