Codota Logo
UserSpecAction.getParameters
Code IndexAdd Codota to your IDE (free)

How to use
getParameters
method
in
languageTools.program.actionspec.UserSpecAction

Best Java code snippets using languageTools.program.actionspec.UserSpecAction.getParameters (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: org.bitbucket.goalhub.mentalstate.msStates/swiprologmentalstate

@Override
public Action convert(UserSpecAction action) throws MSTTranslationException {
  LinkedList<Parameter> parameters = new LinkedList<>();
  for (Term term : action.getParameters()) {
    parameters.add(convert(term));
  }
  return new Action(action.getName(), parameters);
}
origin: org.bitbucket.goalhub.grammar/languageTools

@Override
public UserSpecAction applySubst(Substitution substitution) {
  // Apply substitution to action parameters, pre- and post-condition.
  List<Term> parameters = new ArrayList<>(getParameters().size());
  for (Term parameter : getParameters()) {
    parameters.add(parameter.applySubst(substitution));
  }
  ActionPreCondition precondition = (getFullPreCondition() == null) ? null
      : getFullPreCondition().applySubst(substitution);
  ActionPostCondition positivePostcondition = (getPositivePostcondition() == null) ? null
      : getPositivePostcondition().applySubst(substitution);
  ActionPostCondition negativePostcondition = (getNegativePostcondition() == null) ? null
      : getNegativePostcondition().applySubst(substitution);
  return new UserSpecAction(getName(), parameters, isExternal(), precondition, positivePostcondition,
      negativePostcondition, getSourceInfo());
}
origin: org.bitbucket.goalhub.grammar/languageTools

protected void reportUnusedVariables() {
  for (UserSpecAction spec : this.program.getActionSpecifications()) {
    List<Var> vars = new LinkedList<>();
    try {
      CognitiveKR ckr = getFirstPass().getCognitiveKR();
      if (spec.getPrecondition() != null) {
        for (MentalLiteral literal : spec.getPrecondition().getAllLiterals()) {
          vars.addAll(ckr.getAllVariables(literal.getFormula()));
        }
      }
      if (spec.getNegativePostcondition() != null) {
        vars.addAll(ckr.getAllVariables(spec.getNegativePostcondition().getPostCondition()));
      }
      if (spec.getPositivePostcondition() != null) {
        vars.addAll(ckr.getAllVariables(spec.getPositivePostcondition().getPostCondition()));
      }
      Set<Var> unique = new LinkedHashSet<>(vars);
      unique.removeAll(spec.getParameters());
      for (Var var : unique) {
        int occurences = Collections.frequency(vars, var);
        if (occurences < 2) {
          getFirstPass().reportWarning(ActionSpecWarning.VARIABLE_UNUSED, var.getSourceInfo(),
              var.toString());
        }
      }
    } catch (ParserException e) {
      getFirstPass().reportParsingException(e);
    }
  }
}
languageTools.program.actionspecUserSpecActiongetParameters

Popular methods of UserSpecAction

  • getName
  • <init>
    Creates a UserSpecAction with name, parameter list, and sets flag whether action should be sent to e
  • addParameter
  • applySubst
  • getFullPreCondition
  • getNegativePostcondition
  • getPositivePostcondition
  • getPrecondition
  • getSignature
  • getSourceInfo
  • isExternal
  • isExternal

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now