Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Cosmos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Benoit Barbot
Cosmos
Commits
b2126e3a
Commit
b2126e3a
authored
Mar 06, 2019
by
Benoit Barbot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning
parent
09be281b
Pipeline
#1050
passed with stages
in 13 minutes and 54 seconds
Changes
18
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
3408 additions
and
27 deletions
+3408
-27
CMakeLists.txt
CMakeLists.txt
+1
-0
XCCosmos/Cosmos.xcodeproj/project.pbxproj
XCCosmos/Cosmos.xcodeproj/project.pbxproj
+9
-3
XCCosmos/Eval-parser.cc
XCCosmos/Eval-parser.cc
+1212
-0
XCCosmos/Eval-scanner.cc
XCCosmos/Eval-scanner.cc
+2149
-0
src/ModelGenerator/Cosmos.cpp
src/ModelGenerator/Cosmos.cpp
+1
-1
src/ModelGenerator/Eval/Eval-parser.yy
src/ModelGenerator/Eval/Eval-parser.yy
+1
-0
src/ModelGenerator/Eval/Eval-scanner.ll
src/ModelGenerator/Eval/Eval-scanner.ll
+1
-1
src/ModelGenerator/Eval/Eval.hpp
src/ModelGenerator/Eval/Eval.hpp
+0
-1
src/ModelGenerator/Generator.hpp
src/ModelGenerator/Generator.hpp
+1
-1
src/ModelGenerator/GspnParser/Gspn-Grml-Output.hpp
src/ModelGenerator/GspnParser/Gspn-Grml-Output.hpp
+4
-4
src/ModelGenerator/GspnParser/Gspn-Reader.hpp
src/ModelGenerator/GspnParser/Gspn-Reader.hpp
+3
-3
src/ModelGenerator/GspnParser/Gspn-parser.yy
src/ModelGenerator/GspnParser/Gspn-parser.yy
+4
-2
src/ModelGenerator/GspnParser/Gspn-scanner.ll
src/ModelGenerator/GspnParser/Gspn-scanner.ll
+1
-1
src/ModelGenerator/GspnParser/unfolder.cpp
src/ModelGenerator/GspnParser/unfolder.cpp
+1
-0
src/ModelGenerator/GspnParser/unfolder.hpp
src/ModelGenerator/GspnParser/unfolder.hpp
+8
-8
src/ModelGenerator/LhaParser/Lha_gmlparser.hpp
src/ModelGenerator/LhaParser/Lha_gmlparser.hpp
+0
-1
src/ModelGenerator/parameters.cpp
src/ModelGenerator/parameters.cpp
+11
-1
src/ModelGenerator/server.hpp
src/ModelGenerator/server.hpp
+1
-0
No files found.
CMakeLists.txt
View file @
b2126e3a
...
...
@@ -25,6 +25,7 @@ ADD_DEFINITIONS(
-DBOOST_PATH=\"-I
${
Boost_INCLUDE_DIRS
}
\"
-DBOOST_LIB=\"
${
Boost_LIBRARIES
}
\"
-DCPP_COMPILER=\"g++\"
-DCMAKE_VERSION=\"
${
CMAKE_VERSION
}
\"
)
...
...
XCCosmos/Cosmos.xcodeproj/project.pbxproj
View file @
b2126e3a
...
...
@@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
0306A22F1BACA88E0045B056
/* LHA.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0306A22B1BACA88E0045B056
/* LHA.cpp */
;
};
0306A2311BACA88E0045B056
/* spn.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0306A22E1BACA88E0045B056
/* spn.cpp */
;
};
0311D424222FE0C90062B65E
/* Eval-parser.cc in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0367E29818842F2400F35619
/* Eval-parser.cc */
;
};
0315F53A1B7215E600DA8EDA
/* NLHA.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0315F5381B7215E600DA8EDA
/* NLHA.cpp */
;
};
0315F53B1B7215E600DA8EDA
/* NLHA.hpp in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0315F5391B7215E600DA8EDA
/* NLHA.hpp */
;
};
032A7067181BC0D6006D7332
/* casesWriter.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
032A7008181BC0D6006D7332
/* casesWriter.cpp */
;
};
...
...
@@ -68,7 +69,6 @@
038186DE1E97DE19009C275D
/* SimulatorContinuousBounded.hpp in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
039255251E687CB200680513
/* SimulatorContinuousBounded.hpp */
;
};
038186DF1E97DE19009C275D
/* SimulatorRE.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
039255261E687CB200680513
/* SimulatorRE.cpp */
;
};
038186E01E97DE19009C275D
/* SimulatorRE.hpp in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
039255271E687CB200680513
/* SimulatorRE.hpp */
;
};
0381D5451B905FFC00D0AC20
/* Eval-parser.cc in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0367E29818842F2400F35619
/* Eval-parser.cc */
;
};
0381D5461B905FFC00D0AC20
/* Eval-scanner.cc in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0367E29918842F2400F35619
/* Eval-scanner.cc */
;
};
0381D5471B90600000D0AC20
/* Gspn-parser.cc in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0367E29018842E8C00F35619
/* Gspn-parser.cc */
;
};
0381D5481B90600000D0AC20
/* Gspn-scanner.cc in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0367E29218842EE600F35619
/* Gspn-scanner.cc */
;
};
...
...
@@ -131,7 +131,7 @@
isEditable
=
1
;
outputFiles
=
(
);
script
=
"# $(YACC)\n/usr/local/Cellar/bison/3.0.4/bin/bison -y"
;
script
=
"# $(YACC)\n/usr/local/Cellar/bison/3.0.4/bin/bison -y
\n
"
;
};
/* End PBXBuildRule section */
...
...
@@ -183,6 +183,8 @@
0306A22C1BACA88E0045B056
/* lumpingfun.cpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
path
=
lumpingfun.cpp
;
sourceTree
=
"<group>"
;
};
0306A22D1BACA88E0045B056
/* markingImpl.hpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.h
;
path
=
markingImpl.hpp
;
sourceTree
=
"<group>"
;
};
0306A22E1BACA88E0045B056
/* spn.cpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
path
=
spn.cpp
;
sourceTree
=
"<group>"
;
};
0311D41F222FDDD40062B65E
/* Eval-parser.cc */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
path
=
"Eval-parser.cc"
;
sourceTree
=
"<group>"
;
};
0311D421222FDE1C0062B65E
/* Eval-scanner.cc */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
path
=
"Eval-scanner.cc"
;
sourceTree
=
"<group>"
;
};
0315F5381B7215E600DA8EDA
/* NLHA.cpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
path
=
NLHA.cpp
;
sourceTree
=
"<group>"
;
};
0315F5391B7215E600DA8EDA
/* NLHA.hpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.h
;
path
=
NLHA.hpp
;
sourceTree
=
"<group>"
;
};
032573981A9652F600974A89
/* magicLight.hpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.h
;
path
=
magicLight.hpp
;
sourceTree
=
"<group>"
;
};
...
...
@@ -3014,6 +3016,8 @@
08FB7794FE84155DC02AAC07
/* Cosmos */
=
{
isa
=
PBXGroup
;
children
=
(
0311D421222FDE1C0062B65E
/* Eval-scanner.cc */
,
0311D41F222FDDD40062B65E
/* Eval-parser.cc */
,
038CC6911C0F245000C5A0F5
/* CMakeLists.txt */
,
03A22C501E5EEE750023133F
/* modelConvert */
,
03FDF5E31A42F09300AA4DA2
/* automataGen */
,
...
...
@@ -3365,7 +3369,7 @@
isa
=
PBXSourcesBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
03
81D5451B905FFC00D0AC20
/* Eval-parser.cc in Sources */
,
03
11D424222FE0C90062B65E
/* Eval-parser.cc in Sources */
,
0381D5461B905FFC00D0AC20
/* Eval-scanner.cc in Sources */
,
03541DD71BE7B7A9005741C6
/* Gspn-Grml-Output.cpp in Sources */
,
0381D5471B90600000D0AC20
/* Gspn-parser.cc in Sources */
,
...
...
@@ -3764,6 +3768,7 @@
GCC_DYNAMIC_NO_PIC
=
NO
;
GCC_MODEL_TUNING
=
G5
;
GCC_OPTIMIZATION_LEVEL
=
0
;
GCC_PREPROCESSOR_DEFINITIONS
=
"XCODE_VERSION=\\\"10.1\\\""
;
GCC_VERSION
=
""
;
GCC_WARN_SIGN_COMPARE
=
YES
;
GCC_WARN_UNUSED_PARAMETER
=
NO
;
...
...
@@ -3791,6 +3796,7 @@
CLANG_STATIC_ANALYZER_MODE
=
deep
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
GCC_MODEL_TUNING
=
G5
;
GCC_PREPROCESSOR_DEFINITIONS
=
"XCODE_VERSION=\\\"10.1\\\""
;
GCC_VERSION
=
""
;
GCC_WARN_SIGN_COMPARE
=
YES
;
GCC_WARN_UNUSED_PARAMETER
=
NO
;
...
...
XCCosmos/Eval-parser.cc
0 → 100644
View file @
b2126e3a
This diff is collapsed.
Click to expand it.
XCCosmos/Eval-scanner.cc
0 → 100644
View file @
b2126e3a
This diff is collapsed.
Click to expand it.
src/ModelGenerator/Cosmos.cpp
View file @
b2126e3a
...
...
@@ -56,7 +56,7 @@
* The result of the call to cmd is read from its standart
* ouput and put in a string.
*/
string
systemStringResult
(
const
char
*
cmd
);
st
d
::
st
ring
systemStringResult
(
const
char
*
cmd
);
/**
* Clean the temporary directory
...
...
src/ModelGenerator/Eval/Eval-parser.yy
View file @
b2126e3a
...
...
@@ -13,6 +13,7 @@
#include <set>
class Eval;
using namespace std;
}
...
...
src/ModelGenerator/Eval/Eval-scanner.ll
View file @
b2126e3a
...
...
@@ -107,7 +107,7 @@ Eval::scan_end ()
}
void
Eval:
:scan_expression
(
const
string&
f
){
void
Eval:
:scan_expression
(
const
st
d:
:st
ring&
f
){
const
char
*
ch
=
f
.
c_str
()
;
evalset_debug
(
trace_scanning
)
;
...
...
src/ModelGenerator/Eval/Eval.hpp
View file @
b2126e3a
...
...
@@ -36,7 +36,6 @@ eval::Eval_parser::location_type* evallloc, \
Eval& Evaluate)
EVAL_DECL
;
using
namespace
std
;
class
Eval
{
public:
...
...
src/ModelGenerator/Generator.hpp
View file @
b2126e3a
...
...
@@ -42,7 +42,7 @@
* @return a boolean equal to true if everything run correctly
*/
shared_ptr
<
GspnType
>
ParseGSPN
();
s
td
::
s
hared_ptr
<
GspnType
>
ParseGSPN
();
bool
ParseLHA
(
GspnType
&
);
bool
ParseLHA
();
...
...
src/ModelGenerator/GspnParser/Gspn-Grml-Output.hpp
View file @
b2126e3a
...
...
@@ -40,12 +40,12 @@ class GspnGrmlOutput: public GspnType {
public:
GspnGrmlOutput
(
GspnType
&
g
)
:
GspnType
(
g
){};
friend
ostream
&
operator
<<
(
ostream
&
os
,
GspnGrmlOutput
&
gspn
);
friend
ostream
&
operator
<<
(
ostream
&
os
,
const
Distribution
&
d
);
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
GspnGrmlOutput
&
gspn
);
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
Distribution
&
d
);
void
printPlace
(
std
::
ostream
&
,
const
place
&
);
void
printTransition
(
std
::
ostream
&
,
const
transition
&
);
void
printToken
(
ostream
&
os
,
const
coloredToken
&
c
,
size_t
);
void
printArc
(
ostream
&
os
,
const
pair
<
size_t
,
size_t
>
&
p
,
const
arc
&
a
,
bool
,
size_t
);
void
printToken
(
std
::
ostream
&
os
,
const
coloredToken
&
c
,
size_t
);
void
printArc
(
std
::
ostream
&
os
,
const
std
::
pair
<
size_t
,
size_t
>
&
p
,
const
arc
&
a
,
bool
,
size_t
);
};
}
...
...
src/ModelGenerator/GspnParser/Gspn-Reader.hpp
View file @
b2126e3a
...
...
@@ -53,7 +53,7 @@ public:
virtual
~
Gspn_Reader
();
shared_ptr
<
GspnType
>
spn
;
s
td
::
s
hared_ptr
<
GspnType
>
spn
;
int
parse
(
std
::
string
&
);
int
parse_file
(
std
::
string
&
);
...
...
@@ -62,14 +62,14 @@ public:
void
error
(
const
gspn
::
location
&
l
,
const
std
::
string
&
m
);
//<! Index of distribution type.
map
<
string
,
int
>
IndexDist
;
std
::
map
<
std
::
string
,
int
>
IndexDist
;
parameters
P
;
private:
void
scan_begin
();
void
scan_end
();
void
scan_expression
(
const
string
&
);
void
scan_expression
(
const
st
d
::
st
ring
&
);
bool
trace_scanning
;
...
...
src/ModelGenerator/GspnParser/Gspn-parser.yy
View file @
b2126e3a
...
...
@@ -14,8 +14,9 @@
#include "../expressionStruct.hpp"
#include "../../Simulator/DistributionDef.hpp"
#include "../Eval/Eval.hpp"
class Gspn_Reader;
class Gspn_Reader;
using namespace std;
}
...
...
@@ -192,7 +193,8 @@ Constant: Const INT str EQ IntStringFormula SEMICOLON
if (Reader.P.constants.count(*$3)>0)st = Reader.P.constants[*$3];
Evaluate.parse(st);
Reader.spn->IntConstant[*$3]=Evaluate.IntResult;Reader.spn->RealConstant[*$3]=Evaluate.RealResult;}
Reader.spn->IntConstant[*$3]=Evaluate.IntResult;
Reader.spn->RealConstant[*$3]=Evaluate.RealResult;}
}
| Const DOUBLE str EQ RealStringFormula SEMICOLON
{if(Reader.spn->RealConstant.find(*$3)!=Reader.spn->RealConstant.end())
...
...
src/ModelGenerator/GspnParser/Gspn-scanner.ll
View file @
b2126e3a
...
...
@@ -176,7 +176,7 @@ Gspn_Reader::scan_end ()
}
void
Gspn_Reader:
:scan_expression
(
const
string&
f
){
void
Gspn_Reader:
:scan_expression
(
const
st
d:
:st
ring&
f
){
const
char
*
ch
=
f
.
c_str
()
;
gspnset_debug
(
trace_scanning
)
;
...
...
src/ModelGenerator/GspnParser/unfolder.cpp
View file @
b2126e3a
...
...
@@ -28,6 +28,7 @@
#include "unfolder.hpp"
using
namespace
std
;
using
namespace
xml_output
;
string
unfolder
::
str_of_vect
(
const
vector
<
color
>
&
v
,
const
string
&
smid
)
const
{
...
...
src/ModelGenerator/GspnParser/unfolder.hpp
View file @
b2126e3a
...
...
@@ -39,20 +39,20 @@ class unfolder: public GspnType {
public:
unfolder
(
GspnType
&
g
)
:
GspnType
(
g
),
nbPlace
(
0
),
nbTrans
(
0
),
nbArc
(
0
){};
void
export_grml
(
ofstream
&
fout
);
void
export_grml
(
std
::
ofstream
&
fout
);
private:
//void export_init_grml(ofstream &fout);
void
export_place_grml
(
ofstream
&
fout
,
const
place
&
p
);
void
export_transition_grml
(
ofstream
&
fout
,
const
transition
&
t
);
void
export_arc_grml
(
ofstream
&
fout
,
const
transition
&
t
);
void
export_coltoken
(
ofstream
&
fout
,
const
vector
<
color
>
&
vec
,
const
coloredToken
&
coltoken
,
const
transition
&
t
,
const
place
&
p
,
bool
);
void
export_multcoltok
(
ofstream
&
fout
,
const
vector
<
color
>
&
vec
,
const
transition
&
t
,
const
place
&
p
,
bool
,
const
arc
);
void
export_place_grml
(
std
::
ofstream
&
fout
,
const
place
&
p
);
void
export_transition_grml
(
std
::
ofstream
&
fout
,
const
transition
&
t
);
void
export_arc_grml
(
std
::
ofstream
&
fout
,
const
transition
&
t
);
void
export_coltoken
(
std
::
ofstream
&
fout
,
const
std
::
vector
<
color
>
&
vec
,
const
coloredToken
&
coltoken
,
const
transition
&
t
,
const
place
&
p
,
bool
);
void
export_multcoltok
(
std
::
ofstream
&
fout
,
const
std
::
vector
<
color
>
&
vec
,
const
transition
&
t
,
const
place
&
p
,
bool
,
const
arc
);
//size_t next_uid;
void
print_arc
(
ofstream
&
,
size_t
,
size_t
,
size_t
,
bool
,
const
expr
&
);
void
print_arc
(
std
::
ofstream
&
,
size_t
,
size_t
,
size_t
,
bool
,
const
expr
&
);
std
::
string
cleanstr
(
const
std
::
string
&
)
const
;
std
::
string
str_of_vect
(
const
vector
<
color
>
&
v
,
const
std
::
string
&
smid
)
const
;
std
::
string
str_of_vect
(
const
std
::
vector
<
color
>
&
v
,
const
std
::
string
&
smid
)
const
;
size_t
nbPlace
,
nbTrans
,
nbArc
;
};
...
...
src/ModelGenerator/LhaParser/Lha_gmlparser.hpp
View file @
b2126e3a
...
...
@@ -32,7 +32,6 @@
#include "expatmodelparser.hh"
#include "modelhandler.hh"
#include "Lha-Reader.hpp"
#include "../Eval/Eval.hpp"
#include <map>
...
...
src/ModelGenerator/parameters.cpp
View file @
b2126e3a
...
...
@@ -678,7 +678,17 @@ void parameters::parseCommandLine(int argc, char** argv) {
case
CO_version
:
cout
<<
"Source Version:"
<<
GIT_REVISION
<<
endl
;
cout
<<
BUILD_VERSION
<<
" Build Date:"
<<
__DATE__
" at "
<<
__TIME__
<<
endl
;
cout
<<
"Compiled with: "
<<
CPP_COMPILER
<<
" "
<<
BOOST_PATH
<<
endl
;
cout
<<
"Compiled with "
;
#ifdef CMAKE_VERSION
cout
<<
"cmake "
<<
CMAKE_VERSION
;
#else
#ifdef XCODE_VERSION
cout
<<
"Xcode "
<<
XCODE_VERSION
;
#else
cout
<<
"automake"
;
#endif
#endif
cout
<<
" : "
<<
CPP_COMPILER
<<
" "
<<
BOOST_PATH
<<
endl
;
cout
<<
"Default flags: "
<<
gccflags
<<
endl
;
cout
<<
"Library: "
<<
BOOST_LIB
<<
" "
<<
endl
;
cout
<<
"Binary Path: "
<<
Path
<<
endl
;
...
...
src/ModelGenerator/server.hpp
View file @
b2126e3a
...
...
@@ -68,6 +68,7 @@ void launchServer(parameters& P);
* @param signum the number of a signal
*/
void
signalHandler
(
int
signum
);
void
signalHandlerIgn
(
int
signum
);
//istream streamOfFile(int fd);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment