Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
anpl4mc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ziyuan Nan
anpl4mc
Commits
6b738550
Commit
6b738550
authored
Oct 17, 2023
by
nzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an command
parent
85ada63a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
anplc.py
+4
-1
synthesis.py
+2
-0
No files found.
anplc.py
View file @
6b738550
import
argparse
from
synthesis
import
synthesis
,
synthesis_1
from
synthesis
import
synthesis
,
synthesis_1
,
synthesis_1_inorder
from
lib
import
check_holes
,
check_hole_1
,
create_sketch
,
create_dest
import
argparse
import
os
...
...
@@ -69,6 +69,7 @@ async def main():
syn_parser
=
subparsers
.
add_parser
(
'synthesis'
)
syn_parser
.
add_argument
(
'fun_name'
,
nargs
=
'?'
,
default
=
None
,
help
=
"Name of the function to synthesis."
)
syn_parser
.
add_argument
(
'--all'
,
action
=
'store_true'
,
help
=
"Compile all functions."
)
syn_parser
.
add_argument
(
'--sketch'
,
default
=
None
,
help
=
"Name of the sketch to synthesis."
)
args
=
parser
.
parse_args
()
if
args
.
command
==
"sketch"
:
...
...
@@ -92,6 +93,8 @@ async def main():
print
(
holes
)
else
:
await
synthesis_1
(
args
.
fun_name
)
elif
args
.
sketch
:
await
synthesis_1_inorder
(
args
.
sketch
)
else
:
parser
.
print_help
()
...
...
synthesis.py
View file @
6b738550
...
...
@@ -38,4 +38,5 @@ async def synthesis_1_inorder(fun_name):
dependencies
=
json
.
load
(
f
)[
"dependencies"
]
for
name
in
dependencies
:
print
(
f
"I am synthesizing {name}"
)
await
synthesis_1
(
name
)
\ No newline at end of file
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