Leibniz System Manual
Total Page:16
File Type:pdf, Size:1020Kb
Copyright c 2015 by Leibniz Company ° All rights reserved. Permission is herewith granted to distribute electronic copies of this book, or to print and distribute paper copies, for any commercial or noncommercial purpose, as long as distribution is done at no charge. Cover Art: The author gratefully acknowledges permission to use photos 3,65:28 / 3,65:35 / 3,65:59 of the book Das letzte Original, Die Leibniz-Rechenmaschine der Gottfried Wilhelm Leibniz Bibliothek (The Last Original, the Leibniz Calculator of the Gottfried Wilhelm Leibniz Library) by Ariane Walsdorf, Klaus Badur, Erwin Stein, and Franz Otto Kopp, with preface by Georg Ruppelt. Photographs: Maike Kandziora. c 2014 Gottfried Wilhelm Leibniz Bibliothek - Nieders¨achsische ° Landesbibliothek, Hannover, Germany. The book covers the history of the Leibniz calculator, technical construction, and mathematical aspects of the invention. The book includes about 150 photos, diagrams, and sketches of the calculator and related material. Cover Design: Ingrid Truemper Library of Congress Cataloging-in-Publication Data Truemper, Klaus, 1942– Leibniz System: Development Tool for Logic-based Intelligent Systems / Klaus Truemper. Includes bibliographical references and subject index. ISBN 0-9663554-7-4 1. Software. 2. Intelligent Systems I. Title. Leibniz System Development Tool for Logic-based Intelligent Systems Table of Contents Preface .................................................. 15 Chapter 1 Overview ................................. 20 License 21 Citation 22 Disclaimer of Warranty of Any Kind 22 Summary of System 23 lbcc Compiler 25 qallsatcc Program for solving Q-ALL SAT 27 lsqcc Program for Learning Logic Formulas 28 cutcc Program for Transformation of Data 30 subcc Module for Subgroup Discovery 31 matchcc Program for Data Estimation 32 redcc Module for Reduction of Dimension 33 decc Program for Decomposition of Graphs and Matrices 34 prpcc Module for Data Preparation 35 multicc Module for Optimization 36 Chapter 2 Getting Started .......................... 37 Installation 37 Copyright 1992-2015 by Leibniz Company, Plano, Texas Version 16.0 1 July 2015 4 Table of Contents Linux/Unix Installation 39 All Other Installations 40 The First Time 41 lbcc Compiler 41 qallsatcc Program 43 lsqcc Program 46 cutcc Program 47 subcc Program 48 sub2cc Program 49 suballcc Program 49 matchcc Program 50 redcc Program 53 decc Program 56 prpcc Module 59 multicc Module 60 Chapter 3 lbcc Compiler ............................ 62 Introduction 62 Example of Logic Formulation 64 leibnizparams.dat 71 Logic Formulation – Overview 79 Reserved Words and Special Symbols 79 User-defined Names 82 INCLUDE Statement 83 Comments and Blank Lines 83 Declaration Sections 83 Changing Formulations During Execution 84 SETS 85 Subsets 86 File z1to1000 86 Version 16.0 1 July 2015 Table of Contents 5 Restrictions 87 PREDICATES 88 Options – Overview 89 Options – Rules 90 Restrictions 92 VARIABLES 93 Options 93 Restrictions 94 FACTS 95 Fact Forms 95 Quantification 96 Conditional Quantification 98 Likelihood Terms and Levels 99 Clause Name and Clause Deletion 100 Likelihood Terms and Clause Deletion 101 Goals and GOAL Variable 102 Error Messages 105 Warnings 105 Nonfatal Errors 108 Fatal Errors 115 System Errors 118 Chapter 4 Logic Reasoning ......................... 119 Introduction 119 makefile.machine 120 .prg File 122 machine.c 124 Transfer Process for Several .prg Files 132 Execution of Several Solution Programs 136 Procedure Summary 138 Version 16.0 1 July 2015 6 Table of Contents Assign Devices 138 Begin Problem 138 Delete Problem 138 Execute lbcc Compiler 138 Free Devices 139 Get Clause Name or Goal Name 139 Get Dimension 139 Get Dual Value 139 Get Goal 139 Get Primal Classification 140 Get Value of Variable 140 Initialize Problems 140 Limit Warnings and Errors 140 Maximal Subset of Satisfied Clauses 140 Minimal Subset of Unsatisfied Clauses 141 Modify Status of All Variables 141 Modify Status of Clause 141 Modify Status of Goal 141 Modify Status of Current Problem 142 Modify Status of Variable 142 Restore Problem 142 Retrieve Problem 142 Solve Current Problem 142 Status of Clause 143 Status of Element 143 Status of Current Problem 143 Status of Storage 143 Status of Variable 143 Store Current Problem 144 Procedure Hierarchy and General Rules 145 Version 16.0 1 July 2015 Table of Contents 7 assign device 146 begin problem 150 delete problem 152 execute lbcc 153 free device 155 get clsname 156 get dimension 158 get dual 161 get goal 164 get primal 166 get value 168 initialize problem 170 limit error 173 maxcls sat 175 mincls unsat 178 modify allvar 181 modify clause 184 modify goal 188 modify problem 191 modify variable 192 restore problem 195 retrieve problem 197 solve problem 199 status clause 202 status element 205 status problem 207 status storage 209 status variable 211 store problem 213 Error Messages 215 Version 16.0 1 July 2015 8 Table of Contents Warnings 216 Nonfatal Errors 216 Fatal Errors 225 System Errors 225 Chapter 5 Compiler Learning Process ............ 227 Introduction 227 Learn Option 228 User-directed Learning 228 Compiler-selected Learning 229 Limit on Learning Cases 229 Output 230 Chapter 6 qallsatcc for Solving Q-ALL SAT . 231 Introduction 231 Execution 232 Input File 232 Applications 234 Chapter 7 lsqcc for Learning Logic ................ 235 Introduction 235 Program optcc 236 Program pyrcc 236 Program tstcc 237 Alternate Execution of Programs 237 Training File 239 Testing File 246 lsqccparams.dat 247 Training 256 Separation File 256 Version 16.0 1 July 2015 Table of Contents 9 Size of Formula 258 Value of Formula 258 Vote and Vote Total 259 Distribution File 260 Testing 264 Vote File 264 optcc Program 268 Optimal Records 273 Optimal Formulas 275 pyrcc Program 278 Pyramid File 280 Consistency Check 284 tstcc Program 287 Chapter 8 cutcc for Data Transformation ........ 288 Introduction 288 Alternate Execution of cutcc 289 Rational Training File 290 Rational Data Versus Set Data 293 Rational Testing File 295 lsqccparams.dat 296 Output Files 301 Cutpoint File 301 Visualization File 304 Partial Data File 306 Logic Training File 308 Logic Testing File 309 Error File 311 Prior Knowledge 313 Version 16.0 1 July 2015 10 Table of Contents Chapter 9 subcc for Discovery ..................... 316 Introduction 316 Alternate Execution of subcc 317 Master and Alternate Testing Files 318 Master File 319 Types of Attribute Records 320 Target Option (1) 320 Target Options (2) and (3) 321 Class Option 321 Alternate Testing File 323 Sort and Split Option 324 Target File 325 lsqccparams.dat 326 Additional Options of lsqccparams.dat 333 Computation and Selection of Subgroups 334 Output Subgroup Files of Program subcc 334 Program sub2cc 335 Program suballcc 339 Chapter 10 matchcc for Matching ................. 340 Introduction 340 Execution 341 Input Training and Testing Files 342 Output Files 344 match.result File 344 match.error File 346 match.learn File 346 match.solution File 347 average.error File 348 Version 16.0 1 July 2015 Table of Contents 11 Chapter 11 redcc for Reduction ................... 349 Introduction 349 Mathematical Background 349 Input Files 351 Execution 353 Parameter file 354 Output File 357 Estimation for Additional Records 359 Chapter 12 decc for Decomposition ............... 360 Introduction 360 Alternate Execution of decc 361 Example of Input Matrix 362 deccparams.dat 364 Tree Decomposition 369 Linear Decomposition 370 Graph Decomposition 371 Chapter 13 prpcc for Preparation ................. 372 Introduction 372 Execution 374 Chapter 14 multicc for Optimization ............. 375 Introduction 375 Problem Specification 377 Explicit Problem Specification 377 Black Box Problem Specification 379 Parallelization 381 Screen Output 384 Input, Initsol, Blackbox Files 387 Version 16.0 1 July 2015 12 Table of Contents Input File 388 Handling of Integer Variables 390 Processor File 391 Initsol File 393 Blackbox File 394 params.multi, final.multi Output Files 395 params File 397 Auxiliary Files 398 inbox and outbox Files 398 nomad.params File 398 runprocess File 398 nomad Transfer Files 399 Multicc Options: Files and Directories 400 -input 401 -initsol 401 -output 401 -blackbox 402 -inbox 402 -outbox 402 -params 402 -processor 403 -leibnizpath 403 -nomadpath 403 -tempdir 404 Multicc Options: Computations 405 -singleminout 405 -accuracy 406 -sequenceminone 406 -stopcriterion 409 -minall 410 Version 16.0 1 July 2015 Table of Contents 13 -maxeval 410 -maxiter 410 -maxitereval 411 Advanced Multicc Options 412 -maxfirstitereval 412 -minsingleonly 413 -minallonly 413 -ignoreconstraint 414 -gradualconstraint 414 -scaleconstraint 414 -objfactor 415 -objtolerance 415 -constrtolerance 415 -objgoal 416 -objbound 416 -objrange 417 -cutout 418 -dynamiclimit 420 -convergetesteval 421 -paretosize 421 -plotdetail 422 -printdetail 422 -slowmotion 423 -seednsga 424 -seednomad 424 -initialmesh 424 -finalmesh 425 -maxproctime 425 -denconcoordinate 425 Version 16.0 1 July 2015 14 Table of Contents References .............................................. 426 Subject Index .......................................... 429 Version 16.0 1 July 2015 Leibniz System Development Tool for Logic-based Intelligent Systems Preface In 1989, we embarked on the creation of a toolbox for the design and implementation of intelligent systems. The Name ‘Leibniz System’ The toolbox is named the Leibniz System in honor of the mathe- matician, engineer, inventor, and philosopher Gottfried Wilhelm Leib- niz (1646 - 1716). He invented calculus,