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
0f98e40a
Commit
0f98e40a
authored
16 years ago
by
Anders Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
Create static shedule based on no analysis at all.
parent
37d295ca
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/actors/xdf/SSR.jrag
+43
-8
43 additions, 8 deletions
examples/actors/xdf/SSR.jrag
examples/actors/xdf/SSRAnalysis.java
+11
-0
11 additions, 0 deletions
examples/actors/xdf/SSRAnalysis.java
tools/jastadd2.jar
+0
-0
0 additions, 0 deletions
tools/jastadd2.jar
with
54 additions
and
8 deletions
examples/actors/xdf/SSR.jrag
+
43
−
8
View file @
0f98e40a
...
...
@@ -25,24 +25,40 @@ aspect SSR {
}
aspect SDF {
syn boolean Instance.isSDF() = true;
}
aspect StaticSchedule {
syn LinkedList ASTNode.genStaticSchedule(LinkedList l) = l;
eq Start.genStaticSchedule(LinkedList l) = getSpecification().genStaticSchedule(l);
eq Specification.genStaticSchedule(LinkedList l) {
public Instance Instance.next;
public Instance Instance.prev;
syn LinkedList<Instance> ASTNode.genStaticSchedule(LinkedList<Instance> l) = l;
eq Start.genStaticSchedule(LinkedList<Instance> l) = getSpecification().genStaticSchedule(l);
eq Specification.genStaticSchedule(LinkedList<Instance> l) {
for (int i=0; i<getNumElement(); i++) {
l = getElement(i).genStaticSchedule(l);
}
return l;
}
eq XDF.genStaticSchedule(LinkedList l) {
eq XDF.genStaticSchedule(LinkedList
<Instance>
l) {
for (int i=0; i<getNumElement(); i++) {
l = getElement(i).genStaticSchedule(l);
}
return l;
}
eq Connection.genStaticSchedule(LinkedList l) {
eq Connection.genStaticSchedule(LinkedList
<Instance>
l) {
Instance src = getSource();
System.out.println(src);
Instance dest = getDest();
if (src.isSDF() && dest.isSDF()) {
src.next = dest;
dest.prev = src;
}
if (src.prev == null) {
l.add(src);
}
// System.out.println(src.name());
return l;
// Instance dest = getDest();
}
...
...
@@ -54,7 +70,18 @@ aspect ActorLookup {
String Connection.source() {
for (Attribute a : getAttributes()) {
if (a instanceof src) {
return a.getAttrValue().getLITERAL();
return fix(a.getAttrValue().getLITERAL());
}
}
return "";
}
syn Instance Connection.getDest() = root().getInstance(dest());
String Connection.dest() {
for (Attribute a : getAttributes()) {
if (a instanceof dst) {
return fix(a.getAttrValue().getLITERAL());
}
}
return "";
...
...
@@ -77,6 +104,7 @@ aspect misc {
return null;
}
eq Instance.getInstance(String s) {
// System.out.println(name()+" == "+s);
if (name().equals(s)) {
return this;
} else {
...
...
@@ -91,11 +119,18 @@ aspect misc {
for (int i=0; i<getNumAttribute(); i++) {
Attribute a = getAttribute(i);
if (a instanceof id) {
return a.getAttrValue().getLITERAL();
return
fix(
a.getAttrValue().getLITERAL()
)
;
}
}
return "";
}
static String ASTNode.fix(String s) {
if (s.indexOf('"') == 0) {
return s.substring(1,s.length()-1);
}
return s;
}
}
...
...
This diff is collapsed.
Click to expand it.
examples/actors/xdf/SSRAnalysis.java
+
11
−
0
View file @
0f98e40a
import
xdfAST.Start
;
import
xdfAST.Instance
;
import
java.util.LinkedList
;
public
class
SSRAnalysis
extends
Parser
{
public
static
void
main
(
String
args
[])
{
Start
ast
=
parse
(
args
);
ast
.
genSSR
(
System
.
out
);
LinkedList
<
Instance
>
l
=
ast
.
genStaticSchedule
(
new
LinkedList
<
Instance
>());
for
(
Instance
i:
l
){
do
{
System
.
out
.
print
(
i
.
name
()+
" -> "
);
i
=
i
.
next
;
}
while
(
i
!=
null
);
System
.
out
.
println
();
}
}
}
This diff is collapsed.
Click to expand it.
tools/jastadd2.jar
+
0
−
0
View file @
0f98e40a
No preview for this file type
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