kForth Page
About
Copyright
License
Disclaimer
Email Us

Downloads
User's Guides
Forth Programs
Rev History

Related Links
Forth 2012
DPANS94
FSL
XYPLOT
Screenshot of the output of the Forth program epr-sim.4th to simulate the Einstein-Podolsky-Rosen-Bohm experiment. It consists of an emitter (shown in blue near the center-bottom of the image) which emits a pair of entangled spin-1/2 particles in opposite directions, towards the left and right detectors (brown). Each detector is a Stern-Gerlach spin analyzer, which measures the component of spin along the measurement axis of the analyzer. The axis of the analyzer may be set to one of three angles: 1 (0), 2 (60), or 3 (120). The running results of the simulation (2595 events) are shown by the tape recorder output for each detector. Each measurement results in U (spin-up) or D (spin-down) along the axis of the analyzer. Running statistics for all pairs of left and right analyzer measurements are also shown. The two-particle quantum state is represented by four complex numbers, C1 -- C4, which are the probability amplitudes of the state. Full resolution image
  
  : draw-experiment ( -- )
      black background
      text_bold
      page
      leftDet   draw
      rightDet  draw
      EM        draw
      leftTape  dup clear-area draw
      rightTape dup clear-area draw
      draw-histogram-labels
      rightTape recordCount @ IF
        show-jp  show-histograms
        show-correlation
      THEN
      ConfigInfo dup clear-area draw
      at-below-experiment ;
  
Forth source definition of the word draw-experiment to draw the terminal display shown in the image above.

kForth is a Forth environment and an implementation of the Forth language, licensed under the GNU GPL version 3 or later. Source archives and git repositories are available for 32-bit x86 Linux and Windows, and for 64-bit x86_64 Linux systems.

On Linux systems, executable(s) must be built from source using the freely available GNU development tools (assembler, C and C++ compilers). Both 32-bit and 64-bit executables may be used on x86_64 Linux systems.

For Windows systems, the archive or repository includes a pre-built 32-bit executable (kforth.exe).

kForth build and installation instructions are given in the respective user's manuals, located within the doc/ folder. The user's manuals also include a gentle introduction to programming in the Forth language. A large collection of Forth programs and libraries of Forth words are included within the forth-src/ folder of the package.

kForth is not a toy implementation of Forth. It has been used by its principal author for a number of applications, including data acquisition and control, and for performing numerically intensive physics calculations. Nearly all of the author's publications over the last 25 years have included results obtained using kForth.