Skip to content

Merge pycarl into stormpy #205

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

Merged
merged 433 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
433 commits
Select commit Hold shift + click to select a range
538549b
Avoid problem with constant FactorizedPolynomials
volkm Jul 24, 2017
309c8ed
Make tests runs without cln
volkm Jul 26, 2017
f5fd497
Prefix 'Pycarl - ' in setup.py output
volkm Jul 26, 2017
68ece85
Fixed typo
volkm Jul 26, 2017
ff5b27f
Test build without cln in travis as well
volkm Jul 26, 2017
a79fd01
Auto-format python files
volkm Jul 26, 2017
2038e64
Disable Debian builds in Travis as Ubuntu suffices for now
volkm Jul 26, 2017
40e2249
Auto-format python files
volkm Jul 26, 2017
1b4c85c
Updated changelog
volkm Jul 26, 2017
f54f6f5
Fixed some typos
volkm Jul 26, 2017
f584add
Fixed folding command in travis
volkm Jul 26, 2017
c4b81ac
Conversions for int and float
volkm Jul 27, 2017
c412cad
use smt2lib compatible negation in formula to smt2
sjunges Jul 28, 2017
a27299f
Use polynomialWithCoeffficient
sjunges Aug 2, 2017
926b283
fix typo in pycarl installation guide
sjunges Aug 3, 2017
d6e437c
adapted style for pycarl
sjunges Aug 3, 2017
45cd4f1
Fix typo in carl dir option
sjunges Aug 3, 2017
2fdce3b
Report the location of carl if an outdated version is used.
sjunges Aug 3, 2017
c723396
Test support in setup.py
volkm Aug 4, 2017
9d59457
Travis uses setup.py test now
volkm Aug 4, 2017
720b081
pycarl.inf
sjunges Aug 4, 2017
e0ce381
fixed typo (storm should be carl)
sjunges Aug 4, 2017
b967ec6
arithmetic operations with infinity, added missing import sys for eq …
sjunges Aug 4, 2017
9cb54a9
support for hashing pycarl.inf
sjunges Aug 4, 2017
7eaea69
Pycarl requires carl version 17.08 at least.
sjunges Aug 10, 2017
b1a17ed
update version information
sjunges Aug 10, 2017
f12bf44
Small updated in README
volkm Aug 11, 2017
48ad559
Constant and constant_part methods for rational functions
sjunges Aug 11, 2017
d75bd26
Added two common constructors for rational functions
sjunges Aug 14, 2017
4bccea3
rational_function(): Factorized rational function to rational functio…
sjunges Aug 14, 2017
725611b
Fix after removal of relationToString in carl
volkm Sep 1, 2017
c5dfd0f
Use versioning scheme major.minor.patch for carl now
volkm Oct 5, 2017
90b2483
Use version string of carl
volkm Oct 6, 2017
ecf067c
Updated travis scripts similar to storm
volkm Oct 6, 2017
ab060d0
Fixed export in travis
volkm Oct 6, 2017
33cfdc1
More lenient version test
volkm Oct 6, 2017
ce43b9b
Added missing patch version if not given
volkm Oct 6, 2017
f411521
Renamed Interval files to lowercase
volkm Oct 6, 2017
0e0d7fc
Fixed problem with version string parsing
volkm Oct 6, 2017
496f427
in gmp tests, use gmp
sjunges Nov 2, 2017
9d419f8
Adapting to api change in carl.
nafur Nov 3, 2017
3514773
pycarl.*.expand()
sjunges Nov 14, 2017
814a294
change semantics of variable constructor
sjunges Nov 14, 2017
2e97c7e
Adapting to changes in carl.
nafur Nov 23, 2017
d537dc8
Some more adaptions to refactoring in carl::Term.
nafur Nov 24, 2017
873db89
Helper files for setup and config file for build settings
volkm Dec 1, 2017
631a58e
Removed obsolete line in CMakeLists
volkm Dec 1, 2017
8835d53
Set carl-parser-dir
volkm Dec 1, 2017
629430d
Added cmdline flags to disable cln and parser support
volkm Dec 1, 2017
3cc2c58
Use debug in travis
volkm Dec 1, 2017
40c12d4
Fixed typo
volkm Dec 4, 2017
cbe8504
Updated changelog
volkm Dec 4, 2017
f0a27db
Small fixes in setup.py
volkm Dec 7, 2017
ee576a2
Added documentation for new release of pycarl
volkm Dec 7, 2017
176c253
Updated changelog
volkm Dec 7, 2017
ef57b7f
Require carl version >= 17.12
volkm Dec 7, 2017
ace4dc5
Fixed indentation
volkm Dec 7, 2017
b32f1d4
Added methods to get information about pycarl configurations
volkm Dec 7, 2017
58a3544
Fixed import of version
volkm Dec 7, 2017
b53554d
New pycarl version 2.0.2
volkm Dec 7, 2017
d2ddde4
term.is_constant()
sjunges Dec 27, 2017
5969c01
term.tdeg
sjunges Dec 27, 2017
1f5578f
substitute mapping
sjunges Jan 1, 2018
b07af64
repr for polynomials
sjunges Jan 1, 2018
aedaf0d
extended test for substitution
sjunges Jan 1, 2018
d93bc26
improved error message, thanks to Murat for pointing this out
sjunges Jan 2, 2018
3b5bdd1
Construct factorized rational functions with just their numerator (de…
sjunges Jan 11, 2018
b01c374
term and factorised polynomials: is_one
sjunges Jan 11, 2018
9234f07
rational: is_one, is_minus_one
sjunges Jan 21, 2018
f9322dc
some convenience functions
sjunges Jan 28, 2018
b0ce4c1
Use Ubuntu 17.10 in travis now
volkm Jan 29, 2018
fe03e43
is constant for polynomials
sjunges Jan 29, 2018
99bcda8
Build carl with cocoa in travis
volkm Jan 30, 2018
543595b
Travis: build carl without cocoa again
volkm Feb 13, 2018
5ca6b58
Better error message if carl-parser is not available
volkm Feb 13, 2018
c8204e1
Travis: use venv for virtual environment
volkm Mar 21, 2018
1202705
Travis: added missing packages
volkm Mar 21, 2018
993c5db
Typo
volkm Mar 28, 2018
937a158
Fixed typo in neq
volkm Mar 28, 2018
4570adc
Fixed typo in __ne__
volkm Mar 28, 2018
9e6ff1c
Bindings for additional types in arithmetic operations
volkm Mar 28, 2018
aee5b88
Clear all pools in tests
volkm Apr 18, 2018
178a287
Travis: clean-up
volkm Apr 18, 2018
433c948
Travis: changed notification mail adresses
volkm Apr 18, 2018
242fc7a
Travis: change docker repo
volkm Apr 20, 2018
c553736
Added more bindings for addition of RationalFunction
volkm Apr 20, 2018
53b4d9e
Travis: use absolute path
volkm Apr 20, 2018
f69c65b
Raise ImportError when using python 2.x
volkm Apr 25, 2018
fea1ee0
Improve distributing pycarl
volkm Apr 25, 2018
aa4dd0b
Updated gitignore
volkm Apr 25, 2018
189c843
Removed file
volkm Apr 25, 2018
9749197
Updated package information
volkm Apr 25, 2018
26d607e
Minor update in project description
volkm Apr 25, 2018
2911b4c
Fixed typo
volkm Apr 26, 2018
e9658eb
Added missing package convert in setup.py
volkm Apr 27, 2018
7a4ec74
Find packages automatically in setup.py
volkm Apr 27, 2018
0897c1a
Use pytest-runner
volkm Apr 27, 2018
d8ec031
Travis: updated config file generation
volkm Apr 27, 2018
83c7cb7
Extended documentation
volkm Apr 30, 2018
23c48a9
Fixed some typos in documentation
volkm May 1, 2018
633421a
Fixed some spacing
volkm May 2, 2018
3016215
Extended doc for build arguments
volkm May 3, 2018
5dd9cbc
Fix for carl-dir
volkm May 3, 2018
9d9ab2b
Travis: removed docker installation as the package is already present
volkm May 16, 2018
459c989
Travis: Use carl tag 18.08 to avoid problems with C++17
volkm Sep 13, 2018
5d774b8
support for c++14
sjunges Sep 28, 2018
cfff851
Travis: use Ubuntu 18.04
volkm Oct 24, 2018
6837f94
Made version check for master14 branch of carl more robust
volkm Nov 7, 2018
4622523
Travis: use master14 branch of carl
volkm Nov 21, 2018
089ba31
Updated doc to account for master14
volkm Nov 21, 2018
71e8308
Travis: build carl-parser from within carl
volkm Dec 5, 2018
257940d
Set upper bound for supported carl version
volkm Jan 2, 2019
61a1b59
Updated changelog
volkm Jan 2, 2019
258b55b
Set version in doc automatically
volkm Jan 2, 2019
317387b
New pycarl version 2.0.3
volkm Jan 2, 2019
d0185d5
extension to numbertype conversion of formulae
sjunges Feb 14, 2019
16de9d4
Travis: md5sum not needed
volkm Feb 14, 2019
12798b6
Travis: removed c++11 flag
volkm Feb 14, 2019
cdfac24
Extended converter to formulae which do not have subformulae
sjunges Feb 14, 2019
884f479
added another + operator for cleaner code in prophesy
sjunges Feb 14, 2019
cc56fa4
Travis: allow parser failure and use Linux for gh-pages deployment
volkm Feb 14, 2019
6f6a70f
Travis: build only necessary cmake targets
volkm Feb 14, 2019
953d848
Travis: set dependencies with homebrew addon
volkm Feb 14, 2019
052ed1b
Fixed allowed failures
volkm Feb 14, 2019
aff492f
Travis: build only necessary cmake targets
volkm Feb 14, 2019
6e0d133
Unified constant_part() as function
volkm Feb 19, 2019
0e4f56a
Fix for return policy in constant_part
volkm Feb 19, 2019
382666e
Tests for constant_part
volkm Feb 19, 2019
ce345d0
Moving carl_max_version to the future.
nafur Jun 6, 2019
672431a
Travis: test on different systems
volkm Sep 30, 2019
1cfce1d
Travis: fixed argument
volkm Sep 30, 2019
46bd989
Travis: folding for dependencies
volkm Sep 30, 2019
cbf4751
Travis: updated list of Linux distros
volkm Sep 30, 2019
b8763e9
Travis: allow failures under Debian 9 for now
volkm Oct 1, 2019
edaecc4
Modified pybind support for C++17 to fix issues with Xcode 11
volkm Oct 4, 2019
ba2b11b
New release 2.0.4
volkm Nov 14, 2019
4302b8a
Added steps for pypi release in doc
volkm Dec 13, 2019
a665348
Latest release badge
volkm Dec 19, 2019
f3fba9e
Disable deprecation warnings for now. Otherwise the pybind11 compilat…
volkm Mar 9, 2020
e3dc357
Add installation step for pytest in doc
volkm Mar 9, 2020
b210a0c
Travis: update Linux distros to use
volkm May 18, 2020
c3576c4
Travis: workaround for travis problem with homebrew
volkm May 18, 2020
d791d0e
Travis: use current xcode version
volkm May 27, 2020
56cc4d0
Implement manually triggered github actions CI
dbasgoeze Jan 1, 2021
06db897
Update year in doc
volkm Jan 11, 2021
650bd86
Run Github actions on each push
volkm Jan 13, 2021
31c0c6b
Added email notification for Github Actions
volkm Jan 26, 2021
eedb9e8
Updated deprecated version test
volkm Jan 26, 2022
6653d57
Pycarl version 2.0.5
volkm Jan 26, 2022
af0031d
new version, doesnt work yet
sjunges Dec 24, 2021
9b3c90f
set c++14 explicitly
sjunges Dec 24, 2021
371b0b6
remove some deprecated initializers
sjunges Dec 29, 2021
23bc524
Improved workflows for Github Actions
volkm Mar 15, 2022
a466263
Disable interprocedural optimization to fix issues with singletons
volkm Mar 15, 2022
8352268
Updated __init__ to py::init
volkm Feb 27, 2022
e216327
Updated __getstate__/__setstate__ to py::pickle
volkm Feb 27, 2022
fd29199
Activate warnings about deprecated functionality again
volkm Mar 15, 2022
df627eb
Updated distros used in CI
volkm Jul 31, 2022
3aee993
Removed Travis support
volkm Jul 31, 2022
ae5fd31
Updated links from smtrat/carl to ths-rwth/carl
volkm Jul 31, 2022
c63d069
Updated Github Actions
volkm Jul 31, 2022
fcee916
Pycarl version 2.1.0
volkm Jul 31, 2022
45ffb1a
Download pybind11 via CMake instead of shipping it
volkm Aug 2, 2022
03fedc2
Remove Debian 10 from CI tests as CMake version 3.13 is too low for F…
volkm Aug 2, 2022
c5b6af6
Improved build process in CMake and setup.py
volkm Aug 3, 2022
1e155fc
Fixed typo in CMake variable carlparser_DIR
volkm Aug 3, 2022
696b099
Added indepth tests to CI
volkm Aug 3, 2022
e589235
Merge pull request #16: Improved build process
volkm Sep 1, 2022
412d4b8
Merge from master
volkm Sep 1, 2022
28d0807
Pybind version can be set as CMake option and as setup.py argument
volkm Sep 1, 2022
9d269cb
Better highlighting for warnings
volkm Sep 1, 2022
90c2e36
Updated CHANGELOG
volkm Sep 1, 2022
321583e
Merge pull request #15: Download pybind via CMake
volkm Sep 7, 2022
3061f97
Added py::prepend to fix overlead order of __str__ for enums
volkm Feb 27, 2023
610faee
Merge pull request #17 from volkm/fix_enum_str
volkm Mar 22, 2023
6eac4ca
Added Zenodo badge to README (#18)
volkm Mar 23, 2023
c2507ce
Added documentation how to build website
volkm Apr 26, 2023
c996508
Updated list of authors and replaced some paths from carl to carl-storm
volkm Apr 26, 2023
e6dc6cd
Changed path to carl-storm in CI
volkm Apr 26, 2023
763f47f
mention new carl repository, note for apple silicon users
tquatmann Apr 26, 2023
3e01dd7
Mention new carl repository in documentation, note for Apple Silicon …
volkm Apr 26, 2023
d6b3b0a
Updates to carl-storm path and list of authors (#20)
volkm May 1, 2023
1d4a75d
Require carl-storm in version >= 14.23
volkm May 31, 2023
cf2748a
Use packaging.version instead of deprecated distutils.version
volkm May 31, 2023
8f0d64e
Small changes in setup.py
volkm May 31, 2023
f5eba85
Reference new repo moves-rwth/carl-parser (#22)
volkm May 31, 2023
7ebd978
Require carl-storm in version >= 14.23 (#24)
volkm Jun 1, 2023
31af303
Added Dockerfile
volkm Jun 7, 2023
3f2622f
Use Dockerfile in CI
volkm Jun 7, 2023
0596d10
Added Dockerfile and use it in CI (#25)
volkm Jun 7, 2023
af66206
Pycarl version 2.2.0
volkm Jun 7, 2023
25202f6
Correctly disable Cmake argument if not supported (#28)
volkm Jul 1, 2023
0495f1c
Automatic formatting via black + CI support
volkm Aug 2, 2023
12d45c3
Intervals with double as number type
volkm Sep 20, 2023
1256d6a
Tests for intervals
volkm Sep 20, 2023
70eda4e
Intervals with different number types (#31)
volkm Sep 20, 2023
d912940
Automatic formatting via black + CI support (#30)
volkm Dec 5, 2023
c79883e
Applied code formatting
Dec 5, 2023
f1a5e47
Add code formatting commit to .git-blame-ignore-revs
Dec 5, 2023
87e29c5
Code formatting (#32)
volkm Dec 5, 2023
013ab25
CI: updated distros and added separate deploy action
volkm Jun 5, 2024
212f70d
Dockerfiles: install setuptools
volkm Jun 5, 2024
778145b
Dependabot to automatically update Github actions (#34)
volkm Jun 5, 2024
1af48bb
Update CI and Dockerfiles (#35)from volkm/carl_version
volkm Jun 12, 2024
e7e0237
Bump actions/checkout from 3 to 4 (#36)
dependabot[bot] Jun 12, 2024
cff848c
Bump peaceiris/actions-gh-pages from 3 to 4 (#38)
dependabot[bot] Jun 12, 2024
6218ac2
Bump peter-evans/create-pull-request from 5 to 6 (#37)
dependabot[bot] Jun 12, 2024
0e7e422
Bump dawidd6/action-send-mail from 2 to 3 (#39)
dependabot[bot] Jun 12, 2024
9aaf039
Bump technote-space/workflow-conclusion-action from 2 to 3 (#40)
dependabot[bot] Jun 12, 2024
54709cc
CMake updates (#29)
volkm Jun 26, 2024
6ff7e34
Move pycarl stuff into pycarl folders
glatteis Jun 26, 2024
90c771b
Removed support for test command in setup.py
volkm Aug 12, 2024
3da7079
Removed support for test command in setup.py (#42)
volkm Aug 14, 2024
01ebc24
Merge pycarl into stormpy
glatteis Jun 26, 2024
8b29641
Merge branch 'master' of github.com:moves-rwth/stormpy into storm-com…
glatteis Aug 20, 2024
f9d19d0
Merge branch 'master' of github.com:moves-rwth/stormpy into storm-com…
glatteis Aug 20, 2024
12462ac
Merge branch 'storm-compilation' of github.com:linusheck/stormpy into…
glatteis Aug 20, 2024
4ce76fe
Build-related fixes
glatteis Aug 20, 2024
469790d
Fix definitions.h include for CLN
glatteis Aug 20, 2024
924b318
Remove mention of stormpy.pycarl.core
glatteis Aug 20, 2024
62093d8
Fix import in notebook
glatteis Aug 20, 2024
09d94f5
Pycarl version 2.3.0 (#43)
volkm Aug 22, 2024
d7b3205
Removed older OS from CI (#44)
volkm Aug 28, 2024
668f14a
Bump peter-evans/create-pull-request from 6 to 7 (#45)
dependabot[bot] Sep 9, 2024
dc95d40
Use C++20 (#46)
volkm Oct 10, 2024
81b0a21
Bump dawidd6/action-send-mail from 3 to 4 (#47)
dependabot[bot] Nov 25, 2024
ce590ef
Merge branch 'master' of github.com:moves-rwth/stormpy into storm-com…
glatteis Feb 5, 2025
801ab06
fix pycarl inclusion
lukovdm Dec 12, 2024
a2d977d
Merge branch 'master' of github.com:moves-rwth/stormpy into storm-com…
glatteis Feb 19, 2025
3eec28d
Merge docs, fix pycarl's test decorators
glatteis Feb 19, 2025
449bdce
Format
glatteis Feb 19, 2025
243d336
Fix circular config imports
glatteis Feb 24, 2025
77d08a6
Removed commented out lines from setup.py
glatteis Feb 24, 2025
aef284b
Reset git-blame-ignore-revs
glatteis Feb 24, 2025
690234c
Merge branch 'master' of github.com:moves-rwth/stormpy into storm-com…
glatteis Feb 25, 2025
d983dac
Include carlparser
glatteis Mar 3, 2025
94dcbc0
Merge branch 'pycarl-checkout' into storm-compilation
glatteis Mar 3, 2025
e0f356c
Update CHANGELOG.md
linusheck Mar 17, 2025
bb92d52
Update CHANGELOG.md
linusheck Mar 17, 2025
dd65e83
Update Dockerfile
linusheck Mar 17, 2025
59dcb24
Update Dockerfile
linusheck Mar 17, 2025
b2bbe29
Update cmake/CMakeLists.txt
linusheck Mar 17, 2025
f9113cd
Update cmake/CMakeLists.txt
linusheck Mar 17, 2025
c3d31ec
Update cmake/CMakeLists.txt
linusheck Mar 17, 2025
1ecb567
Update README.md
linusheck Mar 17, 2025
d6c8b47
Update setup.py
linusheck Mar 17, 2025
e43b27b
Update pyproject.toml
linusheck Mar 17, 2025
c49db87
Matthias suggestions
glatteis Mar 17, 2025
58f87fa
Merge branch 'storm-compilation' of github.com:moves-rwth/stormpy int…
glatteis Mar 17, 2025
f75b857
Reformat Jupyter Notebooks
glatteis Mar 18, 2025
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
2 changes: 1 addition & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
534f29c9e329007d67428da3ef7be84141140fe2
534f29c9e329007d67428da3ef7be84141140fe2
102 changes: 102 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,105 @@ Version 0.9.x

### Version 0.9 (2017/03)
- Start of this changelog


# Appendix: Pycarl Changelog
=============

Version 2.3.x
-------------

### Version 2.3.0 (2024/08)
Requires carl-storm version >= 14.23

- Added support for intervals with different number types
- Automated code formatting
- Developer: improved build and CMake support
- Developer: improved CI


Version 2.2.x
-------------

### Version 2.2.0 (2023/06)
Requires carl-storm version >= 14.23

- Upgraded repo / version for carl, requires [carl-storm](https://github.com/moves-rwth/carl-storm) from now on
- Developer: added Dockerfile
- Developer: improved build process
- Developer: updated pybind11 to version 2.10.0


Version 2.1.x
-------------

### Version 2.1.0 (2022/07)
Requires carl with branch `master14`

- Developer: updated pybind11 to version 2.8.1 and adapted bindings accordingly
- Improved continuous integration with Github Actions


Version 2.0.x
-------------

### Version 2.0.5 (2022/01)
Requires carl with branch `master14`

- Added support for continuous integration with Github Actions

### Version 2.0.4 (2019/11)
Requires carl with branch `master14`

- Extended conversion of number types to formulae
- (minor) changed `constant_part` to function for `Polynomial`
- (minor) added an additional operator on polynomials
- Fix for compilation with Xcode 11

### Version 2.0.3 (2019/01)
Requires carl with branch `master14` or a carl version between 17.12 and 18.08

- Extended bindings for arithmetic operations
- Fixed negation comparison
- Improved error output in installation
- Extended documentation
- Improved and extended setup

### Version 2.0.2 (2017/12)
Requires carl version >= 17.12

- Adaptions to changes in carl
- Extended bindings for rational functions and factorized rational functions
- `Variable` constructor no longer returns an existing variable if a variable with that name exists
- `expand()` allows to obtain the expanded polynomial and rational function
- Added methods for getting information about pycarl configuration
- Extended build script:
* uses config file
* support for disabling build of CLN and parser bindings
* fixed debug build type

### Version 2.0.1 (2017/08)
Requires carl version >= 17.08

- Added conversions between CLN and GMP
- Added variable and integer pickling support. Throw errors if pickling is not supported
- Added hash functions
- Hide factorization caches for user
- Depend on [carl-parser](https://github.com/ths-rwth/carl-parser) for parsing routines
- Check for carl version
- Fixed issues when CLN is not available

### Version 2.0.0 (2017/05)
- First version with support for CLN and GMP.
This means that no longer all operators are supported as it would be ambiguous
- Using bigint


Version 1.2.x
-------------

### Version 1.2.1 (2017/04)
- Arbitrary-size integers (CLN and GMP)

### Version 1.2.0 (2017/03)
- Start of this changelog
120 changes: 115 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,38 @@ cmake_minimum_required(VERSION 3.15)

project(stormpy)

# include(FetchContent)

# FetchContent_Declare(
# storm
# GIT_REPOSITORY https://github.com/moves-rwth/storm.git
# GIT_BRANCH master
# OVERRIDE_FIND_PACKAGE
# )
# message(Callign make available)
# FetchContent_MakeAvailable(storm)
# message(Done with make)


option(USE_STORM_DFT "Enable support for DFTs" ON)
option(USE_STORM_GSPN "Enable support for GSPNs" ON)
option(USE_STORM_PARS "Enable support for parametric models" ON)
option(USE_STORM_POMDP "Enable support for POMDPs" ON)
option(STORMPY_DISABLE_SIGNATURE_DOC "Disable the signature in the documentation" OFF)

option(USE_CLN_NUMBERS "Make cln numbers available in pycarl" ON)
option(USE_PARSER "Make carlparser available in pycarl" ON)

MARK_AS_ADVANCED(STORMPY_DISABLE_SIGNATURE_DOC)
set(PYBIND_VERSION "" CACHE STRING "Pybind11 version to use")
MARK_AS_ADVANCED(PYBIND_VERSION)
set(STORM_DIR_HINT "" CACHE STRING "A hint where the Storm library can be found.")
set(CARL_DIR_HINT "" CACHE STRING "A hint where the Carl library can be found.")
set(CARLPARSER_DIR_HINT "" CACHE STRING "A hint where the Carl-parser library can be found.")

find_package(storm REQUIRED HINTS ${STORM_DIR_HINT})
find_package(carl REQUIRED HINTS ${CARL_DIR_HINT})
find_package(carlparser QUIET HINTS ${CARLPARSER_DIR_HINT})

find_package(Python COMPONENTS Interpreter Development REQUIRED)
include(resources/include_pybind11.cmake)
Expand Down Expand Up @@ -53,12 +74,26 @@ if (STORM_USE_CLN_RF)
else()
set(PYCARL_RF_PACKAGE "gmp")
endif()
set(PYCARL_IMPORTS "import pycarl")
set(PYCARL_IMPORTS "from stormpy import pycarl")
if (STORM_USE_CLN_EA OR STORM_USE_CLN_RF)
set(PYCARL_IMPORTS "${PYCARL_IMPORTS}\nimport pycarl.cln")
set(PYCARL_IMPORTS "${PYCARL_IMPORTS}\nfrom stormpy.pycarl import cln")
endif()
if (NOT STORM_USE_CLN_EA OR NOT STORM_USE_CLN_RF)
set(PYCARL_IMPORTS "${PYCARL_IMPORTS}\nimport pycarl.gmp")
set(PYCARL_IMPORTS "${PYCARL_IMPORTS}\nfrom stormpy.pycarl import gmp")
endif()

set(CARL_VERSION ${carl_VERSION})
if ((USE_PARSER) AND (carlparser_FOUND))
set(CARL_WITH_PARSER "True")
else()
set(CARL_WITH_PARSER "False")
endif()
if ((USE_CLN_NUMBERS) AND (CARL_USE_CLN_NUMBERS))
set(CARL_WITH_CLN "True")
set(PYCARL_HAS_CLN TRUE)
else()
set(CARL_WITH_CLN "False")
set(PYCARL_HAS_CLN FALSE)
endif()

# Set dependency variables
Expand Down Expand Up @@ -95,9 +130,10 @@ function(stormpy_optional_module NAME ADDITIONAL_LIBS ADDITIONAL_INCLUDES)
set_target_properties(${NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${NAME}")
endfunction(stormpy_optional_module)

# Generate definitions used during compilation
# Generate stormpy definitions used during compilation
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)

# Generate pycarl definitions used during compilation
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/definitions.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/pycarl/definitions.h)

stormpy_module(core)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/core_config.py.in ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/_config.py @ONLY)
Expand All @@ -107,6 +143,15 @@ stormpy_module(logic)
stormpy_module(storage)
stormpy_module(utility)

# Pycarl Core
######
file(GLOB_RECURSE pycarl_core_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/pycarl_core/*.cpp)
pybind11_add_module(pycarl_core ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/mod_core.cpp ${pycarl_core_SOURCES})
target_include_directories(pycarl_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src/)
target_link_libraries(pycarl_core PRIVATE lib_carl)
set_target_properties(pycarl_core PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl" OUTPUT_NAME "pycarl_core")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pycarl_core_config.py.in ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/_config.py @ONLY)

# Optional modules
if(HAVE_STORM_DFT)
stormpy_optional_module(dft storm-dft "${storm-dft_INCLUDE_DIR}")
Expand All @@ -121,3 +166,68 @@ if(HAVE_STORM_POMDP)
stormpy_optional_module(pomdp storm-pomdp "${storm-pomdp_INCLUDE_DIR}")
endif()

# Typed core
file(GLOB_RECURSE PYCARL_TYPED_CORE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/typed_core/*.cpp)
# GMP
pybind11_add_module(pycarl.gmp ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/mod_gmp.cpp ${PYCARL_TYPED_CORE_SOURCES})
target_include_directories(pycarl.gmp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src)
target_link_libraries(pycarl.gmp PRIVATE lib_carl)
set_target_properties(pycarl.gmp PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/gmp" OUTPUT_NAME "gmp")
# CLN
pybind11_add_module(pycarl.cln ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/mod_cln.cpp ${PYCARL_TYPED_CORE_SOURCES})
target_include_directories(pycarl.cln PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src)
target_link_libraries(pycarl.cln PRIVATE lib_carl)
target_compile_definitions(pycarl.cln PUBLIC "PYCARL_USE_CLN=ON")
set_target_properties(pycarl.cln PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/cln" OUTPUT_NAME "cln")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pycarl_cln_config.py.in ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/cln/_config.py @ONLY)


# Formula
#########
file(GLOB_RECURSE PYCARL_FORMULA_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/formula/*.cpp)
pybind11_add_module(pycarl.formula ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/mod_formula.cpp ${PYCARL_FORMULA_SOURCES})
target_include_directories(pycarl.formula PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src)
target_link_libraries(pycarl.formula PRIVATE lib_carl)
set_target_properties(pycarl.formula PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/formula" OUTPUT_NAME "formula")

# Typed formula
file(GLOB_RECURSE PYCARL_TYPED_FORMULA_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/typed_formula/*.cpp)
# GMP
pybind11_add_module(pycarl.formula-gmp ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/mod_typed_formula.cpp ${PYCARL_TYPED_FORMULA_SOURCES})
target_include_directories(pycarl.formula-gmp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src)
target_link_libraries(pycarl.formula-gmp PRIVATE lib_carl)
set_target_properties(pycarl.formula-gmp PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/gmp/formula" OUTPUT_NAME "formula")
# CLN
pybind11_add_module(pycarl.formula-cln ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/mod_typed_formula.cpp ${PYCARL_TYPED_FORMULA_SOURCES})
target_include_directories(pycarl.formula-cln PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src)
target_link_libraries(pycarl.formula-cln PRIVATE lib_carl)
target_compile_definitions(pycarl.formula-cln PUBLIC "PYCARL_USE_CLN=ON")
set_target_properties(pycarl.formula-cln PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/cln/formula" OUTPUT_NAME "formula")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pycarl_cln_config.py.in ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/cln/formula/_config.py @ONLY)


# Parse
# #######
file(GLOB_RECURSE PYCARL_PARSE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/parse/*.cpp)

pybind11_add_module(pycarl.parse ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/mod_parse.cpp ${PYCARL_PARSE_SOURCES})
target_include_directories(pycarl.parse PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src)
target_link_libraries(pycarl.parse PRIVATE lib_carl carl-parser)
set_target_properties(pycarl.parse PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/parse" OUTPUT_NAME "parse")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pycarl_parser_config.py.in ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/parse/_config.py @ONLY)

# Typed parse
file(GLOB_RECURSE PYCARL_TYPED_PARSE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/typed_parse/*.cpp)
# GMP
pybind11_add_module(pycarl.parse-gmp ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/mod_typed_parse.cpp ${PYCARL_TYPED_PARSE_SOURCES})
target_include_directories(pycarl.parse-gmp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src)
target_link_libraries(pycarl.parse-gmp PRIVATE lib_carl carl-parser)
set_target_properties(pycarl.parse-gmp PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/gmp/parse" OUTPUT_NAME "parse")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pycarl_parser_config.py.in ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/gmp/parse/_config.py @ONLY)
# CLN
pybind11_add_module(pycarl.parse-cln ${CMAKE_CURRENT_SOURCE_DIR}/src/pycarl/mod_typed_parse.cpp ${PYCARL_TYPED_PARSE_SOURCES})
target_include_directories(pycarl.parse-cln PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src)
target_link_libraries(pycarl.parse-cln PRIVATE lib_carl carl-parser)
target_compile_definitions(pycarl.parse-cln PUBLIC "PYCARL_USE_CLN=ON")
set_target_properties(pycarl.parse-cln PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/cln/parse" OUTPUT_NAME "parse")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pycarl_parser_config.py.in ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pycarl/cln/parse/_config.py @ONLY)
17 changes: 0 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ MAINTAINER Matthias Volk <[email protected]>
ARG build_type=Release
# Additional arguments for compiling stormpy
ARG setup_args=""
# Additional arguments for compiling pycarl
ARG setup_args_pycarl=""
# Number of threads to use for parallel compilation
ARG no_threads=2

Expand All @@ -37,7 +35,6 @@ RUN apt-get install -y --no-install-recommends \
python3-venv
# Packages maven and uuid-dev are required for carl-parser


# Build carl-parser
###################
WORKDIR /opt/
Expand All @@ -64,20 +61,6 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN pip install setuptools

# Build pycarl
##############
WORKDIR /opt/

# Obtain latest version of pycarl from public repository
RUN git clone https://github.com/moves-rwth/pycarl.git

# Switch to pycarl directory
WORKDIR /opt/pycarl

# Build pycarl
RUN python setup.py build_ext $setup_args_pycarl -j $no_threads develop


# Build stormpy
###############
RUN mkdir /opt/stormpy
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ Stormpy depends on [pycarl](https://github.com/moves-rwth/pycarl/).

- Sebastian Junges
- Matthias Volk
Stormpy includes Pycarl, the Python Bindings for [CArL](https://github.com/moves-rwth/carl-storm).

The development of pycarl received significant contributions from:
- Harold Bruintjes
30 changes: 27 additions & 3 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
cmake_minimum_required(VERSION 3.15)

project(storm-version)

include(FetchContent)

set(INSTALL_STORM TRUE CACHE BOOL "Whether to install storm from scratch.")
set(STORM_DIR_HINT "" CACHE STRING "A hint where the Storm library can be found.")
set(CARL_DIR_HINT "" CACHE STRING "A hint where the Carl library can be found.")
set(CARLPARSER_DIR_HINT "" CACHE STRING "A hint where the Carl-parser library can be found.")

if(INSTALL_STORM)
message(STATUS "Installing Storm from scratch")
endif()

find_package(storm REQUIRED HINTS ${STORM_DIR_HINT})
find_package(carl REQUIRED HINTS ${CARL_DIR_HINT})
find_package(carlparser QUIET HINTS ${CARLPARSER_DIR_HINT})

include(${CMAKE_CURRENT_SOURCE_DIR}/macros.cmake)


# Set configuration
set(STORM_DIR ${storm_DIR})
set(STORM_VERSION ${storm_VERSION})
set(STORM_LIBS ${storm_LIBRARIES})


# Check for optional Storm libraries
storm_with_lib(DFT)
storm_with_lib(GSPN)
storm_with_lib(PARS)
storm_with_lib(POMDP)


# Set variables
set_variable_string(STORM_CLN_EA_BOOL ${STORM_USE_CLN_EA})
set_variable_string(STORM_CLN_RF_BOOL ${STORM_USE_CLN_RF})
Expand All @@ -33,6 +42,21 @@ set_variable_string(HAVE_STORM_GSPN_BOOL ${HAVE_STORM_GSPN})
set_variable_string(HAVE_STORM_PARS_BOOL ${HAVE_STORM_PARS})
set_variable_string(HAVE_STORM_POMDP_BOOL ${HAVE_STORM_POMDP})

# Set configuration
set(CARL_DIR ${carl_DIR})
set(CARL_VERSION ${carl_VERSION})
if(carlparser_FOUND)
set(CARL_PARSER_DIR ${carlparser_DIR})
set_variable_string(CARL_WITH_PARSER "True")
else()
set(CARL_PARSER_DIR "")
set_variable_string(CARL_WITH_PARSER "False")
endif()
if(CARL_USE_CLN_NUMBERS)
set_variable_string(CARL_WITH_CLN "True")
else()
set_variable_string(CARL_WITH_CLN "False")
endif()

# Write configuration file
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.py.in ${CMAKE_CURRENT_BINARY_DIR}/generated/config.py @ONLY)
5 changes: 5 additions & 0 deletions cmake/config.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ HAVE_STORM_DFT = @HAVE_STORM_DFT_BOOL@
HAVE_STORM_GSPN = @HAVE_STORM_GSPN_BOOL@
HAVE_STORM_PARS = @HAVE_STORM_PARS_BOOL@
HAVE_STORM_POMDP = @HAVE_STORM_POMDP_BOOL@
CARL_DIR = "@CARL_DIR@"
CARL_VERSION = "@CARL_VERSION@"
CARL_PARSER_DIR = "@CARL_PARSER_DIR@"
CARL_WITH_PARSER = @CARL_WITH_PARSER@
CARL_WITH_CLN = @CARL_WITH_CLN@
3 changes: 3 additions & 0 deletions cmake/pycarl_cln_config.py.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Auto-generated by CMake.

CARL_WITH_CLN = @CARL_WITH_CLN@
Loading