/** * Returns the view of the universal Dung theory restricted to * the given set of arguments. * @param arguments a set of arguments. * @return the projection of the universal theory. */ public DungTheory getPerceivedDungTheory(Extension arguments){ return new DungTheory(this.universalTheory.getRestriction(arguments)); } }
/** * Returns the view of the universal Dung theory restricted to * the given set of arguments. * @param arguments a set of arguments. * @return the projection of the universal theory. */ public DungTheory getPerceivedDungTheory(Extension arguments){ return new DungTheory(this.universalTheory.getRestriction(arguments)); } }
Collection<Argument> t = new HashSet<Argument>(scc); t.addAll(this.getOutparents(bbase, scc)); DungTheory restTheory = new DungTheory(bbase.getRestriction(t));//this.getUP(af, scc, af)); Set<Extension> e = this.singleAFExtensions(restTheory); exts.put(restTheory, e);
@Override public double getUtility(DialogueTrace<Argument,Extension> trace) { DungTheory theory = new DungTheory(this.theory.getRestriction(trace.getElements())); Extension groundedExtension = new SimpleGroundedReasoner().getModel(theory); return this.getUtility(groundedExtension, trace); }
DungTheory subTheory = (DungTheory) theory.getRestriction(sccs.get(idx));
@Override public double getUtility(DialogueTrace<Argument,Extension> trace, Set<Argument> additionalArguments, Set<Attack> additionalAttacks){ DungTheory theory = new DungTheory(this.theory.getRestriction(trace.getElements())); theory.addAll(additionalArguments); theory.addAllAttacks(additionalAttacks); Extension groundedExtension = new SimpleGroundedReasoner().getModel(theory); return this.getUtility(groundedExtension, trace); }
@Override public Collection<StratifiedLabeling> getModels(DungTheory bbase) { Set<StratifiedLabeling> labelings = new HashSet<StratifiedLabeling>(); AbstractExtensionReasoner reasoner = AbstractExtensionReasoner.getSimpleReasonerForSemantics(this.semantics); Collection<Extension> extensions = reasoner.getModels(bbase); for(Extension extension: extensions){ StratifiedLabeling labeling = new StratifiedLabeling(); if(extension.isEmpty()){ for(Argument arg: bbase) labeling.put(arg, Integer.MAX_VALUE); labelings.add(labeling); }else{ for(Argument arg: extension) labeling.put(arg, 0); Extension remainingArguments = new Extension(bbase); remainingArguments.removeAll(extension); DungTheory remainingTheory = new DungTheory(bbase.getRestriction(remainingArguments)); StratifiedLabelingReasoner sReasoner = new StratifiedLabelingReasoner(this.semantics); for(StratifiedLabeling labeling2: sReasoner.getModels(remainingTheory)){ for(Argument arg: labeling2.keySet()) labeling2.put(arg, labeling2.get(arg) + 1); labeling2.putAll(labeling); labelings.add(labeling2); } } } return labelings; }
return new ExecutableDungTheory(new DungTheory(this.theory.getRestriction(e))); }else{ DungTheory th = new DungTheory();