main

expect fun main(args: Array<String>)

Command-line entry point of the :full module -- the "batteries-included" umbrella artifact that depends on every other 2P-Kt module (except the test-support and examples ones -- see this module's build.gradle.kts), so an embedder can pull in the whole framework through a single dependency instead of picking individual modules one by one.

Delegates, per platform, to it.unibo.tuprolog.ui.repl's own main function (see the actual implementations of this function), which builds it.unibo.tuprolog.ui.repl.TuPrologCmd with its solve subcommand and hands it args -- i.e. this is the very same REPL CLI shipped standalone by the :repl module, just reachable from a project that only depends on :full. See TuPrologCmd's own KDoc for the supported options and subcommands.

The @file:JvmName("PrologCLI") file annotation (present on both this file and its JVM actual counterpart) names the JVM class backing this file PrologCLI instead of the compiler-default PrologCLIKt, so it can be invoked directly under that name, e.g. java -cp <classpath> it.unibo.tuprolog.PrologCLI [OPTIONS] [solve QUERY [-n N]].

Parameters

args

command-line arguments, forwarded verbatim to TuPrologCmd's clikt-based parser.

actual fun main(args: Array<String>)

JS implementation: delegates to it.unibo.tuprolog.ui.repl's own JS entry point (see its Repl.kt), which builds it.unibo.tuprolog.ui.repl.TuPrologCmd with its solve subcommand and hands it args -- same caveat as the :repl module's own JS build: -T/--theory support is not functional yet on this platform (see it.unibo.tuprolog.ui.repl.isReadableFile/loadTheoryFromFile).

Unlike the JVM target, this module's JS target is built as a library rather than an executable (see binaries.library() in this module's build.gradle.kts), so main is not invoked automatically on load -- a JS/Node consumer has to call it explicitly, passing its own argument array.

actual fun main(args: Array<String>)

JVM implementation: delegates to it.unibo.tuprolog.ui.repl's own JVM entry point (see its Main.kt), which builds it.unibo.tuprolog.ui.repl.TuPrologCmd with its solve subcommand and hands it args -- i.e. running this is equivalent to running the standalone :repl module's own JVM entry point.