Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Latest commit

 

History

History
58 lines (43 loc) · 1.87 KB

README.md

File metadata and controls

58 lines (43 loc) · 1.87 KB

AML-GEN

Automatic generator of examples for AML dialects.

Provided a valid AML dialect, this generator can automatically create a set of examples that validates the dialect. The generator can be potentially customised to generate more semantically accurate values that not only matches the contraints in the dialect but provide a better set of examples for a human reader.

Command line usage

Installation

Script usage documentation

AML 1.0
Usage: amlgen [generate] [options] dialect output

Command: generate [options]
Generates dialect instances
  -s, --seed <value>       the seed used when generating files. Default is random
  dialect                  dialect is the path to the dialect
  output                   output is the path to the folder where the generated files will be dumped
  -i, --instances <value>  instances is the number of dialect instances you want to generate. Default is 1000
  -c, --cardinality <value>
                           cardinality is the maximum length of generated lists and maps. Default is 3

Example

The following example will generate 5 dialect instances files given the dialect.yaml and leave them in the output file.

./amlgen generate "./dialect.yaml" "./output" -instances 5 -cardinality 2 -seed 7

Library usage

Installation

Maven
<dependency>
    <groupId>com.github.amlorg</groupId>
    <artifactId>aml-gen_2.12</artifactId>
    <version>1.0.1</version>
</dependency>
Gradle

compile group: 'com.github.amlorg', name: 'aml-gen_2.12', version: '1.0.1'

SBT

libraryDependencies += "com.github.amlorg" %% "aml-gen_2.12" % "1.0.1"