Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## lp.trans
Class EvolpSolver

    java.lang.Object
      lp.trans.Solver<EvolutionStableModel>
          lp.trans.EvolpSolver

    public class EvolpSolver

extends Solver<EvolutionStableModel>

A class that computes evolution stable models of an evoluving logic program given its transformational equivalent.

Version:
  1.0.0
Author:
  Martin Slota

Nested Class Summary
`private static class` | `EvolpSolver.Decoder` A filtering reader that decodes logic programming constructs previously encoded by `LpEncoder`.
`private class` | `EvolpSolver.TransEvolpParser` Special parser that recognizes the indexation of atoms in the normal logic program that was constructed by the transformation from an evolving logic program.

Field Summary
`private int` | `modelLength` Contains the length of the resulting evolution stable model.
`private EvolpSolver.TransEvolpParser` | `parser` Parser used to convert the string representation of a model into object representations of the atoms in the model.

Constructor Summary
`EvolpSolver()` Creates a new instance of `EvolpSolver`.
`EvolpSolver(LparseWrapper lparseWrapper, SmodelsWrapper smodelsWrapper)` Creates a new instance of `EvolpSolver`.

Method Summary
`protected EvolutionStableModel` | `parseModel(String modelString)` Parses `modelString` and returns the model that it represents.
`void` | `setModelLength(int modelLength)` Sets the desired length of computed evolution stable models.

Methods inherited from class lp.trans.Solver
`getModelCount, getNextModelString, setLparsePath, setModelLimit, setSmodelsPath, solve`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### parser

    private final EvolpSolver.TransEvolpParser parser

  Parser used to convert the string representation of a model into object representations of the atoms in the model.

### modelLength

    private int modelLength

  Contains the length of the resulting evolution stable model.

Constructor Detail

### EvolpSolver

    public EvolpSolver()

  Creates a new instance of `EvolpSolver`. It will also create new instances of `LparseWrapper` and `SmodelsWrapper`. They are used them to compute the stable models of transformational equivalents of evolving logic programs passed in through the `Solver.solve(LogicProgram, Consumer)` method.

### EvolpSolver

    public EvolpSolver(LparseWrapper lparseWrapper,
                       SmodelsWrapper smodelsWrapper)

  Creates a new instance of `EvolpSolver`. It will use the given instances of `LparseWrapper` and `SmodelsWrapper` classes and use them to compute the stable models of transformational equivalents of evolving logic programs passed in through the `Solver.solve(LogicProgram, Consumer)` method.

  Parameters:
    `lparseWrapper` - the object used to execute lparse
    `smodelsWrapper` - the object used to execute smodels

Method Detail

### setModelLength

    public void setModelLength(int modelLength)

  Sets the desired length of computed evolution stable models.

### parseModel

    protected EvolutionStableModel parseModel(String modelString)

  Parses `modelString` and returns the model that it represents.

  Specified by:
    `parseModel` in class `Solver<EvolutionStableModel>`
  Parameters:
    `modelString` - a string representation of a model returned by smodels
  Returns:
    the object representation of the model

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD