Code Monkey home page Code Monkey logo

forsyde-io's People

Contributors

albinwwoxnerud avatar beethovenkodar avatar dependabot[bot] avatar rojods avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

forsyde-io's Issues

The trait minimal requirements are not properly checked.

The supporting library for java does not enforce the traits requirements given to the input trait hierarchy. Currently this means the std_trait_hierarchy. The validation should be fixed and added so that the basic expected syntax works across tools. For the moment, the fix regards the java supporting library.

Probably incorrect kgt format for SDF applications

Bold of me to make an issue this early into the project, but I think there might be an issue actually B)

This is the simple code snippet I use

SystemGraph sGraph = new SystemGraph();

SDFActorViewer a = SDFActor.enforce(sGraph, sGraph.newVertex("Actor A"));
a.consumption(Map.of("s_in", 2));
a.production(Map.of("s1", 2));
a.addPorts("s_in", "s1");
Visualizable.enforce(a);

SDFActorViewer b = SDFActor.enforce(sGraph, sGraph.newVertex("Actor B"));
b.consumption(Map.of("s1", 3));
b.production(Map.of("s_out", 1));
b.addPorts("s1", "s_out");
Visualizable.enforce(b);

SDFChannelViewer ab_chan = SDFChannel.enforce(sGraph, sGraph.newVertex("Channel A-B"));
ab_chan.numInitialTokens(0);
sGraph.connect(
    a, 
    ab_chan,
    EdgeTraits.SDFNetworkEdge, 
    EdgeTraits.VisualConnection
);
sGraph.connect(
    ab_chan,
    b, 
    EdgeTraits.SDFNetworkEdge, 
    EdgeTraits.VisualConnection
);
Visualizable.enforce(ab_chan);

return sGraph;

This produces the following .kgt file which gives syntax errors in VSCode:

1  knode forsyde {
2     klabel "ForSyDe Model"
3     knode v_Channel A-B {
4       klabel "Channel A-B [SDFChannel, MoCEntity]"
5       kedge (  -> v_Actor_B)
6     }
7     knode v_Actor B {
8       klabel "Actor B [SDFActor, MoCEntity]"
9     }
10   knode v_Actor A {
11     klabel "Actor A [SDFActor, MoCEntity]"
12     kedge (  -> v_Channel_A-B)
13   }
14 }

There are two things that I believe have to be corrected.

  • Line 3, 7, 10: The kgt syntax does not allow node names to include spaces. Line 12 handles this case by inserting an underscore, so it's not consistent. Additionally, this makes the edge of the channel not recognized since they're written differently.
  • Hyphens are not allowed in a knode name and naming a Vertex allows this. I suggest to either replace the hyphen by some underscore or throw an error.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

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.