Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DSL pour Robotique en essaim
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Kylian Fontaine
DSL pour Robotique en essaim
Commits
8094637d
Commit
8094637d
authored
11 months ago
by
Kylian Fontaine
Browse files
Options
Downloads
Patches
Plain Diff
fix: location est par defaut en activelyup
parent
f9910891
No related branches found
No related tags found
1 merge request
!1
Module
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/main.ml
+8
-6
8 additions, 6 deletions
bin/main.ml
lib/gencoq.ml
+4
-4
4 additions, 4 deletions
lib/gencoq.ml
with
12 additions
and
10 deletions
bin/main.ml
+
8
−
6
View file @
8094637d
...
...
@@ -29,11 +29,13 @@ let rec parse_args args (proof_name : string) (type_name : string) (overwrite: b
@param args: string array, array of command line arguments
*)
let
gen
(
args
:
string
array
)
=
let
list_args
=
Array
.
to_list
args
in
try
let
name
=
args
.
(
1
)
in
let
(
proof_name
,
type_name
,
overwrite
,
repo_gen
,
graph_gen
)
=
parse_args
list_args
((
Filename
.
basename
name
)
^
"_proof"
)
((
Filename
.
basename
name
)
^
"_world_type"
)
true
"./generate"
false
in
Gencoq
.
generate_coq_2files
(
Interface
.
parse_description
name
)
(
Filename
.
basename
name
)
proof_name
type_name
overwrite
repo_gen
graph_gen
with
_
->
print_endline
usage
;
exit
0
;;
if
Array
.
length
args
<
2
then
(
print_endline
usage
;
exit
0
)
else
let
list_args
=
Array
.
to_list
args
in
let
name
=
args
.
(
1
)
in
let
(
proof_name
,
type_name
,
overwrite
,
repo_gen
,
graph_gen
)
=
parse_args
list_args
((
Filename
.
basename
name
)
^
"_proof"
)
((
Filename
.
basename
name
)
^
"_world_type"
)
true
"./generate"
false
in
Gencoq
.
generate_coq_2files
(
Interface
.
parse_description
name
)
(
Filename
.
basename
name
)
proof_name
type_name
overwrite
repo_gen
graph_gen
;;
gen
Sys
.
argv
;;
This diff is collapsed.
Click to expand it.
lib/gencoq.ml
+
4
−
4
View file @
8094637d
...
...
@@ -28,13 +28,13 @@ let get_val_ret (infos : information list) : string list =
|
Location
::
tl
->
"location"
::
(
locdir
tl
)
|
Direction
::
tl
->
"direction"
::
(
locdir
tl
)
|
Str
x
::
tl
->
if
x
=
"Light"
then
"light"
::
(
locdir
tl
)
else
(
locdir
tl
)
|
[]
->
[]
|
[]
->
[
"location"
]
in
let
valret
=
List
.
find
_opt
(
fun
x
->
match
x
with
|
ActivelyUpdate
_
->
true
|
_
->
false
)
infos
let
valret
=
List
.
find
(
fun
x
->
match
x
with
|
ActivelyUpdate
_
->
true
|
_
->
false
)
infos
in
match
valret
with
|
Some
(
ActivelyUpdate
x
)
->
locdir
x
|
_
->
[
"location"
]
|
ActivelyUpdate
x
->
locdir
x
|
_
->
[]
(**[get_space infos] returns the string corresponding to the space
@param information list corresponding to the description of the world
...
...
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