Class ProjogConsole

java.lang.Object
org.projog.tools.ProjogConsole

public class ProjogConsole extends Object
Command line interface to Prolog.

Provides a mechanism for users to interact with Projog via a read-evaluate-print loop (REPL).

  • Field Details

  • Constructor Details

  • Method Details

    • run

      void run(List<String> startupScriptFilenames) throws IOException
      Throws:
      IOException
    • printPrompt

      private void printPrompt()
    • isNotEmpty

      private static boolean isNotEmpty(String input)
    • consultScripts

      private void consultScripts(List<String> scriptFilenames)
    • consultScript

      private void consultScript(String startupScriptName)
    • parseAndExecute

      private void parseAndExecute(String inputSyntax)
    • shouldContinue

      private boolean shouldContinue()
    • processThrowable

      private void processThrowable(Throwable e)
    • evaluateOnce

      private boolean evaluateOnce(QueryResult r, Set<String> variableIds)
      Returns true if QueryResult can be re-tried
    • printVariableAssignments

      private void printVariableAssignments(QueryResult r, Set<String> variableIds)
    • printOutcome

      private void printOutcome(boolean success, long timing)
    • main

      public static void main(String[] args) throws IOException
      Throws:
      IOException