Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Open Source Software
Zipr Toolchain
Commits
c0973c98
Commit
c0973c98
authored
13 years ago
by
an7s
Browse files
Options
Downloads
Patches
Plain Diff
...
parent
022cb7a5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tools/p1xform.sh
+7
-4
7 additions, 4 deletions
tools/p1xform.sh
tools/ps_validate.sh
+26
-10
26 additions, 10 deletions
tools/ps_validate.sh
tools/ps_validate_ss.sh
+1
-1
1 addition, 1 deletion
tools/ps_validate_ss.sh
with
34 additions
and
15 deletions
tools/p1xform.sh
+
7
−
4
View file @
c0973c98
...
@@ -21,7 +21,8 @@ echo "=========================================="
...
@@ -21,7 +21,8 @@ echo "=========================================="
$PEASOUP_HOME
/tools/p1xform.genspri.sh
$P1_DIR
a.ncexe a.ncexe.annot
>
$P1_DIR
/genspri.out 2>
$P1_DIR
/genspri.err
$PEASOUP_HOME
/tools/p1xform.genspri.sh
$P1_DIR
a.ncexe a.ncexe.annot
>
$P1_DIR
/genspri.out 2>
$P1_DIR
/genspri.err
$PEASOUP_HOME
/tools/generate_io_baseline.sh
$CURRENT_DIR
a.ncexe concolic.files_a.stratafied_0001
>
gen_baseline.out 2> gen_baseline.err
# NOT NEEDED ANYMORE????
#$PEASOUP_HOME/tools/generate_io_baseline.sh $CURRENT_DIR a.ncexe concolic.files_a.stratafied_0001 > gen_baseline.out 2> gen_baseline.err
#
#
# remove any candidate functions not covered
# remove any candidate functions not covered
...
@@ -34,12 +35,14 @@ CANDIDATE_FNS=$P1_DIR/p1.candidates
...
@@ -34,12 +35,14 @@ CANDIDATE_FNS=$P1_DIR/p1.candidates
FILTERED_OUT
=
$P1_DIR
/p1.fn_coverage.filtered_out
FILTERED_OUT
=
$P1_DIR
/p1.fn_coverage.filtered_out
KEEPS
=
$P1_DIR
/p1.keep
KEEPS
=
$P1_DIR
/p1.keep
FINAL_XFORM_FNS
=
$P1_DIR
/p1.final
FINAL_XFORM_FNS
=
$P1_DIR
/p1.final
EXECUTED_ADDRESS_FILE
=
$CONCOLIC
/executed_address_list.txt
grep
"^0x"
$CONCOLIC
/trace_manager.run_
*
.log |
cut
-f2
-d
":"
|
sort
|
uniq
>
tmp.
$$
#grep "^0x" $CONCOLIC/trace_manager.run_*.log | cut -f2 -d":" | sort | uniq > tmp.$$
$STRATA_REWRITE
/tools/cover/cover a.ncexe a.ncexe.annot tmp.
$$
$COVERAGE_FNS
#$STRATA_REWRITE/tools/cover/cover a.ncexe a.ncexe.annot tmp.$$ $COVERAGE_FNS
$STRATA_REWRITE
/tools/cover/cover a.ncexe a.ncexe.annot
$EXECUTED_ADDRESS_FILE
$COVERAGE_FNS
grep
-v
"0
\.
0"
$COVERAGE_FNS
|
cut
-f1
-d
" "
>
$CANDIDATE_FNS
grep
-v
"0
\.
0"
$COVERAGE_FNS
|
cut
-f1
-d
" "
>
$CANDIDATE_FNS
grep
"0
\.
0"
$COVERAGE_FNS
|
cut
-f1
-d
" "
>
$FILTERED_OUT
grep
"0
\.
0"
$COVERAGE_FNS
|
cut
-f1
-d
" "
>
$FILTERED_OUT
rm
tmp.
$$
#
rm tmp.$$
cp
$CANDIDATE_FNS
$KEEPS
cp
$CANDIDATE_FNS
$KEEPS
...
...
This diff is collapsed.
Click to expand it.
tools/ps_validate.sh
+
26
−
10
View file @
c0973c98
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
#
#
STRATAFIED_BINARY
=
$1
# stratafied subject program
STRATAFIED_BINARY
=
$1
# stratafied subject program
BSPRI
=
$2
# transformation specific
i
ation SPRI file
BSPRI
=
$2
# transformation specification SPRI file
INPUT_DIR
=
$3
# directory containing inputs
INPUT_DIR
=
$3
# directory containing inputs
BASELINE_OUTPUT_DIR
=
$
4
# directory containing expected out
put
s
BASELINE_OUTPUT_DIR
=
$
INPUT_DIR
/file_in
put
echo
"=========================================="
echo
"=========================================="
echo
"Running ps_validate.sh"
echo
"Running ps_validate.sh"
...
@@ -19,21 +19,37 @@ echo " INPUT_DIR: $INPUT_DIR"
...
@@ -19,21 +19,37 @@ echo " INPUT_DIR: $INPUT_DIR"
echo
" BASELINE_OUTPUT_DIR:
$BASELINE_OUTPUT_DIR
"
echo
" BASELINE_OUTPUT_DIR:
$BASELINE_OUTPUT_DIR
"
echo
"=========================================="
echo
"=========================================="
#
# name of files describing inputs is of the form: input_0001.json, input_0002.json, ...
#
for
i
in
`
ls
$INPUT_DIR
/input
*
.json
`
for
i
in
`
ls
$INPUT_DIR
/input
*
.json
`
do
do
echo
""
echo
""
input
=
`
basename
$i
.json
`
input
=
`
basename
$i
.json
`
input_number
=
`
echo
$input
|
sed
"s/input_//"
`
# make sure the output files exist
touch
stdout.
$input
touch
stderr.
$input
echo
"ps_validate.sh: cmd: STRATA_SPRI_FILE=
$BSPRI
$GRACE_HOME
/concolic/bin/replayer --symbols=a.sym --stdout=stdout.
$input
--stderr=stderr.
$input
--engine=sdt ./a.stratafied
$i
"
echo
"ps_validate.sh: cmd: STRATA_SPRI_FILE=
$BSPRI
$GRACE_HOME
/concolic/bin/replayer --symbols=a.sym --stdout=stdout.
$input
--stderr=stderr.
$input
--engine=sdt ./a.stratafied
$i
"
STRATA_SPRI_FILE
=
"
$BSPRI
"
"
$GRACE_HOME
/concolic/bin/replayer"
--symbols
=
a.sym
--stdout
=
stdout.
$input
--stderr
=
stderr.
$input
--engine
=
sdt
$STRATAFIED_BINARY
$i
STRATA_SPRI_FILE
=
"
$BSPRI
"
"
$GRACE_HOME
/concolic/bin/replayer"
--symbols
=
a.sym
--stdout
=
stdout.
$input
--stderr
=
stderr.
$input
--engine
=
sdt
$STRATAFIED_BINARY
$i
if
[
-f
replay.baseline/stdout.
$input
]
;
BASELINE_OUTPUT_STDOUT
=
$BASELINE_OUTPUT_DIR
/run_
$input_number
/stdout
BASELINE_OUTPUT_STDERR
=
$BASELINE_OUTPUT_DIR
/run_
$input_number
/stderr
echo
"
$BASELINE_OUTPUT_STDOUT
"
echo
"
$BASELINE_OUTPUT_STDERR
"
if
[
-f
$BASELINE_OUTPUT_STDOUT
]
;
then
then
diff
replay.baseline/stdout.
$input
stdout.
$input
diff
stdout.
$input
$BASELINE_OUTPUT_STDOUT
if
[
!
$?
-eq
0
]
;
then
if
[
!
$?
-eq
0
]
;
then
echo
"ps_validate.sh: divergence detected for input
$i
(stdout)"
echo
"ps_validate.sh: divergence detected for input
:
$i
(stdout)"
echo
"Baseline file (stdout):"
echo
"Baseline file (stdout):"
cat
replay.baseline/stdout.
$input
cat
$BASELINE_OUTPUT_STDOUT
echo
"Output stdout (stdout):
$input
:"
echo
"Output stdout (stdout):
$input
:"
cat
stdout.
$input
cat
stdout.
$input
...
@@ -42,14 +58,14 @@ do
...
@@ -42,14 +58,14 @@ do
fi
fi
fi
fi
if
[
-f
replay.baseline/stderr.
$input
]
;
if
[
-f
$BASELINE_OUTPUT_STDERR
]
;
then
then
diff
replay.baseline/stderr.
$input
stderr.
$input
diff
stderr.
$input
$BASELINE_OUTPUT_STDERR
if
[
!
$?
-eq
0
]
;
then
if
[
!
$?
-eq
0
]
;
then
echo
"ps_validate.sh: divergence detected for input
$i
(stderr)"
echo
"ps_validate.sh: divergence detected for input
:
$i
(stderr)"
echo
"Baseline file (stderr):"
echo
"Baseline file (stderr):"
cat
replay.baseline/stderr.
$input
cat
$BASELINE_OUTPUT_STDERR
echo
"Output stderr (stderr):
$input
:"
echo
"Output stderr (stderr):
$input
:"
cat
stderr.
$input
cat
stderr.
$input
...
...
This diff is collapsed.
Click to expand it.
tools/ps_validate_ss.sh
+
1
−
1
View file @
c0973c98
...
@@ -25,6 +25,6 @@ STRATA_VAL=$?
...
@@ -25,6 +25,6 @@ STRATA_VAL=$?
if
[
"
$ORIG_VAL
"
=
"
$STRATA_VAL
"
]
;
then
if
[
"
$ORIG_VAL
"
=
"
$STRATA_VAL
"
]
;
then
exit
0
exit
0
else
else
echo
"ps_validate_ss.sh: BSPRI=
$BSPRI
: does not validate (
$ORIG_VAL
/
$STRATA_VAL
)"
echo
"ps_validate_ss.sh: BSPRI=
$BSPRI
: does not validate
: exit codes:
(
$ORIG_VAL
/
$STRATA_VAL
)"
exit
1
exit
1
fi
fi
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