Software Open Access

Semantic parser tool from the Decoder project

GAEL DE CHALENDAR; Bouachera, Yannis; Laleye, Fréjus; Mesnard, Olivier

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:

  1. Call build_docker.sh to build the Docker container.

  2. 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 (3.8 GB)
Name Size
semparsing_tool_20220225.tgz
md5:96e4d2a82b43b92526d49a18a2ed02b6
3.8 GB Download
17
1
views
downloads
All versions This version
Views 1717
Downloads 11
Data volume 3.8 GB3.8 GB
Unique views 1616
Unique downloads 11

Share

Cite as