Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
XMLSchemaCompiler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Nilsson
XMLSchemaCompiler
Commits
8dc42211
Commit
8dc42211
authored
15 years ago
by
Anders Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
Can merge actor connections in an xdf (though only in very simple cases).
parent
6db494f9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/actors/xdf/MergeActors.jrag
+15
-8
15 additions, 8 deletions
examples/actors/xdf/MergeActors.jrag
examples/actors/xdf/SSR.jrag
+13
-3
13 additions, 3 deletions
examples/actors/xdf/SSR.jrag
with
28 additions
and
11 deletions
examples/actors/xdf/MergeActors.jrag
+
15
−
8
View file @
8dc42211
...
...
@@ -23,28 +23,35 @@ aspect MergeActors {
HashSet<Connection> cons = getConnections(new HashSet<Connection>());
for (Instance i : schedule) {
while (i.next != null) {
// System.out.println("Searching connections for: "+i.name()+" "+i.next.name());
for (Connection c : cons) {
System.out.println(" "+c.getSource().name()+" "+c.getDest().name());
if (c.getSource() == i && c.getDest() == i.next) {
// System.out.println(" Found");
// Check port names and perform actual actor
// merge. Then set remove_me flag so that this
// connection will be removed from the actor
// network.
c.remove_me = true;
c.is$Final(false);
} else if (c.getSource() == i.next) {
c.setSource(i.id());
}
}
i.merge(i.next);
i.setName(i.name()+"_"+i.next.name());
i.next = i.next.next;
}
}
}
void Connection.mergeActors() {
Instance src = getSource();
Instance dest = getDest();
if (dest.isSDF() && src.isSDF()) {
src.merge(dest);
src.setName(src.name()+"_"+dest.name());
}
}
//
void Connection.mergeActors() {
//
Instance src = getSource();
//
Instance dest = getDest();
//
if (dest.isSDF() && src.isSDF()) {
//
src.merge(dest);
//
src.setName(src.name()+"_"+dest.name());
//
}
//
}
void Instance.merge(Instance inst) {}
}
...
...
This diff is collapsed.
Click to expand it.
examples/actors/xdf/SSR.jrag
+
13
−
3
View file @
8dc42211
...
...
@@ -28,15 +28,17 @@ aspect SSR {
}
aspect SDF {
syn boolean Instance.isSDF() {
syn boolean Instance.isSDF() = xlimInstance().isSDF();
syn xlimAST.design Instance.xlimInstance() {
try {
System.out.println("Trying to open: "+name());
xlimAST.XmlParser parser = new xlimAST.XmlParser(new FileReader(name()+".xlim"));
return
parser.Start().isSDF(
);
return
(xlimAST.design) parser.Start().getSpecification().getElement(0
);
} catch (Exception e) {
System.out.println( name()+".xlim not found");
// e.printStackTrace();
return
false
;
return
new xlimAST.design()
;
}
}
}
...
...
@@ -92,6 +94,14 @@ aspect ActorLookup {
return "";
}
void Connection.setSource(String src) {
for (Attribute a : getAttributes()) {
if (a instanceof src) {
a.getAttrValue().setLITERAL(src);
}
}
}
syn Instance Connection.getDest() = root().getInstance(dest());
String Connection.dest() {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment