Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ogma-cli: Provide new standalone command. Refs #170. #171

Merged
merged 10 commits into from
Nov 22, 2024

Conversation

ivanperez-keera
Copy link
Member

Provide a new standalone command to make CLI uniform, as prescribed in the solution proposed for #170 .

To make Ogma more easily extensible, we want to make it possible to
store the format specifications in individual files, so that they do not
have to be included with the code and they can be provided by users.

This commit makes a JSONFormat readable, so that it can be easily read
from a file.
The CLI of Ogma lacks uniformity: some commands are driven by the input
format, others by the output format (e.g., ROS, cFS). To make Ogma
easier to use, we should provide an interface that is driven by one or
the other, but not both.

This commit introduces a new standalone command, at core level, that
produces an individual Copilot specification from an input file.
The CLI of Ogma lacks uniformity: some commands are driven by the input
format, others by the output format (e.g., ROS, cFS). To make Ogma
easier to use, we should provide an interface that is driven by one or
the other, but not both.

A prior commit has introduced a new standalone command, at core level,
that produces an individual Copilot specification from an input file.

This commit exposes that command to the user via the CLI.
The CLI of Ogma lacks uniformity: some commands are driven by the input
format, others by the output format (e.g., ROS, cFS). To make Ogma
easier to use, we should provide an interface that is driven by one or
the other, but not both.

A prior commit has introduced a new standalone command that can be used
to produce individual Copilot specs. This commit removes the commands
made redundant by that new command, at CLI level.
The CLI of Ogma lacks uniformity: some commands are driven by the input
format, others by the output format (e.g., ROS, cFS). To make Ogma
easier to use, we should provide an interface that is driven by one or
the other, but not both.

A prior commit has introduced a new standalone command that can be used
to produce individual Copilot specs, and redundant commands have been
removed from the CLI. This commit removes the corresponding redundant
core commands.
The CLI of Ogma lacks uniformity: some commands are driven by the input
format, others by the output format (e.g., ROS, cFS). To make Ogma
easier to use, we should provide an interface that is driven by one or
the other, but not both.

A prior commit has introduced a new standalone command that replaces two
prior existing commands.

This commit adjusts the core package tests to use the new standalone
command.
The CLI of Ogma lacks uniformity: some commands are driven by the input
format, others by the output format (e.g., ROS, cFS). To make Ogma
easier to use, we should provide an interface that is driven by one or
the other, but not both.

A prior commit has introduced a new standalone command that replaces two
prior existing commands.

This commit adjusts the CLI package tests to use the new standalone
command.
@ivanperez-keera
Copy link
Member Author

Change Manager: Verified that:

  • Solution is implemented:
    • The code proposed compiles and passes all tests. Details:
    • The solution proposed produces the expected result. Details:
      The following dockerfile uses the new standalone command to compile of the prior supported files, after which it prints the message "Success":
      FROM ubuntu:trusty
      
      ENV DEBIAN_FRONTEND=noninteractive
      
      RUN apt-get update
      
      RUN apt-get install --yes software-properties-common
      RUN add-apt-repository ppa:hvr/ghc
      RUN apt-get update
      
      RUN apt-get install --yes ghc-8.6.5 cabal-install-2.4
      RUN apt-get install --yes libz-dev
      
      ENV PATH=/opt/ghc/8.6.5/bin:/opt/cabal/2.4/bin:$PWD/.cabal-sandbox/bin:$PATH
      
      RUN cabal update
      RUN cabal v1-sandbox init
      RUN cabal v1-install alex happy
      RUN apt-get install --yes git
      
      CMD git clone $REPO \
          && cd $NAME \
          && git checkout $COMMIT \
          && cd .. \
          && cabal v1-sandbox init \
          && cabal v1-install $NAME/$PAT**/ copilot-4.1 --constraint="aeson>=2.0.3.0" \
          && ./.cabal-sandbox/bin/ogma standalone --file-name $NAME/ogma-cli/examples/fret.json --input-format fcs > Spec.hs \
          && cabal v1-exec -- runhaskell -XPartialTypeSignatures -Wno-partial-type-signatures Spec.hs \
          && echo "Success"
      Command (substitute variables based on new path after merge):
      $ docker run -e "REPO=https://github.com/ivanperez-keera/ogma" -e "NAME=ogma" -e "PAT=ogma"  -e "COMMIT=c7d2dc64561d39adaed9cde0106e0841d11171ca" -it ogma-verify-170
      
  • Implementation is documented. Details:
    New modules include documentation. New commands include documentation and help messages.
  • Change history is clear.
  • Commit messages are clear.
  • Changelogs are updated.
  • Examples are updated. Details:
    No updates needed.
  • Required version bumps are evaluated. Details:
    Bump needed; interface changes.

@ivanperez-keera ivanperez-keera merged commit 2aaac90 into nasa:develop Nov 22, 2024
2 checks passed
@ivanperez-keera ivanperez-keera deleted the develop-standalone branch November 22, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant