Skip to content

Commit

Permalink
Merge pull request #148 from Bo-Yuan-Huang/v1.0.0
Browse files Browse the repository at this point in the history
V1.0.0
  • Loading branch information
Bo-Yuan-Huang committed Sep 18, 2019
2 parents ff6c1a0 + 1ac29c8 commit 73da002
Show file tree
Hide file tree
Showing 136 changed files with 1,208 additions and 1,003 deletions.
57 changes: 44 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ branches:
only:
- master
- travis
- pre-release
- coverity_scan

git:
depth: 1
Expand All @@ -12,6 +12,11 @@ sudo: required

language: cpp

env:
global:
- secure: "RwHto3MzZ2KTsGK2LiCKCxdN/xzuWiCTO+2+zhfPjVujGMx84QdMHC5fRu94VoJ5PdZ5QHwoWy3jqQ0f2PJE7oRQe28w/ENY32yDl/ziRjY1U6k4p2pcfgYQtsyyof60mL+yG6Yzz4hlJ74uQ+arhdvyAYYvliyvUiHkLgp4XvJhmsqpogkL89pERAeZ32Xg22ajzXZD5tcWQ7CbCDVKOE0KrwktU3UG08VxMmgfjKG+rU1MKj5R8rXtwZrMzqEAzosTEK0miZYJcgO0pVStCeAC2UAZllEpWXaR2EW5plb/hXRmFjRSlWflasGzJ7VB6mZ95w4xm2DICKYgcrwPWgiMnwoEByrJBh0M7xBzU1MTFmbiqB5wSSsWfVA7zv+SLmD4mCww4HKxAkE2cDJ3MOAvK8bp1vCULBCMMmbVFNGQgBprZKoxUlpQLNn+y9C6pQoaCej9/KVdkyiSQ8SM2vXDoS4/CGnoeaOAoNpu5mkPmDk7RRjIPjdS7by9xycYXAoUVVty/EZideCrYswe1KvH87GK6Fd91XITHuhuc/Aw4Jg0zXjxx6dcHbjZKuYN5MgNMx4IWK+lNiKPyLGO1/AnFG1UP+CpOC6QE8XZNhcnvn3q4r6c+v/QbeoEE7O/XOXqJDSEumJ5b2psBuoktl52azKgUqMtDzuTWjv6BvY="


cache:
directories:
- $HOME/_cache
Expand All @@ -26,16 +31,20 @@ matrix:
- gem install coveralls-lcov
before_script:
- mkdir -p $TRAVIS_BUILD_DIR/build
- source $TRAVIS_BUILD_DIR/scripts/travis/clean-coverage.sh $TRAVIS_BUILD_DIR/build
- source $TRAVIS_BUILD_DIR/scripts/travis/clean-coverage.sh $TRAVIS_BUILD_DIR/build
script:
- source $TRAVIS_BUILD_DIR/scripts/travis/build.sh $TRAVIS_BUILD_DIR
after_success:
- source $TRAVIS_BUILD_DIR/scripts/travis/submit-coverage.sh $TRAVIS_BUILD_DIR/build
- source $TRAVIS_BUILD_DIR/scripts/travis/submit-coverage.sh $TRAVIS_BUILD_DIR/build

- name: "linux-clang"
os: linux
dist: xenial
compiler: clang
before_install:
- export LD_LIBRARY_PATH=/usr/local/clang/lib:$LD_LIBRARY_PATH
script:
- source $TRAVIS_BUILD_DIR/scripts/travis/build.sh $TRAVIS_BUILD_DIR

- name: "gcc49"
os: linux
Expand All @@ -55,13 +64,45 @@ matrix:
- MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
before_install:
- eval "${MATRIX_EVAL}"
script:
- source $TRAVIS_BUILD_DIR/scripts/travis/build.sh $TRAVIS_BUILD_DIR

- name: "osx"
os: osx
before_install:
- brew install bison
- export PATH="/usr/local/opt/bison/bin:$PATH"
- export LDFLAGS="-L/usr/local/opt/bison/lib"
script:
- source $TRAVIS_BUILD_DIR/scripts/travis/build-osx.sh $TRAVIS_BUILD_DIR

- name: "coverity"
os: linux
dist: xenial
compiler: gcc
addons:
coverity_scan:
project:
name: "Bo-Yuan-Huang/ILAng"
description: "A modeling and verification platform for SoCs"
notification_email: [email protected]
build_command_prepend: "cd $TRAVIS_BUILD_DIR && mkdir -p build && cd build && cmake .. -DILANG_BUILD_TEST=OFF -DCMAKE_PREFIX_PATH=$TRAVIS_BUILD_DIR/local -DILANG_COVERITY=ON"
build_command: "make"
branch_pattern: coverity_scan
apt:
update: true
packages:
- flex
- bison
- libboost-all-dev
- z3
- libz3-dev
before_install:
- echo -n | openssl s_client -connect https://scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
before_script:
- source $TRAVIS_BUILD_DIR/scripts/travis/install-externs.sh $TRAVIS_BUILD_DIR
script:
- source $TRAVIS_BUILD_DIR/scripts/travis/build-static.sh $TRAVIS_BUILD_DIR

addons:
apt:
Expand All @@ -82,15 +123,5 @@ addons:
- boost-python
- z3

script:
- cd $TRAVIS_BUILD_DIR
- mkdir -p build
- cd build
- cmake .. -DILANG_BUILD_COV=ON -DCMAKE_BUILD_TYPE=Debug
- make -j$(nproc)
- sudo make install
- make run_test
- ctest -R ExampleCMakeBuild

notifications:
email: false
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()
# PROJECT
# name version language
# ---------------------------------------------------------------------------- #
project(ilang VERSION 0.9.3
project(ilang VERSION 1.0.0
LANGUAGES CXX
)

Expand All @@ -25,6 +25,7 @@ option(ILANG_BUILD_DOCS "Build documentations." OFF)
option(ILANG_BUILD_SYNTH "Build the synthesis engine." ON)
option(ILANG_INSTALL_DEV "Install dev features." OFF)
option(ILANG_EXPORT_PACKAGE "Export CMake package if enabled." OFF)
option(ILANG_COVERITY "Build for Coverity static analysis." OFF)
option(BUILD_SHARED_LIBS "Build shared libraries." ON)

include(CMakeDependentOption)
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[![ILAng](https://raw.githubusercontent.com/Bo-Yuan-Huang/ILAng/master/docs/pics/ilang-logo.png)](https://bo-yuan-huang.gitbook.io/ilang/)

[![Build Status](https://dev.azure.com/byhuang/ILAng/_apis/build/status/Bo-Yuan-Huang.ILAng?branchName=master)](https://dev.azure.com/byhuang/ILAng/_build/latest?definitionId=1&branchName=master)
[![Build Status](https://travis-ci.org/Bo-Yuan-Huang/ILAng.svg?branch=master)](https://travis-ci.org/Bo-Yuan-Huang/ILAng)
[![Build Status](https://semaphoreci.com/api/v1/bo-yuan-huang/ilang/branches/master/shields_badge.svg)](https://semaphoreci.com/bo-yuan-huang/ilang)
[![Build status](https://ci.appveyor.com/api/projects/status/cwhlq09513art6hw/branch/master?svg=true)](https://ci.appveyor.com/project/Bo-Yuan-Huang/ilang/branch/master)
[![Build Status](https://dev.azure.com/byhuang/ILAng/_apis/build/status/Bo-Yuan-Huang.ILAng?branchName=master)](https://dev.azure.com/byhuang/ILAng/_build/latest?definitionId=1&branchName=master)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/17719/badge.svg)](https://scan.coverity.com/projects/bo-yuan-huang-ilang)
[![Coverage Status](https://coveralls.io/repos/github/Bo-Yuan-Huang/ILAng/badge.svg?branch=master)](https://coveralls.io/github/Bo-Yuan-Huang/ILAng?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b120e2527cc04d4aacd1dc11581e2f30)](https://www.codacy.com/app/Bo-Yuan-Huang/ILAng?utm_source=github.com&utm_medium=referral&utm_content=Bo-Yuan-Huang/ILAng&utm_campaign=Badge_Grade)
[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/Bo-Yuan-Huang/ILAng.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Bo-Yuan-Huang/ILAng/context:cpp)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b120e2527cc04d4aacd1dc11581e2f30)](https://www.codacy.com/app/Bo-Yuan-Huang/ILAng?utm_source=github.com&utm_medium=referral&utm_content=Bo-Yuan-Huang/ILAng&utm_campaign=Badge_Grade)
[![license](https://img.shields.io/github/license/bo-yuan-huang/ilang.svg?style=flat)](https://github.com/Bo-Yuan-Huang/ILA-Tools/blob/master/LICENSE)
[![Documentation](https://img.shields.io/badge/docs-manual-blue.svg)](https://bo-yuan-huang.gitbook.io/ilang/)
[![Documentation](https://img.shields.io/badge/docs-doxygen-blue.svg)](https://bo-yuan-huang.github.io/ILAng-Doc/doxygen-output-html/namespaceilang.html)
Expand Down Expand Up @@ -55,12 +56,12 @@ brew install bison flex boost boost-python z3
| Ubuntu 14.04 (Trusty) | gcc 4.8.4 | 3.8.0 | 4.8.5 | 1.54 | 3.0.4 | 2.5.25 | Release |
| Ubuntu 16.04 (Xenial) | gcc 5.4.0 | 3.12.4 | 4.4.1 | 1.58 | 3.0.4 | 2.6.0 | Debug |
| Ubuntu 16.04 (Xenial) | clang 7.0.0 | 3.12.4 | 4.4.1 | 1.58 | 3.0.4 | 2.6.0 | Debug |
| Ubuntu 16.04 (Xenial) | gcc 5.4.0 | 3.12.4 | 4.4.1 | 1.69 | 3.0.4 | 2.6.0 | Default |
| Ubuntu 18.04 (Bionic) | gcc 7.4.0 | 3.14.4 | 4.4.1 | 1.65 | 3.0.4 | 2.6.4 | Default |
| OSX 10.13.3 (High Sierra) | Xcode 9.4.1 | 3.11.3 | 4.8.5 | 1.70 | 3.4.1 | 2.5.35 | Debug |
| OSX 10.13.6 (High Sierra) | Xcode 10.1.0 | 3.14.5 | 4.8.5 | 1.70 | 3.4.1 | 2.5.35 | Default |
| OSX 10.14.5 (Mojave) | Xcode 10.2.1 | 3.14.5 | 4.8.5 | 1.70 | 3.4.1 | 2.5.35 | Default |
| Windows Server 2016 | VS 2017 | 3.14.5 | 4.8.5 | - | 3.3.2 | 2.6.4 | Default |
| Ubuntu 16.04 (Xenial) | gcc 5.4.0 | 3.12.4 | 4.4.1 | 1.69 | 3.0.4 | 2.6.0 | Release |
| Ubuntu 18.04 (Bionic) | gcc 7.4.0 | 3.15.2 | 4.8.6 | 1.65 | 3.0.4 | 2.6.4 | Release |
| OSX 10.13.3 (High Sierra) | Xcode 9.4.1 | 3.11.3 | 4.8.5 | 1.71 | 3.4.2 | 2.5.35 | Debug |
| OSX 10.13.6 (High Sierra) | Xcode 10.1.0 | 3.14.5 | 4.8.5 | 1.71 | 3.4.2 | 2.5.35 | Release |
| OSX 10.14.5 (Mojave) | Xcode 10.2.1 | 3.14.5 | 4.8.5 | 1.71 | 3.4.2 | 2.5.35 | Release |
| Windows Server 2016 | VS 2017 | 3.14.5 | 4.8.5 | - | 3.3.2 | 2.6.4 | Release |

### Default Build

Expand Down
28 changes: 0 additions & 28 deletions appveyor.yml

This file was deleted.

7 changes: 4 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
export LDFLAGS="-L/usr/local/opt/bison/lib"
mkdir -p build
cd build
cmake ..
cmake .. -DCMAKE_BUILD_TYPE=Release -DBoost_NO_BOOST_CMAKE=ON
cmake --build .
cmake --build . --target install
cmake --build . --target test
Expand All @@ -53,7 +53,7 @@ jobs:
export LDFLAGS="-L/usr/local/opt/bison/lib"
mkdir -p build
cd build
cmake ..
cmake .. -DCMAKE_BUILD_TYPE=Release -DBoost_NO_BOOST_CMAKE=ON
cmake --build .
cmake --build . --target install
cmake --build . --target test
Expand All @@ -74,7 +74,7 @@ jobs:
- script: |
mkdir -p build
cd build
cmake ..
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
sudo cmake --build . --target install
cmake --build . --target test
Expand Down Expand Up @@ -126,6 +126,7 @@ jobs:
- script: |
md build
cd build
# For building the test, we need CMAKE_MSVC_RUNTIME_LIBRARY (which will be supported in CMake 3.15+)
cmake .. -DILANG_BUILD_SYNTH=OFF -DILANG_BUILD_TEST=OFF -DBUILD_SHARED_LIBS=OFF -DZ3_INCLUDE_DIR=$(Build.Repository.LocalPath)/z3/include -DZ3_LIBRARY=$(Build.Repository.LocalPath)/z3/bin/libz3.lib -DZ3_EXEC=$(Build.Repository.LocalPath)/z3/bin/z3.exe
cmake --build .
cmake --build . --target install
Expand Down
8 changes: 4 additions & 4 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# PATH extern/glog
# ---------------------------------------------------------------------------- #
# find installed package
find_package(glog QUIET)
find_package(glog 0.4.0 QUIET)

# build from embeded subtree (in-source)
if(NOT GLOG_FOUND)
Expand All @@ -25,7 +25,7 @@ endif() # GLOG_FOUND
# PATH extern/json
# ---------------------------------------------------------------------------- #
# find installed package
find_package(nlohmann_json QUIET)
find_package(nlohmann_json 3.6.1 QUIET)

# build from embeded subtree (in-source)
if(NOT NLOHMANN_JSON_FOUND)
Expand All @@ -44,7 +44,7 @@ endif() # NLOHMANN_JSON_FOUND
# PATH extern/vlog-parser
# ---------------------------------------------------------------------------- #
# find installed package
find_package(verilogparser QUIET)
find_package(verilogparser 1.1.0 QUIET)

# embed to build tree if not installed
if(NOT VERILOGPARSER_FOUND)
Expand Down Expand Up @@ -80,7 +80,7 @@ endif() # VERILOGPARSER_FOUND
if(${ILANG_BUILD_SYNTH})

# find installed package
find_package(ilasynth QUIET)
find_package(ilasynth 1.0 QUIET)

# embed to build tree if not installed
if(NOT ILASYNTH_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion extern/tmpl-synth
28 changes: 28 additions & 0 deletions include/ilang/ila-handler/eq_check.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/// \file
/// The header for checking the equivalence of two ILAs.

#ifndef ILANG_ILA_HANDLER_EQ_CHECK_H__
#define ILANG_ILA_HANDLER_EQ_CHECK_H__

#include <ilang/ilang++.h>

/// \namespace ilang
namespace ilang {

/// \brief Check if two ILAs have an exact same architecture, i.e., at the
/// highest level of hierarchy.
/// \param[in] a first ILA.
/// \param[in] b second ILA.
/// \param[in] update check update if true.
bool CheckEqSameArch(const Ila& a, const Ila& b, bool update = true);

/// \brief Check if two ILAs have an exact same micro-architecture. That is,
/// they have a same architecture at every level in the hierarchy.
/// \param[in] a first ILA.
/// \param[in] b second ILA.
/// \param[in] update check update if true.
bool CheckEqSameMicroArch(const Ila& a, const Ila& b, bool update = true);

}; // namespace ilang

#endif // ILANG_ILA_HANDLER_EQ_CHECK_H__
12 changes: 5 additions & 7 deletions include/ilang/ila/ast/ast.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/// \file
/// Header for the class Ast.

#ifndef AST_H__
#define AST_H__
#ifndef ILANG_ILA_AST_AST_H__
#define ILANG_ILA_AST_AST_H__

#include "z3++.h"
#include <ilang/ila/object.h>
#include <memory>
#include <string>

#include <ilang/ila/object.h>

/// \namespace ilang
namespace ilang {

Expand Down Expand Up @@ -54,10 +54,8 @@ class Ast : public Object {
/// Pointer to the host ILA.
InstrLvlAbsPtr host_ = NULL;

// ------------------------- HELPERS -------------------------------------- //

}; // class Ast

} // namespace ilang

#endif // AST_H__
#endif // ILANG_ILA_AST_AST_H__
17 changes: 9 additions & 8 deletions include/ilang/ila/ast/expr.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
/// \file
/// Header for the class Expr

#ifndef EXPR_H__
#define EXPR_H__
#ifndef ILANG_ILA_AST_EXPR_H__
#define ILANG_ILA_AST_EXPR_H__

#include "z3++.h"
#include "z3_api.h"
#include <ilang/ila/ast/ast.h>
#include <ilang/ila/ast/sort.h>
#include <ilang/ila/defines.h>
#include <memory>
#include <ostream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#include "z3++.h"
#include "z3_api.h"
#include <ilang/ila/ast/ast.h>
#include <ilang/ila/ast/sort.h>
#include <ilang/ila/defines.h>

/// \namespace ilang
namespace ilang {

Expand Down Expand Up @@ -148,4 +149,4 @@ typedef std::unordered_set<ExprPtr, ExprHash> ExprSet;

} // namespace ilang

#endif // EXPR_H__
#endif // ILANG_ILA_AST_EXPR_H__
6 changes: 3 additions & 3 deletions include/ilang/ila/ast/expr_const.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/// \file
/// Header for constant expression

#ifndef EXPR_CONST_H__
#define EXPR_CONST_H__
#ifndef ILANG_ILA_AST_EXPR_CONST_H__
#define ILANG_ILA_AST_EXPR_CONST_H__

#include <ilang/ila/ast/expr.h>
#include <ilang/ila/ast/sort_value.h>
Expand Down Expand Up @@ -53,4 +53,4 @@ class ExprConst : public Expr {

} // namespace ilang

#endif // EXPR_CONST_H__
#endif // ILANG_ILA_AST_EXPR_CONST_H__
6 changes: 3 additions & 3 deletions include/ilang/ila/ast/expr_op.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/// \file
/// Header for the class ExprOp

#ifndef EXPR_OP_H__
#define EXPR_OP_H__
#ifndef ILANG_ILA_AST_EXPR_OP_H__
#define ILANG_ILA_AST_EXPR_OP_H__

#include <ilang/ila/ast/expr.h>

Expand Down Expand Up @@ -432,4 +432,4 @@ class ExprOpIte : public ExprOp {

} // namespace ilang

#endif // EXPR_OP_H__
#endif // ILANG_ILA_AST_EXPR_OP_H__
Loading

0 comments on commit 73da002

Please sign in to comment.