Giter Site home page Giter Site logo

aalwines's People

Contributors

clemy avatar dank100 avatar mortenschou avatar petergjoel avatar yrke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aalwines's Issues

--no-ip-route is broken

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.

pre error formatting error

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

Consistent error messages

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
    }
}

Add --version and --license

Both these standard options are missing - and --version is quite useful in practice (in particular if it is paired with a git-hash).

Optional match at the beginning of path does not work

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

etopo.txt
erouting.txt
eq.txt

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();
     }

Negative compilation and verification times

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.

MPLS label issue

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.

mpls-issue.zip

Add cost/weight to trace output

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.

Unify input format

Currently the old P-Rex format is used which is

  1. XML based, and
  2. Very verbose

It would be nicer to unify the inputs for the engine to JSON and also make a lean, single-file format instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.