Semantic parser tool from the Decoder project
Description
DECODER SP tool
This is the Semantic Parsing (SP) tool for the Decoder project (WP2)
It is a Docker composition of Flask service and NN based translation services.
To install it, you need to follow these steps:
-
Call
build_docker.sh
to build the Docker container. -
Start the Docker container with
run_docker.sh
.
To test the service, you can use test_semantic_parsing_jml_pkm.sh
, test_semantic_parsing_jml.sh
, test_semantic_parsing_pkm.sh
and test_semantic_parsing.sh
.
SP API
The SP tool, when interacting with the pkm, takes as parameters the information necessary to find comments in the pkm. Its return value is only a pair of a string and a code indicating the success of the operation or explaining its failure. The actual result is that the targeted comments are completed with their equivalent in the target language.
The input parameters are used to send the following query to the pkm: code/{source_language}/comments/{project_id}/{file}
.
Input:
- project_id: pkm project to query
- source_language: the programming language of the file (java/c/cpp)
- target_language: the target programming or constraints language (jml, acsl, acsl++, ast, java, c, cpp)
- file: the file whose comments will be parsed to code. This
Output:
- status: boolean indicating the success or failure of the call
- message: "Success" if status is true and an error message otherwise
Side effect:
If successful, the targeted comments are completed with their translation in the target language.
Files
Files
(3.8 GB)
Name | Size | Download all |
---|---|---|
md5:96e4d2a82b43b92526d49a18a2ed02b6
|
3.8 GB | Download |