-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathasp.proto
46 lines (37 loc) · 822 Bytes
/
asp.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
syntax = "proto3";
// package asp;
message KeyValuePair {
string key = 1;
string value = 2;
}
message Parameters {
int32 number_of_answers = 1;
bool return_only_optimal_answers = 2;
repeated KeyValuePair additional_parameters = 3;
}
message SolverJob {
// ASP Core-2 program
string program = 1;
Parameters parameters = 2;
}
message CostElement {
int32 level = 1;
int32 cost = 2;
}
message Answerset {
repeated string atoms = 1;
repeated CostElement costs = 2;
bool is_known_optimal = 3;
}
message ResultDescription {
bool success = 1;
int32 code = 2;
repeated string messages = 3;
}
message SolveResultAnswersets {
ResultDescription description = 1;
repeated Answerset answers = 2;
}
service OneShotAnswerSetSolver {
rpc solve(SolverJob) returns (SolveResultAnswersets);
}