This file is ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/new/install.txt UNDER CONSTRUCTION. Last changed Sat Jul 17 01:24:26 BST 1999 For more information on Free Poplog systems see ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/freepoplog.html NOTE: "Poplog" is a trade mark of the University of Sussex. Poplog is no longer marketed by Integral Solutions Ltd. However commercial users interested in professional support may contact ISL. For contact information see http://www.isl.co.uk The following provisional licensing information is based on the XFREE86 licence. 1. Poplog Copyright Poplog code without an explicit copyright is covered by the following copy-right: Copyright (C) 1981-1999 The University of Sussex. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE UNIVERSITY OF SUSSEX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Copyright notices in the Poplog code and documentation files do not restrict use of those files in accord with this notice, as the notices remain solely on account of requirements of the installation software used by the development team. This Poplog distribution is based at the University of Birmingham solely as a service to users. THE UNIVERSITY IF BIRMINGHAM GIVES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE UNIVERSITY OF BIRMINGHAM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ======================================================================= INSTALLING POPLOG ON UNIX SYSTEMS For Poplog Version V15.53 FIRST DRAFT INSTRUCTIONS 13 Jul 1999 Aaron Sloman School of Computer Science The University of Birmingham http://www.cs.bham.ac.uk/~axs/ This is based on a set of notes originally written for Linux Poplog users at the University of Birmingham. I have tried to make this version more generally useful, but may have slipped up. Please report errors or omissions to A.Sloman@cs.bham.ac.uk CONTENTS -- WHAT IS POPLOG? -- GETTING POPLOG -- CREATE A DIRECTORY FOR POPLOG -- SET $usepop - The "root" directory for the current version -- CREATE AND SET $poplocal/local -- Installing Poplog on a Unix system (e.g. Linux, Solaris) -- How to install Poplog -- Preparing to run pop-11 and other poplog languages -- Setting up environment variables -- Installing Poplog on a PC running Windows 95/98 -- First check on installation -- Testing XVED (Not available under Windows) -- Testing other languages Provided with Poplog (on Unix) -- Documentation directories -- Edit your login startup file -- -- Problems?? -- Using Motif or Lesstif -- What is included in Poplog? -- Prerequisites -- Birmingham extensions to Poplog -- Installing Birmingham local extensions -- Making the local files accessible -- Re-linking Poplog to run with motif -- Creating new saved images -- The default system saved images -- WHAT IS POPLOG? ---------------------------------------------------- Poplog is a multi-language interactive software development system including incremental compilers for Pop-11 (the core language), Prolog, Common Lisp and Standard ML. It also includes a powerful, programmable editor VED, with a multi-window version XVed, which is similar in its facilities to Emacs, though some users find it easier to learn to use. VED is programmable in Pop-11. Further information about Poplog and Pop-11 is available from ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/poplog.info.html It was developed originally by Sussex University and was previously a commercial product, sold by Integral Solutions Ltd (who use it in their award-winning data-mining package Clementine). It is now freely available via FTP. Information about availability will be provided in ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/freepoplog.html Version 15.53 is the first free version of Poplog supplied with full system sources. It should be regarded as a "beta" test version, and will be developed and updated from time to time. -- GETTING POPLOG ----------------------------------------------------- Fetch the file for your system from the Poplog distribution directory: ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/new/ (Later there may be mirror sites.) Poplog is distributed in the form of a gzipped tar file. Current versions have names indicating platform and version, like linux1553.tar.gz solaris1553.tar.gz Later a different naming scheme may be used, as more versions become available. These gzipped tar files may be between about 10Mbytes and 18Mbytes depending on the version and whether system sources are included (now the default for new versions of Poplog.) When unpacked Poplog will require more space, of course, about 61 Mbytes for the Solaris version, less for linux. -- CREATE A DIRECTORY FOR POPLOG -------------------------------------- After you have fetched the gzipped tar file you will need to create a directory $usepop for the main poplog system, and a "local" directory $poplocal in which you can place additional packages, etc. Choose a directory in which to install Poplog. On a unix system this might be something like /usr/local/poplog If you create a new directory below that each time you install a new version of poplog, that will make it easier to manage changes of poplog systems, and test out a new version while an old one is still in use. So for poplog V15.53 create a subdirectory called /usr/local/poplog/v15.53 -- SET $usepop - The "root" directory for the current version --------- Set the Unix environment variable "usepop" to refer to the installation directory. E.g. in a C-type shell setenv usepop /usr/local/poplog/v15.53 in other shells usepop=/usr/local/poplog/v15.53 export usepop Henceforth the installation directory will be referred to as $usepop. -- CREATE AND SET $poplocal/local ------------------------------------- It is useful to have a directory in which you can add additional poplog libraries imported from elsewhere or created by you. This could be /usr/local/poplog/local Create it thus: mkdir /usr/local/poplog/local In that case you could do in a C-shell setenv poplocal /usr/local/poplog or other shells: poplocal=/usr/local/poplog export poplocal Then the local directory will be $poplocal/local. In there you can create directories called com, auto, lib, teach and help, etc., mirroring the structure in the main poplog directory. These local extensions can be preserved when you upgrade poplog later. It may be convenient to set $local to be equivalent to $poplocal/local -- Installing Poplog on a Unix system (e.g. Linux, Solaris) ----------- It is assumed that you have copied the tar file, which, will be referred to as poplog.tar.gz although the "poplog" bit will be different for different versions of Poplog. E.g. it may be something like linux1553.tar.gz or solaris1553.tar.gz The directory where the tar file is kept will be referred to as .../ so the tar file will be referred to as .../poplog.tar.gz After setting "usepop", as described above, you can install poplog in the directory you have set to be $usepop, e.g. /usr/local/poplog/v15.53 If you wish to install it somewhere else you can do so, but then all the instructions which follow will have to be changed to use the correct path name for the installation directory. -- How to install Poplog ---------------------------------------------- You should be able to extract the poplog system into your own directory $usepop previously created, as follows # 1. Make that your "current working directory" cd $usepop # 2. Extract the Poplog system from the tar files zcat .../poplog.tar.gz | tar xf - (replace the dots and "poplog.tar.gz" as appropriate). The above could take several seconds to several minutes depending on the speed and size of your computer. It may consume 50 Mbytes of file space on your hard drive or more. (You can later save space if you wish by deleting unwanted sources and saved images.) The above command will unpack the poplog tar file and create the directory $usepop/pop/ e.g. /usr/local/poplog/v15.53/pop If you then check out what is in that directory ls -F $usepop/pop you'll find that it includes directories like these (and maybe more): adm/ doc/ help/ lisp/ plog/ pop/ src/ ved/ com/ extern/ lib/ obj/ pml/ ref/ teach x/ There is an overview of most of the Poplog directory structure in $usepop/pop/doc/sysspec which can be read in the poplog editor VED using the command ENTER doc sysspec That file may be slightly out of date. -- Preparing to run pop-11 and other poplog languages ----------------- The executable images are in the sub-directory pop/pop/ along with some other things. Try cd $usepop ls -l pop/pop This should include the main executable file, basepop11, linked to various files representing names by which poplog can be invoked, e.g. pop11, prolog, clisp, xved, etc. how it starts up will depend on how it was invoked. Normally it will start up saved images which can be found in $usepop/pop/lib/psv e.g. startup.psv The basic poplog and Ved/Xved saved image. This will be run by the pop11 command, which is equivalent to basepop11 +startup xved.psv A version which goes straight into Xved on startup prolog.psv clisp.psv pml.psv Precompiled versions of Prolog, Common Lisp and ML. -- Setting up environment variables ----------------------------------- Before you can run any of Poplog you have to set up various environment variables, as follows If your shell is csh, or tcsh, then do source $usepop/pop/com/poplog Alternatively, using bash or ksh, or sh you can do . $usepop/pop/com/poplog.sh The command sets up several environment variables used by pop-11 and other parts of the poplog system, and extends $PATH You are now ready to run the programs. -- Installing Poplog on a PC running Windows 95/98 -------------------- Fetch the file from the installation directory, by following the link in ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/freepoplog.html Copy the gzipped tar file onto your PC and use the Winzip program to unpack it. There should be ten directories and a README file. DISK1/ ... DISK10/ Look inside DISK1. Run the program SETUP.EXE Then follow instructions including specifying an installation directory. This will put a file README.TXT in the installation directory. You should read that file for further information. -- First check on installation ---------------------------------------- Under Unix try to run this: pop11 On Windows, select Poplog from the Programs menu (accessible via Startup). This should print out something like: Sussex Poplog (Version 15.53 Mon Jul 12 19:45:02 BST 1999) Copyright (c) 1982-1999 University of Sussex. All rights reserved. Setpop : It ends with a colon, the standard Pop-11 prompt. You can type pop-11 commands directly to the prompt. They will be compiled and run. Then you can type more commands, etc. Usually, however, it is more convenient to run Pop-11 from inside an editor, which saves re-typing if you make a mistake. If you get the pop11 startup prompt you can check that everything is fine by computing factorial 10000, by typing in a procedure definition, then a command to run it: ;;; define a factorial function define fact(x); if x == 0 then 1 else x * fact(x-1) endif enddefine; ;;; Test it fact(1000) => The answer is a very big number which takes about 29 lines to print (depending in the width of your screen). You can check that it gets the right answer by computing two factorials and dividing them fact(1000)/fact(999) => which should print out ** 1000 You can leave pop-11 by typing CTRL-D, (or "bye). Test that the pop-11 eliza works, as follows # run pop-11 from the shell pop11 then when you get the colon prompt, type the following to autoload the eliza library program and then run it. eliza(); This will compile the Eliza program, then run it. Instructions will be printed out. Type each assertion on one line, ending with the RETURN key (not the ENTER key). When you have finished with Eliza, type: bye to get back to the Pop-11 prompt. -- Testing XVED (Not available under Windows) ------------------------- XVed is a multi-window version of the Poplog VED editor. If your system includes Motif, XVed will also provide a scroll bar and menus at the top of each window. Leave Pop-11 and type xved & This should run the X version of Ved. If you then type ENTER teach teach you will get an online tutorial on the editor. (There are more up to date tutorial files available from the Birmingham FTP site.) -- Testing other languages Provided with Poplog (on Unix) ------------- To run Poplog prolog, give the command prolog which is equivalent to pop11 +prolog To run Poplog Common Lisp give the command clisp which is equivalent to pop11 +clisp To run Poplog ML give the command pml which is equivalent to pop11 +ml All of these will run a process which includes the editor VED and the Pop-11 system. Online documentation explains how you can make these languages call Pop-11 and vice versa. To build a system that contains more than one language extension you can copy and edit mk* files in the directory $usepop/pop/com/ Some combinations are already there, e.g. mklispplog and mkploglisp which show now to use the existing Prolog image to build a new layered saved image with Common lisp, and how to use the existing Common Lisp image to build a new layered saved image with prolog. -- Documentation directories ------------------------------------------ There is a huge amount of online documentation of varying kinds and formats. $usepop/pop/teach Tutorial introductions to the editor, Pop-11 and AI techniques (Many of the latter are out of date. More up to date versions will be added later.) An overview file is $usepop/pop/teach/teachfiles $usepop/pop/help More terse help files on many aspects of Pop-11 and VED An overview file is $usepop/pop/help/helpfiles People who are used to older versions of Poplog may find it useful to study $usepop/pop/help/news $usepop/pop/help/plognews $usepop/pop/help/lispnews $usepop/pop/help/pmlnews $usepop/pop/ref Extremely full documentation on Poplog, Pop-11, the Poplog virtual machine, VED facilities, the operating system interface, the external language interface, etc. This documentation is mostly written for experts. See the overview file $usepop/pop/ref/reffiles $usepop/pop/doc Some out of date overview files, which may still have some useful information but are likely to be incomplete. E.g. there is a Ved manual and a Userguide. $usepop/pop/x/pop/teach $usepop/pop/x/pop/help $usepop/pop/x/pop/ref Tutorial, summary help, and reference documentation on the Poplog X window interface, including the Poplog widget set. In particular a lot of information about how poplog starts up and how you can tailor it is in $usepop/pop/ref/system REF SYSTEM $usepop/pop/help/initial HELP INITIAL $usepop/pop/x/ved/teach $usepop/pop/x/ved/help $usepop/pop/x/ved/ref Tutorial, summary help, and reference documentation on the X-based version of the Ved editor (including multiple windows, mouse driven interaction, etc.) $usepop/pop/lib/objectclass/teach $usepop/pop/lib/objectclass/help $usepop/pop/lib/objectclass/ref Documentation on the Objectclass system which extends Pop-11 with object oriented programming facilities, much as CLOS extends Common Lisp There is also documentation on the Prolog, Common Lisp, and ML language subsystems. $usepop/pop/plog/teach $usepop/pop/plog/help Prolog documentation $usepop/pop/lisp/help $usepop/pop/lisp/ref Common Lisp documentation $usepop/pop/pml/help Standard ML documentation All of the online documentation is formatted to facilitate reading in VED. There is a package which tailors Emacs for use with Poplog including documentation files. See ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/emacs.tar.gz -- Edit your login startup file --------------------------------------- If the above tests show that pop-11 works, then you could put into your .login file the following lines, so that they are obeyed automatically whenever you log in. setenv usepop /usr/local/poplog/v15.53 #or whatever the version is setenv poplocal /usr/local/poplog setenv local $poplocal/local source $usepop/pop/com/poplog If you don't use .login because you use bash or sh or ksh try usepop=/usr/local/poplog/v15.53 #or whatever the version is poplocal=/usr/local/poplog local=/usr/local/poplog/local export usepop poplocal local . $usepop/pop/com/poplog.sh Optionally you can include setenv poplib ~/Poplib and then put any private poplog libraries of your own, not shared by other users of the same machine in your Poplib directory, e.g. files which configure poplog and the editor, init.p, vedinit.p, init.pl etc. After that you should be able to run poplog whenever you login. Alternatively put those commands into a file called setup.poplog and then run the file before you run poplog. [This startup mechanism will be replaced and improved in later versions of Poplog.] -- -- Problems?? If it doesn't start up at all, or complains about missing files, then you may have an incomplete installation, or you may have given an incorrect command at some point. If the attempt to run poplog does not work, you should record EXACTLY what is printed out, and post a request for help to the comp.lang.pop newsgroup, or pop-forum@cs.bham.ac.uk -- Using Motif or Lesstif --------------------------------------------- On most Unix systems, poplog is linked to use Motif, and you can ignore this section. E.g. motif is included in versions of Poplog for Solaris, Digital Unix, SGI, HP Unix. However, Linux is not normally supplied with motif and poplog is not linked to use it. If you have lesstif or motif and you wish to have the benefit of extra motif-based facilities in Poplog, you will need to re-link Poplog as explained later, to take advantage of the facilities. However, you can run poplog without linking if you don't want to use Motif. You will then not be able to use propsheet, nor will Xved have scroll bars or menus at the top. However, the Birmingham RCLIB package which provides sliders, menus, control panels, etc. will work without motif. It is available from ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/rc.tar.gz If you do try re-linking poplog to use motif, remember that this version of Linux Poplog has not been fully tested with Motif (as far as I know) and if you use Lesstif there may be bugs in Lesstif or incompatibilities between that and the version of Motif for which pop11 was designed. In that case you can restore the original version, e.g by reinstalling Poplog from the ....tar.gz file or by using the newpop command to re-link without motif, as described below. If anyone manages to get it to work with Lesstif, please let me know. -- What is included in Poplog? When everything is working, you will find a system overview file in: $usepop/pop/doc/sysspec You can interrogate this from inside Ved with the command ENTER doc sysspec Please remember that it is at best a guide to the current version of Poplog, and is likely to be out of date. -- Prerequisites ------------------------------------------------------ Poplog Version 15.53 works with Redhat Linux version 5 or 6. I don't know if it works with other versions of linux. If you find that it does please let me know (email A.Sloman@cs.bham.ac.uk) It also works with Solaris (various versions) on Sparc. If you have any problems, please post a message to comp.lang.pop asking for help. -- Birmingham extensions to Poplog ------------------------------------ Local Birmingham extensions to Pop-11 are available for copying by ftp from this directory ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/ That directory has a README file explaining what is in all the sub-directories and gzipped tar files. The main local extensions are all available both in a browsable format and packaged in gzipped tar files: bhamteach.tar.gz many local utilities,teach files, etc. rc.tar.gz rc_graphics extensions, control panels, GUI stuff prb.tar.gz Poprulebase (a very flexible forward chaining condition-action rule-interpreter). sim.tar.gz The sim_agent toolkit. (This uses Objectclass, Poprulebase and RCLIB to produce a toolkit for exploring architectures for interacting intelligent agents.) primerhtml.tar.gz HTML version of the Pop-11 primer (also included in Poplog as $usepop/pop/teach/primer The HTML version has out of date information about poplog distribution, and will later be brought up to date. pattern.tar.gz A small library extending the Pop-11 pattern matcher with the "!" prefix. This makes it possible to use patterns with lexically scoped variables. popvision.tar.gz The popvision library produced by David Young at Sussex. (1997 version. Will be updated). ved_latex.tar.gz Ved extensions for driving latex (including a latex tutorial) vedmail.tar.gz Extensions and improvements to the VED interface for reading and sending mail vedgn.tar.gz A collection of utilities for reading and posting news from inside the VED editor. This completely supersedes the VED_NET library distributed with Poplog. contrib.tar.gz A collection of libraries and documentation contributed at various times. It includes code from various books such as the Gazdar and Mellish books on Natural Language processing and Larry Paulson's book on ML emacs.tar.gz Emacs interface to poplog, by Brian Logan and others Additional files and subdirectories (including the Pop-11 primer in various formats) are described in the README file ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/README -- Installing Birmingham local extensions ----------------------------- If you have not already done so, create a local poplog directory cd /usr/local/poplog mkdir local cd local You can then install other files whose names end in gz E.g. zcat .../bhamteach.tar.gz | tar xf - zcat .../rc.tar.gz | tar xf - etc. where, as before the dots indicate the path preceding the file names where you have installed or mounted the .gz files copied from our system. -- Making the local files accessible ---------------------------------- The default Poplog system assumes that the local directory is installed in $usepop/pop/local This is not a good location, as the $usepop/pop directory may be deleted when you get a new version of Poplog. So you can make that file a link to the actual location thus; cd $usepop/pop chmod u+w . ln -s ../local local chmod u-w . Instead of creating that link, you can change the definition of $poplocal in your .login file, immediately after defining $usepop: setenv poplocal $usepop If you have done all that successfully it will have the following effects: The VED "ENTER teach" command should automatically access the files in $poplocal/local/teach, as well as the system TEACH directories e.g. $usepop/pop/teach The "ENTER help" command will access files in $poplocal/local/help. The files in $poplocal/local/auto will be automatically loaded when needed, as described in HELP AUTOLOAD. The files in $poplocal/local/lib can be compiled using either the "lib" command which always compiles its argument, e.g. lib readpattern or, more commonly the "uses" command, which only compiles if the library has not yet been compiled already, e.g. uses readpattern -- Re-linking Poplog to run with motif -------------------------------- You will have to do this if you have either Motif or Lesstif installed and you want XVED to use them, or you want to use Propsheet. Instructions for re-linking follow. You should do this while you are super-user. In case it goes wrong, make sure that you still have the original poplog.tar.gz file so that you can re-install the original version without motif, as described above. 1. unprotect both $popsys and $usepop/pop/extern/lib, the latter so that libXpw.so can be rebuilt. chmod -R u+w $popsys $usepop/pop/extern/lib 2. Give this command to do the re-linking $popsrc/newpop -link -x=-xm -xpw Other options are described in the HELP NEWPOP file. You can add this to prevent installation in $popsys -noinstall e.g. to see if it works. After re-linking you should be able to run poplog if you have Motif available. -- Creating new saved images ------------------------------------------ If you have successfully installed the files from the Birmingham bhamteachtar diskette you will find that the files in the directory $poplocal/local/com/ include several shell scripts for creating and installing new saved images which already have various local poplog extras pre-compiled. You may be able to work out which ones you need e.g. by reading the files called $poplocal/local/com/mkstartup.nomotif This creates a startup.psv image which already includes objectclass, rc_graphic and various other useful things which are part of the standard pop-11 configuration at Birmingham, though not necessarily elsewhere. $poplocal/local/com/mkall.nomotif This can be used to rebuild a lot of saved images similar to those installed at Birmingham. The best way to proceed may be to make a copy of mkall.nomotif (e.g. call it my.mkall) then edit it to prevent construction of the saved images you don't want. You must include the startup saved image. Then make sure that you have unprotected the $usepop directory using this command: chmod u+w $usepop Run your new file, storing all the output in a log file $poplocal/local/com/my.mkall >! mkall.log It should take a few minutes, depending on the speed of your machine and how many saved images you decide to create. Examine the log file to make sure there are no errors (there may be some warnings, e.g. from compiling common lisp, which you can ignore). At the end you should have a new directory in which the saved images have been built, which you can inspect ls -l $usepop/templocalbin If it has startup.psv and other files which look like the ones you want, then, if you already have a file $usepop/poplocalbin remove or rename it, and make the new one poplocalbin, i.e. mv $usepop/poplocalbin $usepop/oldlocalbin rename old directory if you had one. mv $usepop/templocalbin $usepop/poplocalbin rename new directory make sure everything works ok, e.g. try running pop11, xved, etc. If it all works, get rid of the old directory rm -rf $usepop/oldlocalbin You can later insert new saved images in $usepop/poplocalbin if you wish, by copying files in $poplocal/local/com, such as mkeliza.local and mkclisp.local To find out more about saved images see HELP SYSSAVE, HELP SYSRESTORE, and for full gory details REF SYSTEM. Some of the files use the mkimage library, described in HELP MKIMAGE -- The default system saved images ------------------------------------ NOTE: the saved images which come with the poplog system initially are in $usepop/pop/lib/psv/ These give you a more "primitive" version of pop-11 than the one we use at Birmingham (e.g. it doesn't include rc_graphic and objectclass precompiled). If you have created new versions in $usepop/poplocalbin and you wish to get rid of the "system" versions to save space do this: chmod -R u+w $usepop/pop/lib/psv # make the directory and the files writeable by the owner rm $usepop/pop/lib/psv/* # remove the files --- ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/new/install.txt --- Copyright University of Birmingham 1999. All rights reserved. ------