Examples of CompositeExpression


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

      // poiche siamo in un ambiente distribuito. Quindi ci vanno meccanismi di matching sullo stato sociale:
      // 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
View Full Code Here

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

     reject.setRoleReceiver(dest);
     reject.setPerformative(ACLMessage.REJECT_PROPOSAL);
    send(reject);
   
    try {
      releaseCommitment(new Commitment(proposal.getRoleId(), initiator, "accept", new CompositeExpression(
          LogicalOperatorType.OR, new Fact("done"), new Fact("failure"))));
      logger.trace("OPERATION PERFORMED: REJECT by "+initiator);
    } catch (MissingOperandException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

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

     proposal.setRoleReceiver(initiator);
     proposal.setPerformative(ACLMessage.PROPOSE);
    send(proposal);
   
    try {
      createCommitment(new Commitment(participant, new RoleId(INITIATOR_ROLE, RoleId.GENERIC_ROLE), "accept", new CompositeExpression(
          LogicalOperatorType.OR, new Fact("done"), new Fact("failure"))));
      assertFact(new Fact("propose", participant, prop));
      logger.trace("OPERATION PERFORMED: PROPOSE by "+participant);
    } catch (MissingOperandException e) {
      // TODO Auto-generated catch block
View Full Code Here

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

      // poiche siamo in un ambiente distribuito. Quindi ci vanno meccanismi di matching sullo stato sociale:
      // 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
View Full Code Here

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

     reject.setRoleReceiver(dest);
     reject.setPerformative(ACLMessage.REJECT_PROPOSAL);
    send(reject);
   
    try {
      releaseCommitment(new Commitment(proposal.getRoleId(), initiator, "accept", new CompositeExpression(
          LogicalOperatorType.OR, new Fact("done"), new Fact("failure"))));
      logger.trace("OPERATION PERFORMED: REJECT by "+initiator);
    } catch (MissingOperandException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

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

     proposal.setRoleReceiver(initiator);
     proposal.setPerformative(ACLMessage.PROPOSE);
    send(proposal);
   
    try {
      createCommitment(new Commitment(participant, new RoleId(INITIATOR_ROLE, RoleId.GENERIC_ROLE), "accept", new CompositeExpression(
          LogicalOperatorType.OR, new Fact("done"), new Fact("failure"))));
      assertFact(new Fact("propose", participant, prop));
      logger.trace("OPERATION PERFORMED: PROPOSE by "+participant);
    } catch (MissingOperandException e) {
      // TODO Auto-generated catch block
View Full Code Here

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

    refusal.setRoleReceiver(initiator);
    refusal.setPerformative(ACLMessage.REFUSE);
    send(refusal);
   
    try {
      releaseCommitment(new Commitment(initiator, participant, "propose", new CompositeExpression(
          LogicalOperatorType.OR, new Fact("accept"), new Fact("reject"))));
      assertFact(new Fact("refuse", participant));
      logger.trace("OPERATION PERFORMED: REFUSE by "+participant);
    } catch (MissingOperandException e) {
      // TODO Auto-generated catch block
View Full Code Here

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

      // poiche siamo in un ambiente distribuito. Quindi ci vanno meccanismi di matching sullo stato sociale:
      // 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
     
      createAllCommitments(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
View Full Code Here

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

     reject.setRoleReceiver(dest);
     reject.setPerformative(ACLMessage.REJECT_PROPOSAL);
    send(reject);
   
    try {
      releaseCommitment(new Commitment(proposal.getRoleId(), initiator, "accept", new CompositeExpression(
          LogicalOperatorType.OR, new Fact("done"), new Fact("failure"))));
      logger.trace("OPERATION PERFORMED: REJECT by "+initiator);
    } catch (MissingOperandException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

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

     proposal.setPerformative(ACLMessage.PROPOSE);
    send(proposal);
   
    try {
      assertFact(new Fact("propose", participant, prop));
      createCommitment(new Commitment(participant, initiator, new Fact("accept"), new CompositeExpression(
          LogicalOperatorType.OR, new Fact("done"), new Fact("failure"))));
      //**** DEBUG: CAMBIO STATO DI VITA A COMMITMENT GIUSTO, SARA' IL SOCIAL STATE CHE DOVRA' GESTIRLO
      for (Commitment com : interactionState.retrieveCommitmentsByCreditorRoleId(participant)) {
        if (com.getAntecedent().equals(new Fact("propose")) && com.getLifeCycleStatus().equals(LifeCycleState.CONDITIONAL)) {
          Commitment cToAdd = new Commitment(com.getDebtor(), com.getCreditor(), new Fact("true"), com.getConsequent(), LifeCycleState.DETACHED)
          interactionState.removeCommitment(com);
          logger.debug("Commitment da rimuovere: "+com);
          createCommitment(cToAdd)
          actualProposals++;           
        }
      }
     
      if (actualProposals == numberMaxProposals) {
        acceptingProposals = false;
        RoleId groupParticipant = new RoleId(PARTICIPANT_ROLE, RoleId.GROUP_ROLE);
        createCommitment(new Commitment(initiator, groupParticipant, new CompositeExpression(
            LogicalOperatorType.OR, new Fact("accept"), new Fact("reject"))));
//        defineObsProperty("cc", initiator.getCanonicalName(), "GroupParticipant",
//            "true", "(accept OR reject)", "DETACHED");
       
      }
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.