## CIF language modification

For each change to the CIF language, follow these steps:

- Update textual syntax:

  - Update `cif.setext` syntax (`org.eclipse.escet.cif.parser/src/org/eclipse/escet/cif/parser`).

  - Update `cif.bnf` syntax (`org.eclipse.escet.cif.documentation/images/language-reference/syntax`).

  - Update `cif.min.js` syntax (`org.eclipse.escet.releng.configuration/highlightjs-assets/escet/languages/cif.min.js`).

- Update metamodel (`org.eclipse.escet.cif.metamodel`).

  - Update Ecore diagrams (open `model/cif.aird` and unfold Design and then Entities in a Class Diagram).

  - Update diagram images.

    - Remove all `*.png` files in the `model/images` folder of the CIF metamodel project.

    - Right click the `cif.aird` file in the Package Explorer` and choose Export representations as images.

    - Set To directory to the `model/images` folder of the CIF metamodel project.

    - Set Image Format to PNG.

    - Set Image Size to Nominal.

    - Click OK.

  - Update genmodel.

    - Delete `model/cif.genmodel`.

    - Right click `model/cif.ecore` and select New Other…​.

    - Select Eclipse Modeling Framework and EMF Generator Model and click Next.

    - The parent folder and the file name should already be filled, click Next.

    - Select Ecore model and click Next.

    - Click Load and then Next.

    - For Root packages, select cif, for Referenced generator models, select Position, and click Finish.

    - Run `model/autofix.py` to update the newly created `cif.genmodel`.

  - Generate metamodel code.

    - Remove the generated model code (contents of `src-gen`).

    - Open `model/cif.genmodel`.

    - Right click Cif and click Generate Model Code.

- Update generated Java constructors and walker code (`org.eclipse.escet.cif.metamodel.java`).

  - Remove the generated code (contents of `src-gen`).

  - Right click `gen-cif-constructors.launch` and click Run As gen-cif-constructors.

  - Right click `gen-cif-walker.launch` and click Run As gen-cif-walker.

- Update LaTeX documentation (`org.eclipse.escet.cif.metamodel`).

  - Right click `gen-cif-docs-ecore-latex-skeleton.launch` and click Run As gen-cif-docs-ecore-latex-skeleton.

  - Right click `gen-cif-docs-ecore-latex-skeleton-detail.launch` and click Run As gen-cif-docs-ecore-latex-skeleton-detail.

  - Update `docs/cif_ecore_doc.tex` based on the changes in `docs/cif_ecore_doc_generated.tex`.

  - Update `docs/cif_ecore_doc_details.tex` based on the changes in `docs/cif_ecore_doc_details_generated.tex`.

  - Run `docs/build.bash` to generate a new PDF.

- Update parser (`org.eclipse.escet.cif.parser`).

  - Right click `gen-cif-scanner-parser.launch` and click Run As gen-cif-scanner-parser.

  - Implement new AST classes if needed.

  - Update `CifParserHooks.java` such that it implements `CifParser.Hooks`.

  - Verify the implementation by running `chk.bash`.

- Update keywords and syntax highlighting for the text editor (`org.eclipse.escet.cif.texteditor`).

- Update type checker (`org.eclipse.escet.cif.typechecker`).

  - Add new constraints to the error and problem messages (`ErrMsg.java`).

  - Verify the implementation by running `chk.bash`.

- Update example and benchmark models for changed syntax and constraints (`org.eclipse.escet.cif.examples`).

- Update pretty printer including set of keywords (`org.eclipse.escet.cif.prettyprinter`).

- Update common methods (`org.eclipse.escet.cif.common`).

- Update CIF to CIF transformations and other tools.

- Update CIF documentation, including language reference manual with lexical syntax and grammar.

- Update CIF syntax highlighting definition for LaTeX (`org.eclipse.escet.cif.misc/latex/cif_listing.sty`).