Skip to content

Commit 73da002

Browse files
Merge pull request #148 from Bo-Yuan-Huang/v1.0.0
V1.0.0
2 parents ff6c1a0 + 1ac29c8 commit 73da002

File tree

136 files changed

+1208
-1003
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+1208
-1003
lines changed

.travis.yml

+44-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ branches:
22
only:
33
- master
44
- travis
5-
- pre-release
5+
- coverity_scan
66

77
git:
88
depth: 1
@@ -12,6 +12,11 @@ sudo: required
1212

1313
language: cpp
1414

15+
env:
16+
global:
17+
- secure: "RwHto3MzZ2KTsGK2LiCKCxdN/xzuWiCTO+2+zhfPjVujGMx84QdMHC5fRu94VoJ5PdZ5QHwoWy3jqQ0f2PJE7oRQe28w/ENY32yDl/ziRjY1U6k4p2pcfgYQtsyyof60mL+yG6Yzz4hlJ74uQ+arhdvyAYYvliyvUiHkLgp4XvJhmsqpogkL89pERAeZ32Xg22ajzXZD5tcWQ7CbCDVKOE0KrwktU3UG08VxMmgfjKG+rU1MKj5R8rXtwZrMzqEAzosTEK0miZYJcgO0pVStCeAC2UAZllEpWXaR2EW5plb/hXRmFjRSlWflasGzJ7VB6mZ95w4xm2DICKYgcrwPWgiMnwoEByrJBh0M7xBzU1MTFmbiqB5wSSsWfVA7zv+SLmD4mCww4HKxAkE2cDJ3MOAvK8bp1vCULBCMMmbVFNGQgBprZKoxUlpQLNn+y9C6pQoaCej9/KVdkyiSQ8SM2vXDoS4/CGnoeaOAoNpu5mkPmDk7RRjIPjdS7by9xycYXAoUVVty/EZideCrYswe1KvH87GK6Fd91XITHuhuc/Aw4Jg0zXjxx6dcHbjZKuYN5MgNMx4IWK+lNiKPyLGO1/AnFG1UP+CpOC6QE8XZNhcnvn3q4r6c+v/QbeoEE7O/XOXqJDSEumJ5b2psBuoktl52azKgUqMtDzuTWjv6BvY="
18+
19+
1520
cache:
1621
directories:
1722
- $HOME/_cache
@@ -26,16 +31,20 @@ matrix:
2631
- gem install coveralls-lcov
2732
before_script:
2833
- mkdir -p $TRAVIS_BUILD_DIR/build
29-
- source $TRAVIS_BUILD_DIR/scripts/travis/clean-coverage.sh $TRAVIS_BUILD_DIR/build
34+
- source $TRAVIS_BUILD_DIR/scripts/travis/clean-coverage.sh $TRAVIS_BUILD_DIR/build
35+
script:
36+
- source $TRAVIS_BUILD_DIR/scripts/travis/build.sh $TRAVIS_BUILD_DIR
3037
after_success:
31-
- source $TRAVIS_BUILD_DIR/scripts/travis/submit-coverage.sh $TRAVIS_BUILD_DIR/build
38+
- source $TRAVIS_BUILD_DIR/scripts/travis/submit-coverage.sh $TRAVIS_BUILD_DIR/build
3239

3340
- name: "linux-clang"
3441
os: linux
3542
dist: xenial
3643
compiler: clang
3744
before_install:
3845
- export LD_LIBRARY_PATH=/usr/local/clang/lib:$LD_LIBRARY_PATH
46+
script:
47+
- source $TRAVIS_BUILD_DIR/scripts/travis/build.sh $TRAVIS_BUILD_DIR
3948

4049
- name: "gcc49"
4150
os: linux
@@ -55,13 +64,45 @@ matrix:
5564
- MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
5665
before_install:
5766
- eval "${MATRIX_EVAL}"
67+
script:
68+
- source $TRAVIS_BUILD_DIR/scripts/travis/build.sh $TRAVIS_BUILD_DIR
5869

5970
- name: "osx"
6071
os: osx
6172
before_install:
6273
- brew install bison
6374
- export PATH="/usr/local/opt/bison/bin:$PATH"
6475
- export LDFLAGS="-L/usr/local/opt/bison/lib"
76+
script:
77+
- source $TRAVIS_BUILD_DIR/scripts/travis/build-osx.sh $TRAVIS_BUILD_DIR
78+
79+
- name: "coverity"
80+
os: linux
81+
dist: xenial
82+
compiler: gcc
83+
addons:
84+
coverity_scan:
85+
project:
86+
name: "Bo-Yuan-Huang/ILAng"
87+
description: "A modeling and verification platform for SoCs"
88+
notification_email: byhuang1992@gmail.com
89+
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"
90+
build_command: "make"
91+
branch_pattern: coverity_scan
92+
apt:
93+
update: true
94+
packages:
95+
- flex
96+
- bison
97+
- libboost-all-dev
98+
- z3
99+
- libz3-dev
100+
before_install:
101+
- 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-
102+
before_script:
103+
- source $TRAVIS_BUILD_DIR/scripts/travis/install-externs.sh $TRAVIS_BUILD_DIR
104+
script:
105+
- source $TRAVIS_BUILD_DIR/scripts/travis/build-static.sh $TRAVIS_BUILD_DIR
65106

66107
addons:
67108
apt:
@@ -82,15 +123,5 @@ addons:
82123
- boost-python
83124
- z3
84125

85-
script:
86-
- cd $TRAVIS_BUILD_DIR
87-
- mkdir -p build
88-
- cd build
89-
- cmake .. -DILANG_BUILD_COV=ON -DCMAKE_BUILD_TYPE=Debug
90-
- make -j$(nproc)
91-
- sudo make install
92-
- make run_test
93-
- ctest -R ExampleCMakeBuild
94-
95126
notifications:
96127
email: false

CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ endif()
1111
# PROJECT
1212
# name version language
1313
# ---------------------------------------------------------------------------- #
14-
project(ilang VERSION 0.9.3
14+
project(ilang VERSION 1.0.0
1515
LANGUAGES CXX
1616
)
1717

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

3031
include(CMakeDependentOption)

README.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
[![ILAng](https://raw.githubusercontent.com/Bo-Yuan-Huang/ILAng/master/docs/pics/ilang-logo.png)](https://bo-yuan-huang.gitbook.io/ilang/)
22

3+
[![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)
34
[![Build Status](https://travis-ci.org/Bo-Yuan-Huang/ILAng.svg?branch=master)](https://travis-ci.org/Bo-Yuan-Huang/ILAng)
45
[![Build Status](https://semaphoreci.com/api/v1/bo-yuan-huang/ilang/branches/master/shields_badge.svg)](https://semaphoreci.com/bo-yuan-huang/ilang)
56
[![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)
6-
[![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)
7+
[![Coverity Scan Build Status](https://scan.coverity.com/projects/17719/badge.svg)](https://scan.coverity.com/projects/bo-yuan-huang-ilang)
78
[![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)
8-
[![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)
99
[![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)
10+
[![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)
1011
[![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)
1112
[![Documentation](https://img.shields.io/badge/docs-manual-blue.svg)](https://bo-yuan-huang.gitbook.io/ilang/)
1213
[![Documentation](https://img.shields.io/badge/docs-doxygen-blue.svg)](https://bo-yuan-huang.github.io/ILAng-Doc/doxygen-output-html/namespaceilang.html)
@@ -55,12 +56,12 @@ brew install bison flex boost boost-python z3
5556
| Ubuntu 14.04 (Trusty) | gcc 4.8.4 | 3.8.0 | 4.8.5 | 1.54 | 3.0.4 | 2.5.25 | Release |
5657
| Ubuntu 16.04 (Xenial) | gcc 5.4.0 | 3.12.4 | 4.4.1 | 1.58 | 3.0.4 | 2.6.0 | Debug |
5758
| Ubuntu 16.04 (Xenial) | clang 7.0.0 | 3.12.4 | 4.4.1 | 1.58 | 3.0.4 | 2.6.0 | Debug |
58-
| Ubuntu 16.04 (Xenial) | gcc 5.4.0 | 3.12.4 | 4.4.1 | 1.69 | 3.0.4 | 2.6.0 | Default |
59-
| Ubuntu 18.04 (Bionic) | gcc 7.4.0 | 3.14.4 | 4.4.1 | 1.65 | 3.0.4 | 2.6.4 | Default |
60-
| 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 |
61-
| 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 |
62-
| OSX 10.14.5 (Mojave) | Xcode 10.2.1 | 3.14.5 | 4.8.5 | 1.70 | 3.4.1 | 2.5.35 | Default |
63-
| Windows Server 2016 | VS 2017 | 3.14.5 | 4.8.5 | - | 3.3.2 | 2.6.4 | Default |
59+
| Ubuntu 16.04 (Xenial) | gcc 5.4.0 | 3.12.4 | 4.4.1 | 1.69 | 3.0.4 | 2.6.0 | Release |
60+
| Ubuntu 18.04 (Bionic) | gcc 7.4.0 | 3.15.2 | 4.8.6 | 1.65 | 3.0.4 | 2.6.4 | Release |
61+
| 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 |
62+
| 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 |
63+
| OSX 10.14.5 (Mojave) | Xcode 10.2.1 | 3.14.5 | 4.8.5 | 1.71 | 3.4.2 | 2.5.35 | Release |
64+
| Windows Server 2016 | VS 2017 | 3.14.5 | 4.8.5 | - | 3.3.2 | 2.6.4 | Release |
6465

6566
### Default Build
6667

appveyor.yml

-28
This file was deleted.

azure-pipelines.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
export LDFLAGS="-L/usr/local/opt/bison/lib"
2828
mkdir -p build
2929
cd build
30-
cmake ..
30+
cmake .. -DCMAKE_BUILD_TYPE=Release -DBoost_NO_BOOST_CMAKE=ON
3131
cmake --build .
3232
cmake --build . --target install
3333
cmake --build . --target test
@@ -53,7 +53,7 @@ jobs:
5353
export LDFLAGS="-L/usr/local/opt/bison/lib"
5454
mkdir -p build
5555
cd build
56-
cmake ..
56+
cmake .. -DCMAKE_BUILD_TYPE=Release -DBoost_NO_BOOST_CMAKE=ON
5757
cmake --build .
5858
cmake --build . --target install
5959
cmake --build . --target test
@@ -74,7 +74,7 @@ jobs:
7474
- script: |
7575
mkdir -p build
7676
cd build
77-
cmake ..
77+
cmake .. -DCMAKE_BUILD_TYPE=Release
7878
cmake --build .
7979
sudo cmake --build . --target install
8080
cmake --build . --target test
@@ -126,6 +126,7 @@ jobs:
126126
- script: |
127127
md build
128128
cd build
129+
# For building the test, we need CMAKE_MSVC_RUNTIME_LIBRARY (which will be supported in CMake 3.15+)
129130
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
130131
cmake --build .
131132
cmake --build . --target install

extern/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# PATH extern/glog
77
# ---------------------------------------------------------------------------- #
88
# find installed package
9-
find_package(glog QUIET)
9+
find_package(glog 0.4.0 QUIET)
1010

1111
# build from embeded subtree (in-source)
1212
if(NOT GLOG_FOUND)
@@ -25,7 +25,7 @@ endif() # GLOG_FOUND
2525
# PATH extern/json
2626
# ---------------------------------------------------------------------------- #
2727
# find installed package
28-
find_package(nlohmann_json QUIET)
28+
find_package(nlohmann_json 3.6.1 QUIET)
2929

3030
# build from embeded subtree (in-source)
3131
if(NOT NLOHMANN_JSON_FOUND)
@@ -44,7 +44,7 @@ endif() # NLOHMANN_JSON_FOUND
4444
# PATH extern/vlog-parser
4545
# ---------------------------------------------------------------------------- #
4646
# find installed package
47-
find_package(verilogparser QUIET)
47+
find_package(verilogparser 1.1.0 QUIET)
4848

4949
# embed to build tree if not installed
5050
if(NOT VERILOGPARSER_FOUND)
@@ -80,7 +80,7 @@ endif() # VERILOGPARSER_FOUND
8080
if(${ILANG_BUILD_SYNTH})
8181

8282
# find installed package
83-
find_package(ilasynth QUIET)
83+
find_package(ilasynth 1.0 QUIET)
8484

8585
# embed to build tree if not installed
8686
if(NOT ILASYNTH_FOUND)

extern/tmpl-synth

include/ilang/ila-handler/eq_check.h

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/// \file
2+
/// The header for checking the equivalence of two ILAs.
3+
4+
#ifndef ILANG_ILA_HANDLER_EQ_CHECK_H__
5+
#define ILANG_ILA_HANDLER_EQ_CHECK_H__
6+
7+
#include <ilang/ilang++.h>
8+
9+
/// \namespace ilang
10+
namespace ilang {
11+
12+
/// \brief Check if two ILAs have an exact same architecture, i.e., at the
13+
/// highest level of hierarchy.
14+
/// \param[in] a first ILA.
15+
/// \param[in] b second ILA.
16+
/// \param[in] update check update if true.
17+
bool CheckEqSameArch(const Ila& a, const Ila& b, bool update = true);
18+
19+
/// \brief Check if two ILAs have an exact same micro-architecture. That is,
20+
/// they have a same architecture at every level in the hierarchy.
21+
/// \param[in] a first ILA.
22+
/// \param[in] b second ILA.
23+
/// \param[in] update check update if true.
24+
bool CheckEqSameMicroArch(const Ila& a, const Ila& b, bool update = true);
25+
26+
}; // namespace ilang
27+
28+
#endif // ILANG_ILA_HANDLER_EQ_CHECK_H__

include/ilang/ila/ast/ast.h

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/// \file
22
/// Header for the class Ast.
33

4-
#ifndef AST_H__
5-
#define AST_H__
4+
#ifndef ILANG_ILA_AST_AST_H__
5+
#define ILANG_ILA_AST_AST_H__
66

7-
#include "z3++.h"
8-
#include <ilang/ila/object.h>
97
#include <memory>
108
#include <string>
119

10+
#include <ilang/ila/object.h>
11+
1212
/// \namespace ilang
1313
namespace ilang {
1414

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

57-
// ------------------------- HELPERS -------------------------------------- //
58-
5957
}; // class Ast
6058

6159
} // namespace ilang
6260

63-
#endif // AST_H__
61+
#endif // ILANG_ILA_AST_AST_H__

include/ilang/ila/ast/expr.h

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
/// \file
22
/// Header for the class Expr
33

4-
#ifndef EXPR_H__
5-
#define EXPR_H__
4+
#ifndef ILANG_ILA_AST_EXPR_H__
5+
#define ILANG_ILA_AST_EXPR_H__
66

7-
#include "z3++.h"
8-
#include "z3_api.h"
9-
#include <ilang/ila/ast/ast.h>
10-
#include <ilang/ila/ast/sort.h>
11-
#include <ilang/ila/defines.h>
127
#include <memory>
138
#include <ostream>
149
#include <string>
1510
#include <unordered_map>
1611
#include <unordered_set>
1712
#include <vector>
1813

14+
#include "z3++.h"
15+
#include "z3_api.h"
16+
#include <ilang/ila/ast/ast.h>
17+
#include <ilang/ila/ast/sort.h>
18+
#include <ilang/ila/defines.h>
19+
1920
/// \namespace ilang
2021
namespace ilang {
2122

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

149150
} // namespace ilang
150151

151-
#endif // EXPR_H__
152+
#endif // ILANG_ILA_AST_EXPR_H__

include/ilang/ila/ast/expr_const.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/// \file
22
/// Header for constant expression
33

4-
#ifndef EXPR_CONST_H__
5-
#define EXPR_CONST_H__
4+
#ifndef ILANG_ILA_AST_EXPR_CONST_H__
5+
#define ILANG_ILA_AST_EXPR_CONST_H__
66

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

5454
} // namespace ilang
5555

56-
#endif // EXPR_CONST_H__
56+
#endif // ILANG_ILA_AST_EXPR_CONST_H__

include/ilang/ila/ast/expr_op.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/// \file
22
/// Header for the class ExprOp
33

4-
#ifndef EXPR_OP_H__
5-
#define EXPR_OP_H__
4+
#ifndef ILANG_ILA_AST_EXPR_OP_H__
5+
#define ILANG_ILA_AST_EXPR_OP_H__
66

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

@@ -432,4 +432,4 @@ class ExprOpIte : public ExprOp {
432432

433433
} // namespace ilang
434434

435-
#endif // EXPR_OP_H__
435+
#endif // ILANG_ILA_AST_EXPR_OP_H__

0 commit comments

Comments
 (0)