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
  • Commands without a script
  • Commands with a script
  • Filename
  • Options
  • Options per command
Export as PDF
  1. Running the Ampersand compiler

Commands (vs. 4.0.0 and later)

As from version 4.0.0 Ampersand has a command structure that allows you to use Ampersand from the command line.

Commands without a script

  1. ampersand --version to find out which version of Ampersand you are using.

  2. ampersand --help to summarize all level one commands

Commands with a script

In practice, run ampersand --help instead of consulting the following list, just to be sure that the commands match the version you are using. The following list has been taken from version 4.0.0.

The general structure of commands is ampersand [options]* COMMAND. The following commands are available:

  1. ampersand [options]* check <filename>

    Check your model for syntax errors and type errors.

  2. ampersand [options]* daemon <filename>

    Check your model continuously while editing it.

  3. ampersand [options]* data-analysis <filename>

    Export a data model as a plain Ampersand script, for analyzing Excel data.

  4. ampersand [options]* dev-output <filename>

    Generate some diagnostic files, intended for developers of Ampersand.

  5. ampersand [options]* documentation <filename>

    Generate a functional design document, to kick-start your functional specification.

  6. ampersand [options]* population <filename>

    Generate a .xmlx file containing the populations of your script.

  7. ampersand [options]* proofs <filename>

    Generate a report containing proofs.

  8. ampersand [options]* proto <filename>

    Generate a prototype from your specification.

  9. ampersand [options]* export <filename>

    Generate a single .adl-file of your script (prettyprinted)

  10. ampersand [options]* uml <filename>

    Generate a data model in UML 2.0 style.

  11. ampersand [options]* validate <filename>

    Compare results of rule evaluation in Haskell and SQL, for testing expression semantics. This requires command line PHP with MySQL support.

  12. ampersand [options]* test <filename>

    Run test suites in a given directory. This is meant to do regression testing during automatic build (e.g. Travis-ci)

Filename

The filename in a command typically has suffix .adl (which stands for Ampersand Description Language). If you omit the suffix .adl, Ampersand does NOT add it for you. The filename conventions of your operating system apply (whether you have Windows, macOS, or Linux).

Options

You may use one of the first three options to specify how verbose your output will be. The other options can be used at random and mixed freely.

  1. --help Show the help text. This is always up to date with the version of the compiler you are running. So consider ampersand --help to be authoritative.

  2. --verbosity VERBOSITY

    Verbosity: silent, error, warn, info, debug

  3. -V, --verbose

    Enable verbose mode: verbosity level "debug"

  4. --silent

    Enable silent mode: verbosity level "silent"

  5. --[no-]time-in-log

    Enable/disable inclusion of timings in logs, for the purposes of using diff with logs (default: enabled)

  6. --[no-]terminal

    Enable/disable overriding terminal detection in the case of running in a false terminal

  7. --terminal-width INT

    Specify the width of the terminal, used for pretty-print messages

  8. --outputDir DIR

    Specify the directory where your output will be written to.

Options per command

Every command can have options of its own. Use the command and add --help to see which command specific options there are.

Example:

documentation % ampersand documentation --help
Usage: ampersand documentation [--blackWhite] [--[no-]Intro] [--[no-]SharedLang]
                               [--[no-]Diagnosis] [--[no-]ConceptualAnalysis] 
                               [--[no-]DataAnalysis] [--[no-]graphics] 
                               [--[no-]text] --format FORMAT AMPERSAND_SCRIPT 
                               [--sql-bin-tables] [--interfaces] 
                               [--namespace NAMESPACE] [--crud-defaults CRUD] 
                               [--[no-]trim-cellvalues] [--build-recipe RECIPE] 
                               [--ignore-invariant-violations] 
                               [--language OUTPUTLANGUAGE] [--[no-]legal-refs] 
                               [--verbosity VERBOSITY | (-v|--verbose) | 
                                 --silent] [--[no-]time-in-log] 
                               [--[no-]terminal] [--terminal-width INT] 
                               [--output-dir DIR] [--help]
  Generate a functional design document, to kick-start your functional
  specification.

Available options:
  --blackWhite             avoid coloring conventions to facilitate readable
                           pictures in black and white.
  --[no-]Intro             Do or do not include chapter Intro in the generated
                           document.
  --[no-]SharedLang        Do or do not include chapter SharedLang in the
                           generated document.
  --[no-]Diagnosis         Do or do not include chapter Diagnosis in the
                           generated document.
  --[no-]ConceptualAnalysis
                           Do or do not include chapter ConceptualAnalysis in
                           the generated document.
  --[no-]DataAnalysis      Do or do not include chapter DataAnalysis in the
                           generated document.
  --[no-]graphics          Enable/disable generation of graphics before
                           generating the document. (default: enabled)
  --[no-]text              Enable/disable generation the document file.
                           (default: enabled)
  --format FORMAT          The format in which the output is written.
  AMPERSAND_SCRIPT         The root file of your Ampersand model.
  --sql-bin-tables         Generate binary tables instead of broad tables in SQL
                           database, for testing purposes.
  --interfaces             Generate interfaces, which currently does not work.
  --namespace NAMESPACE    Prefix database identifiers with this namespace, to
                           isolate namespaces within the same
                           database. (default: "")
  --crud-defaults CRUD     Temporary switch to learn about the semantics of crud
                           in interface expressions. (default: "CRUD")
  --[no-]trim-cellvalues   Enable/disable ignoring the leading and trailing
                           spaces in .xlsx files that are INCLUDED in the
                           script. (default: enabled)
  --build-recipe RECIPE    Build the internal FSpec with a predefined recipe.
                           Allowd values are:
                           [Standard,Grind,Prototype,RAP] (default: "Standard")
  --ignore-invariant-violations
                           ignore invariant violations. In case of the prototype
                           command, the generated prototype might not behave as
                           you expect. Documentation is not affected. This means
                           that invariant violations are reported anyway. (See
                           https://github.com/AmpersandTarski/Ampersand/issues/728)
  --language OUTPUTLANGUAGE
                           Pick 'NL' for Dutch or 'EN' for English, as the
                           language to be used in your output. Without this
                           option, output is written in the language of your
                           context.
  --[no-]legal-refs        Enable/disable generation of a table of legal
                           references in Natural Language chapter of the output
                           document. (default: disabled)
  --verbosity VERBOSITY    Verbosity: silent, error, warn, info, debug
  -v,--verbose             Enable verbose mode: verbosity level "debug"
  --silent                 Enable silent mode: verbosity level "silent"
  --[no-]time-in-log       Enable/disable inclusion of timings in logs, for the
                           purposes of using diff with logs (default: enabled)
  --[no-]terminal          Enable/disable overriding terminal detection in the
                           case of running in a false terminal
  --terminal-width INT     Specify the width of the terminal, used for
                           pretty-print messages
  --output-dir DIR         Specify the directory where your output will be
                           written to
  --help                   Show this help text

PreviousConfigurationNextOptions (up to vs. 3.17.4)

Last updated 3 years ago