Documentation
  • Introduction
  • Why Ampersand?
    • The Business Rules Manifesto and Ampersand
  • Tutorial
    • Example system: Enrollment
    • Conceptual Model: Enrollment
    • Your tool: RAP4
    • Making your first Ampersand script
  • Reactive programming
  • The language Ampersand
    • How to read syntax statements
    • Truth
    • Atoms
    • The CONCEPT statement
    • The RELATION statement
    • The MEANING statement
    • The PURPOSE statement
    • The CLASSIFY statement
    • The RULE statement
    • Terms
      • Semantics
      • Semantics in logic
        • Primitive terms
        • Boolean operators
        • Relational operators
        • Residual operators
      • Semantics in natural language
        • Primitive terms in natural language
        • Boolean operators in natural language
        • Relational operators in natural language
        • Residual operators in natural language
      • Semantics in sets
        • Primitive terms in set theory
        • Boolean operators in set theory
        • Relational operators in set theory
      • Semantics of terms, defined algebraically
        • Boolean operators in algebra
        • Relational operators in algebra
      • Semantics visualized
        • Semantics of boolean operators visualized
        • Semantics of relational operators visualized
        • Semantics of residuals visualized
    • Context
    • Module
    • Best Practices
    • Syntactical Conventions
      • The CONCEPT statement
      • The RELATION statement
      • The RULE statement
      • The CONTEXT statement
      • The INCLUDE statement
      • Explanation
      • Patterns
      • Population
        • Population in spreadsheets
      • The PURPOSE statement
      • The IDENT statement
      • The TABLE statement
      • Language support
    • The INCLUDE statement
    • Patterns
    • Services
      • Example: Client
      • Example: Login
      • Syntax and meaning
      • Explanation
      • Layout of user interfaces
        • Your own widgets (HTML and CSS)
      • CRUD
    • Population
      • Population in spreadsheets
    • The ENFORCE statement
    • The IDENT statement
    • The TABLE statement
    • Language support
    • Current date
    • The Preprocessor
    • Design considerations
  • Running the Ampersand compiler
    • Configuration
    • Commands (vs. 4.0.0 and later)
    • Options (up to vs. 3.17.4)
  • Architecture of an Ampersand Application
    • Backend framework
    • Hooks
    • Extensions
      • The ExecEngine
  • Deploying your Ampersand script
    • Compiler
    • Deploy your own web application on your laptop
    • Prototype multi-stage build
    • Prototype database
  • Reusing Available Modules
    • Modules
    • Security
    • SIAM (Sessions, Identity and Access Management) Module
  • Exercises
    • Delivery
    • VOG (in Dutch)
  • Installing Ampersand
    • Deploying your Prototype
    • Installing the tools manually
  • Modeling
    • Domain Driven Design
    • Data modeling
    • Legal modeling
    • Architecture modeling
    • Metamodeling
    • Limitations of Ampersand
  • Configuring your application
  • The Excel Importer
  • Plans
    • Current State
    • NoSQL storage
    • API documentation
    • OWL and RDFS input
    • Refactor the front-end
  • Research
Powered by GitBook
On this page
Export as PDF

The language Ampersand

This chapter describes the full language Ampersand. Please use it as a reference rather than an introductory course.

PreviousReactive programmingNextHow to read syntax statements

Last updated 3 years ago

Watch to learn how we use the words atom, concept, and relation. Below is a list of other words with a specific meaning in Ampersand.

Word

Meaning

Example

Purpose

an indivisible item

"Peter"

to represent a thing

a name to categorize similar items

Person

Pair

two atoms: a source and a target atom

("Ida",5)

to state that two atoms are related

a set of pairs that is identifyable in a context by its name and type

r[A*B]

to build true statements and store pairs persistently in an application

a constraint, which is supposed to remain satisfied.

r;s |- t

to provide meaning in a given context

satisfy

A rule is satisfied (in a context) if the data (in that context) do not cause any violation of that rule.

to calculate violations at run-time helps users do the right things

a set of rules

PATTERN

...

ENDPATTERN

to gather rules that belong together for reusing them in different contexts

Population

a set of pairs in a context

POPULATION r[A*B] CONTAINS [ ("Ida",5), ("Bob",1) ]

to represent the facts (i.e. true statements) in an information system

a population together with a set of rules that are satisfied by the population.

CONTEXT

...

ENDCONTEXT

to maintain a consistent representation of a real life situation

View

A set of pairs that can be shown to users in a particular formulation.

to represent facts

A structure meant for "the outside world" to communicate with the system and possibly change the population.

INTERFACE Request FOR Customer

to let "the outside world" communicate with the system in a given context and possibly change its population

Multiplicity

A predefined property of a relation

UNI, TOT, SUR, INJ

to constrain a relation with predefined properties

A combination of relations and operators that satisfy the Ampersand syntax

r;s-t

to express rules

Operator

a symbol used in combining terms into other terms.

-, ~, \/, /\, -, ;, \, /, |-, =

to express more complex rules.

A rule that defines specialization between two (or more) concepts.

CLASSIFY A ISA B

To specify a building block for a classification hierarchy.

Role

A name for a group of people

ROLE Customer MAINTAINS paymentObligation

to talk about users without having any users

Syntactic definitions are given where the underlying notions (e.g. rule, relation, pattern, etc.) are discussed. The metasyntax is singled out . Because are defined in relation algebra, their semantics are explained in various ways to suit the background of each individual reader. Terms are the only algebraically defined things.

This section is organized by discussing each notion in isolation. Hyperlinks are added in the text to let the reader navigate on her own. The text is suitable for reference purposes, so there is no preferred order in reading.

this clip
on a separate page
terms
Atom
Concept
Relation
Rule
Pattern
Context
Service
Term
Specialization