Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DIVINE
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
paradise
mirror
DIVINE
Commits
7de7b7c3
There was an error fetching the commit references. Please try again later.
Commit
7de7b7c3
authored
5 years ago
by
Petr Rockai
Browse files
Options
Downloads
Patches
Plain Diff
MC: Add a context module for tracking a path condition.
parent
9b9ca119
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
divine/mc/ctx-assume.hpp
+48
-0
48 additions, 0 deletions
divine/mc/ctx-assume.hpp
with
48 additions
and
0 deletions
divine/mc/ctx-assume.hpp
0 → 100644
+
48
−
0
View file @
7de7b7c3
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/*
* (c) 2019 Petr Ročkai <code@fixp.eu>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#pragma once
#include
<divine/vm/types.hpp>
#include
<divine/vm/pointer.hpp>
#include
<divine/smt/extract.hpp>
#include
<brick-compose>
namespace
divine
::
mc
{
template
<
typename
next
>
struct
ctx_assume_
:
next
{
vm
::
HeapPointer
_assume
;
using
next
::
trace
;
void
trace
(
vm
::
TraceAssume
ta
)
{
_assume
=
ta
.
ptr
;
if
(
this
->
debug_allowed
()
)
{
brick
::
smt
::
Context
ctx
;
smt
::
extract
::
SMTLib2
extract
(
this
->
heap
(),
ctx
,
""
,
false
);
auto
assume
=
extract
.
read
(
ta
.
ptr
);
auto
n
=
extract
.
convert
(
assume
->
binary
.
left
);
trace
(
"ASSUME "
+
to_string
(
n
)
);
}
}
};
using
ctx_assume
=
brq
::
module
<
ctx_assume_
>
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment