-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
brushing up scripts, adding a new one to show a test case
- Loading branch information
1 parent
f9cdc37
commit 87b907a
Showing
10 changed files
with
292 additions
and
275 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xbgf:sequence xmlns:bgf="http://planet-sl.org/bgf" xmlns:xbgf="http://planet-sl.org/xbgf"/> |
17 changes: 11 additions & 6 deletions
17
topics/transformation/update/testperform → topics/transformation/update/run1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,40 @@ | ||
#!/bin/sh | ||
|
||
echo [Test Update] $1 | ||
# let's try f of G1 | ||
# let's try ƒ of G1 | ||
../../../shared/tools/xbgf tests/$1/f.xbgf tests/$1/g1.bgf tests/$1/g2.bgf | ||
if [ $? -ne 0 ] | ||
then | ||
echo "OUTCOME for $1: Impossible output — bad f." | ||
exit | ||
exit -1 | ||
fi | ||
# let's try ∆ of G1 | ||
../../../shared/tools/xbgf tests/$1/d.xbgf tests/$1/g1.bgf tests/$1/g3.bgf | ||
if [ $? -ne 0 ] | ||
then | ||
echo "OUTCOME for $1: Impossible output — incompatible ∆." | ||
exit | ||
exit -1 | ||
fi | ||
# let's try f of ∆ of G1 and ∆ of f of G1 | ||
# let's try ƒ of ∆ of G1 and ∆ of ƒ of G1 | ||
../../../shared/tools/xbgf tests/$1/f.xbgf tests/$1/g3.bgf tests/$1/g4.bgf && ../../../shared/tools/xbgf tests/$1/d.xbgf tests/$1/g2.bgf tests/$1/g5.bgf && gdt tests/$1/g4.bgf tests/$1/g5.bgf | ||
if [ $? -eq 0 ] | ||
then | ||
echo "OUTCOME for $1: f and ∆ are independent; any composition is valid." | ||
cp tests/$1/f.xbgf tests/$1/g.xbgf | ||
cp tests/$1/d.xbgf tests/$1/e.xbgf | ||
exit | ||
fi | ||
# let's try f of ∆ of G1 and ∆ of f of G1 | ||
# let's try to reverse ∆ and try to obtain G2=ƒ(G1) from G3=∆(G1) as ƒ(∆r(∆(G1))) | ||
../../../shared/tools/xbgf2cbgf tests/$1/d.xbgf tests/$1/d.cbgf tests/$1/g1.bgf | ||
../../../shared/tools/cbgf2xbgf tests/$1/d.cbgf /dev/null tests/$1/d-1.xbgf | ||
../../../shared/tools/appendxbgf tests/$1/d-1-f.xbgf tests/$1/d-1.xbgf tests/$1/f.xbgf | ||
../../../shared/tools/xbgf tests/$1/d-1-f.xbgf tests/$1/g3.bgf tests/$1/g6.bgf && gdt tests/$1/g2.bgf tests/$1/g6.bgf | ||
if [ $? -eq 0 ] | ||
then | ||
echo "OUTCOME for $1: ∆ messes with input of f; a composition with reversed ∆ is valid." | ||
echo "OUTCOME for $1: ∆ messes with the input of f; a composition with reversed ∆ is valid (but not necessarily correct)." | ||
cp tests/$1/d-1-f.xbgf tests/$1/g.xbgf | ||
cp id.xbgf tests/$1/e.xbgf | ||
exit | ||
fi | ||
echo "OUTCOME for $1: f and ∆ are incompatible." | ||
exit -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
|
||
echo [Show Update] $1 | ||
/bin/echo -n "ƒ = " | ||
../../../shared/tools/xbgf2xbnf tests/$1/f.xbgf | ||
/bin/echo -n "∆ = " | ||
../../../shared/tools/xbgf2xbnf tests/$1/d.xbgf | ||
|
||
(./run1 $1 || echo OUTCOME is ERROR) | grep OUTCOME | ||
|
||
/bin/echo -n "g = " | ||
if [ ! -r tests/$1/g.xbgf ] | ||
then | ||
echo "∅" | ||
else | ||
../../../shared/tools/xbgf2xbnf tests/$1/g.xbgf | ||
# perl -pi -w -e 's/;\n/ ∘ /g;' tmp.xbnf | ||
# cat tmp.xbnf | ||
fi | ||
/bin/echo -n "Γ = " | ||
if [ ! -r tests/$1/e.xbgf ] | ||
then | ||
echo "∅" | ||
else | ||
../../../shared/tools/xbgf2xbnf tests/$1/e.xbgf | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
*.bgf | ||
e.xbgf | ||
g.xbgf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
*.bgf | ||
e.xbgf | ||
g.xbgf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
*.bgf | ||
*.cbgf | ||
d-1*.xbgf | ||
e.xbgf | ||
g.xbgf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
*.bgf | ||
e.xbgf | ||
g.xbgf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
*.bgf | ||
*.cbgf | ||
d-1*.xbgf | ||
e.xbgf | ||
g.xbgf |