Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#FROM ubuntu:18.04 # note: trying 20.04 because of glibc 2.29 req for infer

FROM ubuntu:20.04
RUN apt-get update
RUN apt-get install -y gcc make sudo cmake apt-transport-https software-properties-common binutils g++ curl
RUN apt-get install -y wget apt-transport-https gnupg python
#RUN wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
#RUN echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb bionic main" | sudo tee /etc/apt/sources.list.d/adoptopenjdk.list
RUN apt-get update
#RUN apt-get -y install adoptopenjdk-11-hotspot
# Install OpenJDK-11
RUN apt-get update && \
apt-get install -y openjdk-11-jdk && \
apt-get clean;
ENV JAVA_HOME "/usr/lib/jvm/java-11-openjdk-amd64/"
RUN mkdir /home/bounder

## 3. sbt
#RUN echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
#RUN sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
#RUN sudo apt-get update
#RUN sudo apt-get install -y sbt

# SBT
RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
RUN curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo -H gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import
RUN sudo chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg
RUN sudo apt-get update
RUN sudo apt-get install -y sbt

## Microsoft z3
ENV Z3_VERSION "4.12.5"
# install debian packages
RUN apt-get update -qq -y
RUN apt-get install binutils g++ make ant -y
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*
#
# download, compile and install Z3
RUN Z3_DIR="$(mktemp -d)"
RUN cd "$Z3_DIR"
RUN wget -qO- https://github.com/Z3Prover/z3/archive/z3-${Z3_VERSION}.tar.gz | tar xz --strip-components=1
RUN python scripts/mk_make.py --java
RUN cd /build && make && sudo make install
# RUN ls -a
#failing here
# RUN make -j
# RUN
# RUN cd /
# RUN rm -rf "$Z3_DIR"

RUN apt-get update
RUN apt-get install -y zip unzip
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,24 @@ Week 5(analysis branch):
- Added in `IncrementVar` as a sublass of `Executable`
- Created `Conditional` class to hold comparisons
- Changed `Rand` to have a max value to create more specific ranges

Week 6(combine branch):

- Worked in [dual_evaluate.worksheet.scala](src/main/scala/dual_evaluate.worksheet.sc) to try to find a awy to call the same evaluate function for any domain(concrete, abstract, etc.)

Week 7 and 8(combine branch):

- Researched Types and Classes, polymorphism(ad hoc and parametric), and Type Classes.
- Started trying to implement a version of `evaluate` thats approximates the following: `evaluate[T]` => `T`, or in words you can pass the domain type to the evalute function, and each domain will implement each type of expression in its own way. In theory you would be able to call `.evaluate[Domain]` on any expression for whichever domain you wanted at the time.
- Changed to have a type class instead of `Evaluator[T]`, where each T would be a domain like `Int`, `Interval`, etc. All evaluates were outsourced to the `implicit object` of each domain type like `IntEvaluator` or `IntervalEvaluator`.
- Added the `Statement` trait which is for anything that changes state (while loops, executables, etc.). to evaluate a `Statement` you call `Statement.execute[T]`, which returns `State[T]`

Week 9(combine branch):

- Started learning docker and how to use a docker file in an attempt to integrate z3 as an smt for my interval analysis.
- Added a simple `Program` class that accepts a list of statements to execute, really just to make the language a bit more cohesive and look nicer.

Week 10(combine branch):

- Researched Octagonal Domain and strated adding into project
- [Source](https://arxiv.org/pdf/cs/0703084.pdf)
5 changes: 4 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ lazy val root = project
name := "taylor-fall",
version := "0.1.0-SNAPSHOT",
scalaVersion := scala3Version,
libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test
libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test,
// libraryDependencies += "io.github.pityka" %% "nspl-awt" % "0.10.0"
// libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.1" % Test
// libraryDependencies += "org.scalacheck" % "scalacheck" % "2.13.13" % Test
unmanagedJars in Compile += baseDirectory.value / "lib/com.microsoft.z3.jar"
)
61 changes: 0 additions & 61 deletions src/main/scala/Adddition.scala

This file was deleted.

8 changes: 0 additions & 8 deletions src/main/scala/Bool.scala

This file was deleted.

21 changes: 0 additions & 21 deletions src/main/scala/Executable.scala

This file was deleted.

Loading