Hello all, I threw together a script to get ATS2 up and running on OS X for 
CS520, and Professor Xi said those on this board might find it useful, 
enjoy!

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/5d9954bb-0645-4fb9-a88b-f3f52f006306%40googlegroups.com.
#!/usr/bin/env sh

######
#
# A shell script for
# installing ATS2 + ATS2-contrib
#
# This is mainly for teaching CS520
#
######
#
# Author: Hongwei Xi and Ryan King
# Authoremail: gmhwxiATgmailDOTcom, helloATryankingDOTcom
#
######

# Install Command Line Tools
xcode-select --install

# Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Install Dependencies
brew install git
brew install z3
brew install gmp
brew install bdw-gc
brew install json-c
brew install erlang

# Get ATS2 and ATS2 contrib
git clone git://git.code.sf.net/p/ats2-lang/code ATS2
git clone https://github.com/githwxi/ATS-Postiats-contrib.git ATS2-contrib

# Setup Directories
export PATSHOME=${PWD}/ATS2
export PATSHOMERELOC=${PWD}/ATS2-contrib
export PATH=${PATSHOME}/bin:${PATH}
export PATH=${BIN}:${PATH}

# Store Environment Variables in .bashrc
echo "export PATSHOME=${PWD}/ATS2" >> ${HOME}/.bashrc
echo "export PATSHOMERELOC=${PWD}/ATS2-contrib" >> ${HOME}/.bashrc
echo "export PATSHOME_contrib=${PWD}/ATS2-contrib" >> ${HOME}/.bashrc
echo "export PATH=\${PATSHOME}/bin:\${PATH}" >> ${HOME}/.bashrc

# Build patsopt + patscc
(cd ATS2 && ./configure)
(cd ATS2 && time make all)

# Install Additional Packages
# For parsing C code generated by ATS
(cd ATS2-contrib/projects/MEDIUM/CATS-parsemit && time make DATS_C)
(cd ATS2-contrib/projects/MEDIUM/ATS-extsolve && time make DATS_C)

# patsolve_z3
(cd ATS2-contrib/projects/MEDIUM/ATS-extsolve/ATS-extsolve-z3 && time make build)
(cd ATS2-contrib/projects/MEDIUM/ATS-extsolve/ATS-extsolve-z3 && mv -f patsolve_z3 ${PATSHOME}/bin)

# patsolve_smt2
(cd ATS2-contrib/projects/MEDIUM/ATS-extsolve/ATS-extsolve-smt2 && time make build)
(cd ATS2-contrib/projects/MEDIUM/ATS-extsolve/ATS-extsolve-smt2 && mv -f patsolve_smt2 ${PATSHOME}/bin)

# atscc2js
(cd ATS2-contrib/projects/MEDIUM/CATS-atsccomp/CATS-atscc2js && time make build)
(cd ATS2-contrib/projects/MEDIUM/CATS-atsccomp/CATS-atscc2js && mv -f atscc2js ${PATSHOME}/bin)
(cd ATS2-contrib/contrib/libatscc/libatscc2js && time make all && time make all_in_one)

# atscc2py3
(cd ATS2-contrib/projects/MEDIUM/CATS-atsccomp/CATS-atscc2py3 && time make build)
(cd ATS2-contrib/projects/MEDIUM/CATS-atsccomp/CATS-atscc2py3 && mv -f atscc2py3 ${PATSHOME}/bin)
(cd ATS2-contrib/contrib/libatscc/libatscc2py3 && time make all && time make all_in_one)

# atscc2clj
(cd ATS2-contrib/projects/MEDIUM/CATS-atsccomp/CATS-atscc2clj && time make build)
(cd ATS2-contrib/projects/MEDIUM/CATS-atsccomp/CATS-atscc2clj && mv -f atscc2clj ${PATSHOME}/bin)
(cd ATS2-contrib/contrib/libatscc/libatscc2clj && time make all && time make all_in_one)

# atscc2erl
(cd ATS2-contrib/projects/MEDIUM/CATS-atsccomp/CATS-atscc2erl && time make build)
(cd ATS2-contrib/projects/MEDIUM/CATS-atsccomp/CATS-atscc2erl && mv -f atscc2erl ${PATSHOME}/bin)
(cd ATS2-contrib/contrib/libatscc/libatscc2erl && time make all && time make all_in_one)
(cd ATS2-contrib/contrib/libatscc/libatscc2erl/Session && time make all && time make all_in_one)

###### end of [osx-ATS2-install-cs520-z3.sh] ######

Reply via email to