deis-tools / aalwines Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
check
<$mpls ip> .* < mpls+ $mpls ip> 0 DUAL
on the nn-example using --no-ip-route -e 1 --routing ./nn-routing.xml --topology ./nn-topology.xml -q ./query.q -r 3 -t
.
There is an IP-hop mid trace which should be disabled by the --no-ip-route
flag.
For some queries I get {"pre":"error"} ,which results into a formatting error, because of the missing "," between {"pre":"error"} and the trace description.
I get this error just for dual mode, so when I use the same query with over or under. It doesn't appear.
The main problem with the formatting error is that it makes the json file unreadable
"Q124" : {
"query": "<.> [.#Alice_Springs,Alice_Springs#.] .* [.#Melbourne1,Melbourne1#.] <.> 2 DUAL",
"result":true,
"engine": "Post*",
"mode": "UNDER",
"reduction":[110101, 110101],
"trace":[
{"pre":"error"} {"from_router":"NULL","from_interface":"i61","to_router":"Alice_Springs","to_interface":"eg0","stack":["ip6"]},
{"ingoing":"eg0","pre":"ip","rule":{"weight":2, "via":"in0", "ops":[{"push":"s1567"}, {"push":"1751"}, {"push":"1753"}]}},
{"from_router":"Alice_Springs","from_interface":"in0","to_router":"Adelaide2","to_interface":"in3","stack":["1753","1751","s1567","ip6"]},
{"ingoing":"in3","pre":"1753","rule":{"weight":0, "via":"in1", "ops":[{"swap":"1752"}]}},
{"from_router":"Adelaide2","from_interface":"in1","to_router":"Adelaide1","to_interface":"in2","stack":["1752","1751","s1567","ip6"]},
{"ingoing":"in2","pre":"1752","rule":{"weight":0, "via":"in1", "ops":["pop"]}},
{"from_router":"Adelaide1","from_interface":"in1","to_router":"Darwin","to_interface":"in0","stack":["1751","s1567","ip6"]},
{"ingoing":"in0","pre":"1751","rule":{"weight":0, "via":"in0", "ops":[{"swap":"1750"}]}},
{"from_router":"Darwin","from_interface":"in0","to_router":"Adelaide1","to_interface":"in1","stack":["1750","s1567","ip6"]},
{"ingoing":"in1","pre":"1750","rule":{"weight":0, "via":"in2", "ops":["pop"]}},
{"from_router":"Adelaide1","from_interface":"in2","to_router":"Adelaide2","to_interface":"in1","stack":["s1567","ip6"]},
{"ingoing":"in1","pre":"s1567","rule":{"weight":0, "via":"in1", "ops":[{"swap":"s1568"}]}},
{"from_router":"Adelaide2","from_interface":"in1","to_router":"Adelaide1","to_interface":"in2","stack":["s1568","ip6"]},
{"ingoing":"in2","pre":"s1568","rule":{"weight":0, "via":"in3", "ops":[{"swap":"s1569"}]}},
{"from_router":"Adelaide1","from_interface":"in3","to_router":"Melbourne1","to_interface":"in2","stack":["s1569","ip6"]},
{"ingoing":"in2","pre":"s1569","rule":{"weight":0, "via":"eg0", "ops":["pop"]}},
{"from_router":"Melbourne1","from_interface":"eg0","to_router":"NULL","to_interface":"i51","stack":["ip6"]}
],
"compilation-time":0.201861,
"reduction-time":0.0005006,
"verification-time":0.0883355
E.g. engine used to solve the query.
Please implement consistent error messages for all error conditions, especially caused by invalid input data. Please catch and handle exceptions (weight json parser).
For beeing able to use it within the GUI I would prefer an option to get the error in some machine readable format like JSON:
{
"errorMessage": "some human readable error message",
"location": {
"inputName": "query",
"lineStart": 1,
"lineEnd": 1,
"columnStart": 3,
"columnEnd": 5
}
}
Both these standard options are missing - and --version is quite useful in practice (in particular if it is paired with a git-hash).
Engine PostStar (-e 2) is not showing a trace. Deactivate for now?
Starting a path with an optional match (? or *) does not work as expected. Following two queries should be similar for the attached network files.
<.> [.#s1]? [.#s1] [.#s2] <.> 0 OVER
<.> [.#s1] [.#s2] <.> 0 OVER
Command used:
./mpls2pda --topology etopo.txt --routing erouting.txt -q eq.txt -t -e 1
Output is:
{
"network-parsing-time":0.00560265, "query-parsing-time":0.000657254,
"answers":{
"Q1" : {
"result":false,
"reduction":[29, 29],
"compilation-time":0.00140231,
"reduction-time":1.907e-06,
"verification-time":0.00911686
},
"Q2" : {
"result":true,
"reduction":[42, 42],
"trace":[
{"router":"s1","stack":["0.0.0.0"]},
{"pre":"ip","rule":{"weight":0, "via":"s2"}},
{"router":"s2","stack":["0.0.0.0"]}
],
"compilation-time":0.00135042,
"reduction-time":2.035e-06,
"verification-time":0.0086711
}
}}
Following patch (compiling the path before starting initial construction) fixed this for me:
--- a/src/model/NetworkPDAFactory.cpp
+++ b/src/model/NetworkPDAFactory.cpp
@@ -37,8 +37,8 @@ namespace mpls2pda
NFA::state_t* ns = nullptr;
Interface* nr = nullptr;
add_state(ns, nr);
- construct_initial();
_path.compile();
+ construct_initial();
}
Sometimes I get negative compilation or verification times.
I don't think it has something to do with the query or weights in specific, because I trie the same Configuration a few times and it was never the case, that negative compilation or verification times occurred more than once.
Recent testing has enlightened an issue within the query of MPLS labels.
File: mpls-bug-queries.q contains queries and results, Q1 is expected true, similar to Q2.
Since Q5 is true, Q6 would be expected to provide same answer.
Add the total cost/weight to the trace output, when using the weighted analysis.
Also, consider annotating each hop of the trace with the corresponding weight. Find out if this can be done in a meaningful and consistent way, given the possible types of weights.
See Conext-paper
Currently the old P-Rex format is used which is
It would be nicer to unify the inputs for the engine to JSON and also make a lean, single-file format instead.
Current CMakeList.txt uses cp
which is not cross platform.
Exactly as the title mentions.
It is currently only used for filtering during construction and does not belong in the network-model.
A series of '_' characters are sent to stdout, making the JSON result-object invalid.
The recent features for weighted queries need to be documented in the README.md.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.