Pipeline
Install stack
See the official stack
installation documentation.
Enter the repository
Clone and enter the project repository.
git clone https://github.com/objectionary/eo-phi-normalizer --recurse-submodules
cd eo-phi-normalizer
Install eo-phi-normalizer
Install eo-phi-normalizer
.
export LC_ALL=C.UTF-8
stack install eo-phi-normalizer
Install dependencies
Install yq.
yq --version
yq (https://github.com/mikefarah/yq/) version v4.44.1
Install NodeJS.
node --version
v20.18.0
Install Java.
java --version
openjdk 21.0.5 2024-10-15 LTS
OpenJDK Runtime Environment Zulu21.38+21-CRaC-CA (build 21.0.5+11-LTS)
OpenJDK 64-Bit Server VM Zulu21.38+21-CRaC-CA (build 21.0.5+11-LTS, mixed mode, sharing)
Windows
Install Cygwin.
Make cygpath
available on PATH
.
Learn about the pipeline
Pipeline stages
The pipeline has several important stages:
- Rewrite original
EO
programs into filteredEO
programs, leaving only the specified top-level objects (tests). - Translate filtered
EO
programs to initialPHI
programs. - Translate initial
PHI
programs to initialEO
programs. - Test initial
EO
programs. - Normalize initial
PHI
programs and get normalizedPHI
programs. - Report metrics on initial
PHI
programs and normalizedPHI
programs (See Metrics). - Translate normalized
PHI
programs to normalizedEO
programs. - Test normalized
EO
programs.
Pipeline configuration
The pipeline is configured via the pipeline/config.yaml file.
The configuration file specifies the following:
report
- Pipeline report configuration.js
- Optional path to aJavaScript
file that should be inlined into theHTML
report.- If no path is specified,
eo-phi-normalizer
will use report/main.js.
- If no path is specified,
css
- Optional path to aCSS
file that should be inlined into theHTML
report.- If no path is specified,
eo-phi-normalizer
will use report/styles.css.
- If no path is specified,
output
- Where to write report versions.html
- The file path of theHTML
version.json
- The file path of theJSON
version.markdown
- The file path of theGitHub Flavored Markdown
version.
expected-metrics-change
- The expected relative change in metrics w.r.t the initial metrics.dataless
- For dataless formations.applications
- For applications.formations
- For formations.dispatches
- For dispatches.
expected-improved-programs-percentage
- Expected percentage of programs where all metrics changed as expected.
test-sets
- A list of configurations for sets of test objects (tests).eo
- The configuration of theEO
part of the test set.original
- The file path of the originalEO
program.enable
- A flag to enable tests in the originalEO
program.include
- A list of names of tests in the originalEO
program that should be included into the filteredEO
program.exclude
- A list of names of tests in the originalEO
program that shouldn't be included into the filteredEO
program.filtered
- The file path of the filtered originalEO
program.yaml
- The file path of the originalEO
program in theYAML
format.
phi
- The configuration of thePHI
part of the test set.initial
- The file path of the initialPHI
program.normalized
- The file path of the normalizedPHI
program.bindings-path-initial
- The path to tests via bindings in the initialPHI
program.bindings-path-normalized
- The path to tests via bindings in the normalizedPHI
program.
atoms
- The configuration of atoms in the test set. The set of enabled atoms is the difference of sets constructed from theenable
anddisable
lists.enable
- The list of names of atoms to enable. An empty list is equivalent to a list of all known atoms.disable
- The list of names of atoms to disable.
Run the pipeline script
bash ./scripts/pipeline.sh
Explore the pipeline directory
The script will run for several minutes and write the following entries to the pipeline
directory:
eo-filtered
- FilteredEO
programs.eo-initial
- InitialEO
programs..eoc/4-pull/org/eolang
-org.eolang
objects (link).
eo-normalized
- NormalizedEO
programs.eo-yaml
- FilteredEO
programs in theYAML
format.logs
- Logs of some pipeline stages.phi-initial
- InitialPHI
programs..eoc/phi/org/eolang
-org.eolang
objects translated toPHI
.
phi-normalized
- NormalizedPHI
programs.report
- Pipeline reports.report.html
- The report in theHTML
format.report.json
- The report in theJSON
format.report.md
- The report in theGitHub Flavored Markdown
format.