* CMake: simplify FindGMP.cmake
Remove printing of all the different variables, and let FPHSA output the library
name. Add an imported target, which bundles the library and the include
directories for easier usage.
* fix build: vector::c_ptr() now is vector::data()
* CMake: use Threads::Threads imported module
Otherwise the setting of THREADS_PREFER_PTHREAD_FLAG has no effect.
* CMake: remove needless policy setting
The minimum required version is CMake 3.4, where these policies are already set
to new because they were introduced earlier.
* CMake: remove needless variable expansion
This fixes encode roundtripping for all printable ASCII characters.
In particular, this now leaves a plain '\' untouched by the
encoding logic, instead of converting it to escaped hex-digits.
It also adds unit testing covering this specific zstring encoding
property, in order to avoid future regressions.
* on POSIX systems, fork() is dangerous in the presence of a thread
pool, because the child process inherits only the thread from the
parent that actually called fork().
this patch winds down the scoped_timer thread pool in preparation for
forking; workers will get freshly created again following the fork
call.
creating a fresh thread for every scoped_timer has significant overhead
in some use cases. this patch creates a persistent pool of worker threads
to do this job, resulting in 20-30% speedup of some alive2 jobs on a
large multicore
* std::cout debugging statements
* comment out std::cout debugging as this is now a shared fork
* convert std::cout to TRACE statements for seq_rewriter and seq_regex
* add cases to min_length and max_length for regexes
* bug fix
* update min_length and max_length functions for REs
* initial pass on simplifying derivative normal forms by eliminating redundant predicates locally
* add seq_regex_brief trace statements
* working on debugging ref count issue
* fix ref count bug and convert trace statements to seq_regex_brief
* add compact tracing for cache hits/misses
* seq_regex fix cache hit/miss tracing and wrapper around is_nullable
* minor
* label and disable more experimental changes for testing
* minor documentation / tracing
* a few more @EXP annotations
* dead state elimination skeleton code
* progress on dead state elimination
* more progress on dead state elimination
* refactor dead state class to separate self-contained state_graph class
* finish factoring state_graph to only work with unsigned values, and implement separate functionality for expr* logic
* implement get_all_derivatives, add debug tracing
* trace statements for debugging is_nullable loop bug
* fix is_nullable loop bug
* comment out local nullable change and mark experimental
* pretty printing for state_graph
* rewrite state graph to remove the fragile assumption that all edges from a state are added at a time
* start of general cycle detection check + fix some comments
* implement full cycle detection procedure
* normalize derivative conditions to form 'ele <= a'
* order derivative conditions by character code
* fix confusing names m_to and m_from
* assign increasing state IDs from 1 instead of using get_id on AST node
* remove elim_condition call in get_dall_derivatives
* use u_map instead of uint_map to avoid memory leak
* remove unnecessary call to is_ground
* debugging
* small improvements to seq_regex_brief tracing
* fix bug on evil2 example
* save work
* new propagate code
* work in progress on using same seq sort for deriv calls
* avoid re-computing derivatives: use same head var for every derivative call
* use min_length on regexes to prune search
* simple implementation of can_be_in_cycle using rank function idea
* add a disabled experimental change
* minor cleanup comments, etc.
* seq_rewriter cleanup for PR
* typo noticed by Nikolaj
* move state graph to util/state_graph
* re-add accidentally removed line
* clean up seq_regex code removing obsolete functions and comments
* a few more cleanup items
* oops, missed merge change to fix compilation
* disabled change to lift unions to the top level and treat them seperately in seq_regex solver
* added get_overapprox_regex to over-approximate regex membership constraints
* replace calls to is_epsilon with a centrally available method in seq_decl_plugin
* simplifications and modifications in get_overapprox_regex and related
* added approximation support for sequence expressions that use ite
* removed is_app check that was redundant
* tweak differences with upstream
* rewrite derivative leaves
* enable Antimorov-style derivatives via lifting unions in the solver
* TODO placeholders for outputting state graph
* change order in seq_regex propagate_in_re
* implement a more restricted form of Antimorov derivatives via a special op code to indicate lifting unions
* minor
* new Antimorov optimizations based on BDD compatibility checking
* seq regex tracing for # of derivatives
* fix get_cofactors (currently this fix is buggy)
* partially revert get_cofactors buggy change
* re-implement get_cofactors to more efficiently explore nodes in the derivative expression
* dgml generation for state graph
* fix release build
* improved dgml output
* bug fixes in dgml generation
* dot output support for state_graph and moved dgml and dot output under CASSERT
* updated tracing of what regex corresponds to what state id with /tr:state_graph
* clean up & document Antimorov derivative support
* remove op cache tracing
* remove re_rank experimental idea
* small fix
* fix Antimorov derivative (important change for the good performance)
* remove unused and unnecessary code
* implemented simpler efficient get_cofactors alternative mk_deriv_accept
* simplifications in propagate_accept, and trace unusual cases
* document the various seq_regex tracing & debugging command-line options
* fix debug build (broken tracing)
* guard eager Antimorov lifting for possible disabling
* fix bug in propagate_accept Rule 1
* disable eager version of Antimorov lifting for performance reasons
* remove some remaining obsolete comments
Co-authored-by: calebstanford-msr <t-casta@microsoft.com>
Co-authored-by: Margus Veanes <margus@microsoft.com>
* added support for saving state graph in dot format
* moved write_dgml and write_dot under CASSERT
* updated dgml and dot generation a bit so that a state that is both and alive state is detected as having green background but red border when the invariant is vioalted
* Rocco first commit
* Rocco: clean the log
* Rocco: version 0.1 beta of the causality graph
* Rocco: minimal fix to separate lines
* Rocco: fix the enodes
* Rocco: our trace has to reflect same behaviour of the native trace for what concern used_enodes
* Rocco: disable trace when dummy instantiations
* Rocco: fix to enodes
* Update README.md
* Rocco: remove causality details and add the pattern (trigger)
* Rocco: add ; at the end of the bindings
* Rocco: add triggers as separate trace
* Rocco README file
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Rocco: bug in tout flush
* Update README.md
* Update README.md
* Rocco: clean code
* Ready for pull request
* Remove commented line bindings
* Add space between // and first char
* Substitute or with || for compatibility; Add space around >
* std::cout debugging statements
* comment out std::cout debugging as this is now a shared fork
* convert std::cout to TRACE statements for seq_rewriter and seq_regex
* add cases to min_length and max_length for regexes
* bug fix
* update min_length and max_length functions for REs
* initial pass on simplifying derivative normal forms by eliminating redundant predicates locally
* add seq_regex_brief trace statements
* working on debugging ref count issue
* fix ref count bug and convert trace statements to seq_regex_brief
* add compact tracing for cache hits/misses
* seq_regex fix cache hit/miss tracing and wrapper around is_nullable
* minor
* label and disable more experimental changes for testing
* minor documentation / tracing
* a few more @EXP annotations
* dead state elimination skeleton code
* progress on dead state elimination
* more progress on dead state elimination
* refactor dead state class to separate self-contained state_graph class
* finish factoring state_graph to only work with unsigned values, and implement separate functionality for expr* logic
* implement get_all_derivatives, add debug tracing
* trace statements for debugging is_nullable loop bug
* fix is_nullable loop bug
* comment out local nullable change and mark experimental
* pretty printing for state_graph
* rewrite state graph to remove the fragile assumption that all edges from a state are added at a time
* start of general cycle detection check + fix some comments
* implement full cycle detection procedure
* normalize derivative conditions to form 'ele <= a'
* order derivative conditions by character code
* fix confusing names m_to and m_from
* assign increasing state IDs from 1 instead of using get_id on AST node
* remove elim_condition call in get_dall_derivatives
* use u_map instead of uint_map to avoid memory leak
* remove unnecessary call to is_ground
* debugging
* small improvements to seq_regex_brief tracing
* fix bug on evil2 example
* save work
* new propagate code
* work in progress on using same seq sort for deriv calls
* avoid re-computing derivatives: use same head var for every derivative call
* use min_length on regexes to prune search
* simple implementation of can_be_in_cycle using rank function idea
* add a disabled experimental change
* minor cleanup comments, etc.
* seq_rewriter cleanup for PR
* typo noticed by Nikolaj
* move state graph to util/state_graph
* re-add accidentally removed line
* clean up seq_regex code removing obsolete functions and comments
* a few more cleanup items
* remove experimental functionality for integration
* fix compilation
* remove some tracing and TODOs
* remove old comment
* update copyright dates to 2020
* feedback from Nikolaj
* use [] for map access
* make state_graph methods constant
* avoid recursion in mark_dead_recursive and mark_live_recursive
* a possible bug fix in propagate_nonempty
* write down list of invariants in state_graph
* implement partial invariant check and insert CASSERT statements
* expand on invariant check and tracing
* finish state graph invariant check
* minor tweaks
* regex propagation: convert first two axioms to propagations
* remove obsolete regex solver functionality
Co-authored-by: calebstanford-msr <t-casta@microsoft.com>
This should replace several "segfaults" and "illegal instruction" errors
with messages that contain a bit more context. I also put in a link to
the bug tracker to make users' lives a bit easier.
For context, `__builtin_unreachable`'s behavior is undefined and is
intended only as a mechanism to help the compiler see that code will not
return. I do still include it in the new code because if I don't,
compilation produces a lot more warnings as it can't see that
`NOT_IMPLEMENTED_YET` and `UNREACHABLE` cannot return.