8000 Fix expression type for a generated "!="-expression by jerhard · Pull Request #49 · cil-project/cil · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix expression type for a generated "!="-expression #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 240 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
00366ca
add opam script without patch
vesalvojdani Jul 8, 2015
26b3c8a
Make some annoying warnings optional.
vesalvojdani Jul 21, 2015
d4a046d
Merge remote-tracking branch 'upstream/develop' into develop
vesalvojdani Dec 22, 2015
e6e32e4
Merge branch 'develop' of https://github.com/cil-project/cil into dev…
vogler Jul 18, 2016
f9de7f2
keep some string for truncated integer constants
vogler Apr 6, 2017
ad70219
Merge pull request #1 from vogler/develop
vogler Nov 23, 2017
4d7fff3
keep some string for truncated integer constants
vogler Apr 6, 2017
b4db151
fix for OCaml 4.06.0 (-safe-string is the default)
vogler Nov 28, 2017
d2c78d1
Merge pull request #2 from vogler/CInt64-string
vogler Nov 28, 2017
254c563
Merge pull request #3 from vogler/4.06-support
vogler Nov 28, 2017
7f25c1f
missing fixes for 4.06
vogler Nov 29, 2017
f8e6f6f
Merge pull request #4 from vogler/4.06-support
vogler Nov 29, 2017
d907ff6
prepare goblint-cil opam package
vogler Nov 30, 2017
e17dc6a
opam-version 2.0
vogler Oct 25, 2018
6712e5a
support attribute hidden (GNU) and _Complex (GNU, C99)
vogler Nov 5, 2018
804699f
support `static` in array indices in parameter declarations (C99)
vogler Nov 5, 2018
b211da6
cil needs num for Big_int since OCaml 4.06.0
vogler Nov 5, 2018
9d8e68e
Replace nums with zarith.
vesalvojdani Mar 6, 2019
791705e
merge opam from opam-repository
vogler Jun 11, 2019
fa6b11a
travis: test newer ocaml versions (4.04.2-4.07.1, 4.00-4.02 failed)
vogler Jun 11, 2019
9ac0a8d
.travis-ocaml.sh expects OCAML_VERSION as major.minor w/o .patch version
vogler Jun 11, 2019
a99330a
FORCE_PERL_PREFIX was removed in commit 5e793394c529066d80cc24372aec1…
vogler Jun 11, 2019
034518e
add test/ to Perl's @INC path so that RegTest.pm is always found
vogler Jun 13, 2019
f63a8ff
gitignore _opam/ (opam local switch)
vogler Oct 2, 2019
c32e415
Make Cilly not abort with newer versions of GCC
michael-schwarz Oct 2, 2019
d08962f
Adapt .merlin after move of ocamlutil files into src
michael-schwarz Oct 3, 2019
617c8e1
gitignore /test/small2/*.o
michael-schwarz Oct 3, 2019
e95aa46
Fix make doc to work with newer perl versions
michael-schwarz Oct 4, 2019
13fc020
Fix test 318/404 longBlock
michael-schwarz Oct 7, 2019
09a7b10
Specify std=gnu90 for combine test cases.
michael-schwarz Oct 7, 2019
ec38539
Fix several other tests that also rely on C standard being GNU90 by m…
michael-schwarz Oct 7, 2019
2765ecc
Fix so string representation of integer type is only used when it is …
michael-schwarz Oct 7, 2019
f44b466
Normalize whitespace in cabs2cil.ml
michael-schwarz Oct 4, 2019
ecbdb88
WIP remove special handling of VLAs
michael-schwarz Oct 4, 2019
aa62d19
Fix spelling in cabs2cil.ml
michael-schwarz Oct 4, 2019
32f9c83
Add additional instruction for MakeVLA
michael-schwarz Oct 7, 2019
6345050
fix typos
michael-schwarz Oct 7, 2019
4da5cd9
Emit additional MakeVLA statement where a VLA is defined
michael-schwarz Oct 7, 2019
daca717
Add vvladummy to varinfo for dummy varinfos
michael-schwarz Oct 7, 2019
b50d3d0
Modify printer to not print phony vla decls
michael-schwarz Oct 7, 2019
552e06c
Normalize whitespace in check.ml
michael-schwarz Oct 8, 2019
409b1e5
Allow non-const expressions for size of arrays
michael-schwarz Oct 8, 2019
11e6aa0
Support VLAs for which their size is not a CIL Exp but has side-effects.
michael-schwarz Oct 8, 2019
13a2cb9
Pull VLA code into makeVarSizeVarInfo
michael-schwarz Oct 8, 2019
581b83b
Handle mutlidimensional VLA References #5
michael-schwarz Oct 8, 2019
a39d8c7
Remove superfluos code & fix typo
michael-schwarz Oct 8, 2019
98aeda1
Remove superflous warnings
michael-schwarz Oct 8, 2019
8ac783e
Revert "Remove superflous warnings"
michael-schwarz Oct 8, 2019
c8ff63b
Assume two arrays have same length if they both appear in a function …
michael-schwarz Oct 8, 2019
ba24149
Add support for VLAs as parameters
michael-schwarz Oct 9, 2019
7ff1714
Move isConstant up
michael-schwarz Oct 9, 2019
650eebf
Remove problematic casts to the type of the decl for calls for VLAs
michael-schwarz Oct 9, 2019
6876a54
Add test case for multidimensional VLAs. References #5
michael-schwarz Oct 9, 2019
d1c2853
Cleanup
michael-schwarz Oct 9, 2019
3a7cb01
Reinsert test of length argument of TArray in checkType
michael-schwarz Oct 17, 2019
b208642
Cleanup for VLA changes
michael-schwarz Oct 17, 2019
e170ac1
Fix deprecation warnings
michael-schwarz Oct 17, 2019
26a401b
Fix typo
michael-schwarz Oct 17, 2019
c1e51cd
Fixed some more typos
michael-schwarz Oct 18, 2019
9b1593c
Rename varinfo.vdeclinstgenerated to vhasdeclinstruction and add comm…
michael-schwarz Oct 18, 2019
a28024c
Add check for VarDecl
michael-schwarz Oct 18, 2019
315fbf2
Fix testcase builtin3.c
michael-schwarz Oct 21, 2019
791270a
typo
vogler Oct 21, 2019
251b746
Add VarDecl pattern in module MakePartial
michael-schwarz Oct 21, 2019
2ef6d86
typo and add comments
michael-schwarz Oct 21, 2019
7a6d02d
Possibility to control if VarDecl should be generated for all variabl…
michael-schwarz Oct 21, 2019
e080376
Merge pull request #7 from goblint/allow_vla_in_cil_result
michael-schwarz Oct 29, 2019
369c2f8
travis: add osx
vogler Oct 31, 2019
12c67a7
travis: OPAMWITHDOC=false
vogler Oct 31, 2019
ed49489
fix URL for 'Linux build Status' (travis-ci.com, not .org anymore)
vogler Oct 31, 2019
428f409
Add VarDecl _ to all pattern matches on instructions
michael-schwarz Nov 4, 2019
53946cd
Remove warnings for VLA
michael-schwarz Nov 5, 2019
ef606e3
Add new group of C99 tests
michael-schwarz Nov 6, 2019
69bcd09
Include stdlib.h in c99-struct example
michael-schwarz Nov 6, 2019
1ddbbe0
Add test for universal character names
michael-schwarz Nov 6, 2019
225f65d
add __int128, __float128 to lexer and typeSpecifier (also added Tint6…
vogler Nov 6, 2019
8a60315
Add _Float128 to lexer. References #8
michael-schwarz Nov 7, 2019
c0ad7b0
Map Cabs.Tfloat128 to CIL TFloat with fkind FLongDouble. References #8
michael-schwarz Nov 7, 2019
ae6dcbf
Merge branch 'develop' into c99
michael-schwarz Nov 7, 2019
ec2e453
travis: xcode10 -> 11.2
vogler Nov 7, 2019
464d062
travis: install gcc on osx since some tests don't work with clang
vogler Nov 7, 2019
9d1b672
Set alwaysGenerateVarDecl in cabs2cil.ml to false
michael-schwarz Nov 14, 2019
330ea78
Merge branch 'develop' into c99
michael-schwarz Nov 14, 2019
2a61619
Add inlining test. References #9
michael-schwarz Dec 5, 2019
073c3b4
Remove trailing whitespace in clexer.mll and cparser.mly
michael-schwarz Dec 5, 2019
6c90ac5
Merge branch 'develop' into c99
michael-schwarz Dec 5, 2019
bbb0bf3
OS X: Only brew install gcc if it is not already installed
michael-schwarz Dec 6, 2019
a1cd47c
Remove trailing whitespace in cabs.ml and cprint.ml
michael-schwarz Dec 9, 2019
d8947d2
Merge branch 'develop' into c99
michael-schwarz Dec 9, 2019
f119eb5
Fix pAtrr to correctly print _Complex types. References #9
michael-schwarz Dec 13, 2019
1912efb
gitignore vscode settings
michael-schwarz Jan 8, 2020
3f130da
Add assertion to c99-complex test case
michael-schwarz Jan 10, 2020
2f8624b
Add example for broken tgmath
michael-schwarz Jan 10, 2020
caac4f3
WIP Dirty: towards handeling complex and tgmath
michael-schwarz Jan 14, 2020
e1471d0
Add Real (and Imag) to CIL
michael-schwarz Jan 14, 2020
4bbbed7
Extend tgmath.h test
michael-schwarz Jan 14, 2020
398c70f
Fix compiler warning from clexer.mll
michael-schwarz Jan 15, 2020
38e4278
Add isNullPtrConstant to determine if a CIL expression is a nullPtrCo…
michael-schwarz Jan 15, 2020
60251ce
Fix conditionalConversion to conform to ISO 6.5.15
michael-schwarz Jan 15, 2020
60d0851
Special treatment of __builtin_classify_type
michael-schwarz Jan 15, 2020
9a62a24
Also drop complex attribute in typeOfReal
michael-schwarz Jan 15, 2020
f6cce92
Expand test for c99-complex.c
michael-schwarz Jan 15, 2020
65bf016
Add size and alignment for complex types to CIL machine configuration
michael-schwarz 10000 Jan 15, 2020
1d71297
Fix arithmetic conversion to work for complex. References #8, Referen…
michael-schwarz Jan 16, 2020
7e85e55
Ensure complex have the correct fkind rather than having the "comple…
michael-schwarz Jan 16, 2020
673fd85
Be more lenient when accepting complex float constants.
michael-schwarz Jan 16, 2020
5c39b0e
Cleanup
michael-schwarz Jan 16, 2020
61f1f00
Normalize whitespace in testcil.pl
michael-schwarz Jan 16, 2020
b8c0705
Merge branch 'develop' into c99
michael-schwarz Jan 16, 2020
1cde476
Add support for __imag__ References #8, References #9
michael-schwarz Jan 16, 2020
691e411
Skip failing tests for universal character names and inline
michael-schwarz Jan 16, 2020
252a597
Add comments about what c99Mode does
michael-schwarz Jan 17, 2020
4089860
Add comments for fkind also to cil.mli
michael-schwarz Jan 17, 2020
ad7f497
Try setting CC to gcc-9 gcc-8 etc instead of gcc on MacOS
michael-schwarz Jan 21, 2020
45b6fe5
Be more flexible with content of host_os
michael-schwarz Jan 21, 2020
01715a4
test if case distinction for macos works
michael-schwarz Jan 21, 2020
47e3300
Set CC=gcc-9 for MacOS
michael-schwarz Jan 21, 2020
7870313
Support tgmath.h in newer versions of GCC
michael-schwarz Jan 22, 2020
8e255cb
Remove __const__ from asm
michael-schwarz Jan 22, 2020
be553fe
Pass CC to all the tests even if CC is called directly and not via cilly
michael-schwarz Jan 22, 2020
4adf96c
Travis: also test with Ocaml 4.08 and 4.09
michael-schwarz Jan 23, 2020
7daa709
Travis: Remove sudo.
michael-schwarz Jan 23, 2020
3a5a738
testrun/longBlock: Use ocamlfind
michael-schwarz Jan 23, 2020
19649b2
Merge pull request #10 from goblint/c99
michael-schwarz Jan 23, 2020
e11dae6
Clarify that `opam install cil` installs the upstream version of CIL
michael-schwarz Jan 29, 2020
8b151a2
Travis: Also test with OCaml 4.10
michael-schwarz Feb 22, 2020
6bc0c07
try `dune build src/cil.cmxa`; still need to generate machdep.ml
vogler Feb 24, 2020
fb6ed01
WIP: try to generate machdep.ml
vogler Feb 24, 2020
21d0736
make `dune build src/cil.cmxa` work, fix bug in libmaincil.ml, travis…
vogler Feb 25, 2020
398ef5e
dune: generate_opam_files
vogler Mar 2, 2020
3bb3723
generate machdep-ml.c and cilversion.ml
vogler Mar 3, 2020
dfb376a
merge rules such that ./confgure only needs to be run once
vogler Mar 3, 2020
2aad010
add libraries: Feature references Dynlink, Str; Stats references Unix
vogler Mar 3, 2020
b5b714f
module Mutex from ocaml/threads/threads.cmxa clashes with goblint's
vogler Mar 3, 2020
fe912eb
travis (mac): do not require ocamlbuild for ./configure
vogler Mar 3, 2020
3d42bcc
disable Warning 27: unused variable
vogler Mar 3, 2020
e7edf36
fix Warning 33: unused open
vogler Mar 3, 2020
ca4e311
fix Warning 7: the method ... is overridden
vogler Mar 3, 2020
f21e06a
show all warnings but 27 again
vogler Mar 3, 2020
e3a103c
Merge pull request #11 from goblint/dune
vogler Mar 3, 2020
0afce4c
dune builds doc with odoc
vogler Mar 3, 2020
79c5d85
Fix Warning 9
michael-schwarz Mar 9, 2020
41db643
Fix Warning 3
michael-schwarz Mar 9, 2020
09fdcc2
Fix Warning 39
michael-schwarz Mar 9, 2020
e3a4e61
Fix ambiguous pattern match in removeUnusedGoto
michael-schwarz Mar 9, 2020
ed8f205
Fix most Warning 50
michael-schwarz Mar 9, 2020
11caf78
Fix Warning 6
michael-schwarz Mar 9, 2020
2e621d7
Fix Warning 52
michael-schwarz Mar 11, 2020
5ee6445
Steps towards running unit tests from dune
michael-schwarz Apr 2, 2020
9e4d0a2
Add missing dependencies and make executable public so it gets built …
michael-schwarz Apr 2, 2020
beb6616
Depend on input file for configure instead of on output
michael-schwarz Apr 2, 2020
acae373
Don't load goblint-cil via dynlink
michael-schwarz Apr 3, 2020
6e30839
Fix Cil extra modules when compiling with dune
michael-schwarz Apr 3, 2020
36f07bb
Remove `make doc` from regression tests
michael-schwarz Apr 3, 2020
f4095f2
Fix testrun/longBlock for dune
michael-schwarz Apr 3, 2020
a475df9
Add cqualann
michael-schwarz Apr 3, 2020
156261e
Fix dependencies of @runtest
michael-schwarz Apr 3, 2020
0cbd2d2
Dune: Replace readlink that is unavailable on Mac
michael-schwarz Apr 5, 2020
1887fb8
Travis: Increase timeout
michael-schwarz Apr 5, 2020
5a41560
Travis: Increase timeout
michael-schwarz Apr 5, 2020
76b8cba
Use -linkall when building the CIL executable, don't load deep ancest…
michael-schwarz Apr 5, 2020
eb7a148
Use stdlib-shims
michael-schwarz Apr 5, 2020
7bf251c
Add stdlib-shims dependency to libraries in ext/
michael-schwarz Apr 6, 2020
edcea55
Fix remaining warnings
michael-schwarz Apr 6, 2020
6da4545
Merge branch 'fix-warnings' into develop
michael-schwarz Apr 6, 2020
a05b084
Bump goblint-cil to 1.7.5
michael-schwarz Apr 7, 2020
149f140
Ignore Warning 32: unused value
michael-schwarz Apr 9, 2020
59e24c4
Fix warning 35
michael-schwarz Apr 9, 2020
3ce20fa
Fix Warning 36
michael-schwarz Apr 9, 2020
f8522a8
Fix remaining warning 36
michael-schwarz Apr 9, 2020
6059c7d
Ignore warnings 34, 37, 38
michael-schwarz Apr 9, 2020
0d12b5b
Fix warning 50
michael-schwarz Apr 9, 2020
d066cf3
Add test case for compound literals
michael-schwarz Apr 19, 2020
6f9e7ba
Fix typo
michael-schwarz May 25, 2020
fcbb884
Test OCaml 4.11 as well
michael-schwarz Aug 24, 2020
5d46709
Return bottom value for Real & Imag
keremc Sep 7, 2020
2e8feaa
Set found_undefined only if an undefined is called
keremc Sep 7, 2020
ae3bf37
Merge pull request #16 from keremc/pta-fixes
michael-schwarz Sep 9, 2020
61ae9ec
added mapping-var which holds all (intern) variable mapping of CIL
faddeenkov May 26, 2020
c19f340
added a mapping which keeps track of all alpha-conversions/renamings
faddeenkov May 29, 2020
0d5a336
readded variable which collects all CIL-generated tmp-vars
faddeenkov Jun 25, 2020
60c331b
added myEnv to cabs2cil.mli
faddeenkov Sep 23, 2020
eba7776
added description of cabs2cil.mli and clean
faddeenkov Oct 19, 2020
5c9b708
Rename myEnv to environment; Add comment
michael-schwarz Oct 19, 2020
60f8db1
Bump goblint-cil to 1.7.6
michael-schwarz Oct 19, 2020
50b89fa
Steps towards adding syntactic search to CIL
michael-schwarz Oct 21, 2020
d280320
Include goblint-cil.syntacticsearch into all-features
michael-schwarz Oct 21, 2020
a548025
Add dependencies to dune-project
michael-schwarz Oct 21, 2020
888aefe
Add dependencies to goblint-cil.opam as well
michael-schwarz Oct 21, 2020
ba2c71a
Replace List.filter_map with BatList.filter_map for OCaml <4.08
michael-schwarz Oct 21, 2020
3126be6
Fix for Ocaml 4.04
michael-schwarz Oct 21, 2020
5fb04be
Ocaml 4.04: remove Hastbl.find_opt
michael-schwarz Oct 21, 2020
119d19a
Travis: MacOS support for gcc-10
michael-schwarz Oct 21, 2020
6dd1fc0
Ocaml 4.04: Replace List.find_opt with BatList.find_opt
michael-schwarz Oct 21, 2020
0994b83
Revert "Travis: MacOS support for gcc-10"
michael-schwarz Oct 22, 2020
26847e8
Remove special handling of hidden.
michael-schwarz Oct 22, 2020
bc1e6d3
foldLeftCompound: remove unnecessary return type annotation to get sy…
michael-schwarz Oct 22, 2020
6510d4b
Add batteries to top-level dune and _tags file
michael-schwarz Oct 22, 2020
573f4af
Uncomment test for VLA
michael-schwarz Oct 22, 2020
edfe4c4
Patch array sizes in type for global initializers {}. References #19
michael-schwarz Oct 22, 2020
6c5cd92
Also patch type of {} initializer itself for arrays to have length zero.
michael-schwarz Oct 22, 2020
1481c4d
Bump goblint-cil to 1.7.7
michael-schwarz Oct 23, 2020
a67a702
Rename JsonParser to CodeQuery. References https://github.com/goblint…
michael-schwarz Oct 26, 2020
e5ec72d
Merge branch 'feature/syntactic_search' into develop
michael-schwarz Oct 28, 2020
f0e6e5e
Bump goblint-cil to 1.7.8
michael-schwarz Oct 28, 2020
174b5ca
Add info on dune build to README
jerhard Nov 6, 2020
96a44ff
Fix build via make. References #22
michael-schwarz Nov 6, 2020
fc9b7bb
Merge branch 'develop' of github.com:goblint/cil into develop
michael-schwarz Nov 6, 2020
af72038
Fix forgotten renames of findlib package. References #22
michael-schwarz Nov 9, 2020
e68f7fa
Syntactic Search: Rename misnamed subfolder; add .merlin to gitignore
michael-schwarz Nov 9, 2020
4610bfb
Make all tests work with `make test`; Fix `make clean`. References #22
michael-schwarz Nov 10, 2020
5fdf44c
Bump CIL version number in configure.ac
michael-schwarz Nov 27, 2020
8f27589
Ignore #pragma STDC FENV_ACCESS OFF just like GCC
michael-schwarz Dec 3, 2020
60e9c5f
Switch CI from Travis to GitHub (#23)
michael-schwarz Dec 4, 2020
bb83968
Remove build badges from README.md
michael-schwarz Dec 4, 2020
f332f6b
Update copyright
michael-schwarz Dec 9, 2020
a31cb4e
mention how to setup opam dependencies
vogler Dec 10, 2020
0bfb6e3
add opam lock file
vogler Dec 10, 2020
2f7a7de
README: Working urls for CIL tutorial and template
michael-schwarz Dec 11, 2020
d99f4c3
Use string representation of int in mkCastT if any, and fix when stri…
jerhard Dec 21, 2020
5c21f05
Remove debug-output
jerhard Dec 22, 2020
b6136b4
Test with OCaml 4.11.2 and 4.12.0 in CI (#25)
michael-schwarz Mar 2, 2021
8924642
Use unthreaded Batteries (#26)
keremc Mar 10, 2021
741edbe
Add feature descriptor for syntacticsearch
keremc Apr 1, 2021
a293b0e
Ignore Goto statements in syntacticsearch
keremc Apr 1, 2021
7181c13
Merge pull request #27 from keremc/fix-syntactic-search-stack-overflow
michael-schwarz Apr 5, 2021
e68694f
Remove unused CIL extensions
keremc Apr 12, 2021
f9ede8d
Move Ciltools out of zrapp
keremc Apr 19, 2021
5bf857d
Remove simplify tests
keremc Apr 20, 2021
44c2a37
Don't enable --logcalls
keremc Apr 20, 2021
4fd1eba
Bring back partial extension partially as makecfg
keremc Apr 20, 2021
e1805d0
Update README
keremc Apr 23, 2021
f1a6723
Remove varnameMapping from cabs2cil. Closes #31
michael-schwarz Apr 23, 2021
069df74
Merge pull request #30 from goblint/remove-unmaintained-extensions
michael-schwarz Apr 23, 2021
2074bfe
Better name for function to find renamed varinfos
michael-schwarz Apr 23, 2021
a8d9f32
Merge pull request #32 from goblint/fixes/remove-cabs-varname-mapping
michael-schwarz Apr 23, 2021
2aae6ae
Fix "package loop for goblint-cil.makecfg" error on OCaml 4.08.1
tkchia May 7, 2021
80f102c
Merge pull request #35 from tkchia/develop
michael-schwarz May 10, 2021
f69f89a
Add failing test case for issue #29
jerhard May 17, 2021
ab6a723
Fix type of tranformation to NEQ-expression
jerhard May 17, 2021
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
56 changes: 56 additions & 0 deletions .github/workflows/tests.yml
10000
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: build and run tests
# https://github.com/avsm/setup-ocaml

on:
- push
- pull_request

jobs:
tests:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
# - windows-latest
ocaml-version:
- 4.04.2
- 4.05.0
- 4.06.1
- 4.07.1
- 4.08.1
- 4.09.1
- 4.10.1
- 4.11.2
- 4.12.0


runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache # https://github.com/marketplace/actions/cache
uses: actions/cache@v2.0.0
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: |
~/.opam
_opam
# An explicit key for restoring and saving the cache
key: ${{ runner.os }}-new-${{ matrix.ocaml-version }}

- name: Setup OCaml ${{ matrix.ocaml-version }}
uses: avsm/setup-ocaml@v1
with:
ocaml-version: ${{ matrix.ocaml-version }}

- run: opam pin add goblint-cil.dev . --no-action
- run: opam depext goblint-cil --yes
- run: opam depext goblint-cil --yes --with-doc
- run: opam depext goblint-cil --yes --with-test
- run: opam install . --deps-only --with-doc --with-test
- run: opam exec -- dune build
- run: opam exec -- dune runtest
27 changes: 26 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
_opam/
src/.merlin
# /
/camlprim0.obj
/*.a
Expand Down Expand Up @@ -92,6 +94,7 @@

# /lib/cil
/lib/cil
/lib/goblint-cil

# /share
/share/cil/ocamlpath
Expand Down Expand Up @@ -390,4 +393,26 @@
/test/small2/funcptr3
/test/small2/merge-ar
/test/small2/libmerge.a

/test/small2/*.o
.vscode/settings.json
src/ext/blockinggraph/.merlin
src/ext/callgraph/.merlin
src/ext/zrapp/.merlin
src/ext/simplify/.merlin
src/ext/simplemem/.merlin
src/ext/sfi/.merlin
src/ext/pta/.merlin
src/ext/partial/.merlin
src/ext/oneret/.merlin
src/ext/logwrites/.merlin
src/ext/logcalls/.merlin
src/ext/llvm/.merlin
src/ext/liveness/.merlin
src/ext/inliner/.merlin
src/ext/heapify/.merlin
src/ext/epicenter/.merlin
src/ext/dataslicing/.merlin
src/ext/ccl/.merlin
src/ext/canonicalize/.merlin
src/ext/cqualann/.merlin
src/ext/syntacticsearch/.merlin
4 changes: 2 additions & 2 deletions .merlin
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ S src/
S src/ext/
S src/ext/pta/
S src/frontc/
S ocamlutil/
S src/ocamlutil/
B _build/
B _build/src/
B _build/src/ext/
B _build/src/ext/pta/
B _build/src/frontc/
B _build/ocamlutil/
B _build/src/ocamlutil/
PKG findlib
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Copyright (c) 2001-2013,
Copyright (c) 2001-2020,
George C. Necula <necula@cs.berkeley.edu>
Scott McPeak <smcpeak@cs.berkeley.edu>
Wes Weimer <weimer@cs.berkeley.edu>
Ben Liblit <liblit@cs.wisc.edu>
Matt Harren <matth@cs.berkeley.edu>
Gabriel Kerneis <kerneis@pps.univ-paris-diderot.fr>
Ralf Vogler <ralf.vogler@tum.de>
Michael Schwarz <m.schwarz@tum.de>
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
11 changes: 11 additions & 0 deletions META.goblint-cil.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# DUNE_GEN

package "default-features" (
requires="goblint-cil.dataslicing goblint-cil.liveness goblint-cil.pta goblint-cil.makecfg goblint-cil.syntacticsearch"
version = "1.7.8"
)

package "all-features" (
requires="goblint-cil.dataslicing goblint-cil.liveness goblint-cil.pta goblint-cil.makecfg goblint-cil.zrapp goblint-cil.syntacticsearch"
version = "1.7.8"
)
20 changes: 13 additions & 7 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ CILLIB_TARGETS=
CILLY_EXE_FILES=

CIL_PLUGINS_DIR = src/ext
CIL_EXCLUDE_PLUGINS =
CIL_EXCLUDE_PLUGINS = dune
CIL_PLUGINS = $(addprefix $(OBJDIR)/,$(filter-out $(addprefix $(CIL_PLUGINS_DIR)/, $(CIL_EXCLUDE_PLUGINS)),$(wildcard $(CIL_PLUGINS_DIR)/*)))

CIL_DEFAULT_PLUGINS = $(patsubst $(CIL_PLUGINS_DIR)/%/default,cil.%,$(wildcard $(CIL_PLUGINS_DIR)/*/default))
CIL_DEFAULT_PLUGINS = $(patsubst $(CIL_PLUGINS_DIR)/%/default,goblint-cil.%,$(wildcard $(CIL_PLUGINS_DIR)/*/default))

ifneq ($(OCAMLC),no)
CILLIB_TARGETS += $(OBJDIR)/src/cil.cma
Expand Down Expand Up @@ -106,7 +106,7 @@ ocamlbuild:
META:
@rm -f $@
@printf "description = \"C Intermediate Language\"\n" >>$@
@printf "requires = \"unix str num dynlink\"\n" >>$@
@printf "requires = \"unix str zarith dynlink\"\n" >>$@
@printf "version = \"$(CIL_VERSION)\"\n\n" >>$@
@printf "archive(byte) = \"cil.cma\"\n" >>$@
@printf "archive(native) = \"cil.cmxa\"\n\n" >>$@
Expand All @@ -115,7 +115,7 @@ META:
@printf "version = \"$(CIL_VERSION)\"\n" >>$@
@printf ")\n\n" >>$@
@printf "package \"all-features\" (\n" >>$@
@printf "requires=\"$(patsubst $(OBJDIR)/$(CIL_PLUGINS_DIR)/%,cil.%,$(CIL_PLUGINS))\"\n" >>$@
@printf "requires=\"$(patsubst $(OBJDIR)/$(CIL_PLUGINS_DIR)/%,goblint-cil.%,$(CIL_PLUGINS))\"\n" >>$@
@printf "version = \"$(CIL_VERSION)\"\n" >>$@
@printf ")\n\n" >>$@
@$(foreach plugin,$(patsubst $(OBJDIR)/$(CIL_PLUGINS_DIR)/%,%,$(CIL_PLUGINS)),\
Expand Down Expand Up @@ -167,6 +167,9 @@ $(OBJDIR)/machdep.ml : src/machdep-ml.c configure.ac Makefile.in
@echo " sizeof_float: int; (* Size of \"float\" *)" >> $@
@echo " sizeof_double: int; (* Size of \"double\" *)" >> $@
@echo " sizeof_longdouble: int; (* Size of \"long double\" *)" >> $@
@echo " sizeof_floatcomplex: int; (* Size of \"float _Complex\" *)" >> $@
@echo " sizeof_doublecomplex: int; (* Size of \"double _Complex\" *)" >> $@
@echo " sizeof_longdoublecomplex: int; (* Size of \"long double _Complex\" *)" >> $@
@echo " sizeof_void: int; (* Size of \"void\" *)" >> $@
@echo " sizeof_fun: int; (* Size of function *)" >> $@
@echo " size_t: string; (* Type of \"sizeof(T)\" *)" >> $@
Expand All @@ -181,6 +184,9 @@ $(OBJDIR)/machdep.ml : src/machdep-ml.c configure.ac Makefile.in
@echo " alignof_float: int; (* Alignment of \"float\" *)" >> $@
@echo " alignof_double: int; (* Alignment of \"double\" *)" >> $@
@echo " alignof_longdouble: int; (* Alignment of \"long double\" *)" >> $@
@echo " alignof_floatcomplex: int; (* Alignment of \"float _Complex\" *)" >> $@
@echo " alignof_doublecomplex: int; (* Alignment of \"double _Complex\" *)" >> $@
@echo " alignof_longdoublecomplex: int; (* Alignment of \"long double _Complex\" *)" >> $@
@echo " alignof_str: int; (* Alignment of strings *)" >> $@
@echo " alignof_fun: int; (* Alignment of function *)" >> $@
@echo " alignof_aligned: int; (* Alignment of anything with the \"aligned\" attribute *)" >> $@
Expand Down Expand Up @@ -277,7 +283,7 @@ distclean: clean
clean: $(CILLYDIR)/Makefile
rm -rf $(OBJDIR)
rm -f $(BINDIR)/$(CILLY).*
rm -rf lib/cil share/
rm -rf lib/goblint-cil share/
rm -f META
rm -rf doc/html/
rm -rf doc/cilcode.tmp/
Expand Down Expand Up @@ -346,10 +352,10 @@ endif
install-findlib: META $(CILLIB_FILES) $(CILLIB_TARGETS) uninstall-findlib
mkdir -p $(OCAMLFIND_INSTALLDIR)
OCAMLFIND_DESTDIR=$(OCAMLFIND_INSTALLDIR) \
$(OCAMLFIND) install cil META $(CILLIB_TARGETS) `cat $(CILLIB_FILES)`
$(OCAMLFIND) install goblint-cil META $(CILLIB_TARGETS) `cat $(CILLIB_FILES)`

uninstall-findlib:
OCAMLFIND_DESTDIR=$(OCAMLFIND_INSTALLDIR) $(OCAMLFIND) remove cil
OCAMLFIND_DESTDIR=$(OCAMLFIND_INSTALLDIR) $(OCAMLFIND) remove goblint-cil

.PHONY: install-data uninstall-data
install-data:
Expand Down
117 changes: 68 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,64 @@
C Intermediate Language (CIL)
============================

Linux [![Linux build Status](https://travis-ci.org/cil-project/cil.svg?branch=develop)](https://travis-ci.org/cil-project/cil)
Windows [![Windows build status](https://ci.appveyor.com/api/projects/status/jtgf72r03jnge7jw/branch/develop?svg=true)](https://ci.appveyor.com/project/kerneis/cil/branch/develop)


CIL is a front-end for the C programming language that facilitates
program analysis and transformation. CIL will parse and typecheck a
program, and compile it into a simplified subset of C.

CIL supports ANSI C as well as most of the extensions of the GNU C and
Microsoft C compilers. A Perl script acts as a drop in replacement for
either gcc or Microsoft's cl, and allows merging of the source files in
your project. Other features include support for control-flow and
points-to analyses.
`goblint-cil` is a fork of CIL that supports C99 as well as most of the
extensions of the GNU C. It makes many changes to the original CIL in an effort
to modernize it and keep up with the latest versions of the C language. Here is
an incomplete list of some of the ways `goblint-cil` improves upon CIL:
- Proper support for C99, ([#9][i9]) and VLAs in particular ([#5][i5], [#7][pr7])
- It uses [Zarith][zarith] instead of the deprecated [Num][num]
- Support for more recent OCaml versions (≥ 4.06)
- Large integer constants that do not fit in an OCaml `int` are represented as a
`string` instead of getting truncated
- Syntactic search extension ([#21][pr21])
- Some warnings were made optional
- Unmaintained extensions ([#30][pr30]) were removed
- Many bug fixes

[zarith]: https://github.com/ocaml/Zarith
[num]: https://github.com/ocaml/num
[i5]: https://github.com/goblint/cil/issues/5
[pr7]: https://github.com/goblint/cil/pull/7
[i9]: https://github.com/goblint/cil/issues/9
[pr21]: https://github.com/goblint/cil/pull/21
[pr30]: https://github.com/goblint/cil/pull/30

Quickstart
----------

Install the latest release of `goblint-cil` with [opam][]:

Quick start
-----------
opam install goblint-cil

Install the latest release of CIL with [opam][]:
Read the excellent [CIL tutorial][tuto] by Zachary Anderson, much of which
still applies to `goblint-cil`.

opam install cil
**ATTENTION:** Don't install the `cil` package. This is the unmaintained
original version of CIL.

Read the excellent [CIL tutorial][tuto] by Zachary Anderson, and
check out the accompanying [project template][template].
[tuto]: https://web.eecs.umich.edu/~weimerw/2011-6610/reading/ciltut.pdf

[tuto]: https://bitbucket.org/zanderso/cil-template/downloads/ciltut.pdf
[template]: https://bitbucket.org/zanderso/cil-template
Installation from Source
------------------------

Installation
-----------
Prerequisites:
- opam
- Some C compiler (preferably `gcc`)
- Perl

To build and install CIL, you need the OCaml compiler, perl, and
[ocamlfind][findlib]. (Of course, you also need some C compiler,
preferably gcc.)
First create a local opam switch and install all dependencies:

Run the following commands to build and install CIL:
opam switch create .

Then, run the following commands to build and install `goblint-cil`:

./configure
make
make test # regression test suite, optionnal
make test # runs the regression test suite, optional
make install # as root or using sudo

If you want to install to some other directory, you can tweak the prefix
Expand All @@ -48,17 +67,26 @@ directory:

./configure --prefix=`opam config var prefix`

[findlib]: http://projects.camlcity.org/projects/findlib.html
[opam]: http://opam.ocamlpro.com/
[opam]: https://opam.ocaml.org/

Build with Dune
---------------
Alternatively, you can use [dune] to build `goblint-cil`. Run the following
commands to build and test `goblint-cil`:

dune build
dune runtest # runs the regression test suite

[dune]: https://github.com/ocaml/dune

Usage
-----

You can use cilly (installed in /usr/local/bin by default) as a drop-in
replacement for gcc to compile and link your programs.
You can use cilly (installed in `/usr/local/bin` by default) as a drop-in
replacement for `gcc` to compile and link your programs.

You can also use CIL as a library to write your own programs. For
instance in the OCaml toplevel using [findlib][]:
You can also use `goblint-cil` as a library to write your own programs. For
instance in the OCaml toplevel using [Findlib][findlib]:

$ ocaml
Objective Caml version 4.00.1
Expand All @@ -67,29 +95,20 @@ instance in the OCaml toplevel using [findlib][]:
[...]
# #require "cil";;
[...]
# Cil.cilVersion;;
# Cil.cilVersion;;
- : string = "1.7.3"

[findlib]: http://projects.camlcity.org/projects/findlib.html

More documentation
------------------

The documentation is located in the doc/html/cil directory. The API
documentation (generated by ocamldoc) is in the api subdirectory.

To (re)build the doc, you need [Hevea][] and run:

make doc

You can also [browse the documentation online][doc].
TODO
----

[hevea]: http://hevea.inria.fr/ "Hevea - LaTex to HTML translator"
[doc]: http://cil-project.github.io/cil/doc/html/cil/ "Cil online doc"
- C11 support ([#13][i13])

Ressources
----------
[i13]: https://github.com/goblint/cil/issues/13

* [Mailing list](https://lists.sourceforge.net/lists/listinfo/cil-users)
* [Bug tracker](http://sourceforge.net/p/cil/bugs/)
License
-------
`goblint-cil` is licensed under the BSD license. See [LICENSE][license].

CIL is maintained by Gabriel Kerneis <gabriel@kerneis.info>
[license]: https://github.com/goblint/cil/blob/develop/LICENSE
2 changes: 1 addition & 1 deletion _tags
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Traverse only subdirectories containing source code
true: -traverse
true: -traverse, package(zarith), package(stdlib-shims), package(batteries), package(yojson), package(ppx_deriving_yojson)
<src>: include
# build every cmo in debug mode (for cil.cma)
<**/*.cmo>: debug
Expand Down
Loading
0