Examples of Proposition


Examples of net.emaze.dysfunctional.dispatching.logic.Proposition

            Assert.assertNotNull(monitor);
        }

        @Test
        public void canMonitorAProposition() {
            final Proposition monitor = Spies.monitor(new Yes(), accumulator);
            Assert.assertNotNull(monitor);
        }
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.logic.Proposition

    public static class CurryPredicates {

        @Test
        public void canCurryPredicate() {
            final Proposition adapted = Dispatching.curry(new Always<O>(), O.ONE);
            Assert.assertNotNull(adapted);
        }
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.logic.Proposition

    }

    @Test
    public void callingIncrementsTheAtomicLong() {
        final AtomicLong state = new AtomicLong();
        final Proposition spy = new MonitoringProposition(new Yes(), state);
        spy.state();
        Assert.assertEquals(1l, state.get());
    }
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.logic.Proposition

    }

    @Test
    public void callingThePropositionYieldsProviderResult() {
        final Boolean expected = Boolean.TRUE;
        final Proposition proposition = new ProviderToProposition(new ConstantProvider<Boolean>(expected));
        Assert.assertEquals(expected, proposition.state());
    }
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.logic.Proposition

    @Test
    public void callingTheBinderPassesBoundParameter() {
        final Box<O> param = Box.empty();
        final Predicate<O> spy = Spies.spy1st(new Always<O>(), param);
        final Proposition proposition = new PredicateBinder<O>(spy, O.ONE);
        proposition.state();
        Assert.assertEquals(O.ONE, param.getContent());
    }
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.logic.Proposition

    @Test
    public void callingTheBinderYieldsPredicateResult() {
        final Box<Boolean> result = Box.empty();
        final Predicate<O> spy = Spies.spyRes(new Always<O>(), result);
        final Proposition proposition = new PredicateBinder<O>(spy, O.ONE);
        proposition.state();
        Assert.assertEquals(Boolean.TRUE, result.getContent());
    }
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.logic.Proposition

    }

    @Test
    public void callingCapturesTheResult() {
        final Box<Boolean> result = Box.empty();
        final Proposition spy = new CapturingProposition(new Yes(), result);
        spy.state();
        Assert.assertEquals(Box.of(true), result);
    }
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.logic.Proposition

            Assert.assertNotNull(adapted);
        }

        @Test
        public void canAdaptProviderToProposition() {
            final Proposition adapted = Dispatching.proposition(new ConstantProvider<Boolean>(Boolean.TRUE));
            Assert.assertNotNull(adapted);
        }
View Full Code Here

Examples of opennlp.ccg.hylo.Proposition

 
  @Before
  public void setUp() throws Exception {
    super.setUp();
   
    edge = new LFEdge(new LFVertex(new NominalAtom("w0"), new Proposition("blah")),
        new LFVertex(new NominalAtom("w1"), new Proposition("blah blah")),
        new LFEdgeLabel(new ModeLabel("blase")));
   
    filter = new EdgeMatchFilter(edge, MatchType.LABEL_MISMATCH, MatchType.SOURCE_PREDICATE_MISMATCH,
        MatchType.TARGET_PREDICATE_MATCH);
  }
View Full Code Here

Examples of org.ggp.base.util.propnet.architecture.components.Proposition

    // based on having the same Body proposition.
    for(Set<Proposition> legalProps : legalPropositions.values()) {
      for(Proposition legalProp : legalProps) {
        List<GdlTerm> legalPropBody = (legalProp.getName()).getBody();
        if (inputPropsByBody.containsKey(legalPropBody)) {
            Proposition inputProp = inputPropsByBody.get(legalPropBody);
            legalInputMap.put(inputProp, legalProp);
            legalInputMap.put(legalProp, inputProp);
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.