# Propositional LogicMan (PLMan) -- a Propositional Logic Shell/Interpreter

Author: T. Hoshi

## What is Propositional LogicMan (PLMan)?

PLMan, or Propositional LogicMan, is a user-friendly and powerful propositional logic (sometimes called sentential logic or propositional calculus) sentence shell/interpreter written in Java, capable of handling many existing propositional systems of propositional logic, especially the important ones.

PLMan can:

• Evaluate formulas under many logical systems
• Compare each logic and decide the best system which models a certain environment of your consideration.
• Tell if the given formula is grammatically correct (well-formed) or not
• Translate a given well-formed formula (or wff) into English
• Write formulas in a visually pleasant manner with standard logical connectives and Greek characters (both uppercase and lowercase) in Unicode
• Display truth tables of a given wff
• Determine the satisfiability, or validity, of a given wff
• Tell if a set of wffs entails a wff
• Assign and refer to the description of each propositional atom
• Build his/her own knowledge system (or even Axiomatic system)

### A List of Logics being Implemented on PLMan

A list of logics being implemented thus far is shown below:

• Classical two-valued propositional logic (CPL)
• Kleene three-valued logic (K3)
• \Lukasiewicz three-valued logic (L3)
• Logic of paradox (LP)
• R-Mingle three valued logic (RM3)
• A System of Fuzzy logic (L)
• \Lukasiewicz' continuum-valued logic (LAleph)
• First degree entailment as a four-valued logic (FDE)

### Requirement

• JVM version 1.4 or higher. Otherwise, it'll run on Linux, Unix, Windows, Palm OS, etc.
• ## PLMan Distribution and User's Manual

Older versions of PLMan can be found here.

## Installation

#### Linux or Unix

1. Unzip the downloaded PLMan archive by some zip utility.
2. There are two environment variables to be set in order to obtain PLMan’s full functionality: “PLMAN_PATH” and “PLMAN_SCRIPT_PATH”.

PLMAN_PATH is the directory under which plman can be found. If, for example, you unzipped PLMan archive under “/home/user/app/” directory, then “/home/user/app/plman” would be value that has to be set.

PLMAN_SCRIPT_PATH is the directory under which plman script files reside. This path is used by “:inputFile” command in interactive mode (c.f. “:inputFile” subsection under chapter “Command”). If this environment variable is set, PLMan will look for the file specified as an argument to :inputFile command under and only under the directory.

3. Once these two environment variables are set, go under “\$PLMAN_PATH/bin” and copy “plman” directory to one of the directories where your OS looks for commands to execute (for example, “/home/user/bin”, “/usr/local/bin”, etc.).
4. Finally, in order to execute PLMan, type:
 plman

at your favorite command shell.

Another way to execute plman is simply to go under the plman path and type:

 java -classpath lib/plman.jar:lib/ant.jar \          PropositionalLogicParser

or

 java -classpath lib/plman.jar:lib/ant.jar \          PropositionalLogicParser

#### Windows

1. Unzip downloaded PLMan archive by some zip utility.
2. There are two environment variables to be set in order to obtain PLMan’s full functionality: “PLMAN_PATH” and “PLMAN_SCRIPT_PATH”.

PLMAN_PATH is the address of the folder under which plman can be found. If, for example, you unzipped PLMan archive under “C:\” folder, then “C:\plman” would be value that has to be set; similarly, if you unzipped PLMan archive under “C:\Documents and Settings\Administrator” but moved newly created “plman” folder to “C:\Program Files” folder, then “C:\Program Files\plman” is the correct value to be set to PLMAN_PATH.

PLMAN_SCRIPT_PATH is the address of the folder under which plman script files reside. This path is used by “:inputFile” command in interactive mode. If this environment variable is set, PLMan will look for the file specified by an argument under and only under the folder.

Note: If you who don’t know how to set those values, see section “Setting Environment Variables.”

3. Go under %PLMAN_PATH and then under ‘bin\’ folder. Copy ‘plman.bat’ inside the folder to either ‘C:\WINNT’ or ‘C:\Windows’ folder (the existence of either of which depends on a type of Windows used by the user).
4. Restart your computer.
5. Open a command prompt and type:
 plman

Another way to execute plman is simply to go under the plman path and type:

 java -classpath lib/plman.jar:lib/ant.jar \          PropositionalLogicParser

or

 java -classpath lib/plman.jar:lib/ant.jar \          PropositionalLogicParser

#### Setting Environment Variables

The ways of setting values to environment variables differ from one operating system, and one environment, to another. In this section, I will present several ways of doing so in several environments, taking environment variable ‘PLMAN_SCRIPT_PATH’ as our example.

Bash shell On the shell, type something like

 export PLMAN_SCRIPT_PATH="/path/to/PLMan/script/files"

Example:

 export PLMAN_SCRIPT_PATH="/home/user_dir/plman/script"

Windows 9x Run “cmd.exe” (command prompt). At the prompt, type something like:

 C:\>set PLMAN_SCRIPT_PATH=C:\path\to\PLMan\script\files

Example:

 C:\>set PLMAN_SCRIPT_PATH=C:\plman\script

You could add your exact input line to AUTOEXEC.BAT if you want the variable to be set whenever you start your OS.

Windows 2000 (or XP) Either you follow the same procedure for Windows 9x, or you can follow the following instruction: Open the System icon in the the Control Panel. Under the Advanced tab, there is a button labeled “Environment Variables”. Click on the label, and then add PLMAN_SCRIPT_PATH and its correct value to the system and then reboot your system. The procedure should be similar for XP users.

Eshell (Emacs Shell), csh, and tcsh On the shell prompt, type:

 setenv PLMAN_SCRIPT_PATH "/path/to/PLMan/script/files"

GPL

### Comments

Please email me any of your comments ( I'd love to hear your experience with PLMan ). My email address is: th279 @ cornell .. edu (remove whitespaces and a '.')