Search in sources :

Example 6 with BriefPrintDfsVerifierListener

use of il.ac.bgu.cs.bp.bpjs.analysis.listeners.BriefPrintDfsVerifierListener in project BPjs by bThink-BGU.

the class DfsBProgramVerifierTest method simpleAAABTrace.

@Test
public void simpleAAABTrace() throws Exception {
    BProgram program = new SingleResourceBProgram("AAABTrace.js");
    DfsBProgramVerifier sut = new DfsBProgramVerifier();
    sut.setProgressListener(new BriefPrintDfsVerifierListener());
    program.appendSource(Requirements.eventNotSelected("B"));
    sut.setVisitedNodeStore(new ForgetfulVisitedStateStore());
    VerificationResult res = sut.verify(program);
    assertTrue(res.isCounterExampleFound());
    assertEquals("AAAB", traceEventNamesString(res.getCounterExampleTrace(), ""));
}
Also used : BriefPrintDfsVerifierListener(il.ac.bgu.cs.bp.bpjs.analysis.listeners.BriefPrintDfsVerifierListener) SingleResourceBProgram(il.ac.bgu.cs.bp.bpjs.model.SingleResourceBProgram) BProgram(il.ac.bgu.cs.bp.bpjs.model.BProgram) StringBProgram(il.ac.bgu.cs.bp.bpjs.model.StringBProgram) SingleResourceBProgram(il.ac.bgu.cs.bp.bpjs.model.SingleResourceBProgram) Test(org.junit.Test)

Aggregations

BriefPrintDfsVerifierListener (il.ac.bgu.cs.bp.bpjs.analysis.listeners.BriefPrintDfsVerifierListener)6 SingleResourceBProgram (il.ac.bgu.cs.bp.bpjs.model.SingleResourceBProgram)6 BProgram (il.ac.bgu.cs.bp.bpjs.model.BProgram)5 StringBProgram (il.ac.bgu.cs.bp.bpjs.model.StringBProgram)4 Test (org.junit.Test)4 BProgramStateVisitedStateStore (il.ac.bgu.cs.bp.bpjs.analysis.BProgramStateVisitedStateStore)2 DfsBProgramVerifier (il.ac.bgu.cs.bp.bpjs.analysis.DfsBProgramVerifier)2 VerificationResult (il.ac.bgu.cs.bp.bpjs.analysis.VerificationResult)2 Node (il.ac.bgu.cs.bp.bpjs.analysis.Node)1 PrioritizedBSyncEventSelectionStrategy (il.ac.bgu.cs.bp.bpjs.model.eventselection.PrioritizedBSyncEventSelectionStrategy)1