Skip to content

Name code for programming with arbitrary names


Apache-2.0, Unknown licenses found

Licenses found

Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit



5 Commits

Repository files navigation

Namec -- name code for programming with arbitrary names

      Version 2018.1 2018/09/14 1.0.0
        namec --help; namec --syntax

      Available from:
        <> with namec.exe
        <> (

  Name code is for programming with arbitrary names.  Name code has a flexible syntax 
  with trivial semantics.  Everything is a name.  Its hello world program is a test 
  of  Its traditional hello world is:

     say hello->
     hello world=
  The distribution includes programs for regular expressions, three Turing machines, 
  a name machine, and various tests.  As well as executing name code, Namec compiles
  name code for or assembles name code for Masm32.  
  Currently, name code is not practical.  It does not support integers, floats,
  strings, booleans, expressions, parameters, types, or external programs.  The 
  assembly code is wasteful of memory.  It ignores registers and the stack.

  Despite these limitations, name code programs can read like pseudocode.

  1) Write name code to implement th_NEW without using th_INC (
  2) With (1), start the name code clock.  It prints th_NEW values indefinitely. 
     Be careful of memory.  The clock needs to run for at least a month.
  3) Write name code for 32-bit arithmetic.
  4) Write a verifier for well-formed name code.
Environment requirements

  Namec is a C++ program based on the Qt framework (  
  The distribution includes a Windows executable for Intel hosts, compiled
  with Visual C++ 2017.  The generated assembly code requires Masm32 for 
  Windows installed in /masm32/ (  Define environment 
  variable $QTDIR.  Review PlatformToolset in *.vcxproj. 
  Namec is copyrighted software.  Please read COPYING.txt, LICENSE.txt,
  and REGISTER.txt before using or distributing Namec.

To cite Namec, please use

  Barber, C.B., "Name code for understandable programs,", 2018.

Distributed files

  README.txt                // An introduction to Namec
  COPYING.txt               // Namec copyright notice 
  LICENSE.txt               // Apache License, Version 2.0
  REGISTER.txt              // Namec registration                  // Shell program for maintaining Namec
  .gitignore                // git ignore file

  bin/namec.exe             // Windows executable for Intel hosts
  bin/turing-sample.exe     // Turing machine for 5-state busy beaver
  bin/Qt5Core.dll           // Qt dll for namec.exe
  build/namec/namec.vcxproj // A DevStudio project for namec

  doc/namec-help.txt        // Namec arguments, examples, and name code syntax
  doc/pseudocode.rtf        // An introduction to name code with programs

  src/Changes-namec.txt     // Change history for Namec
  src/thid-app.pri          // Include file for Qt projects 
  src/thid-warn.pri         // Include warnings for Qt projects

  src/nameasm/turing-sample.asm // Assembly code for bin/turing-sample.exe
  src/nameasm/nameasm.vcxproj // A DevStudio project for nameasm and /masm32
  src/nameasm/NameAsmRun.asm // Assembly runtime for Masm32 name code
  src/nameasm/ // Symbols for name.asm and NameAsmRun.asm

  src/namec/       // Qt project file for Namec
  src/namec/namec.cpp       // The Namec program
  src/namec/RoadUtility_mini.* // Utility functions for Namec

  src/road/RoadArg64.*      // 64-bit args for error reporting
  src/road/RoadError.*      // Report an error 
  src/road/RoadEvent.*      // An event (a call, log, warning, or error)
  src/road/RoadEventPool.*  // Event history
  src/road/RoadEventStack.* // Event stack
  src/road/RoadLogEvent.*   // A logged event in RoadEventPool

  src/thidcode/ThAsmCode.*  // Write Masm32 code for a ThCode program
  src/thidcode/ThCode.*     // Generate a byte code program from name code
  src/thidcode/ThCoreCode.* // Compile core code from a ThCode program
  src/thidcode/ThExecuteCode.*  // Execute a ThCode program

  src/thidcore/ThCall.*     // Log a call event to RoadEventPool and stderr
  src/thidcore/ThError.*    // Throw an error.  Log to RoadEventPool and stderr
  src/thidcore/ThLog.*      // Log an event to RoadEventPool and stderr
  src/thidcore/ThWarn.*     // Log a warning to RoadEventPool and stderr
  src/thidcore/thesa.h      // Precompiled header file
  src/thidcore/tnamespace.h // Namespace defined symbols
  src/thidcore/tglobal.h    // Globally defined macros

  test/        // hello world test program
  test/   // hello world test program for
  test/ // hello world for compiling

  test/        // Test print instructions
  test/   // Test core instructions
  test/ // Test syntax errors
  test/ // Test literal names
  test/ // Test name.field syntax
  test/    // Test try instructions
  test/      // a name code machine for core code (*
  test/        //  a regular expression recognizer
  test/       //  Tests for
  test/    // a universal turing machine
  test/    // Sample turing machines from


  C. Bradford Barber
  If you find Namec useful, please let me know.