added a counter example

This commit is contained in:
hneemann 2017-04-03 20:37:28 +02:00
parent 0e1416c433
commit 05ba2abf42
2 changed files with 776 additions and 1 deletions

View File

@ -0,0 +1,775 @@
<?xml version="1.0" encoding="utf-8"?>
<circuit>
<version>1</version>
<visualElements>
<visualElement>
<elementName>Tunnel</elementName>
<elementAttributes>
<entry>
<string>Inputs</string>
<int>1</int>
</entry>
<entry>
<string>NetName</string>
<string>q_3n</string>
</entry>
</elementAttributes>
<pos x="340" y="180"/>
</visualElement>
<visualElement>
<elementName>D_FF</elementName>
<elementAttributes>
<entry>
<string>valueIsProbe</string>
<boolean>true</boolean>
</entry>
<entry>
<string>Label</string>
<string>q_3n</string>
</entry>
<entry>
<string>Inputs</string>
<int>1</int>
</entry>
<entry>
<string>Default</string>
<int>1</int>
</entry>
</elementAttributes>
<pos x="260" y="180"/>
</visualElement>
<visualElement>
<elementName>Or</elementName>
<elementAttributes>
<entry>
<string>Inputs</string>
<int>4</int>
</entry>
</elementAttributes>
<pos x="140" y="140"/>
</visualElement>
<visualElement>
<elementName>And</elementName>
<elementAttributes>
<entry>
<string>Inputs</string>
<int>4</int>
</entry>
</elementAttributes>
<pos x="20" y="0"/>
</visualElement>
<visualElement>
<elementName>And</elementName>
<elementAttributes/>
<pos x="20" y="120"/>
</visualElement>
<visualElement>
<elementName>And</elementName>
<elementAttributes/>
<pos x="20" y="200"/>
</visualElement>
<visualElement>
<elementName>And</elementName>
<elementAttributes/>
<pos x="20" y="280"/>
</visualElement>
<visualElement>
<elementName>Tunnel</elementName>
<elementAttributes>
<entry>
<string>Inputs</string>
<int>1</int>
</entry>
<entry>
<string>NetName</string>
<string>q_2n</string>
</entry>
</elementAttributes>
<pos x="340" y="460"/>
</visualElement>
<visualElement>
<elementName>D_FF</elementName>
<elementAttributes>
<entry>
<string>valueIsProbe</string>
<boolean>true</boolean>
</entry>
<entry>
<string>Label</string>
<string>q_2n</string>
</entry>
<entry>
<string>Inputs</string>
<int>1</int>
</entry>
<entry>
<string>Default</string>
<int>1</int>
</entry>
</elementAttributes>
<pos x="260" y="460"/>
</visualElement>
<visualElement>
<elementName>Or</elementName>
<elementAttributes>
<entry>
<string>Inputs</string>
<int>3</int>
</entry>
</elementAttributes>
<pos x="120" y="440"/>
</visualElement>
<visualElement>
<elementName>And</elementName>
<elementAttributes>
<entry>
<string>Inputs</string>
<int>3</int>
</entry>
</elementAttributes>
<pos x="20" y="360"/>
</visualElement>
<visualElement>
<elementName>And</elementName>
<elementAttributes/>
<pos x="20" y="440"/>
</visualElement>
<visualElement>
<elementName>And</elementName>
<elementAttributes/>
<pos x="20" y="520"/>
</visualElement>
<visualElement>
<elementName>Tunnel</elementName>
<elementAttributes>
<entry>
<string>Inputs</string>
<int>1</int>
</entry>
<entry>
<string>NetName</string>
<string>q_1n</string>
</entry>
</elementAttributes>
<pos x="340" y="660"/>
</visualElement>
<visualElement>
<elementName>D_FF</elementName>
<elementAttributes>
<entry>
<string>valueIsProbe</string>
<boolean>true</boolean>
</entry>
<entry>
<string>Label</string>
<string>q_1n</string>
</entry>
<entry>
<string>Inputs</string>
<int>1</int>
</entry>
<entry>
<string>Default</string>
<int>1</int>
</entry>
</elementAttributes>
<pos x="260" y="660"/>
</visualElement>
<visualElement>
<elementName>Or</elementName>
<elementAttributes/>
<pos x="120" y="640"/>
</visualElement>
<visualElement>
<elementName>And</elementName>
<elementAttributes/>
<pos x="20" y="600"/>
</visualElement>
<visualElement>
<elementName>And</elementName>
<elementAttributes/>
<pos x="20" y="680"/>
</visualElement>
<visualElement>
<elementName>Tunnel</elementName>
<elementAttributes>
<entry>
<string>Inputs</string>
<int>1</int>
</entry>
<entry>
<string>NetName</string>
<string>q_0n</string>
</entry>
</elementAttributes>
<pos x="340" y="760"/>
</visualElement>
<visualElement>
<elementName>D_FF</elementName>
<elementAttributes>
<entry>
<string>valueIsProbe</string>
<boolean>true</boolean>
</entry>
<entry>
<string>Label</string>
<string>q_0n</string>
</entry>
<entry>
<string>Inputs</string>
<int>1</int>
</entry>
</elementAttributes>
<pos x="260" y="760"/>
</visualElement>
<visualElement>
<elementName>Tunnel</elementName>
<elementAttributes>
<entry>
<string>rotation</string>
<rotation rotation="1"/>
</entry>
<entry>
<string>NetName</string>
<string>q_0n</string>
</entry>
</elementAttributes>
<pos x="-160" y="-100"/>
</visualElement>
<visualElement>
<elementName>Not</elementName>
<elementAttributes>
<entry>
<string>rotation</string>
<rotation rotation="3"/>
</entry>
</elementAttributes>
<pos x="-140" y="-60"/>
</visualElement>
<visualElement>
<elementName>Tunnel</elementName>
<elementAttributes>
<entry>
<string>rotation</string>
<rotation rotation="1"/>
</entry>
<entry>
<string>NetName</string>
<string>q_1n</string>
</entry>
</elementAttributes>
<pos x="-120" y="-100"/>
</visualElement>
<visualElement>
<elementName>Not</elementName>
<elementAttributes>
<entry>
<string>rotation</string>
<rotation rotation="3"/>
</entry>
</elementAttributes>
<pos x="-100" y="-60"/>
</visualElement>
<visualElement>
<elementName>Tunnel</elementName>
<elementAttributes>
<entry>
<string>rotation</string>
<rotation rotation="1"/>
</entry>
<entry>
<string>NetName</string>
<string>q_2n</string>
</entry>
</elementAttributes>
<pos x="-80" y="-100"/>
</visualElement>
<visualElement>
<elementName>Not</elementName>
<elementAttributes>
<entry>
<string>rotation</string>
<rotation rotation="3"/>
</entry>
</elementAttributes>
<pos x="-60" y="-60"/>
</visualElement>
<visualElement>
<elementName>Tunnel</elementName>
<elementAttributes>
<entry>
<string>rotation</string>
<rotation rotation="1"/>
</entry>
<entry>
<string>NetName</string>
<string>q_3n</string>
</entry>
</elementAttributes>
<pos x="-40" y="-100"/>
</visualElement>
<visualElement>
<elementName>Not</elementName>
<elementAttributes>
<entry>
<string>rotation</string>
<rotation rotation="3"/>
</entry>
</elementAttributes>
<pos x="-20" y="-60"/>
</visualElement>
<visualElement>
<elementName>Clock</elementName>
<elementAttributes>
<entry>
<string>rotation</string>
<rotation rotation="3"/>
</entry>
<entry>
<string>Label</string>
<string>C</string>
</entry>
</elementAttributes>
<pos x="240" y="120"/>
</visualElement>
<visualElement>
<elementName>Data</elementName>
<elementAttributes>
<entry>
<string>microStep</string>
<boolean>true</boolean>
</entry>
<entry>
<string>Label</string>
<string>Data</string>
</entry>
</elementAttributes>
<pos x="140" y="-140"/>
</visualElement>
</visualElements>
<wires>
<wire>
<p1 x="-160" y="0"/>
<p2 x="20" y="0"/>
</wire>
<wire>
<p1 x="-40" y="320"/>
<p2 x="20" y="320"/>
</wire>
<wire>
<p1 x="-100" y="640"/>
<p2 x="20" y="640"/>
</wire>
<wire>
<p1 x="100" y="640"/>
<p2 x="120" y="640"/>
</wire>
<wire>
<p1 x="-100" y="200"/>
<p2 x="20" y="200"/>
</wire>
<wire>
<p1 x="100" y="200"/>
<p2 x="140" y="200"/>
</wire>
<wire>
<p1 x="240" y="200"/>
<p2 x="260" y="200"/>
</wire>
<wire>
<p1 x="-100" y="520"/>
<p2 x="20" y="520"/>
</wire>
<wire>
<p1 x="120" y="140"/>
<p2 x="140" y="140"/>
</wire>
<wire>
<p1 x="80" y="140"/>
<p2 x="100" y="140"/>
</wire>
<wire>
<p1 x="320" y="460"/>
<p2 x="340" y="460"/>
</wire>
<wire>
<p1 x="80" y="460"/>
<p2 x="120" y="460"/>
</wire>
<wire>
<p1 x="180" y="460"/>
<p2 x="260" y="460"/>
</wire>
<wire>
<p1 x="240" y="780"/>
<p2 x="260" y="780"/>
</wire>
<wire>
<p1 x="-160" y="-80"/>
<p2 x="-140" y="-80"/>
</wire>
<wire>
<p1 x="-120" y="-80"/>
<p2 x="-100" y="-80"/>
</wire>
<wire>
<p1 x="-80" y="-80"/>
<p2 x="-60" y="-80"/>
</wire>
<wire>
<p1 x="-40" y="-80"/>
<p2 x="-20" y="-80"/>
</wire>
<wire>
<p1 x="-20" y="80"/>
<p2 x="20" y="80"/>
</wire>
<wire>
<p1 x="-60" y="400"/>
<p2 x="20" y="400"/>
</wire>
<wire>
<p1 x="-120" y="720"/>
<p2 x="20" y="720"/>
</wire>
<wire>
<p1 x="-120" y="20"/>
<p2 x="20" y="20"/>
</wire>
<wire>
<p1 x="320" y="660"/>
<p2 x="340" y="660"/>
</wire>
<wire>
<p1 x="180" y="660"/>
<p2 x="260" y="660"/>
</wire>
<wire>
<p1 x="-60" y="280"/>
<p2 x="20" y="280"/>
</wire>
<wire>
<p1 x="-160" y="600"/>
<p2 x="20" y="600"/>
</wire>
<wire>
<p1 x="80" y="220"/>
<p2 x="100" y="220"/>
</wire>
<wire>
<p1 x="120" y="220"/>
<p2 x="140" y="220"/>
</wire>
<wire>
<p1 x="80" y="540"/>
<p2 x="100" y="540"/>
</wire>
<wire>
<p1 x="-40" y="160"/>
<p2 x="20" y="160"/>
</wire>
<wire>
<p1 x="100" y="160"/>
<p2 x="140" y="160"/>
</wire>
<wire>
<p1 x="-80" y="480"/>
<p2 x="20" y="480"/>
</wire>
<wire>
<p1 x="100" y="480"/>
<p2 x="120" y="480"/>
</wire>
<wire>
<p1 x="240" y="480"/>
<p2 x="260" y="480"/>
</wire>
<wire>
<p1 x="80" y="40"/>
<p2 x="120" y="40"/>
</wire>
<wire>
<p1 x="-160" y="360"/>
<p2 x="20" y="360"/>
</wire>
<wire>
<p1 x="-140" y="680"/>
<p2 x="20" y="680"/>
</wire>
<wire>
<p1 x="100" y="680"/>
<p2 x="120" y="680"/>
</wire>
<wire>
<p1 x="240" y="680"/>
<p2 x="260" y="680"/>
</wire>
<wire>
<p1 x="80" y="300"/>
<p2 x="120" y="300"/>
</wire>
<wire>
<p1 x="80" y="620"/>
<p2 x="100" y="620"/>
</wire>
<wire>
<p1 x="-40" y="240"/>
<p2 x="20" y="240"/>
</wire>
<wire>
<p1 x="-80" y="560"/>
<p2 x="20" y="560"/>
</wire>
<wire>
<p1 x="320" y="180"/>
<p2 x="340" y="180"/>
</wire>
<wire>
<p1 x="200" y="180"/>
<p2 x="260" y="180"/>
</wire>
<wire>
<p1 x="-140" y="120"/>
<p2 x="20" y="120"/>
</wire>
<wire>
<p1 x="100" y="440"/>
<p2 x="120" y="440"/>
</wire>
<wire>
<p1 x="-140" y="440"/>
<p2 x="20" y="440"/>
</wire>
<wire>
<p1 x="320" y="760"/>
<p2 x="340" y="760"/>
</wire>
<wire>
<p1 x="-140" y="760"/>
<p2 x="260" y="760"/>
</wire>
<wire>
<p1 x="-80" y="60"/>
<p2 x="20" y="60"/>
</wire>
<wire>
<p1 x="-120" y="380"/>
<p2 x="20" y="380"/>
</wire>
<wire>
<p1 x="80" y="380"/>
<p2 x="100" y="380"/>
</wire>
<wire>
<p1 x="80" y="700"/>
<p2 x="100" y="700"/>
</wire>
<wire>
<p1 x="240" y="120"/>
<p2 x="240" y="200"/>
</wire>
<wire>
<p1 x="240" y="680"/>
<p2 x="240" y="780"/>
</wire>
<wire>
<p1 x="240" y="200"/>
<p2 x="240" y="480"/>
</wire>
<wire>
<p1 x="240" y="480"/>
<p2 x="240" y="680"/>
</wire>
<wire>
<p1 x="-100" y="-80"/>
<p2 x="-100" y="-60"/>
</wire>
<wire>
<p1 x="-100" y="-20"/>
<p2 x="-100" y="200"/>
</wire>
<wire>
<p1 x="-100" y="520"/>
<p2 x="-100" y="640"/>
</wire>
<wire>
<p1 x="-100" y="200"/>
<p2 x="-100" y="520"/>
</wire>
<wire>
<p1 x="-100" y="640"/>
<p2 x="-100" y="820"/>
</wire>
<wire>
<p1 x="-20" y="-80"/>
<p2 x="-20" y="-60"/>
</wire>
<wire>
<p1 x="-20" y="-20"/>
<p2 x="-20" y="80"/>
</wire>
<wire>
<p1 x="-20" y="80"/>
<p2 x="-20" y="820"/>
</wire>
<wire>
<p1 x="100" y="140"/>
<p2 x="100" y="160"/>
</wire>
<wire>
<p1 x="100" y="200"/>
<p2 x="100" y="220"/>
</wire>
<wire>
<p1 x="100" y="380"/>
<p2 x="100" y="440"/>
</wire>
<wire>
<p1 x="100" y="480"/>
<p2 x="100" y="540"/>
</wire>
<wire>
<p1 x="100" y="620"/>
<p2 x="100" y="640"/>
</wire>
<wire>
<p1 x="100" y="680"/>
<p2 x="100" y="700"/>
</wire>
<wire>
<p1 x="-120" y="-100"/>
<p2 x="-120" y="-80"/>
</wire>
<wire>
<p1 x="-120" y="380"/>
<p2 x="-120" y="720"/>
</wire>
<wire>
<p1 x="-120" y="20"/>
<p2 x="-120" y="380"/>
</wire>
<wire>
<p1 x="-120" y="720"/>
<p2 x="-120" y="820"/>
</wire>
<wire>
<p1 x="-120" y="-80"/>
<p2 x="-120" y="20"/>
</wire>
<wire>
<p1 x="-40" y="-100"/>
<p2 x="-40" y="-80"/>
</wire>
<wire>
<p1 x="-40" y="-80"/>
<p2 x="-40" y="160"/>
</wire>
<wire>
<p1 x="-40" y="160"/>
<p2 x="-40" y="240"/>
</wire>
<wire>
<p1 x="-40" y="320"/>
<p2 x="-40" y="820"/>
</wire>
<wire>
<p1 x="-40" y="240"/>
<p2 x="-40" y="320"/>
</wire>
<wire>
<p1 x="120" y="40"/>
<p2 x="120" y="140"/>
</wire>
<wire>
<p1 x="120" y="220"/>
<p2 x="120" y="300"/>
</wire>
<wire>
<p1 x="-140" y="-80"/>
<p2 x="-140" y="-60"/>
</wire>
<wire>
<p1 x="-140" y="-20"/>
<p2 x="-140" y="120"/>
</wire>
<wire>
<p1 x="-140" y="440"/>
<p2 x="-140" y="680"/>
</wire>
<wire>
<p1 x="-140" y="680"/>
<p2 x="-140" y="760"/>
</wire>
<wire>
<p1 x="-140" y="120"/>
<p2 x="-140" y="440"/>
</wire>
<wire>
<p1 x="-140" y="760"/>
<p2 x="-140" y="820"/>
</wire>
<wire>
<p1 x="-60" y="-80"/>
<p2 x="-60" y="-60"/>
</wire>
<wire>
<p1 x="-60" y="-20"/>
<p2 x="-60" y="280"/>
</wire>
<wire>
<p1 x="-60" y="280"/>
<p2 x="-60" y="400"/>
</wire>
<wire>
<p1 x="-60" y="400"/>
<p2 x="-60" y="820"/>
</wire>
<wire>
<p1 x="-160" y="-100"/>
<p2 x="-160" y="-80"/>
</wire>
<wire>
<p1 x="-160" y="600"/>
<p2 x="-160" y="820"/>
</wire>
<wire>
<p1 x="-160" y="0"/>
<p2 x="-160" y="360"/>
</wire>
<wire>
<p1 x="-160" y="-80"/>
<p2 x="-160" y="0"/>
</wire>
<wire>
<p1 x="-160" y="360"/>
<p2 x="-160" y="600"/>
</wire>
<wire>
<p1 x="-80" y="-100"/>
<p2 x="-80" y="-80"/>
</wire>
<wire>
<p1 x="-80" y="60"/>
<p2 x="-80" y="480"/>
</wire>
<wire>
<p1 x="-80" y="560"/>
<p2 x="-80" y="820"/>
</wire>
<wire>
<p1 x="-80" y="480"/>
<p2 x="-80" y="560"/>
</wire>
<wire>
<p1 x="-80" y="-80"/>
<p2 x="-80" y="60"/>
</wire>
</wires>
<measurementOrdering>
<string>C</string>
<string>q_0n</string>
<string>q_1n</string>
<string>q_2n</string>
<string>q_3n</string>
</measurementOrdering>
</circuit>

View File

@ -28,7 +28,7 @@ public class TestExamples extends TestCase {
*/
public void testDistExamples() throws Exception {
File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig");
assertEquals(107, new FileScanner(this::check).scan(examples));
assertEquals(108, new FileScanner(this::check).scan(examples));
assertEquals(55, testCasesInFiles);
}