Package it.unito.di.logic.expression

Examples of it.unito.di.logic.expression.Fact


    failure.setRoleSender(participant);
    failure.setRoleReceiver(initiator);
    failure.setPerformative(ACLMessage.FAILURE);
    send(failure);
    try {
      assertFact(new Fact("failure"));
      logger.trace("OPERATION PERFORMED: FAILURE by "+participant);
    } catch (MissingOperandException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here


  }
 
  private static void testExpressionTree() throws MissingOperandException, WrongOperandsNumberException, CartagoException {
   
    CompositeExpression le1 =
        CompositeExpression.and(new Fact("pippo", new Fact("pippoInside")),
            CompositeExpression.or(new Fact("ripippo"),
              CompositeExpression.not(new Fact("ripippo")))
            );
   
    logger.info(le1.toString());   
    logger.error("pippo");
       
View Full Code Here

public class InitiatorRequirements extends Type {
 
  public InitiatorRequirements() throws MissingOperandException, WrongOperandsNumberException {
    super(new Commitment[]{
      new Commitment(CNPArtifactTimerMaxPart.INITIATOR_ROLE, CNPArtifactTimerMaxPart.PARTICIPANT_ROLE, "propose", new CompositeExpression(
          LogicalOperatorType.OR, new Fact("accept"), new Fact("reject")))
    });
 
View Full Code Here

  public TypeInitiator() throws MissingOperandException, WrongOperandsNumberException {
   
    super(new Commitment[]
        {new Commitment(CNPArtifactTimerMaxPart.INITIATOR_ROLE, CNPArtifactTimerMaxPart.PARTICIPANT_ROLE, "propose", new CompositeExpression(
          LogicalOperatorType.OR, new Fact("accept"), new Fact("reject")))
        });
  }
View Full Code Here

  public TypeOneParticipant() throws MissingOperandException, WrongOperandsNumberException {
 
    super(new Commitment[]{
        new Commitment(CNPArtifactTimerMaxPart.PARTICIPANT_ROLE, CNPArtifactTimerMaxPart.INITIATOR_ROLE, "accept", new CompositeExpression(
              LogicalOperatorType.OR, new Fact("done"), new Fact("failure")))
    });
  }
View Full Code Here

  }
 
  private static void testExpressionTree() throws MissingOperandException, WrongOperandsNumberException, CartagoException {
   
    CompositeExpression le1 =
        CompositeExpression.and(new Fact("pippo", new Fact("pippoInside")),
            CompositeExpression.or(new Fact("ripippo"),
              CompositeExpression.not(new Fact("ripippo")))
            );
   
    logger.info(le1.toString());   
    logger.error("pippo");
       
View Full Code Here

    testFact();
  }
 
  private static void testFact() {
    logger.debug("Initializing test on Logical Expression management, status: "+state);
    Fact f = null;
    Fact fOneStringPredicate = null;
    Fact fMultiStringPredicate = null;
    Fact fOneStringOneObject = null;
    Fact fMultiObjectPredicate = null;
    try {
      f = new Fact("factOne");
      fOneStringPredicate = new Fact("factOneStringPredicate", "stringPredicate");
      fMultiStringPredicate = new Fact("factMultiStringPredicate", "stringPredOne", "stringPredTwo", "stringPredThree");
      fOneStringOneObject = new Fact("factOneStringOneObject", "stringPred", new Rectangle(15, 20));
      fMultiObjectPredicate = new Fact("factMultiObjectPredicate", new Rectangle(10, 10), 15, new String[]{"one","two","three"});
    } catch (MissingOperandException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      logger.error("Error in creating fact factOne");
   
View Full Code Here

public class ParticipantRequirements extends Type {
 
  public ParticipantRequirements() throws MissingOperandException, WrongOperandsNumberException {     
    super(new Commitment[]{
        new Commitment(CNPArtifact.PARTICIPANT_ROLE, CNPArtifact.INITIATOR_ROLE, "accept", new CompositeExpression(
              LogicalOperatorType.OR, new Fact("done"), new Fact("failure")))
        });
   
  }
View Full Code Here

  }
 
  private static void testExpressionTree() throws MissingOperandException, WrongOperandsNumberException, CartagoException {
   
    CompositeExpression le1 =
        CompositeExpression.and(new Fact("pippo", new Fact("pippoInside")),
            CompositeExpression.or(new Fact("ripippo"),
              CompositeExpression.not(new Fact("ripippo")))
            );
   
    logger.info(le1.toString());   
    logger.error("pippo");
       
View Full Code Here

      // la release ad es. viene fatta creando un nuovo commitment, quello che si vuole porre in stato released.
     
      // togliere new commitment e mettere i singoli paramtri di costruzione
     
      createCommitment(new Commitment(initiator, dest, "propose", new CompositeExpression(
          LogicalOperatorType.OR, new Fact("accept"), new Fact("reject"))));
      assertFact(new Fact("cfp", initiator, task));
      logger.trace("OPERATION PERFORMED: CFP by "+initiator);
    } catch (MissingOperandException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (WrongOperandsNumberException e) {
View Full Code Here

TOP

Related Classes of it.unito.di.logic.expression.Fact

Copyright © 2018 www.massapicom. 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.