Skip to content

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ReedOei committed Feb 3, 2020
1 parent 4dd748d commit 9f19717
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
35 changes: 35 additions & 0 deletions Dockerfile
@@ -0,0 +1,35 @@
FROM ubuntu:18.04

# Setup basic environment
RUN apt-get update
RUN apt-get install -y software-properties-common

# Install git
RUN apt-get install -y git
RUN git --version

# Install python
RUN apt-get update
RUN apt-get install -y python3 python3-dev python3-pip
RUN pip3 install pytest
RUN rm -rf /var/lib/apt/lists/*

ENV PYTHONIOENCODING utf-8

# Install misc
RUN apt-get update
RUN apt-get install -y sudo vim wget curl

# Install spot. Run this here so that if we make changes to the stuff below, we don't have to rebuild spot
RUN curl -sSL https://raw.githubusercontent.com/ReedOei/Pecan/master/install-spot.sh | bash

WORKDIR /home/pecan

RUN git clone "https://github.com/ReedOei/Pecan" "ReedOei/Pecan"

WORKDIR /home/pecan/ReedOei/Pecan

RUN git pull
RUN pip3 install -r requirements.txt
RUN pytest --verbose test

9 changes: 9 additions & 0 deletions build-dockerfile.sh
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -ex

echo "$(git rev-parse HEAD)"
date

docker build -t "pecan-prover:latest" - < "./Dockerfile"

2 changes: 1 addition & 1 deletion pecan.py
Expand Up @@ -54,7 +54,7 @@ def main():
parser = argparse.ArgumentParser(description='An automated theorem prover for Büchi Automata')
parser.add_argument('file', help='A Pecan file to execute', nargs='?')
parser.add_argument('-i', '--interactive', help='Run Pecan in interactive mode (REPL)', required=False, action='store_true')
parser.add_argument('-d', '--debug', help='Output debugging information', required=False, action='count')
parser.add_argument('-d', '--debug', help='Output debugging information', required=False, action='store_true')
parser.add_argument('-q', '--quiet', help='Quiet mode', required=False, action='store_true')
parser.add_argument('--no_opt', help='Turns off optimizations', required=False, action='store_true')
parser.add_argument('--load_stdlib', help='Loads the standard library (from library/std.pn in your Pecan installation)', required=False, action='store_false')
Expand Down
1 change: 0 additions & 1 deletion pecan/lang/ir/prog.py
Expand Up @@ -431,7 +431,6 @@ def evaluate(self, old_env=None):

settings.log(0, lambda: '[DEBUG] Processing: {}'.format(d))
if type(d) is NamedPred:

# If we already computed it, it doesn't matter if we replace it with a more efficient version
if self.preds[d.name].body_evaluated is None:
self.preds[d.name] = d
Expand Down

0 comments on commit 9f19717

Please sign in to comment.