Giter Club home page Giter Club logo

flowblaze.p4's People

Contributors

daniele-moro avatar davidesanvito avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flowblaze.p4's Issues

Add feedback from EFSM parser back to the GUI

Rather then not returning the file to download or returning it with partial transitions we should inform back the user.

Regardless the client-side JS checks something might go wrong in Python

Consistent order of states

Right now, the state ID generated by the parser is the order number in the JSON list of states. This means that state 0 might not be translated to the 0 state by the parser. This is a requirement for flowblaze.p4.
Examples:
Wrong:

{
  "x": 473,
  "y": 209,
  "text": "1", <-- STATE 1 is first in the list and it's translated to STATE 0
  "isAcceptState": false
},
{
  "x": 679,
  "y": 247,
  "text": "2",
  "isAcceptState": false
},
{
  "x": 120,
  "y": 175,
  "text": "0", <-- STATE 0 is the last in the list and it's translated to STATE 2
  "isAcceptState": false
}

Correct:

{
  "x": 120,
  "y": 175,
  "text": "0",
  "isAcceptState": false
},
{
  "x": 473,
  "y": 209,
  "text": "1",
  "isAcceptState": false
},
{
  "x": 679,
  "y": 247,
  "text": "2",
  "isAcceptState": false
}

Declare local FlowBlaze metadata in FlowBlaze loop

FlowBlaze metadata is local to the FlowBlaze loop. There is no need to define them into the global metadata and can be kept local to the FlowBlaze loop (e.g., by defining a flowblaze_t flowblaze_metadata; at the beginning of the FlowBlaze loop). This will remove the need for adding the flowblaze_t into the user-defined metadata.

Add colours in EFSM transitions

+++ b/gui/www/fsm.js
@@ -295,6 +295,7 @@ function canvasHasFocus() {
 function drawText(c, originalText, x, y, angleOrNull, isSelected) {
        text = convertLatexShortcuts(originalText);
        c.font = '12px "Times New Roman", serif';
+       //c.fillStyle = "red";

How to handle illegal transitions?

e.g. an update action whose result is @now or @meta
shall we just skip the reg_action or the whole transition?

e.g. a transition with too many update actions or more than 1 pkt action
shall we just skip the reg_action or the whole transition?

TODOs

-POSSIBLE_PACKET_ACTION in gui/config.py should be set by p4_json_parser.py

-shall the user explicitly use NoAction()?

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.