Difference between revisions of "Visual Prolog Demo Examples"

From wiki.visual-prolog.com

m (Thomas Linder Puls moved page Ide/Visual Prolog Examples to Visual Prolog Examples without leaving a redirect: Major article)
(update)
Line 1: Line 1:
{{ideNavbar|IDE Projects}}
{{ideNavbar|IDE Projects}}


In the '''bin''' subdirectory you can find the '''SetupExamples.msi''' setup program file with which you can install Visual Prolog examples. The default subdirectory for examples is '''"Visual Prolog <version> Examples"'''. In the '''SetupExamples.msi''' program you can set it as subdirectory of your main Visual Prolog directory or somewhere else.
You can download the latest Visual Prolog [https://www.vusual-prolog.com/link/demo.php demo projects].


=== Visual Prolog Personal Edition Examples ===
Notice that some demo programs may require the Commercial Edition.  The build system will inform you if that is the case.


If you a newer Commercial Editoion you license file will contain a link to the demo programs correcponding to your version.
For the Personal Edition you can only obtain the "current" version of demos, but you can also obtain the "current" version of the Personal Edition".  Older versions of the Personal Edition can be used freely, but is not otherwise supported.
In older versions of Visual Prolog the demo projects was in the installation and could be installed from the menu entry "Help -> Install Examples ..."
<div style="clear:both"></div>
=== Visual Prolog Demo Examples ===


{|{{prettytable}}
{|{{prettytable}}
|-
| '''_BeginnersGuide/'''
| This directory contains updated versions of the examples in the old book [[A Beginners Guide to Visual Prolog]].
|-
| '''_tutorial/'''
| This directory contains examples corresponding to the main section of the [[:Category:Tutorials|Tutorials]].
|-
|-
| '''animationControlDemo'''
| '''animationControlDemo'''
|
| This project uses the <vp>animationControl</vp> (this control is not frequently used anymore).
|-
|-
| '''askDialogDemo'''
| '''askDialogDemo'''
| This program demonstrates how to program dialogs that ask the user for something and return an answer.
| This project use a modal dialog to ask the user a question.
|-  
|-
| '''BackgroundIntelligentTransferService'''
| This project uses Windows Background Intelligent Transfer Service (BITS).
|-
| '''balloonTipsDemo'''
| This project uses balloon tips popping up as notifications Windows.
|-
| '''bgDemo'''
| This project runs several background jobs in separate threads.
|-
| '''buttonDemo'''
| '''buttonDemo'''
| This program demonstrates how to handle OK and Cancel buttons, how to handle default buttons, how to handle button responders
| This program demonstrates how to handle OK and Cancel buttons, how to handle default buttons, how to handle button responders
|-
| '''diskUsage'''
| This example demonstrates usage of the PFC fileSystem package to get information about files in different specified directories. The PFC VPI/vpiTreeView package is used as a GUI interface end.
|-
|-
| '''editor'''
| '''callProcess'''
| This example demonstrates how to open editor and save edited text.
| The project invokes an external process and interact with the standard output and standard input of it.
|-
|-
| '''formWindowDemo'''
| '''cmdLineDemo'''
| This program demonstrates a simple form and how a new form can be created dynamically.
| This project uses the <vp>commandLineParser</vp> with several options.
|-
|-
| '''GDIplus'''
| '''com'''
| The examples demonstrates drawing pictures using GDI .
| This directory contains projects that illustrates how to use a COM component and how to implement one.
|-
|-
| '''genericsExample'''
| '''direct2DDemo'''
|  
| This project compare GDI+ graphics to "plain" GDI graphics.
|-
|-
| '''GUIDemo'''
| '''dll'''
| This example demonstrates how to manipulate with dialogs and controls in conventional GUI applications. It also demonstrates difference between class and object facts.
| This directory contains various projects illustrating the use of DLL.
|-
|-
| '''listDemo'''
| '''dockingDemo'''
| This program demonstrates how to handle list button, list edit and list control.
| This project iullustrates how to use "docking" to define the layout of a dialog.
|-
|-
| '''listViewDemo'''
| '''dragDropTargetOle'''
| This example demonstrates how you can create dialogs with '''vpiListView''' controls using the PFC VPI/vpiListView package.
| This project is a "drop target"
|-
|-
| '''LZDecompression'''
| '''dragNdropDemo'''
|  
| This project illustrates the use of drag and drop.
|-
|-
| '''mdiWin'''
| '''editor'''
| This MDI mode example demonstrates how to change the standard "Windows" submenu items with user-defined items.
| This project demonstrates how to use the scintilla editor in a program.
|-
|-
| '''MultiThreadDemo'''
| '''formWindowDemo'''
| This example demonstrates how to create the multi-thread application and handle interactions between threads. In the example, each thread produces the results in the single (common for all threads) "queue", and the primary thread reads them one by one and displays on the screen.
| This project demonstrates the use of forms.
|-
|-
| '''pictureDraw'''
| '''GDI+Example'''
| This example demonstrates how to draw pictures using the GdiPlusX.lib containing some graphical primitives. The example declares the '''gdiPlus''' package. The package maintains drawing pictures using the '''GdiPlusX.lib''' graphical primitives. The '''pictWin''' package contains invocations of drawing predicates for BMP and JPG files.
| This project illustrates various GDI+ features.
|-
|-
| style="padding-right: 10px; padding-left: 10px" |
| '''genericsExample'''
'''Pie'''
| This project demostrates how to define and work with generic domains.
| style="padding-right: 10px; padding-left: 10px" |
This example demonstrates a GUI Prolog Inference Engine (PIE) interpreter program. It uses a standard Prolog syntax (K&amp;M) and releases the most popular set of predicates.
|-
|-
| '''pieDemo'''
| '''guiDemo'''
|  
| This project illustrates how to work with GUI.
|-
|-
| '''prologSourceBrowser'''
| '''jsonWebToken'''
| This is an example of using such pfc\gui controls as treeViewControl, listViewControl and editorControl.
| This project demonstrates how to create and decompose JSON web tokens (jwt).
|-
|-
| '''radioButtonDemo'''
| '''listDemo'''
| This program demonstrates how to use single radio button group, multiple radio button groups or how to use check boxes.
| This project illustrates various operations on lists.
|-
|-
| '''SandClocks'''
| '''listViewDemo'''
| The example demonstrates: How to program a simple enumeration of possibilities algorithm to solve the goal: "There are several sand clocks. How can we measure a given time interval?"
| This project uses the <vp>listViewControl</vp>.
|-
|-
| '''StreamDemo'''
| '''logDemo'''
| The example demonstrates Visual Prolog streams: <vp>outputStream_string</vp>, <vp>outputStream_file</vp>, <vp>console::getConsoleOutputStream</vp>. It also illustrates that facts databases can be written to any outputStream.
| This project demonstrates the use of the <vp>log</vp> tool.
|-
|-
| '''Sudoku'''
| '''logDemoPE'''
| A currently very popular logical Sudoku puzzle is used as an example. We show how such a problem can be solved using constraint programming and explain a simple approach to finite domains constraint solving. Furthermore, we show how to build an interactive GUI that visualizes the workings of the constraint solver.
| This project demonstrates the use of the <vp>log</vp> tool in a Personal Edition projectl.
|-
|-
| '''tabControlDemo'''
| '''masterSlave'''
| This program demonstrates how to handle tab control.
| This directory contains projects that utilizes slave process from a master process.
|-
|-
| '''toolTipDemo'''
| '''MSXML_Example'''
| Example demonstrates most aspects and styles of tooltips.
| This project uses the MSXML component to load an xml file which is visualized in a tree control.
|-
|-
| '''validationDemo'''
| '''MultiThreadDemo'''
| This program demonstrates how to use validation. Validation is usually a check, which is performed on pressing OK button. Such check makes sure that all necessary controls with input values contains valid values.
| In the example several threads produces results in the single (common for all threads) "queue", and the primary thread reads them one by one and displays on the screen.
|-
|-
| style="padding-right: 10px; padding-left: 10px" |
| '''neuralNet'''
'''WatchDir'''
| This project builds a pyramid shaped neural network. (Modern neural networks will use vector/matrix/tensor operations).
|  
|}
 
=== Visual Prolog Commercial Edition Examples ===
 
{|{{prettytable}}
|-
|-
| '''balloonTipsDemo'''
| '''OdbcDemo'''
|
| This project demonstrated the use of ODBC (in a GUI program).
|-
|-
| '''bgDemo'''
| '''pictureDraw'''
|
| This project draws a picture using GDI+ (<vp>gdiPlus</vp>).
|-
|-
| '''BITS Example'''
| '''pie'''
|
| PIE is a Prolog Inference Engine which implements an ISO Prolog like interpreter.
|-
|-
|'''CallProcess'''
| '''pieDemo'''
| An example of an external process invocation.
| This project uses the <vp>pie</vp> (Prolog Inference Engine) as a scripting language in the project.
|-
|-
| '''CGI'''
| '''progress'''
| A CGI version of the Towers of Hanoi puzzle.
| This project uses the <vp>progressControl</vp> to illustrate progress in a program.
|-
|-
| '''Com'''
| '''prologSourceBrowser'''
| These examples illustrate how COM components can be created by Visual Prolog and how COM components can be used from Visual Prolog program.
| This project illustrates the use of several types of GUI controls in a dialog that can browse in files in a directory.
|-
|-
| '''DDE'''
| '''radioButtonDemo'''
| This directory contains examples demonstrating Windows DDE interprocess communications. In the '''Server''' and '''Client''' subdirectories there are examples of a DDE server and a DDE client applications. The DDE client initiates and controls A communication with the DDE server. In the '''Office''' subdirectory there is an example of a DDE client applications, which can communicate with Microsoft Office programs. (With the MS Word, for example.) All programs use the '''vpiDDE''' class from PFC VPI package.
| This project demonstrates how to use single radio button group, multiple radio button groups or how to use check boxes.
|-
|-
| '''Dll'''
| '''ribbonDemo'''
| The examples illustrates how to create and use Prolog DLLs.
| This demo project illustrates how to develop applications using the Ribbon and Command packages of pfc/gui.
|-
|-
| '''dockingDemo'''
| '''ribbonMdiDemo'''
|
| This demo project illustrates use the ribbonControl in an MDI (Multiple Document Interface) program.
|-
|-
| '''dragNdropDemo'''
| '''sandClocks'''
| This project demonstrates how to use the pfc/gui/dragNdrop package for application-wide drag-and-drop support.
| This project can solve a "sand clock" puzles.
|-
|-
| '''ESTA'''
| '''simpleOdbc'''
| Expert System Shell.
| This project illustrates the use of ODBC in a command line program.
|-
|-
| '''gridControlDemo'''
| '''socketAsync'''
| This program contains an example of Grid Control and demonstrates how to use it.
| This directory contains a socket server and a corresponding client, both working asynchronously using suspending predicates.
|-
|-
| '''GridForm'''
| '''streamDemo'''
| This example demonstrates how to can create grid controls.
| This project illustrates the use of streams.
|-
|-
| '''isApiDemo'''
| '''sudoku'''
| The example demonstrates creating an ISAPI DLL.
| This project can solve soduko's using a constratint programming thechnique.
|-
|-
| '''MSXML Example'''
| '''tabControlDemo'''
|  
| This project uses the <vp>tabControl</vp>.
|-
|-
| '''OdbcDemo'''
| '''tail'''
| This rather complex example demonstrates Visual Prolog ODBC connections. This is a GUI application providing several different complex functions. It uses the PFC ODBC package.
| This project can follow changes to a text/log file.
|-
|-
| '''Parser Generator'''
| '''toolTipDemo'''
|
| This project illustrates the use of tooltips.
|-
|-
| '''ProgressBarDemo'''
| '''toyIDE'''
|
| This directory contains several projecs that illustrates how a complex application can be divided into several DLL's.
|-
|-
| '''ribbonDemo'''
| '''treeControlDemo'''
| This demo project illustrates how to develop applications using the Ribbon and Command packages of pfc/gui.
| This project uses the <vp>treeControl</vp>
|-
|-
| '''shellDDEdemo'''
| '''useSyntaxDemo'''
| This project demonstrates how to easily integrate Visual Prolog with Windows Shell (Explorer).
| This project uses the Visual Prolog parser to parse source files and then extracts literals from the syntax trees.
|-
|-
| '''simpleOdbc'''
| '''validationDemo'''
| This is an extremely simple example (comparing with the complex '''OdbcDemo''') also demonstrating A ODBC connection. This is console application, which can open only the supplied '''odbc.mdb''' database and providing minimal functions. It uses the PFC ODBC package.
| This project illustrates how to use control and dialog validation to validate user input in a dialog.
|-
|-
| '''toolboxDemo'''
| '''vipLalrGen'''
|
| This project is the source code of the Visual Prolog LALR parser generator.
|-
|-
| '''toyIDE'''
| '''vipPP'''
|  
| This project is the source code of the <vp>vipPP</vp> program that can parse and pretty print Visual Prolog source code.
|-
| '''treeControlDemo'''
|-
|-
| '''useVipInDotNet'''
| '''WatchDir'''
| This example shows how to create and use Visual Prolog DLLs from Visual Basic applications under Dot Net. The example supplies sources for both Visual Prolog and Visual Basic projects.
| This project uses <vp>watchDir</vp> to monitor changes in a directory.
|-
|-
| '''WebBrowser'''
| '''watchDirGui'''
| This example demonstrates how you can easy program full functioning WEB Browser in Visual Prolog. The example uses Microsoft ActiveX WebBrowser control.
| This project uses <vp>watchDir</vp> to monitor changes in a directory (in a GUI program).
|-
|-
| '''workspaceDemo'''
| '''webService'''
|  
| This directory contains a webServiceDemo project with a HTML test page and a corresponding Visual Prolog client program.
|-
|-
| '''xmlLiteDemo'''
| '''webView2Demo'''
|  
| This project illustrates the usage of the <vp>webView2</vp> control (Edge browser).
|}
|}

Revision as of 14:30, 16 September 2024

IDE

You can download the latest Visual Prolog demo projects.

Notice that some demo programs may require the Commercial Edition. The build system will inform you if that is the case.

If you a newer Commercial Editoion you license file will contain a link to the demo programs correcponding to your version.

For the Personal Edition you can only obtain the "current" version of demos, but you can also obtain the "current" version of the Personal Edition". Older versions of the Personal Edition can be used freely, but is not otherwise supported.

In older versions of Visual Prolog the demo projects was in the installation and could be installed from the menu entry "Help -> Install Examples ..."

Visual Prolog Demo Examples

_BeginnersGuide/ This directory contains updated versions of the examples in the old book A Beginners Guide to Visual Prolog.
_tutorial/ This directory contains examples corresponding to the main section of the Tutorials.
animationControlDemo This project uses the animationControl (this control is not frequently used anymore).
askDialogDemo This project use a modal dialog to ask the user a question.
BackgroundIntelligentTransferService This project uses Windows Background Intelligent Transfer Service (BITS).
balloonTipsDemo This project uses balloon tips popping up as notifications Windows.
bgDemo This project runs several background jobs in separate threads.
buttonDemo This program demonstrates how to handle OK and Cancel buttons, how to handle default buttons, how to handle button responders
callProcess The project invokes an external process and interact with the standard output and standard input of it.
cmdLineDemo This project uses the commandLineParser with several options.
com This directory contains projects that illustrates how to use a COM component and how to implement one.
direct2DDemo This project compare GDI+ graphics to "plain" GDI graphics.
dll This directory contains various projects illustrating the use of DLL.
dockingDemo This project iullustrates how to use "docking" to define the layout of a dialog.
dragDropTargetOle This project is a "drop target"
dragNdropDemo This project illustrates the use of drag and drop.
editor This project demonstrates how to use the scintilla editor in a program.
formWindowDemo This project demonstrates the use of forms.
GDI+Example This project illustrates various GDI+ features.
genericsExample This project demostrates how to define and work with generic domains.
guiDemo This project illustrates how to work with GUI.
jsonWebToken This project demonstrates how to create and decompose JSON web tokens (jwt).
listDemo This project illustrates various operations on lists.
listViewDemo This project uses the listViewControl.
logDemo This project demonstrates the use of the log tool.
logDemoPE This project demonstrates the use of the log tool in a Personal Edition projectl.
masterSlave This directory contains projects that utilizes slave process from a master process.
MSXML_Example This project uses the MSXML component to load an xml file which is visualized in a tree control.
MultiThreadDemo In the example several threads produces results in the single (common for all threads) "queue", and the primary thread reads them one by one and displays on the screen.
neuralNet This project builds a pyramid shaped neural network. (Modern neural networks will use vector/matrix/tensor operations).
OdbcDemo This project demonstrated the use of ODBC (in a GUI program).
pictureDraw This project draws a picture using GDI+ (gdiPlus).
pie PIE is a Prolog Inference Engine which implements an ISO Prolog like interpreter.
pieDemo This project uses the pie (Prolog Inference Engine) as a scripting language in the project.
progress This project uses the progressControl to illustrate progress in a program.
prologSourceBrowser This project illustrates the use of several types of GUI controls in a dialog that can browse in files in a directory.
radioButtonDemo This project demonstrates how to use single radio button group, multiple radio button groups or how to use check boxes.
ribbonDemo This demo project illustrates how to develop applications using the Ribbon and Command packages of pfc/gui.
ribbonMdiDemo This demo project illustrates use the ribbonControl in an MDI (Multiple Document Interface) program.
sandClocks This project can solve a "sand clock" puzles.
simpleOdbc This project illustrates the use of ODBC in a command line program.
socketAsync This directory contains a socket server and a corresponding client, both working asynchronously using suspending predicates.
streamDemo This project illustrates the use of streams.
sudoku This project can solve soduko's using a constratint programming thechnique.
tabControlDemo This project uses the tabControl.
tail This project can follow changes to a text/log file.
toolTipDemo This project illustrates the use of tooltips.
toyIDE This directory contains several projecs that illustrates how a complex application can be divided into several DLL's.
treeControlDemo This project uses the treeControl
useSyntaxDemo This project uses the Visual Prolog parser to parse source files and then extracts literals from the syntax trees.
validationDemo This project illustrates how to use control and dialog validation to validate user input in a dialog.
vipLalrGen This project is the source code of the Visual Prolog LALR parser generator.
vipPP This project is the source code of the vipPP program that can parse and pretty print Visual Prolog source code.
WatchDir This project uses watchDir to monitor changes in a directory.
watchDirGui This project uses watchDir to monitor changes in a directory (in a GUI program).
webService This directory contains a webServiceDemo project with a HTML test page and a corresponding Visual Prolog client program.
webView2Demo This project illustrates the usage of the webView2 control (Edge browser).