Skip to content

Commit 95b8964

Browse files
committed
server code
1 parent 1c771d7 commit 95b8964

File tree

12 files changed

+1748
-19
lines changed

12 files changed

+1748
-19
lines changed

resources/frame.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
<a id="function-button" class="button blue-bg">
2020
main
2121
</a>
22+
<!--<a class="button yellow-bg" href="javascript:goblintNext()">-->
23+
<!--next-->
24+
<!--</a>-->
2225
<a id="global-button" class="button yellow-bg" href="javascript:show_info_self('globals')">
2326
globals
2427
</a>

resources/iframeResizer.contentWindow.min.js

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/jquery.iframeResizer.min.js

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/node.xsl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<xsl:template match="map">
88
<xsl:choose>
99
<xsl:when test="normalize-space(.) != '' or ./@* != ''">
10-
<xsl:for-each select="key" >
10+
<xsl:for-each select="key" >
1111
<xsl:choose>
1212
<xsl:when test="following-sibling::*[1]//value">
1313
<div class="toggle">
@@ -43,9 +43,9 @@
4343
<xsl:template match="set">
4444
<xsl:choose>
4545
<xsl:when test="normalize-space(.) != '' or ./@* != ''">
46-
<xsl:for-each select="value" >
46+
<xsl:for-each select="value" >
4747
<div class="nontoggle">
48-
<xsl:apply-templates select="." />
48+
<xsl:apply-templates select="." />
4949
</div>
5050
</xsl:for-each>
5151
</xsl:when>
@@ -60,20 +60,20 @@
6060
<xsl:when test="value//value">
6161
<div class="toggle">
6262
<span>
63-
<xsl:value-of select="@name" />
63+
<xsl:value-of select="@name" />
6464
</span> &#8594;
6565
<div>
66-
<xsl:apply-templates select="value" />
66+
<xsl:apply-templates select="value" />
6767
</div>
6868
</div>
6969
</xsl:when>
7070
<xsl:otherwise>
7171
<div class="nontoggle">
7272
<span class="emph">
73-
<xsl:value-of select="@name" />
73+
<xsl:value-of select="@name" />
7474
</span> &#8594;
7575
<span class="emph">
76-
<xsl:apply-templates select="value" />
76+
<xsl:apply-templates select="value" />
7777
</span>
7878
</div>
7979
</xsl:otherwise>
@@ -86,22 +86,22 @@
8686
<div class="toggle">
8787
<span>path:</span>
8888
<div>
89-
<xsl:apply-templates select="analysis" />
89+
<xsl:apply-templates select="analysis" />
9090
</div>
9191
</div>
9292
</xsl:when>
9393
<xsl:otherwise>
9494
<div class="nontoggle">
9595
<span>path:</span>
9696
<span>
97-
<xsl:apply-templates select="analysis" />
97+
<xsl:apply-templates select="analysis" />
9898
</span>
9999
</div>
100100
</xsl:otherwise>
101101
</xsl:choose>
102102
</xsl:template>
103103

104-
<xsl:template match="loc">
104+
<xsl:template match="call">
105105
<a target="_top" class="node-wrap">
106106
<xsl:attribute name="href">../frame.html?file=<xsl:value-of select="@file"/>&amp;fun=<xsl:value-of select="@fun"/>&amp;node=<xsl:value-of select="@id" /></xsl:attribute>
107107
<div class="node-id">
@@ -131,7 +131,7 @@
131131
<script type="text/javascript" src="../script.js"/>
132132
</head>
133133
<body onload="init_node()">
134-
<xsl:apply-templates select="loc" />
134+
<xsl:apply-templates select="loc/call" />
135135
</body>
136136
</html>
137137
</xsl:template>

resources/script.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,31 @@ function show_info_self(x){
8383
window.postMessage("load:1:"+x,"*");
8484
}
8585

86+
// step forward with analysis
87+
function goblintNext() {
88+
// if we know the function then show the graph, else try to show the whole file
89+
if (getURLParameter("file")!=null) {
90+
if (getURLParameter("fun")!=null) {
91+
// we know the function so we can show the graph
92+
$('#file-view-frame-div').load("cfgs/"+encodeURIComponent(encodeURIComponent(getURLParameter("file")))+"/"+getURLParameter("fun")+'.svg?goblint=next',
93+
function f(){
94+
$("#file-view-frame-div svg").attr("width","100%");
95+
$("#file-view-frame-div svg").attr("height","100%");
96+
svgPanZoom.init({selector:"#file-view-frame-div svg"});
97+
});
98+
$('#function-button').text(getURLParameter("fun"));
99+
$('#function-button').attr("href","frame.html?fun="+getURLParameter("fun")+"&file="+getURLParameter("file"));
100+
} else {
101+
// we know the file only, so we show the file listing
102+
$('#file-view-frame-div').empty();
103+
$('#file-view-frame-div').append("<iframe class=\"borderless fill\"src=\"files/"+encodeURIComponent(encodeURIComponent(getURLParameter("file")))+".xml?line="+getURLParameter("line")+"\"></iframe>");
104+
105+
// fix breadcrumbs: function -- not avaliable
106+
$('#function-button').css("display","none");
107+
$('#function-slash').css("display","none");
108+
}
109+
}
110+
}
86111

87112

88113
// select lines from the code-listing

0 commit comments

Comments
 (0)