Commit Graph

15 Commits

Author SHA1 Message Date
Zoltan Somogyi
9b6390b17e Bring the programming style of extras up to date.
extras/curs/curs.m:
extras/curs/curs.panel.m:
    Make panel a separate submodule of curs, not a nested submodule.

extras/base64/base64.m:
extras/curses/mcurses.basics.m:
extras/curses/mcurses.m:
extras/curses/mcurses.misc.m:
extras/curses/mcurses.user.m:
extras/gator/evolve.m:
extras/gator/genotype.m:
extras/gator/phenotype.m:
extras/gator/tausworthe3.m:
extras/monte/dots.m:
extras/monte/geom.m:
extras/monte/hg.m:
extras/monte/monte.m:
extras/monte/rnd.m:
extras/moose/grammar.m:
extras/moose/moose.m:
extras/mopenssl/mopenssl.m:
extras/net/echo.m:
extras/net/errno.m:
extras/net/getaddrinfo.m:
extras/net/net.m:
extras/net/netdb.m:
extras/net/sockets.m:
extras/net/streams.m:
extras/net/tcp.m:
extras/net/test_lookups.m:
extras/net/types.m:
extras/odbc/odbc.m:
extras/odbc/odbc_test.m:
extras/references/README:
extras/references/reference.m:
extras/references/scoped_update.m:
extras/solver_types/library/any.m:
extras/solver_types/library/any_array.m:
extras/solver_types/library/any_assoc_list.m:
extras/solver_types/library/any_list.m:
extras/solver_types/library/any_map.m:
extras/solver_types/library/any_tree234.m:
extras/solver_types/library/any_util.m:
extras/trail/trail.m:
extras/trailed_update/samples/interpreter.m:
extras/trailed_update/samples/vqueens.m:
extras/trailed_update/tests/var_test.m:
extras/trailed_update/tr_array.m:
extras/trailed_update/tr_store.m:
extras/trailed_update/trailed_update.m:
extras/trailed_update/unsafe.m:
extras/trailed_update/var.m:
    Bring programming style up to date.
2023-03-30 21:48:10 +11:00
Peter Wang
8da4853b49 Update programs for getopt changes.
benchmarks/progs/icfp2000_par/main.m:
benchmarks/progs/mandelbrot/mandelbrot.m:
benchmarks/tools/log_to_r/log_to_r.m:
extras/align_right/align_right.m:
extras/error/error.m:
extras/gator/evolve.m:
extras/moose/options.m:
samples/concurrency/midimon/midimon.m:
samples/diff/diff.m:
samples/muz/muz.m:
    Conform to getopt.process_options now returning structured errors
    instead of strings.
2020-10-26 16:24:11 +11:00
Mark Brown
ed9f3a0e4f extras/gator/tausworthe3.m: use max_uint32 instead of a literal 2019-08-11 14:43:35 +10:00
Mark Brown
3fde825499 Improve comments in extras/gator/tausworthe3.m
The 'evolve' program assumes that next/3 returns a non-negative integer.
2019-08-11 12:55:08 +10:00
Mark Brown
6e68723d12 Convert extras/gator/tausworthe3.m to using uint32
Previously this used int, but this only works on platforms where
integers are 32-bit.
2019-08-11 12:55:08 +10:00
Julien Fischer
8f0067c997 Fix bitrot in extras.
extras/gator/phenotype.m:
    Replace a call to an obsolete predicate.

extras/mopenssl/mopenssl.m:
    Pass allocation site ids to calls to MR_make_string.

    Avoid warnings from the C compiler about const qualifiers
    being discarded.

extras/show_ops/show_ops.m:
    Conform to changes to the term module's representation of
    integers.
2018-07-05 23:58:40 -04:00
Sebastian Godelet
fcee76f671 Update .gitignore files.
Update .gitignore files to ignore Unix executables and intermediate files.

extras/.gitignore:
    ignore *.beams

extras/cgi/.gitignore:
extras/gator/.gitignore:
extras/graphics/mercury_cairo/tutorial/.gitignore:
extras/logged_output/.gitignore:
extras/monte/.gitignore:
extras/odbc/.gitignore:
extras/posix/samples/.gitignore:
extras/quickcheck/.gitignore:
extras/quickcheck/tutes/.gitignore:
extras/references/samples/.gitignore:
    ignore executable(s)

extras/references/tests/.gitignore:
extras/trailed_update/tests/.gitignore:
    ignore test *.res and *.out files,
    ignore executable

extras/windows_installer_generator/sample/.gitignore:
samples/concurrency/dining_philosophers/.gitignore:
samples/concurrency/midimon/.gitignore:
    ignore executables

tests/hard_coded/.gitignore:
    ignore *.o and *.obj object files
2014-11-06 22:33:48 +11:00
Julien Fischer
aff3343c68 Fix more compilation errors in extras.
extras/trailed_update/tr_store.m:
	Conform to runtime changes.

extras/gator/genotype.m:
extras/gator/phenotype.m:
extras/graphics/samples/maze/maze.m:
extras/trailed_update/samples/interpreter.m:
	Conform to standard library changes.
2014-02-06 03:31:59 +11:00
Zoltan Somogyi
0a3854b918 A whole bunch of style cleanups. There are no algorithmic changes.
Estimated hours taken: 2
Branches: main

browser/browser_info.m:
extras/gator/evolve.m:
extras/gator/genotype.m:
extras/gator/phenotype.m:
extras/gator/tausworthe3.m:
extras/lazy_evaluation/lazy.m:
extras/lazy_evaluation/lazy_list.m:
extras/lex/lex.automata.m:
extras/lex/lex.buf.m:
extras/lex/lex.convert_NFA_to_DFA.m:
extras/lex/lex.lexeme.m:
extras/lex/lex.lex.m:
extras/lex/lex.regexp.m:
extras/lex/regex.m:
library/graph.m:
library/list.m:
library/relation.m:
library/string.m:
	A whole bunch of style cleanups. There are no algorithmic changes.
2010-08-05 06:55:46 +00:00
Julien Fischer
36ac2b4c77 Merge late changes from the 0.13 branch onto the main branch.
Estimated hours taken: 0.5
Branches: main

Merge late changes from the 0.13 branch onto the main branch.

BUGS:
	Merge in additions from the 0.12(!) branch.

HISTORY:
	Fix typos and be more consistent about the formatting of dates.

NEWS:
	Move the news about checking inst declarations for consistency
	with visible type constructors to the post-0.13 news where it belongs.

	Merge changes to the 0.13 branch.

README.Solaris:
	Merge changes from the 0.13 branch.

compiler/notes/todo.html:
	Merge changes from the 0.13 branch.

doc/user_guide.texi:
	Merge changes from 0.13 branch related to trace counts
	documentation.

extras/curses/sample/smalltest.m:
extras/gator/genotype.m:
extras/references/tests/ref_test.m:
samples/rot13/rot13_ralph.m:
tests/mmc_make/complex_test.m:
tests/mmc_make/lib/complex.m:
	Merge minor fixes from the 0.13 branch.
2006-09-15 09:11:24 +00:00
Samrith Uong
a896c1ed82 s/echo/printf/
Estimated hours taken: 0.1
Branches: main

extras/gator/gator:
	s/echo/printf/
2006-02-20 01:14:43 +00:00
Samrith Uong
ee1925b74d Copy the source code for all the benchmark programs to all
Estimated hours taken: 4
Branches: main

extras/gator/gator:
	Copy the source code for all the benchmark programs to all
	the hosts automatically.  It must already exist on (at least)
	one host.

	Print some more verbose output so that the program gives useful
	feedback to the user without having to pass gator the -v flag.

	At the end of every generation, print the top 10 (or as
	specified by the user with the -n flag) individuals.

	Add a copyright message to the top of the file.

extras/gator/README:
	Document the fact that it automatically copies files over,
	rather than requiring the user to do it manually.

extras/gator/evaluate:
	Add a copyright message to the top of the file.
2006-02-17 05:23:25 +00:00
Samrith Uong
39c55e5da9 Show examples of configuration files in gator's README file,
Estimated hours taken: 2.5
Branches: main

extras/gator/README:
	Show examples of configuration files in gator's README file,
	to give the reader a better idea of what is required to set
	up gator.
2006-02-17 01:45:10 +00:00
Samrith Uong
ad35cb9036 Changed the configuration files so that the program will work without
Estimated hours taken: 0.2

Changed the configuration files so that the program will work without
any additional configuration.

mercury/extras/gator/evaluate.conf:
       Instead of using the benchmark programs in the benchmarks
       directory (which the user might not have access to), use
       mercury/samples/hello.m as the benchmark program.

mercury/extras/gator/evolve.conf:
	Since the evaluate.conf file was changed so that there is
	only one benchmark program, we need to change the length of
	the first term.

mercury/extras/gator/gator.conf:
	In the previous revision, the hosts sophie, boadicea, surprise,
	lively and leopard were used.  Rather than use these hosts,
	which are only available to Mercury developers, use `hostname`
	instead.
2006-02-15 04:58:16 +00:00
Samrith Uong
7864c75130 This program implements a genetic algorithm to explore the space of
Estimated hours taken: 150
Branches: main

This program implements a genetic algorithm to explore the space of
compiler optimizations, with the goal of finding a good set of
optimizations to use when compiling a program.

mercury/extras/gator/README:
	An overview of the program and how to configure it.

mercury/extras/gator/gator:
	A shell script containing the main program.  This script
	contains a loop that continuously evaluates all the individuals
	in a generation and evolves the next generation of individuals
	based on how well they performed.

mercury/extras/gator/gator.conf:
	This file contains configuration data for gator, including all
	the hosts which are available for benchmarking.  Benchmarking
	all of the individuals in a population is distributed over a
	number of hosts as this is the slowest part of the process.

mercury/extras/gator/evaluate:
	A shell script that benchmarks the given individuals.  This
	script measures compile times, executable sizes and run times,
	for the programs given in evaluate.conf.

mercury/extras/gator/evaluate.conf:
	Configuration data for evaluate, including all the programs to
	be used for benchmarking.

mercury/extras/gator/evolve.m:
	This program breeds a new population of individuals based on the
	previous generation, and the output of evaluate.

mercury/extras/gator/evolve.conf:
	Configuration data for evolve, containing data used by the
	phenotype.fitness/3 and genotype.mutation/5 predicates.

mercury/extras/gator/genotype.m:
	A genotype is the representation of an individual.  For this
	application it is a set of compiler flags.  This module contains
	predicates related to this data structure.

mercury/extras/gator/phenotype.m:
	A phenotype is the representation of the traits of an
	individual.  For this application it is the set of benchmarks
	produced by the evaluate script.  This module contains the
	definition of the phenotype data structure, and predicates that
	operate on it.

mercury/extras/gator/tausworthe3.m:
	A random number generator (originally taken from
	/home/mercury/rafe/mercury/rnd/tausworthe3.m).  I've also added
	Julien's typeclass definition and an instance declaration.
	This should make using a different random number generator
	a bit easier.

mercury/extras/gator/generations/1/genotypes:
	The initial population of individuals.
2006-02-13 01:42:03 +00:00