Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
frama-c
Commits
95ff321d
Commit
95ff321d
authored
8 years ago
by
Kostyantyn Vorobyov
Browse files
Options
Downloads
Patches
Plain Diff
[e-acsl-gcc.sh] Option to print the names of the supported memory models
parent
c4769857
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
src/plugins/e-acsl/scripts/e-acsl-gcc.sh
+19
-6
19 additions, 6 deletions
src/plugins/e-acsl/scripts/e-acsl-gcc.sh
with
19 additions
and
6 deletions
src/plugins/e-acsl/scripts/e-acsl-gcc.sh
+
19
−
6
View file @
95ff321d
...
@@ -112,7 +112,8 @@ required_tool find "GNU findutils"
...
@@ -112,7 +112,8 @@ required_tool find "GNU findutils"
LONGOPTIONS
=
"help,compile,compile-only,print,debug:,ocode:,oexec:,verbose:,
LONGOPTIONS
=
"help,compile,compile-only,print,debug:,ocode:,oexec:,verbose:,
frama-c-only,extra-cpp-args:,frama-c-stdlib,full-mmodel,gmp,quiet,logfile:,
frama-c-only,extra-cpp-args:,frama-c-stdlib,full-mmodel,gmp,quiet,logfile:,
ld-flags:,cpp-flags:,frama-c-extra:,memory-model:,production,no-stdlib,
ld-flags:,cpp-flags:,frama-c-extra:,memory-model:,production,no-stdlib,
debug-log:,frama-c:,gcc:,e-acsl-share:,instrumented-only,rte:,oexec-e-acsl:"
debug-log:,frama-c:,gcc:,e-acsl-share:,instrumented-only,rte:,oexec-e-acsl:,
print-mmodels"
SHORTOPTIONS
=
"h,c,C,p,d:,o:,O:,v:,f,E:,L,M,l:,e:,g,q,s:,F:,m:,P,N,D:,I:,G:,X,a:"
SHORTOPTIONS
=
"h,c,C,p,d:,o:,O:,v:,f,E:,L,M,l:,e:,g,q,s:,F:,m:,P,N,D:,I:,G:,X,a:"
# Prefix for an error message due to wrong arguments
# Prefix for an error message due to wrong arguments
ERROR
=
"ERROR parsing arguments:"
ERROR
=
"ERROR parsing arguments:"
...
@@ -135,6 +136,7 @@ OPTION_EACSL_OUTPUT_EXEC="" # Name of E-ACSL executable
...
@@ -135,6 +136,7 @@ OPTION_EACSL_OUTPUT_EXEC="" # Name of E-ACSL executable
OPTION_EACSL
=
"-e-acsl"
# Specifies E-ACSL run
OPTION_EACSL
=
"-e-acsl"
# Specifies E-ACSL run
OPTION_FRAMA_STDLIB
=
"-no-frama-c-stdlib"
# Use Frama-C stdlib
OPTION_FRAMA_STDLIB
=
"-no-frama-c-stdlib"
# Use Frama-C stdlib
OPTION_FULL_MMODEL
=
# Instrument as much as possible
OPTION_FULL_MMODEL
=
# Instrument as much as possible
OPTION_PRINT_MMODELS
=
# Print memory model names
OPTION_GMP
=
# Use GMP integers everywhere
OPTION_GMP
=
# Use GMP integers everywhere
OPTION_DEBUG_MACRO
=
"-DE_ACSL_DEBUG"
# Debug macro
OPTION_DEBUG_MACRO
=
"-DE_ACSL_DEBUG"
# Debug macro
OPTION_DEBUG_LOG_MACRO
=
""
# Specification of debug log file
OPTION_DEBUG_LOG_MACRO
=
""
# Specification of debug log file
...
@@ -366,15 +368,15 @@ do
...
@@ -366,15 +368,15 @@ do
OPTION_EACSL_MMODELS
=
"
`
echo
$1
|
sed
-s
's/,/ /g'
`
"
OPTION_EACSL_MMODELS
=
"
`
echo
$1
|
sed
-s
's/,/ /g'
`
"
shift
;
shift
;
;;
;;
# Print names of the supported memody models.
--print-mmodels
)
shift
;
OPTION_PRINT_MMODELS
=
"1"
;;
esac
esac
done
done
shift
;
shift
;
# Bail if no files to translate are given
if
[
-z
"
$1
"
]
;
then
error
"no input files"
;
fi
# Check Frama-C and GCC executable names
# Check Frama-C and GCC executable names
check_tool
"
$OPTION_FRAMAC
"
check_tool
"
$OPTION_FRAMAC
"
check_tool
"
$OPTION_CC
"
check_tool
"
$OPTION_CC
"
...
@@ -463,6 +465,12 @@ mmodel_sources() {
...
@@ -463,6 +465,12 @@ mmodel_sources() {
fi
fi
}
}
# If specified, print the names of the supported memory models and exit
if
[
-n
"
$OPTION_PRINT_MMODELS
"
]
;
then
mmodel_sources
exit
0
fi
# Once EACSL_SHARE is defined check the memory models provided at inputs
# Once EACSL_SHARE is defined check the memory models provided at inputs
for
mod
in
$OPTION_EACSL_MMODELS
;
do
for
mod
in
$OPTION_EACSL_MMODELS
;
do
mmodel_sources
$mod
>
/dev/null
mmodel_sources
$mod
>
/dev/null
...
@@ -525,6 +533,11 @@ if [ -n "$OPTION_EACSL" ]; then
...
@@ -525,6 +533,11 @@ if [ -n "$OPTION_EACSL" ]; then
-then-last"
-then-last"
fi
fi
# Bail if no files to translate are given
if
[
-z
"
$1
"
]
;
then
error
"no input files"
;
fi
# Instrument
# Instrument
if
[
-n
"
$OPTION_INSTRUMENT
"
]
;
then
if
[
-n
"
$OPTION_INSTRUMENT
"
]
;
then
(
$OPTION_ECHO
;
\
(
$OPTION_ECHO
;
\
...
...
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