Skip to content

Running and Deployment

Jans George Rautenbach edited this page Jul 3, 2021 · 7 revisions

CLI Compiler

Built on every push. Download artifact from the releases section or the relevant Github Action (for dev builds). Run so:

java -jar logic-compiler.jar [input] [output...]

Where [input] is the input .logic file. Optionally, further arguments are output file names - 1 per cmd in the input file. For example, given the input file:

# input.logic
prop var1 -> var2
cmd translate to reserved word variant
cmd convert to DIMACS CNF

The following command would be appropriate:

java -jar logic-compiler.jar input.logic translation.logic dimacs.cnf

Note that at this stage in development cmd's are completely independent of each other and produce independent files. SAT solving for example requires a DIMACS CNF file, but this is handled internally. There is no need to explicitly specify a convert to DIMACS CNF command.

If no output file names are specified, the output is printed to STDOUT, with each cmd's output separated by a crude ==== line.

Web

Deployed here: http://cair-gpu.cs.uct.ac.za/logic (Note: only accessible within the UCT network)

Docker

To run the website anywhere with minimal hassle, you can use docker. Registry link.

docker run -d -p [port]:8003 koellewe/logic-app

Artifact

Also built on every push. Download the artifact from the releases section or the relevant Github Action (for dev builds). The zip contains the following:

  • logic-webserver.jar: Runnable jar for serving the editor over the web.
  • src/: Directory containing the files to be served.

To run the webserver, ensure the logic-compiler.jar and its dependencies, like SAT solver binaries, are in the same dir, then:

java -jar logic-webserver.jar [port]

Will listen for HTTP connections on all interfaces (0.0.0.0) on the port you specify. Default is 8003.

Clone this wiki locally