CASL
The Common Algebraic Specification Language
Summary

by The CoFI Task Group on Language Design

22 October 1998

The formatted body and appendices of this document are also available separately.
[CHANGED:] The various changes from version 0.99 of the CASL design have been proposed and discussed on the CoFI Language Design mailing list (see the archives). All significant changes from version 0.99 of the Summary are marked1 in the same way as this paragraph, and listed here.

(There were a few superfluous occurrences of `!!' in the Appendices when this document first appeared; these have now been removed.) []

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

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
  • Changes from version 0.99
  • 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 Named and Parametrized Specifications
  • 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 Simple Structured Specifications
  • E.2 Generic Structured Specifications
  • E.3 Architectural Specifications
  • F Finalization
  • Footnotes
  • Full Contents

  • About this document
  • Structure
  • Versions
  • Contributors
  • Changes from version 0.99
  • 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 Named and Parametrized Specifications
  • 6.2.1 Specification Definitions
  • 6.2.2 Specification Instantiation
  • 6.3 Views
  • 6.3.1 View Definitions
  • 6.3.2 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 Unit Specifications
  • 8.2.3 Closed Unit 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 Simple Structured Specifications
  • E.1.1 Partial_Order
  • E.1.2 Monoid
  • E.1.3 Nat
  • E.1.4 Elem
  • E.2 Generic Structured Specifications
  • E.2.1 Set1
  • E.2.2 Set2
  • E.2.3 List
  • E.2.4 List_with_Order
  • E.2.5 Nat_List_with_Reverse_Orders
  • E.2.6 Non_Empty_List
  • E.2.7 Path
  • E.2.8 File
  • E.2.9 List_of_List_of_List_of_Nat
  • E.2.10 Nat_List_with_Order
  • E.2.11 Bounded_Nat_List
  • E.3 Architectural Specifications
  • E.3.1 Num
  • E.3.2 Num_Monoid
  • E.3.3 Add_Num
  • E.3.4 Add_Num_Efficiently
  • E.3.5 Efficient_Add_Num
  • F Finalization
  • Footnotes

  • CoFI Document: CASL/Summary-v1.0 -- Version: 1.0 -- 22 October 1998.
    Comments to cofi-language@brics.dk