diff --git a/.gitignore b/.gitignore index d8647b47..97ef7367 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ Gemfile.lock -.idea/ +.bundle/ +vendor/ diff --git a/.travis.yml b/.travis.yml index b24209c5..83880550 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,9 @@ -before_install: sudo apt-get install libicu-dev -y +before_install: + - sudo apt-get install libicu-dev -y + - gem update --system 2.1.11 rvm: - - 1.8.7 - - 1.9.2 - 1.9.3 - - ree + - 2.0.0 + - 2.1.1 notifications: disabled: true diff --git a/LICENSE b/LICENSE index d1d7570c..f09a7d0a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2011-2013 GitHub, Inc. +Copyright (c) 2011-2014 GitHub, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/README.md b/README.md index 472fdb29..660ac00c 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,17 @@ # Linguist -We use this library at GitHub to detect blob languages, highlight code, ignore binary files, suppress generated files in diffs and generate language breakdown graphs. +We use this library at GitHub to detect blob languages, highlight code, ignore binary files, suppress generated files in diffs, and generate language breakdown graphs. ## Features ### Language detection -Linguist defines the list of all languages known to GitHub in a [yaml file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). In order for a file to be highlighted, a language and lexer must be defined there. +Linguist defines a list of all languages known to GitHub in a [yaml file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). In order for a file to be highlighted, a language and a lexer must be defined there. -Most languages are detected by their file extension. This is the fastest and most common situation. - -For disambiguating between files with common extensions, we use a [Bayesian classifier](https://github.com/github/linguist/blob/master/lib/linguist/classifier.rb). For an example, this helps us tell the difference between `.h` files which could be either C, C++, or Obj-C. - -In the actual GitHub app we deal with `Grit::Blob` objects. For testing, there is a simple `FileBlob` API. +Most languages are detected by their file extension. For disambiguating between files with common extensions, we first apply some common-sense heuristics to pick out obvious languages. After that, we use a +[statistical +classifier](https://github.com/github/linguist/blob/master/lib/linguist/classifier.rb). +This process can help us tell the difference between, for example, `.h` files which could be either C, C++, or Obj-C. ```ruby @@ -27,13 +26,11 @@ See [lib/linguist/language.rb](https://github.com/github/linguist/blob/master/li The actual syntax highlighting is handled by our Pygments wrapper, [pygments.rb](https://github.com/tmm1/pygments.rb). It also provides a [Lexer abstraction](https://github.com/tmm1/pygments.rb/blob/master/lib/pygments/lexer.rb) that determines which highlighter should be used on a file. -We typically run on a pre-release version of Pygments, [pygments.rb](https://github.com/tmm1/pygments.rb), to get early access to new lexers. The [languages.yml](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml) file is a dump of the lexers we have available on our server. - ### Stats -The Language Graph you see on every repository is built by aggregating the languages of all repo's blobs. The top language in the graph determines the project's primary language. Collectively, these stats make up the [Top Languages](https://github.com/languages) page. +The Language stats bar that you see on every repository is built by aggregating the languages of each file in that repository. The top language in the graph determines the project's primary language. -The repository stats API can be used on a directory: +The repository stats API, accessed through `#languages`, can be used on a directory: ```ruby project = Linguist::Repository.from_directory(".") @@ -41,10 +38,27 @@ project.language.name #=> "Ruby" project.languages #=> { "Ruby" => 0.98, "Shell" => 0.02 } ``` -These stats are also printed out by the binary. Try running `linguist` on itself: +These stats are also printed out by the `linguist` binary. You can use the +`--breakdown` flag, and the binary will also output the breakdown of files by language. - $ bundle exec linguist lib/ - 100% Ruby +You can try running `linguist` on the `lib/` directory in this repository itself: + + $ bundle exec linguist lib/ --breakdown + + 100.00% Ruby + + Ruby: + linguist/blob_helper.rb + linguist/classifier.rb + linguist/file_blob.rb + linguist/generated.rb + linguist/heuristics.rb + linguist/language.rb + linguist/md5.rb + linguist/repository.rb + linguist/samples.rb + linguist/tokenizer.rb + linguist.rb #### Ignore vendored files @@ -82,14 +96,60 @@ To run the tests: ## Contributing -The majority of patches won't need to touch any Ruby code at all. The [master language list](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml) is just a configuration file. +The majority of contributions won't need to touch any Ruby code at all. The [master language list](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml) is just a YAML configuration file. -We try to only add languages once they have a some usage on GitHub, so please note in-the-wild usage examples in your pull request. +We try to only add languages once they have some usage on GitHub, so please note in-the-wild usage examples in your pull request. Almost all bug fixes or new language additions should come with some additional code samples. Just drop them under [`samples/`](https://github.com/github/linguist/tree/master/samples) in the correct subdirectory and our test suite will automatically test them. In most cases you shouldn't need to add any new assertions. +To update the `samples.json` after adding new files to [`samples/`](https://github.com/github/linguist/tree/master/samples): + + bundle exec rake samples + +### A note on language extensions + +Linguist has a number of methods available to it for identifying the language of a particular file. The initial lookup is based upon the extension of the file, possible file extensions are defined in an array called `extensions`. Take a look at this example for example for `Perl`: + +``` +Perl: + type: programming + ace_mode: perl + color: "#0298c3" + extensions: + - .pl + - .PL + - .perl + - .ph + - .plx + - .pm + - .pod + - .psgi + interpreters: + - perl +``` +Any of the extensions defined are valid but the first in this array should be the most popular. + ### Testing -Sometimes getting the tests running can be too much work, especially if you don't have much Ruby experience. It's okay, be lazy and let our build bot [Travis](http://travis-ci.org/#!/github/linguist) run the tests for you. Just open a pull request and the bot will start cranking away. +Sometimes getting the tests running can be too much work, especially if you don't have much Ruby experience. It's okay: be lazy and let our build bot [Travis](http://travis-ci.org/#!/github/linguist) run the tests for you. Just open a pull request and the bot will start cranking away. Here's our current build status, which is hopefully green: [![Build Status](https://secure.travis-ci.org/github/linguist.png?branch=master)](http://travis-ci.org/github/linguist) + +### Releasing + +If you are the current maintainer of this gem: + + 0. Create a branch for the release: `git checkout -b cut-release-vxx.xx.xx` + 0. Make sure your local dependencies are up to date: `bundle install` + 0. Ensure that samples are updated: `bundle exec rake samples` + 0. Ensure that tests are green: `bundle exec rake test` + 0. Bump gem version in `lib/linguist/version.rb`. For example, [like this](https://github.com/github/linguist/commit/8d2ea90a5ba3b2fe6e1508b7155aa4632eea2985). + 0. Make a PR to github/linguist. For example, [#1238](https://github.com/github/linguist/pull/1238). + 0. Build a local gem: `gem build github-linguist.gemspec` + 0. Testing: + 0. Bump the Gemfile and Gemfile.lock versions for an app which relies on this gem + 0. Install the new gem locally + 0. Test behavior locally, branch deploy, whatever needs to happen + 0. Merge github/linguist PR + 0. Tag and push: `git tag vx.xx.xx; git push --tags` + 0. Push to rubygems.org -- `gem push github-linguist-2.10.12.gem` diff --git a/Rakefile b/Rakefile index 08ce419b..e89e75a9 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,7 @@ +require 'json' require 'rake/clean' require 'rake/testtask' +require 'yaml' task :default => :test @@ -13,6 +15,13 @@ task :samples do File.open('lib/linguist/samples.json', 'w') { |io| io.write json } end +task :build_gem do + languages = YAML.load_file("lib/linguist/languages.yml") + File.write("lib/linguist/languages.json", JSON.dump(languages)) + `gem build github-linguist.gemspec` + File.delete("lib/linguist/languages.json") +end + namespace :classifier do LIMIT = 1_000 diff --git a/bin/linguist b/bin/linguist index d28aaf7b..2cfa8064 100755 --- a/bin/linguist +++ b/bin/linguist @@ -1,19 +1,39 @@ #!/usr/bin/env ruby # linguist — detect language type for a file, or, given a directory, determine language breakdown -# -# usage: linguist +# usage: linguist [<--breakdown>] require 'linguist/file_blob' require 'linguist/repository' path = ARGV[0] || Dir.pwd +# special case if not given a directory but still given the --breakdown option +if path == "--breakdown" + path = Dir.pwd + breakdown = true +end + +ARGV.shift +breakdown = true if ARGV[0] == "--breakdown" + if File.directory?(path) repo = Linguist::Repository.from_directory(path) repo.languages.sort_by { |_, size| size }.reverse.each do |language, size| - percentage = ((size / repo.size.to_f) * 100).round - puts "%-4s %s" % ["#{percentage}%", language] + percentage = ((size / repo.size.to_f) * 100) + percentage = sprintf '%.2f' % percentage + puts "%-7s %s" % ["#{percentage}%", language] + end + if breakdown + puts + file_breakdown = repo.breakdown_by_file + file_breakdown.each do |lang, files| + puts "#{lang}:" + files.each do |file| + puts file + end + puts + end end elsif File.file?(path) blob = Linguist::FileBlob.new(path, Dir.pwd) diff --git a/github-linguist.gemspec b/github-linguist.gemspec index 2fde4a68..d4c2337a 100644 --- a/github-linguist.gemspec +++ b/github-linguist.gemspec @@ -1,20 +1,25 @@ +require File.expand_path('../lib/linguist/version', __FILE__) + Gem::Specification.new do |s| s.name = 'github-linguist' - s.version = '2.9.4' + s.version = Linguist::VERSION s.summary = "GitHub Language detection" + s.description = 'We use this library at GitHub to detect blob languages, highlight code, ignore binary files, suppress generated files in diffs, and generate language breakdown graphs.' s.authors = "GitHub" s.homepage = "https://github.com/github/linguist" + s.license = "MIT" s.files = Dir['lib/**/*'] s.executables << 'linguist' - s.add_dependency 'charlock_holmes', '~> 0.6.6' - s.add_dependency 'escape_utils', '~> 0.3.1' + s.add_dependency 'charlock_holmes', '~> 0.7.3' + s.add_dependency 'escape_utils', '~> 1.0.1' s.add_dependency 'mime-types', '~> 1.19' - s.add_dependency 'pygments.rb', '~> 0.5.2' - s.add_development_dependency 'mocha' + s.add_dependency 'pygments.rb', '~> 0.6.0' + s.add_development_dependency 'json' + s.add_development_dependency 'mocha' s.add_development_dependency 'rake' s.add_development_dependency 'yajl-ruby' end diff --git a/lib/linguist.rb b/lib/linguist.rb index e717fb67..3714b5a0 100644 --- a/lib/linguist.rb +++ b/lib/linguist.rb @@ -1,5 +1,7 @@ require 'linguist/blob_helper' require 'linguist/generated' +require 'linguist/heuristics' require 'linguist/language' require 'linguist/repository' require 'linguist/samples' +require 'linguist/version' diff --git a/lib/linguist/blob_helper.rb b/lib/linguist/blob_helper.rb index 81956e47..15ab2d9f 100644 --- a/lib/linguist/blob_helper.rb +++ b/lib/linguist/blob_helper.rb @@ -112,6 +112,12 @@ module Linguist end end + def ruby_encoding + if hash = detect_encoding + hash[:ruby_encoding] + end + end + # Try to guess the encoding # # Returns: a Hash, with :encoding, :confidence, :type @@ -190,9 +196,9 @@ module Linguist # Public: Is the blob safe to colorize? # # We use Pygments for syntax highlighting blobs. Pygments - # can be too slow for very large blobs or for certain + # can be too slow for very large blobs or for certain # corner-case blobs. - # + # # Return true or false def safe_to_colorize? !large? && text? && !high_ratio_of_long_lines? @@ -241,7 +247,31 @@ module Linguist def lines @lines ||= if viewable? && data - data.split(/\r\n|\r|\n/, -1) + # `data` is usually encoded as ASCII-8BIT even when the content has + # been detected as a different encoding. However, we are not allowed + # to change the encoding of `data` because we've made the implicit + # guarantee that each entry in `lines` is encoded the same way as + # `data`. + # + # Instead, we re-encode each possible newline sequence as the + # detected encoding, then force them back to the encoding of `data` + # (usually a binary encoding like ASCII-8BIT). This means that the + # byte sequence will match how newlines are likely encoded in the + # file, but we don't have to change the encoding of `data` as far as + # Ruby is concerned. This allows us to correctly parse out each line + # without changing the encoding of `data`, and + # also--importantly--without having to duplicate many (potentially + # large) strings. + begin + encoded_newlines = ["\r\n", "\r", "\n"]. + map { |nl| nl.encode(ruby_encoding, "ASCII-8BIT").force_encoding(data.encoding) } + + data.split(Regexp.union(encoded_newlines), -1) + rescue Encoding::ConverterNotFoundError + # The data is not splittable in the detected encoding. Assume it's + # one big line. + [data] + end else [] end diff --git a/lib/linguist/classifier.rb b/lib/linguist/classifier.rb index a9707b28..5370bdd8 100644 --- a/lib/linguist/classifier.rb +++ b/lib/linguist/classifier.rb @@ -15,8 +15,8 @@ module Linguist # # Returns nothing. # - # Set LINGUIST_DEBUG=1 or =2 to see probabilities per-token, - # per-language. See also dump_all_tokens, below. + # Set LINGUIST_DEBUG=1 or =2 to see probabilities per-token or + # per-language. See also #dump_all_tokens, below. def self.train!(db, language, data) tokens = Tokenizer.tokenize(data) @@ -78,18 +78,13 @@ module Linguist def classify(tokens, languages) return [] if tokens.nil? tokens = Tokenizer.tokenize(tokens) if tokens.is_a?(String) - scores = {} - if verbosity >= 2 - dump_all_tokens(tokens, languages) - end + + debug_dump_all_tokens(tokens, languages) if verbosity >= 2 + languages.each do |language| - scores[language] = tokens_probability(tokens, language) + - language_probability(language) - if verbosity >= 1 - printf "%10s = %10.3f + %7.3f = %10.3f\n", - language, tokens_probability(tokens, language), language_probability(language), scores[language] - end + scores[language] = tokens_probability(tokens, language) + language_probability(language) + debug_dump_probabilities(tokens, language, scores[language]) if verbosity >= 1 end scores.sort { |a, b| b[1] <=> a[1] }.map { |score| [score[0], score[1]] } @@ -135,6 +130,11 @@ module Linguist @verbosity ||= (ENV['LINGUIST_DEBUG'] || 0).to_i end + def debug_dump_probabilities(tokens, language, score) + printf("%10s = %10.3f + %7.3f = %10.3f\n", + language, tokens_probability(tokens, language), language_probability(language), score) + end + # Internal: show a table of probabilities for each pair. # # The number in each table entry is the number of "points" that each @@ -145,22 +145,22 @@ module Linguist # how much more likely (log of probability ratio) that token is to # appear in one language vs. the least-likely language. Dashes # indicate the least-likely language (and zero points) for each token. - def dump_all_tokens(tokens, languages) + def debug_dump_all_tokens(tokens, languages) maxlen = tokens.map { |tok| tok.size }.max - + printf "%#{maxlen}s", "" puts " #" + languages.map { |lang| sprintf("%10s", lang) }.join - - tokmap = Hash.new(0) - tokens.each { |tok| tokmap[tok] += 1 } - - tokmap.sort.each { |tok, count| + + token_map = Hash.new(0) + tokens.each { |tok| token_map[tok] += 1 } + + token_map.sort.each { |tok, count| arr = languages.map { |lang| [lang, token_probability(tok, lang)] } min = arr.map { |a,b| b }.min minlog = Math.log(min) if !arr.inject(true) { |result, n| result && n[1] == arr[0][1] } printf "%#{maxlen}s%5d", tok, count - + puts arr.map { |ent| ent[1] == min ? " -" : sprintf("%10.3f", count * (Math.log(ent[1]) - minlog)) }.join diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index 424ffbec..761288f0 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -58,7 +58,13 @@ module Linguist generated_parser? || generated_net_docfile? || generated_net_designer_file? || - generated_protocol_buffer? + generated_postscript? || + generated_protocol_buffer? || + generated_jni_header? || + composer_lock? || + node_modules? || + vcr_cassette? || + generated_by_zephir? end # Internal: Is the blob an XCode project file? @@ -73,14 +79,16 @@ module Linguist # Internal: Is the blob minified files? # - # Consider a file minified if it contains more than 5% spaces. + # Consider a file minified if the average line length is + # greater then 110c. + # # Currently, only JS and CSS files are detected by this method. # # Returns true or false. def minified_files? return unless ['.js', '.css'].include? extname - if data && data.length > 200 - (data.each_char.count{ |c| c <= ' ' } / data.length.to_f) < 0.05 + if lines.any? + (lines.inject(0) { |n, l| n += l.length } / lines.length) > 110 else false end @@ -171,6 +179,29 @@ module Linguist false end + # Internal: Is the blob of PostScript generated? + # + # PostScript files are often generated by other programs. If they tell us so, + # we can detect them. + # + # Returns true or false. + def generated_postscript? + return false unless ['.ps', '.eps'].include? extname + + # We analyze the "%%Creator:" comment, which contains the author/generator + # of the file. If there is one, it should be in one of the first few lines. + creator = lines[0..9].find {|line| line =~ /^%%Creator: /} + return false if creator.nil? + + # Most generators write their version number, while human authors' or companies' + # names don't contain numbers. So look if the line contains digits. Also + # look for some special cases without version numbers. + return creator =~ /[0-9]/ || + creator.include?("mpage") || + creator.include?("draw") || + creator.include?("ImageMagick") + end + # Internal: Is the blob a C++, Java or Python source file generated by the # Protocol Buffer compiler? # @@ -181,5 +212,47 @@ module Linguist return lines[0].include?("Generated by the protocol buffer compiler. DO NOT EDIT!") end + + # Internal: Is the blob a C/C++ header generated by the Java JNI tool javah? + # + # Returns true of false. + def generated_jni_header? + return false unless extname == '.h' + return false unless lines.count > 2 + + return lines[0].include?("/* DO NOT EDIT THIS FILE - it is machine generated */") && + lines[1].include?("#include ") + end + + # Internal: Is the blob part of node_modules/, which are not meant for humans in pull requests. + # + # Returns true or false. + def node_modules? + !!name.match(/node_modules\//) + end + + # Internal: Is the blob a generated php composer lock file? + # + # Returns true or false. + def composer_lock? + !!name.match(/composer.lock/) + end + + # Internal: Is the blob a generated by Zephir + # + # Returns true or false. + def generated_by_zephir? + !!name.match(/.\.zep\.(?:c|h|php)$/) + end + + # Is the blob a VCR Cassette file? + # + # Returns true or false + def vcr_cassette? + return false unless extname == '.yml' + return false unless lines.count > 2 + # VCR Cassettes have "recorded_with: VCR" in the second last line. + return lines[-2].include?("recorded_with: VCR") + end end end diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb new file mode 100644 index 00000000..c1116780 --- /dev/null +++ b/lib/linguist/heuristics.rb @@ -0,0 +1,90 @@ +module Linguist + # A collection of simple heuristics that can be used to better analyze languages. + class Heuristics + ACTIVE = false + + # Public: Given an array of String language names, + # apply heuristics against the given data and return an array + # of matching languages, or nil. + # + # data - Array of tokens or String data to analyze. + # languages - Array of language name Strings to restrict to. + # + # Returns an array of Languages or [] + def self.find_by_heuristics(data, languages) + if active? + if languages.all? { |l| ["Objective-C", "C++"].include?(l) } + disambiguate_c(data, languages) + end + if languages.all? { |l| ["Perl", "Prolog"].include?(l) } + disambiguate_pl(data, languages) + end + if languages.all? { |l| ["ECL", "Prolog"].include?(l) } + disambiguate_ecl(data, languages) + end + if languages.all? { |l| ["TypeScript", "XML"].include?(l) } + disambiguate_ts(data, languages) + end + if languages.all? { |l| ["Common Lisp", "OpenCL"].include?(l) } + disambiguate_cl(data, languages) + end + if languages.all? { |l| ["Rebol", "R"].include?(l) } + disambiguate_r(data, languages) + end + end + end + + # .h extensions are ambigious between C, C++, and Objective-C. + # We want to shortcut look for Objective-C _and_ now C++ too! + # + # Returns an array of Languages or [] + def self.disambiguate_c(data, languages) + matches = [] + matches << Language["Objective-C"] if data.include?("@interface") + matches << Language["C++"] if data.include?("#include ") + matches + end + + def self.disambiguate_pl(data, languages) + matches = [] + matches << Language["Prolog"] if data.include?(":-") + matches << Language["Perl"] if data.include?("use strict") + matches + end + + def self.disambiguate_ecl(data, languages) + matches = [] + matches << Language["Prolog"] if data.include?(":-") + matches << Language["ECL"] if data.include?(":=") + matches + end + + def self.disambiguate_ts(data, languages) + matches = [] + if (data.include?("")) + matches << Language["XML"] + else + matches << Language["TypeScript"] + end + matches + end + + def self.disambiguate_cl(data, languages) + matches = [] + matches << Language["Common Lisp"] if data.include?("(defun ") + matches << Language["OpenCL"] if /\/\* |\/\/ |^\}/.match(data) + matches + end + + def self.disambiguate_r(data, languages) + matches = [] + matches << Language["Rebol"] if /\bRebol\b/i.match(data) + matches << Language["R"] if data.include?("<-") + matches + end + + def self.active? + !!ACTIVE + end + end +end diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 0a8d3d54..a8e7a33c 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -1,8 +1,13 @@ require 'escape_utils' require 'pygments' require 'yaml' +begin + require 'json' +rescue LoadError +end require 'linguist/classifier' +require 'linguist/heuristics' require 'linguist/samples' module Linguist @@ -15,17 +20,28 @@ module Linguist @index = {} @name_index = {} @alias_index = {} - @extension_index = Hash.new { |h,k| h[k] = [] } - @filename_index = Hash.new { |h,k| h[k] = [] } + + @extension_index = Hash.new { |h,k| h[k] = [] } + @interpreter_index = Hash.new { |h,k| h[k] = [] } + @filename_index = Hash.new { |h,k| h[k] = [] } # Valid Languages types - TYPES = [:data, :markup, :programming] + TYPES = [:data, :markup, :programming, :prose] # Names of non-programming languages that we will still detect # # Returns an array def self.detectable_markup - ["CSS", "Less", "Sass"] + ["CSS", "Less", "Sass", "SCSS", "Stylus", "TeX"] + end + + # Detect languages by a specific type + # + # type - A symbol that exists within TYPES + # + # Returns an array + def self.by_type(type) + all.select { |h| h.type == type } end # Internal: Create a new Language object @@ -63,6 +79,10 @@ module Linguist @extension_index[extension] << language end + language.interpreters.each do |interpreter| + @interpreter_index[interpreter] << language + end + language.filenames.each do |filename| @filename_index[filename] << language end @@ -87,16 +107,32 @@ module Linguist name += ".script!" end + # First try to find languages that match based on filename. possible_languages = find_by_filename(name) + # If there is more than one possible language with that extension (or no + # extension at all, in the case of extensionless scripts), we need to continue + # our detection work if possible_languages.length > 1 data = data.call() if data.respond_to?(:call) + possible_language_names = possible_languages.map(&:name) + + # Don't bother with emptiness if data.nil? || data == "" nil - elsif result = Classifier.classify(Samples::DATA, data, possible_languages.map(&:name)).first - Language[result[0]] + # Check if there's a shebang line and use that as authoritative + elsif (result = find_by_shebang(data)) && !result.empty? + result.first + # No shebang. Still more work to do. Try to find it with our heuristics. + elsif (determined = Heuristics.find_by_heuristics(data, possible_language_names)) && !determined.empty? + determined.first + # Lastly, fall back to the probablistic classifier. + elsif classified = Classifier.classify(Samples::DATA, data, possible_language_names ).first + # Return the actual Language object based of the string language name (i.e., first element of `#classify`) + Language[classified[0]] end else + # Simplest and most common case, we can just return the one match based on extension possible_languages.first end end @@ -148,7 +184,23 @@ module Linguist # Returns all matching Languages or [] if none were found. def self.find_by_filename(filename) basename, extname = File.basename(filename), File.extname(filename) - @filename_index[basename] + @extension_index[extname] + langs = @filename_index[basename] + + @extension_index[extname] + langs.compact.uniq + end + + # Public: Look up Languages by shebang line. + # + # data - Array of tokens or String data to analyze. + # + # Examples + # + # Language.find_by_shebang("#!/bin/bash\ndate;") + # # => [#] + # + # Returns the matching Language + def self.find_by_shebang(data) + @interpreter_index[Linguist.interpreter_from_shebang(data)] end # Public: Look up Language by its name or lexer. @@ -236,17 +288,9 @@ module Linguist # Set extensions or default to []. @extensions = attributes[:extensions] || [] + @interpreters = attributes[:interpreters] || [] @filenames = attributes[:filenames] || [] - unless @primary_extension = attributes[:primary_extension] - raise ArgumentError, "#{@name} is missing primary extension" - end - - # Prepend primary extension unless its already included - if primary_extension && !extensions.include?(primary_extension) - @extensions = [primary_extension] + extensions - end - # Set popular, and searchable flags @popular = attributes.key?(:popular) ? attributes[:popular] : false @searchable = attributes.key?(:searchable) ? attributes[:searchable] : true @@ -334,19 +378,14 @@ module Linguist # Returns the extensions Array attr_reader :extensions - # Deprecated: Get primary extension + # Public: Get interpreters # - # Defaults to the first extension but can be overridden - # in the languages.yml. + # Examples # - # The primary extension can not be nil. Tests should verify this. + # # => ['awk', 'gawk', 'mawk' ...] # - # This attribute is only used by app/helpers/gists_helper.rb for - # creating the language dropdown. It really should be using `name` - # instead. Would like to drop primary extension. - # - # Returns the extension String. - attr_reader :primary_extension + # Returns the interpreters Array + attr_reader :interpreters # Public: Get filenames # @@ -356,6 +395,27 @@ module Linguist # # Returns the extensions Array attr_reader :filenames + + # Public: Return all possible extensions for language + def all_extensions + (extensions + [primary_extension]).uniq + end + + # Deprecated: Get primary extension + # + # Defaults to the first extension but can be overridden + # in the languages.yml. + # + # The primary extension can not be nil. Tests should verify this. + # + # This method is only used by app/helpers/gists_helper.rb for creating + # the language dropdown. It really should be using `name` instead. + # Would like to drop primary extension. + # + # Returns the extension String. + def primary_extension + extensions.first + end # Public: Get URL escaped name. # @@ -415,7 +475,7 @@ module Linguist # # Returns html String def colorize(text, options = {}) - lexer.highlight(text, options = {}) + lexer.highlight(text, options) end # Public: Return name as String representation @@ -441,11 +501,22 @@ module Linguist end extensions = Samples::DATA['extnames'] + interpreters = Samples::DATA['interpreters'] filenames = Samples::DATA['filenames'] popular = YAML.load_file(File.expand_path("../popular.yml", __FILE__)) - YAML.load_file(File.expand_path("../languages.yml", __FILE__)).each do |name, options| + languages_yml = File.expand_path("../languages.yml", __FILE__) + languages_json = File.expand_path("../languages.json", __FILE__) + + if File.exist?(languages_json) && defined?(JSON) + languages = JSON.load(File.read(languages_json)) + else + languages = YAML.load_file(languages_yml) + end + + languages.each do |name, options| options['extensions'] ||= [] + options['interpreters'] ||= [] options['filenames'] ||= [] if extnames = extensions[name] @@ -456,6 +527,18 @@ module Linguist end end + if interpreters == nil + interpreters = {} + end + + if interpreter_names = interpreters[name] + interpreter_names.each do |interpreter| + if !options['interpreters'].include?(interpreter) + options['interpreters'] << interpreter + end + end + end + if fns = filenames[name] fns.each do |filename| if !options['filenames'].include?(filename) @@ -475,8 +558,8 @@ module Linguist :group_name => options['group'], :searchable => options.key?('searchable') ? options['searchable'] : true, :search_term => options['search_term'], - :extensions => options['extensions'].sort, - :primary_extension => options['primary_extension'], + :extensions => [options['extensions'].first] + options['extensions'][1..-1].sort, + :interpreters => options['interpreters'].sort, :filenames => options['filenames'], :popular => popular.include?(name) ) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 83856098..70eb1133 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3,17 +3,15 @@ # All languages have an associated lexer for syntax highlighting. It # defaults to name.downcase, which covers most cases. # -# type - Either data, programming, markup, or nil +# type - Either data, programming, markup, prose, or nil # lexer - An explicit lexer String (defaults to name) # aliases - An Array of additional aliases (implicitly # includes name.downcase) # ace_mode - A String name of Ace Mode (if available) # wrap - Boolean wrap to enable line wrapping (default: false) -# extension - An Array of associated extensions -# primary_extension - A String for the main extension associated with -# the language. Must be unique. Used when a Language is picked -# from a dropdown and we need to automatically choose an -# extension. +# extensions - An Array of associated extensions (the first one is +# considered the primary extension) +# interpreters - An Array of associated interpreters # searchable - Boolean flag to enable searching (defaults to true) # search_term - Deprecated: Some languages maybe indexed under a # different alias. Avoid defining new exceptions. @@ -22,12 +20,20 @@ # Any additions or modifications (even trivial) should have corresponding # test change in `test/test_blob.rb`. # -# Please keep this list alphabetized. +# Please keep this list alphabetized. Capitalization comes before lower case. ABAP: type: programming lexer: ABAP - primary_extension: .abap + extensions: + - .abap + +ANTLR: + type: programming + color: "#9DC3FF" + lexer: ANTLR + extensions: + - .g4 ASP: type: programming @@ -37,8 +43,8 @@ ASP: aliases: - aspx - aspx-vb - primary_extension: .asp extensions: + - .asp - .asax - .ascx - .ashx @@ -46,6 +52,18 @@ ASP: - .aspx - .axd +ATS: + type: programming + color: "#1ac620" + lexer: OCaml + aliases: + - ats2 + extensions: + - .dats + - .atxt + - .hats + - .sats + ActionScript: type: programming lexer: ActionScript 3 @@ -53,43 +71,82 @@ ActionScript: search_term: as3 aliases: - as3 - primary_extension: .as + extensions: + - .as Ada: type: programming color: "#02f88c" - primary_extension: .adb extensions: + - .adb - .ads +Agda: + type: programming + color: "#467C91" + extensions: + - .agda + +Alloy: + type: programming # 'modeling' would be more appropiate + lexer: Text only + color: "#cc5c24" + extensions: + - .als + ApacheConf: type: markup aliases: - apache - primary_extension: .apacheconf + extensions: + - .apacheconf Apex: type: programming lexer: Text only - primary_extension: .cls + extensions: + - .cls AppleScript: type: programming aliases: - osascript - primary_extension: .applescript + extensions: + - .applescript + - .scpt + interpreters: + - osascript Arc: type: programming color: "#ca2afe" lexer: Text only - primary_extension: .arc + extensions: + - .arc Arduino: type: programming color: "#bd79d1" lexer: C++ - primary_extension: .ino + extensions: + - .ino + +AsciiDoc: + type: prose + lexer: Text only + ace_mode: asciidoc + wrap: true + extensions: + - .asciidoc + - .adoc + - .asc + +AspectJ: + type: programming + lexer: AspectJ + color: "#1957b0" + extensions: + - .aj Assembly: type: programming @@ -98,11 +155,14 @@ Assembly: search_term: nasm aliases: - nasm - primary_extension: .asm + extensions: + - .asm + - .inc Augeas: type: programming - primary_extension: .aug + extensions: + - .aug AutoHotkey: type: programming @@ -110,16 +170,33 @@ AutoHotkey: color: "#6594b9" aliases: - ahk - primary_extension: .ahk + extensions: + - .ahk + +AutoIt: + type: programming + color: "#36699B" + aliases: + - au3 + - AutoIt3 + - AutoItScript + extensions: + - .au3 Awk: type: programming lexer: Awk - primary_extension: .awk extensions: + - .awk + - .auk - .gawk - .mawk - .nawk + interpreters: + - awk + - gawk + - mawk + - nawk Batchfile: type: programming @@ -127,35 +204,61 @@ Batchfile: search_term: bat aliases: - bat - primary_extension: .bat extensions: + - .bat - .cmd Befunge: - primary_extension: .befunge + extensions: + - .befunge + +BlitzBasic: + type: programming + aliases: + - blitzplus + - blitz3d + extensions: + - .bb + - .decls BlitzMax: - primary_extension: .bmx + extensions: + - .bmx + +Bluespec: + type: programming + lexer: verilog + extensions: + - .bsv Boo: type: programming color: "#d4bec1" - primary_extension: .boo + extensions: + - .boo Brainfuck: - primary_extension: .b extensions: + - .b - .bf +Brightscript: + type: programming + lexer: Text only + extensions: + - .brs + Bro: type: programming - primary_extension: .bro + extensions: + - .bro C: type: programming color: "#555" - primary_extension: .c extensions: + - .c + - .cats - .w C#: @@ -165,8 +268,9 @@ C#: color: "#5a25a2" aliases: - csharp - primary_extension: .cs extensions: + - .cs + - .cshtml - .csx C++: @@ -176,21 +280,27 @@ C++: color: "#f34b7d" aliases: - cpp - primary_extension: .cpp extensions: + - .cpp - .C - .c++ + - .cc - .cxx - .H - .h++ - .hh + - .hpp - .hxx + - .inl - .tcc + - .tpp + - .ipp C-ObjDump: type: data lexer: c-objdump - primary_extension: .c-objdump + extensions: + - .c-objdump C2hs Haskell: type: programming @@ -198,24 +308,26 @@ C2hs Haskell: group: Haskell aliases: - c2hs - primary_extension: .chs + extensions: + - .chs CLIPS: type: programming lexer: Text only - primary_extension: .clp + extensions: + - .clp CMake: - primary_extension: .cmake extensions: + - .cmake - .cmake.in filenames: - CMakeLists.txt COBOL: type: programming - primary_extension: .cob extensions: + - .cob - .cbl - .ccp - .cobol @@ -223,26 +335,51 @@ COBOL: CSS: ace_mode: css - color: "#1f085e" - primary_extension: .css + color: "#563d7c" + extensions: + - .css Ceylon: type: programming lexer: Ceylon - primary_extension: .ceylon + extensions: + - .ceylon ChucK: lexer: Java - primary_extension: .ck + extensions: + - .ck + +Cirru: + type: programming + color: "#aaaaff" + # ace_mode: cirru + # lexer: Cirru + lexer: Text only + extensions: + - .cirru + +Clean: + type: programming + color: "#3a81ad" + lexer: Text only + extensions: + - .icl + - .dcl Clojure: type: programming ace_mode: clojure color: "#db5855" - primary_extension: .clj extensions: + - .clj + - .cl2 + - .cljc - .cljs + - .cljscm - .cljx + - .hic + - .cljs.hl filenames: - riemann.config @@ -253,13 +390,15 @@ CoffeeScript: aliases: - coffee - coffee-script - primary_extension: .coffee extensions: + - .coffee - ._coffee - .cson - .iced filenames: - Cakefile + interpreters: + - coffee ColdFusion: type: programming @@ -269,8 +408,8 @@ ColdFusion: search_term: cfm aliases: - cfm - primary_extension: .cfm extensions: + - .cfm - .cfc Common Lisp: @@ -278,124 +417,195 @@ Common Lisp: color: "#3fb68b" aliases: - lisp - primary_extension: .lisp extensions: + - .lisp - .asd + - .cl - .lsp - .ny + - .podsl + interpreters: + - lisp + - sbcl + - ccl + - clisp + - ecl + +Component Pascal: + type: programming + lexer: Delphi + color: "#b0ce4e" + extensions: + - .cp + - .cps Coq: type: programming - primary_extension: .coq + extensions: + - .coq Cpp-ObjDump: type: data lexer: cpp-objdump - primary_extension: .cppobjdump extensions: + - .cppobjdump - .c++objdump - .cxx-objdump +Creole: + type: prose + lexer: Text only + wrap: true + extensions: + - .creole + +Crystal: + type: programming + lexer: Ruby + extensions: + - .cr + ace_mode: ruby + Cucumber: lexer: Gherkin - primary_extension: .feature + extensions: + - .feature + +Cuda: + type: programming + lexer: CUDA + extensions: + - .cu + - .cuh Cython: type: programming group: Python - primary_extension: .pyx extensions: + - .pyx - .pxd - .pxi D: type: programming color: "#fcd46d" - primary_extension: .d extensions: + - .d - .di D-ObjDump: type: data lexer: d-objdump - primary_extension: .d-objdump + extensions: + - .d-objdump + +DM: + type: programming + color: "#075ff1" + lexer: C++ + extensions: + - .dm + aliases: + - byond DOT: - type: programming + type: data lexer: Text only - primary_extension: .dot extensions: + - .dot - .gv Darcs Patch: search_term: dpatch aliases: - dpatch - primary_extension: .darcspatch extensions: + - .darcspatch - .dpatch Dart: type: programming - primary_extension: .dart - -Delphi: - type: programming - color: "#b0ce4e" - primary_extension: .pas + color: "#98BAD6" extensions: - - .dfm - - .lpr + - .dart DCPU-16 ASM: type: programming lexer: dasm16 - primary_extension: .dasm16 extensions: + - .dasm16 - .dasm aliases: - dasm16 Diff: - primary_extension: .diff + extensions: + - .diff + +Dogescript: + type: programming + lexer: Text only + color: "#cca760" + extensions: + - .djs Dylan: type: programming color: "#3ebc27" - primary_extension: .dylan + extensions: + - .dylan + - .intr + - .lid + +E: + type: programming + color: "#ccce35" + lexer: Text only + extensions: + - .E Ecere Projects: type: data group: JavaScript lexer: JSON - primary_extension: .epj + extensions: + - .epj -Ecl: +ECL: type: programming color: "#8a1267" - primary_extension: .ecl lexer: ECL extensions: + - .ecl - .eclxml +Eagle: + type: markup + color: "#3994bc" + lexer: XML + extensions: + - .sch + - .brd + Eiffel: type: programming lexer: Text only color: "#946d57" - primary_extension: .e + extensions: + - .e Elixir: type: programming color: "#6e4a7e" - primary_extension: .ex extensions: + - .ex - .exs Elm: type: programming lexer: Haskell - group: Haskell - primary_extension: .elm + extensions: + - .elm Emacs Lisp: type: programming @@ -404,15 +614,17 @@ Emacs Lisp: aliases: - elisp - emacs - primary_extension: .el + filenames: + - .emacs extensions: + - .el - .emacs Erlang: type: programming color: "#0faf8d" - primary_extension: .erl extensions: + - .erl - .hrl F#: @@ -422,17 +634,25 @@ F#: search_term: fsharp aliases: - fsharp - primary_extension: .fs extensions: + - .fs - .fsi - .fsx +FLUX: + type: programming + color: "#33CCFF" + lexer: Text only + extensions: + - .fx + - .flux + FORTRAN: type: programming lexer: Fortran color: "#4d41b1" - primary_extension: .f90 extensions: + - .f90 - .F - .F03 - .F08 @@ -452,7 +672,8 @@ FORTRAN: Factor: type: programming color: "#636746" - primary_extension: .factor + extensions: + - .factor filenames: - .factor-rc - .factor-boot-rc @@ -460,8 +681,8 @@ Factor: Fancy: type: programming color: "#7b9db4" - primary_extension: .fy extensions: + - .fy - .fancypack filenames: - Fakefile @@ -469,70 +690,137 @@ Fancy: Fantom: type: programming color: "#dbded5" - primary_extension: .fan + extensions: + - .fan Forth: type: programming - primary_extension: .fth color: "#341708" lexer: Text only extensions: + - .fth - .4th +Frege: + type: programming + color: "#00cafe" + lexer: Haskell + extensions: + - .fr + +Game Maker Language: + type: programming + color: "#8ad353" + lexer: JavaScript + extensions: + - .gml + +GAMS: + type: programming + lexer: Text only + extensions: + - .gms + +GAP: + type: programming + lexer: Text only + extensions: + - .g + - .gap + - .gd + - .gi + GAS: type: programming group: Assembly - primary_extension: .s extensions: + - .s - .S GLSL: group: C type: programming - primary_extension: .glsl extensions: + - .glsl - .fp - .frag + - .fshader - .geom - .glslv + - .gshader - .shader - .vert + - .vshader Genshi: - primary_extension: .kid + extensions: + - .kid Gentoo Ebuild: group: Shell lexer: Bash - primary_extension: .ebuild + extensions: + - .ebuild Gentoo Eclass: group: Shell lexer: Bash - primary_extension: .eclass + extensions: + - .eclass Gettext Catalog: search_term: pot searchable: false aliases: - pot - primary_extension: .po extensions: + - .po - .pot +Glyph: + type: programming + color: "#e4cc98" + lexer: Tcl + extensions: + - .glf + +Gnuplot: + type: programming + color: "#f0a9f0" + lexer: Gnuplot + extensions: + - .gp + - .gnu + - .gnuplot + - .plot + - .plt + Go: type: programming - color: "#a89b4d" - primary_extension: .go + color: "#375eab" + extensions: + - .go Gosu: type: programming color: "#82937f" - primary_extension: .gs + extensions: + - .gs + +Grammatical Framework: + type: programming + lexer: Haskell + aliases: + - gf + wrap: false + extensions: + - .gf + searchable: true + color: "#ff0000" Groff: - primary_extension: .man extensions: + - .man - '.1' - '.2' - '.3' @@ -545,33 +833,41 @@ Groovy: type: programming ace_mode: groovy color: "#e69f56" - primary_extension: .groovy + extensions: + - .groovy + - .grt + - .gtpl + - .gvy + interpreters: + - groovy Groovy Server Pages: group: Groovy lexer: Java Server Page aliases: - gsp - primary_extension: .gsp + extensions: + - .gsp HTML: type: markup ace_mode: html aliases: - xhtml - primary_extension: .html extensions: + - .html - .htm + - .html.hl + - .st - .xhtml HTML+Django: type: markup group: HTML lexer: HTML+Django/Jinja - primary_extension: .mustache # TODO: This is incorrect extensions: - - .jinja - .mustache + - .jinja HTML+ERB: type: markup @@ -579,8 +875,8 @@ HTML+ERB: lexer: RHTML aliases: - erb - primary_extension: .erb extensions: + - .erb - .erb.deface - .html.erb - .html.erb.deface @@ -588,81 +884,185 @@ HTML+ERB: HTML+PHP: type: markup group: HTML - primary_extension: .phtml + extensions: + - .phtml HTTP: type: data - primary_extension: .http + extensions: + - .http Haml: group: HTML type: markup - primary_extension: .haml extensions: + - .haml - .haml.deface - .html.haml.deface Handlebars: type: markup lexer: Text only - primary_extension: .handlebars + extensions: + - .handlebars + - .hbs + - .html.handlebars + - .html.hbs + +Harbour: + type: programming + lexer: Text only + color: "#0e60e3" + extensions: + - .hb Haskell: type: programming color: "#29b544" - primary_extension: .hs extensions: + - .hs - .hsc Haxe: type: programming - lexer: haXe ace_mode: haxe - color: "#346d51" - primary_extension: .hx + color: "#f7941e" extensions: + - .hx - .hxsl +Hy: + type: programming + lexer: Clojure + ace_mode: clojure + color: "#7891b1" + extensions: + - .hy + +IDL: + type: programming + lexer: Text only + color: "#e3592c" + extensions: + - .pro + INI: type: data extensions: - - .cfg - .ini - .prefs - .properties - primary_extension: .ini + +Inno Setup: + extensions: + - .iss + lexer: Text only + +Idris: + type: programming + lexer: Text only + extensions: + - .idr + - .lidr + +Inform 7: + type: programming + lexer: Text only + wrap: true + extensions: + - .ni + - .i7x + +Inno Setup: + extensions: + - .iss + lexer: Text only IRC log: lexer: IRC logs search_term: irc aliases: - irc - primary_extension: .irclog extensions: + - .irclog - .weechatlog Io: type: programming color: "#a9188d" - primary_extension: .io + extensions: + - .io Ioke: type: programming color: "#078193" - primary_extension: .ik + extensions: + - .ik + +Isabelle: + type: programming + lexer: Text only + color: "#fdcd00" + extensions: + - .thy + +J: + type: programming + lexer: Text only + extensions: + - .ijs JSON: type: data group: JavaScript ace_mode: json searchable: false - primary_extension: .json + extensions: + - .json + - .sublime-keymap + - .sublime-mousemap + - .sublime-project + - .sublime-settings + - .sublime-workspace + - .sublime_metrics + - .sublime_session + filenames: + - .jshintrc + - composer.lock + +JSON5: + type: data + lexer: JavaScript + extensions: + - .json5 + +JSONLD: + type: data + group: JavaScript + ace_mode: json + lexer: JavaScript + extensions: + - .jsonld + +JSONiq: + type: programming + ace_mode: jsoniq + lexer: XQuery + extensions: + - .jq + +Jade: + group: HTML + type: markup + extensions: + - .jade Java: type: programming ace_mode: java color: "#b07219" - primary_extension: .java + extensions: + - .java Java Server Pages: group: Java @@ -670,64 +1070,115 @@ Java Server Pages: search_term: jsp aliases: - jsp - primary_extension: .jsp + extensions: + - .jsp JavaScript: type: programming ace_mode: javascript - color: "#f15501" + color: "#f1e05a" aliases: - js - node - primary_extension: .js extensions: + - .js - ._js - .bones + - .es6 + - .frag - .jake - .jsfl - .jsm - .jss - .jsx + - .njs - .pac - .sjs - .ssjs filenames: - Jakefile + interpreters: + - node Julia: type: programming - primary_extension: .jl + extensions: + - .jl + color: "#a270ba" + +KRL: + lexer: Text only + type: programming + color: "#f5c800" + extensions: + - .krl + +Kit: + type: markup + lexer: HTML + ace_mode: html + extensions: + - .kit Kotlin: type: programming - primary_extension: .kt extensions: + - .kt - .ktm - .kts +LFE: + type: programming + extensions: + - .lfe + color: "#004200" + lexer: Common Lisp + group: Erlang + LLVM: - primary_extension: .ll + extensions: + - .ll Lasso: type: programming lexer: Lasso - ace_mode: lasso color: "#2584c3" - primary_extension: .lasso + extensions: + - .lasso + +Latte: + type: markup + color: "#A8FF97" + group: HTML + lexer: Smarty + extensions: + - .latte Less: type: markup group: CSS lexer: CSS - ace_mode: less - primary_extension: .less + extensions: + - .less LilyPond: lexer: Text only - primary_extension: .ly extensions: + - .ly - .ily +Liquid: + type: markup + lexer: Text only + extensions: + - .liquid + +Literate Agda: + type: programming + group: Agda + extensions: + - .lagda + Literate CoffeeScript: type: programming group: CoffeeScript @@ -737,7 +1188,8 @@ Literate CoffeeScript: search_term: litcoffee aliases: - litcoffee - primary_extension: .litcoffee + extensions: + - .litcoffee Literate Haskell: type: programming @@ -745,7 +1197,8 @@ Literate Haskell: search_term: lhs aliases: - lhs - primary_extension: .lhs + extensions: + - .lhs LiveScript: type: programming @@ -753,41 +1206,49 @@ LiveScript: color: "#499886" aliases: - ls - primary_extension: .ls extensions: + - .ls - ._ls filenames: - Slakefile Logos: type: programming - primary_extension: .xm extensions: - - .x - - .xi - - .xmi + - .xm Logtalk: type: programming - primary_extension: .lgt extensions: + - .lgt - .logtalk Lua: type: programming ace_mode: lua color: "#fa1fa1" - primary_extension: .lua extensions: + - .lua - .nse - .rbxs + interpreters: + - lua M: type: programming lexer: Common Lisp aliases: - mumps - primary_extension: .m + extensions: + - .mumps + - .m + +MTML: + type: markup + lexer: HTML + color: "#0095d9" + extensions: + - .mtml Makefile: aliases: @@ -795,58 +1256,97 @@ Makefile: extensions: - .mak - .mk - primary_extension: .mak filenames: - makefile - Makefile - GNUmakefile + interpreters: + - make Mako: - primary_extension: .mako extensions: + - .mako - .mao Markdown: - type: markup + type: prose lexer: Text only ace_mode: markdown wrap: true - primary_extension: .md extensions: + - .md - .markdown - .mkd + - .mkdn - .mkdown - .ron +Mask: + type: markup + lexer: SCSS + color: "#f97732" + ace_mode: scss + extensions: + - .mask + +Mathematica: + type: programming + extensions: + - .mathematica + - .m + - .nb + lexer: Text only + Matlab: type: programming color: "#bb92ac" - primary_extension: .matlab + extensions: + - .matlab + - .m Max: type: programming color: "#ce279c" - lexer: Text only + lexer: JSON aliases: - max/msp - maxmsp search_term: max/msp - primary_extension: .mxt extensions: - - .maxhelp - .maxpat + - .maxhelp + - .maxproj + - .mxt + - .pat + +MediaWiki: + type: prose + lexer: Text only + wrap: true + extensions: + - .mediawiki + +Mercury: + type: programming + color: "#abcdef" + lexer: Prolog + ace_mode: prolog + extensions: + - .m + - .moo MiniD: # Legacy searchable: false - primary_extension: .minid # Dummy extension + extensions: + - .minid # Dummy extension Mirah: type: programming lexer: Ruby search_term: ruby color: "#c7a938" - primary_extension: .druby extensions: + - .druby - .duby - .mir - .mirah @@ -854,53 +1354,75 @@ Mirah: Monkey: type: programming lexer: Monkey - primary_extension: .monkey + extensions: + - .monkey Moocode: + type: programming lexer: MOOCode - primary_extension: .moo + extensions: + - .moo MoonScript: type: programming - primary_extension: .moon + extensions: + - .moon Myghty: - primary_extension: .myt + extensions: + - .myt NSIS: - primary_extension: .nsi + extensions: + - .nsi Nemerle: type: programming color: "#0d3c6e" - primary_extension: .n + extensions: + - .n + +NetLogo: + type: programming + lexer: Common Lisp + color: "#ff2b2b" + extensions: + - .nlogo Nginx: type: markup lexer: Nginx configuration file - primary_extension: .nginxconf + extensions: + - .nginxconf Nimrod: type: programming color: "#37775b" - primary_extension: .nim extensions: + - .nim - .nimrod +Nix: + type: programming + lexer: Nix + extensions: + - .nix + Nu: type: programming lexer: Scheme color: "#c9df40" aliases: - nush - primary_extension: .nu + extensions: + - .nu filenames: - Nukefile NumPy: group: Python - primary_extension: .numpy extensions: + - .numpy - .numpyw - .numsc @@ -908,9 +1430,10 @@ OCaml: type: programming ace_mode: ocaml color: "#3be133" - primary_extension: .ml extensions: + - .ml - .eliomi + - .ml4 - .mli - .mll - .mly @@ -918,7 +1441,8 @@ OCaml: ObjDump: type: data lexer: objdump - primary_extension: .objdump + extensions: + - .objdump Objective-C: type: programming @@ -926,7 +1450,15 @@ Objective-C: aliases: - obj-c - objc - primary_extension: .m + extensions: + - .m + +Objective-C++: + type: programming + color: "#4886FC" + aliases: + - obj-c++ + - objc++ extensions: - .mm @@ -935,26 +1467,28 @@ Objective-J: color: "#ff0c5a" aliases: - obj-j - primary_extension: .j extensions: + - .j - .sj Omgrofl: type: programming - primary_extension: .omgrofl + extensions: + - .omgrofl color: "#cabbff" lexer: Text only Opa: type: programming - primary_extension: .opa + extensions: + - .opa OpenCL: type: programming group: C lexer: C - primary_extension: .cl extensions: + - .cl - .opencl OpenEdge ABL: @@ -963,14 +1497,44 @@ OpenEdge ABL: - progress - openedge - abl - primary_extension: .p + extensions: + - .p + +Org: + type: prose + lexer: Text only + wrap: true + extensions: + - .org + +Ox: + type: programming + lexer: Text only + extensions: + - .ox + - .oxh + - .oxo + +Oxygene: + type: programming + lexer: Text only + color: "#5a63a3" + extensions: + - .oxygene + +PAWN: + type: programming + lexer: C++ + color: "#dbb284" + extensions: + - .pwn PHP: type: programming ace_mode: php - color: "#6e03c1" - primary_extension: .php + color: "#4F5D95" extensions: + - .php - .aw - .ctp - .php3 @@ -980,11 +1544,19 @@ PHP: filenames: - Phakefile +Pan: + type: programming + lexer: Text only + color: '#cc0000' + extensions: + - .pan + Parrot: type: programming color: "#f3ca0a" lexer: Text only - primary_extension: .parrot # Dummy extension + extensions: + - .parrot # Dummy extension Parrot Internal Representation: group: Parrot @@ -992,7 +1564,8 @@ Parrot Internal Representation: lexer: Text only aliases: - pir - primary_extension: .pir + extensions: + - .pir Parrot Assembly: group: Parrot @@ -1000,61 +1573,119 @@ Parrot Assembly: lexer: Text only aliases: - pasm - primary_extension: .pasm + extensions: + - .pasm + +Pascal: + type: programming + lexer: Delphi + color: "#b0ce4e" + extensions: + - .pas + - .dfm + - .lpr Perl: type: programming ace_mode: perl color: "#0298c3" - primary_extension: .pl extensions: + - .pl - .PL - - .nqp - .perl - .ph - .plx - - .pm6 + - .pm - .pod - .psgi + interpreters: + - perl + +Perl6: + type: programming + color: "#0298c3" + extensions: + - .p6 + - .6pl + - .6pm + - .nqp + - .p6l + - .p6m + - .pl6 + - .pm6 Pike: type: programming color: "#066ab2" lexer: Pike - primary_extension: .pike extensions: + - .pike - .pmod +Pod: + type: prose + lexer: Text only + ace_mode: perl + wrap: true + extensions: + - .pod + PogoScript: type: programming color: "#d80074" lexer: Text only - primary_extension: .pogo + extensions: + - .pogo + +PostScript: + type: markup + extensions: + - .ps + - .eps PowerShell: type: programming ace_mode: powershell aliases: - posh - primary_extension: .ps1 + extensions: + - .ps1 + - .psd1 + - .psm1 Processing: type: programming lexer: Java color: "#2779ab" - primary_extension: .pde + extensions: + - .pde Prolog: type: programming color: "#74283c" - primary_extension: .prolog extensions: - - .pro + - .prolog + - .ecl + - .pl + +Propeller Spin: + type: programming + lexer: Text only + color: "#2b446d" + extensions: + - .spin + +Protocol Buffer: + type: markup + aliases: + - protobuf + - Protocol Buffers + extensions: + - .proto Puppet: type: programming color: "#cc5555" - primary_extension: .pp extensions: - .pp filenames: @@ -1064,46 +1695,109 @@ Pure Data: type: programming color: "#91de79" lexer: Text only - primary_extension: .pd + extensions: + - .pd + +PureScript: + type: programming + color: "#bcdc53" + lexer: Haskell + extensions: + - .purs Python: type: programming ace_mode: python color: "#3581ba" - primary_extension: .py extensions: + - .py - .gyp + - .lmi + - .pyde + - .pyp - .pyt - .pyw - .wsgi - .xpy filenames: - wscript + - SConstruct + - SConscript + interpreters: + - python Python traceback: type: data group: Python lexer: Python Traceback searchable: false - primary_extension: .pytb + extensions: + - .pytb + +QML: + type: markup + color: "#44a51c" + extensions: + - .qml R: type: programming color: "#198ce7" lexer: S - primary_extension: .r + aliases: + - R + - Rscript + extensions: + - .r + - .R + - .Rd + - .rd + - .rsx + filenames: + - .Rprofile + interpreters: + - Rscript + +RDoc: + type: prose + lexer: Text only + ace_mode: rdoc + wrap: true + extensions: + - .rdoc + +REALbasic: + type: programming + lexer: VB.net + extensions: + - .rbbas + - .rbfrm + - .rbmnu + - .rbres + - .rbtbar + - .rbuistate RHTML: type: markup group: HTML - primary_extension: .rhtml + extensions: + - .rhtml + +RMarkdown: + type: prose + lexer: Text only + wrap: true + ace_mode: markdown + extensions: + - .rmd + - .Rmd Racket: type: programming lexer: Racket color: "#ae17ff" - primary_extension: .rkt extensions: + - .rkt - .rktd - .rktl @@ -1111,32 +1805,52 @@ Ragel in Ruby Host: type: programming lexer: Ragel in Ruby Host color: "#ff9c2e" - primary_extension: .rl + extensions: + - .rl Raw token data: search_term: raw aliases: - raw - primary_extension: .raw + extensions: + - .raw Rebol: type: programming lexer: REBOL color: "#358a5b" - primary_extension: .rebol extensions: + - .reb + - .r - .r2 - .r3 + - .rebol + +Red: + type: programming + lexer: Text only + color: "#ee0000" + extensions: + - .red + - .reds Redcode: - primary_extension: .cw + extensions: + - .cw + +RobotFramework: + type: programming + extensions: + - .robot + # - .txt Rouge: type: programming lexer: Clojure ace_mode: clojure color: "#cc0088" - primary_extension: .rg + extensions: + - .rg Ruby: type: programming @@ -1148,12 +1862,13 @@ Ruby: - rake - rb - rbx - primary_extension: .rb extensions: + - .rb - .builder - .gemspec - .god - .irbrc + - .mspec - .podspec - .rbuild - .rbw @@ -1161,65 +1876,109 @@ Ruby: - .ru - .thor - .watchr + interpreters: + - ruby filenames: + - Appraisals - Berksfile + - Buildfile - Gemfile + - Gemfile.lock - Guardfile - Podfile - Thorfile - Vagrantfile + - buildfile Rust: type: programming color: "#dea584" - primary_extension: .rs + extensions: + - .rs + +SAS: + type: programming + color: "#1E90FF" + lexer: Text only + extensions: + - .sas SCSS: type: markup group: CSS ace_mode: scss - primary_extension: .scss + extensions: + - .scss SQL: type: data ace_mode: sql - searchable: false - primary_extension: .sql + extensions: + - .sql + - .prc + - .tab + - .udf + - .viw + +STON: + type: data + group: Smalltalk + lexer: JSON + extensions: + - .ston Sage: type: programming lexer: Python group: Python - primary_extension: .sage + extensions: + - .sage Sass: type: markup group: CSS - primary_extension: .sass + extensions: + - .sass Scala: type: programming ace_mode: scala color: "#7dd3b0" - primary_extension: .scala + extensions: + - .scala + - .sc + +Scaml: + group: HTML + type: markup + extensions: + - .scaml Scheme: type: programming color: "#1e4aec" - primary_extension: .scm extensions: + - .scm + - .sld - .sls - .ss + interpreters: + - guile + - racket + - bigloo + - chicken Scilab: type: programming - primary_extension: .sci + extensions: + - .sci Self: type: programming color: "#0579aa" lexer: Text only - primary_extension: .self + extensions: + - .self Shell: type: programming @@ -1230,105 +1989,202 @@ Shell: - sh - bash - zsh - primary_extension: .sh extensions: + - .sh + - .bats - .tmux + interpreters: + - bash + - sh + - zsh filenames: - Dockerfile +ShellSession: + type: programming + lexer: Bash Session + extensions: + - .sh-session + +Shen: + type: programming + color: "#120F14" + lexer: Text only + extensions: + - .shen + Slash: type: programming color: "#007eff" - primary_extension: .sl + extensions: + - .sl + +Slim: + group: HTML + type: markup + lexer: Slim + color: "#ff8877" + extensions: + - .slim Smalltalk: type: programming color: "#596706" - primary_extension: .st + extensions: + - .st Smarty: - primary_extension: .tpl + extensions: + - .tpl + +SourcePawn: + type: programming + color: "#f69e1d" + aliases: + - sourcemod + extensions: + - .sp + +Squirrel: + type: programming + lexer: C++ + extensions: + - .nut Standard ML: type: programming color: "#dc566d" aliases: - sml - primary_extension: .sml + extensions: + - .ML + - .fun + - .sml + +Stata: + type: programming + lexer: Text only + extensions: + - .do + - .ado + - .doh + - .ihlp + - .mata + - .matah + - .sthlp + +Stylus: + type: markup + group: CSS + lexer: Text only + extensions: + - .styl SuperCollider: type: programming color: "#46390b" lexer: Text only - primary_extension: .sc + extensions: + - .scd + +Swift: + type: programming + lexer: Swift + color: "#ffac45" + extensions: + - .swift + +SystemVerilog: + type: programming + color: "#343761" + lexer: systemverilog + extensions: + - .sv + - .svh + - .vh TOML: type: data - primary_extension: .toml + extensions: + - .toml TXL: type: programming lexer: Text only - primary_extension: .txl + extensions: + - .txl Tcl: type: programming color: "#e4cc98" - primary_extension: .tcl + extensions: + - .tcl + - .adp + - .tm Tcsh: type: programming group: Shell - primary_extension: .tcsh extensions: + - .tcsh - .csh TeX: type: markup + color: "#3D6117" ace_mode: latex + wrap: true aliases: - latex - primary_extension: .tex extensions: + - .tex - .aux + - .bib + - .cls - .dtx - .ins - .ltx + - .mkii + - .mkiv + - .mkvi - .sty - .toc Tea: type: markup - primary_extension: .tea + extensions: + - .tea Textile: - type: markup + type: prose lexer: Text only ace_mode: textile wrap: true - primary_extension: .textile + extensions: + - .textile Turing: type: programming color: "#45f715" lexer: Text only - primary_extension: .t extensions: + - .t - .tu Twig: type: markup group: PHP lexer: HTML+Django/Jinja - primary_extension: .twig + extensions: + - .twig TypeScript: type: programming color: "#31859c" - lexer: Text only aliases: - ts - primary_extension: .ts + extensions: + - .ts Unified Parallel C: type: programming @@ -1336,30 +2192,52 @@ Unified Parallel C: lexer: C ace_mode: c_cpp color: "#755223" - primary_extension: .upc + extensions: + - .upc + +UnrealScript: + type: programming + color: "#a54c4d" + lexer: Java + extensions: + - .uc + +VCL: + type: programming + lexer: Perl + ace_mode: perl + color: "#0298c3" + extensions: + - .vcl VHDL: type: programming lexer: vhdl color: "#543978" - primary_extension: .vhdl + extensions: + - .vhdl + - .vhd + - .vhf + - .vhi + - .vho + - .vhs + - .vht + - .vhw Vala: type: programming color: "#ee7d06" - primary_extension: .vala extensions: + - .vala - .vapi Verilog: type: programming lexer: verilog color: "#848bf3" - primary_extension: .v extensions: - - .sv - - .svh - - .vh + - .v + - .veo VimL: type: programming @@ -1367,8 +2245,10 @@ VimL: search_term: vim aliases: - vim - primary_extension: .vim + extensions: + - .vim filenames: + - .vimrc - vimrc - gvimrc @@ -1376,23 +2256,27 @@ Visual Basic: type: programming lexer: VB.net color: "#945db7" - primary_extension: .vb extensions: + - .vb - .bas + - .frm - .frx - .vba + - .vbhtml - .vbs Volt: type: programming lexer: D color: "#0098db" - primary_extension: .volt + extensions: + - .volt XC: type: programming lexer: C - primary_extension: .xc + extensions: + - .xc XML: type: markup @@ -1401,23 +2285,39 @@ XML: - rss - xsd - wsdl - primary_extension: .xml extensions: + - .xml - .axml - .ccxml + - .clixml + - .cproject + - .csproj + - .ct - .dita - .ditamap - .ditaval + - .filters + - .fsproj - .glade - .grxml + - .jelly - .kml + - .launch - .mxml + - .nproj + - .nuspec + - .osm - .plist + - .pluginspec + - .ps1xml + - .psc1 - .pt - .rdf - .rss - .scxml + - .srdf - .svg + - .targets - .tmCommand - .tmLanguage - .tmPreferences @@ -1425,11 +2325,16 @@ XML: - .tmTheme - .tml - .ui + - .urdf + - .vbproj + - .vcxproj - .vxml - .wsdl - .wxi - .wxl - .wxs + - .x3d + - .xacro - .xaml - .xlf - .xliff @@ -1440,52 +2345,84 @@ XML: filenames: - .classpath - .project + - phpunit.xml.dist XProc: type: programming lexer: XML - primary_extension: .xpl extensions: + - .xpl - .xproc XQuery: type: programming color: "#2700e2" - primary_extension: .xquery extensions: + - .xquery - .xq + - .xql + - .xqm - .xqy XS: lexer: C - primary_extension: .xs + extensions: + - .xs XSLT: type: programming aliases: - xsl - primary_extension: .xslt extensions: - - .xsl + - .xslt + - .xsl + +Xojo: + type: programming + lexer: VB.net + extensions: + - .xojo_code + - .xojo_menu + - .xojo_report + - .xojo_script + - .xojo_toolbar + - .xojo_window Xtend: type: programming - primary_extension: .xtend + extensions: + - .xtend YAML: - type: markup + type: data aliases: - yml - primary_extension: .yml extensions: + - .yml - .reek + - .rviz - .yaml +Zephir: + type: programming + lexer: PHP + color: "#118f9e" + extensions: + - .zep + +Zimpl: + type: programming + lexer: Text only + extensions: + - .zimpl + - .zmpl + - .zpl + eC: type: programming search_term: ec - primary_extension: .ec extensions: + - .ec - .eh edn: @@ -1493,32 +2430,43 @@ edn: lexer: Clojure ace_mode: clojure color: "#db5855" - primary_extension: .edn + extensions: + - .edn fish: type: programming group: Shell lexer: Text only - primary_extension: .fish + extensions: + - .fish mupad: lexer: MuPAD - primary_extension: .mu + extensions: + - .mu + +nesC: + type: programming + color: "#ffce3b" + lexer: nesC + extensions: + - .nc ooc: type: programming lexer: Ooc color: "#b0b77e" - primary_extension: .ooc + extensions: + - .ooc reStructuredText: - type: markup + type: prose wrap: true search_term: rst aliases: - rst - primary_extension: .rst extensions: + - .rst - .rest wisp: @@ -1526,4 +2474,12 @@ wisp: lexer: Clojure ace_mode: clojure color: "#7582D1" - primary_extension: .wisp + extensions: + - .wisp + +xBase: + type: programming + lexer: Text only + color: "#3a4040" + extensions: + - .prg diff --git a/lib/linguist/repository.rb b/lib/linguist/repository.rb index 4b34be0a..a62bf281 100644 --- a/lib/linguist/repository.rb +++ b/lib/linguist/repository.rb @@ -29,6 +29,7 @@ module Linguist @computed_stats = false @language = @size = nil @sizes = Hash.new { 0 } + @file_breakdown = Hash.new { |h,k| h[k] = Array.new } end # Public: Returns a breakdown of language stats. @@ -60,6 +61,12 @@ module Linguist @size end + # Public: Return the language breakdown of this repository by file + def breakdown_by_file + compute_stats + @file_breakdown + end + # Internal: Compute language breakdown for each blob in the Repository. # # Returns nothing @@ -75,6 +82,10 @@ module Linguist # Only include programming languages and acceptable markup languages if blob.language.type == :programming || Language.detectable_markup.include?(blob.language.name) + + # Build up the per-file breakdown stats + @file_breakdown[blob.language.group.name] << blob.name + @sizes[blob.language.group] += blob.size end end diff --git a/lib/linguist/samples.json b/lib/linguist/samples.json index 23d3c788..75a92152 100644 --- a/lib/linguist/samples.json +++ b/lib/linguist/samples.json @@ -3,6 +3,12 @@ "ABAP": [ ".abap" ], + "Agda": [ + ".agda" + ], + "Alloy": [ + ".als" + ], "Apex": [ ".cls" ], @@ -12,45 +18,124 @@ "Arduino": [ ".ino" ], + "AsciiDoc": [ + ".adoc", + ".asc", + ".asciidoc" + ], + "AspectJ": [ + ".aj" + ], + "Assembly": [ + ".asm", + ".inc" + ], + "ATS": [ + ".atxt", + ".dats", + ".hats", + ".sats" + ], "AutoHotkey": [ ".ahk" ], "Awk": [ ".awk" ], + "BlitzBasic": [ + ".bb" + ], + "Bluespec": [ + ".bsv" + ], + "Brightscript": [ + ".brs" + ], "C": [ ".c", + ".cats", ".h" ], + "C#": [ + ".cs", + ".cshtml" + ], "C++": [ ".cc", ".cpp", - ".cu", ".h", - ".hpp" + ".hpp", + ".inl", + ".ipp" ], "Ceylon": [ ".ceylon" ], + "Cirru": [ + ".cirru" + ], + "Clojure": [ + ".cl2", + ".clj", + ".cljc", + ".cljs", + ".cljscm", + ".cljx", + ".hic" + ], + "COBOL": [ + ".cbl", + ".ccp", + ".cob", + ".cpy" + ], "CoffeeScript": [ ".coffee" ], + "Common Lisp": [ + ".cl", + ".lisp" + ], + "Component Pascal": [ + ".cp", + ".cps" + ], "Coq": [ ".v" ], + "Creole": [ + ".creole" + ], + "Crystal": [ + ".cr" + ], "CSS": [ ".css" ], + "Cuda": [ + ".cu", + ".cuh" + ], "Dart": [ ".dart" ], - "Delphi": [ - ".dpr" - ], "Diff": [ ".patch" ], - "Ecl": [ + "DM": [ + ".dm" + ], + "Dogescript": [ + ".djs" + ], + "E": [ + ".E" + ], + "Eagle": [ + ".brd", + ".sch" + ], + "ECL": [ ".ecl" ], "edn": [ @@ -74,18 +159,46 @@ ".forth", ".fth" ], + "Frege": [ + ".fr" + ], + "Game Maker Language": [ + ".gml" + ], + "GAMS": [ + ".gms" + ], + "GAP": [ + ".g", + ".gd", + ".gi" + ], "GAS": [ ".s" ], + "GLSL": [ + ".fp", + ".frag", + ".glsl" + ], + "Gnuplot": [ + ".gnu", + ".gp" + ], "Gosu": [ ".gs", - ".gsp", ".gst", ".gsx", ".vark" ], + "Grammatical Framework": [ + ".gf" + ], "Groovy": [ ".gradle", + ".grt", + ".gtpl", + ".gvy", ".script!" ], "Groovy Server Pages": [ @@ -98,36 +211,90 @@ ".handlebars", ".hbs" ], + "Haskell": [ + ".hs" + ], + "HTML": [ + ".html", + ".st" + ], + "Hy": [ + ".hy" + ], + "IDL": [ + ".dlm", + ".pro" + ], + "Idris": [ + ".idr" + ], + "Inform 7": [ + ".i7x", + ".ni" + ], "Ioke": [ ".ik" ], + "Isabelle": [ + ".thy" + ], + "Jade": [ + ".jade" + ], "Java": [ ".java" ], "JavaScript": [ + ".frag", ".js", ".script!" ], "JSON": [ ".json", - ".maxhelp", - ".maxpat" + ".lock" + ], + "JSON5": [ + ".json5" + ], + "JSONiq": [ + ".jq" + ], + "JSONLD": [ + ".jsonld" ], "Julia": [ ".jl" ], + "Kit": [ + ".kit" + ], "Kotlin": [ ".kt" ], + "KRL": [ + ".krl" + ], "Lasso": [ ".las", ".lasso", ".lasso9", ".ldml" ], + "Latte": [ + ".latte" + ], "Less": [ ".less" ], + "LFE": [ + ".lfe" + ], + "Liquid": [ + ".liquid" + ], + "Literate Agda": [ + ".lagda" + ], "Literate CoffeeScript": [ ".litcoffee" ], @@ -152,24 +319,52 @@ "Markdown": [ ".md" ], + "Mask": [ + ".mask" + ], + "Mathematica": [ + ".m", + ".nb" + ], "Matlab": [ ".m" ], "Max": [ + ".maxhelp", + ".maxpat", ".mxt" ], + "MediaWiki": [ + ".mediawiki" + ], + "Mercury": [ + ".m", + ".moo" + ], "Monkey": [ ".monkey" ], + "Moocode": [ + ".moo" + ], "MoonScript": [ ".moon" ], + "MTML": [ + ".mtml" + ], "Nemerle": [ ".n" ], + "NetLogo": [ + ".nlogo" + ], "Nimrod": [ ".nim" ], + "Nix": [ + ".nix" + ], "NSIS": [ ".nsh", ".nsi" @@ -182,6 +377,9 @@ ".h", ".m" ], + "Objective-C++": [ + ".mm" + ], "OCaml": [ ".eliom", ".ml" @@ -199,31 +397,62 @@ ".cls", ".p" ], + "Org": [ + ".org" + ], + "Ox": [ + ".ox", + ".oxh", + ".oxo" + ], + "Oxygene": [ + ".oxygene" + ], + "Pan": [ + ".pan" + ], "Parrot Assembly": [ ".pasm" ], "Parrot Internal Representation": [ ".pir" ], + "Pascal": [ + ".dpr" + ], + "PAWN": [ + ".pwn" + ], "Perl": [ ".fcgi", ".pl", ".pm", + ".pod", ".script!", ".t" ], + "Perl6": [ + ".p6", + ".pm6" + ], "PHP": [ ".module", ".php", ".script!" ], "Pike": [ - ".pmod", - ".pike" + ".pike", + ".pmod" + ], + "Pod": [ + ".pod" ], "PogoScript": [ ".pogo" ], + "PostScript": [ + ".ps" + ], "PowerShell": [ ".ps1", ".psm1" @@ -232,25 +461,57 @@ ".pde" ], "Prolog": [ - ".pl" + ".ecl", + ".pl", + ".prolog" + ], + "Propeller Spin": [ + ".spin" + ], + "Protocol Buffer": [ + ".proto" + ], + "PureScript": [ + ".purs" ], "Python": [ ".py", + ".pyde", + ".pyp", ".script!" ], "R": [ ".R", + ".Rd", + ".r", + ".rsx", ".script!" ], "Racket": [ - ".scrbl", - ".script!" + ".scrbl" ], "Ragel in Ruby Host": [ ".rl" ], + "RDoc": [ + ".rdoc" + ], "Rebol": [ - ".r" + ".r", + ".r2", + ".r3", + ".reb", + ".rebol" + ], + "Red": [ + ".red", + ".reds" + ], + "RMarkdown": [ + ".rmd" + ], + "RobotFramework": [ + ".robot" ], "Ruby": [ ".pluginspec", @@ -262,15 +523,23 @@ "Rust": [ ".rs" ], + "SAS": [ + ".sas" + ], "Sass": [ ".sass", ".scss" ], "Scala": [ ".sbt", + ".sc", ".script!" ], + "Scaml": [ + ".scaml" + ], "Scheme": [ + ".sld", ".sps" ], "Scilab": [ @@ -287,17 +556,69 @@ ".sh", ".zsh" ], + "ShellSession": [ + ".sh-session" + ], + "Shen": [ + ".shen" + ], "Slash": [ ".sl" ], + "Slim": [ + ".slim" + ], + "Smalltalk": [ + ".st" + ], + "SourcePawn": [ + ".sp" + ], + "SQL": [ + ".prc", + ".sql", + ".tab", + ".udf", + ".viw" + ], + "Squirrel": [ + ".nut" + ], "Standard ML": [ + ".ML", + ".fun", ".sig", ".sml" ], + "Stata": [ + ".ado", + ".do", + ".doh", + ".ihlp", + ".mata", + ".matah", + ".sthlp" + ], + "STON": [ + ".ston" + ], + "Stylus": [ + ".styl" + ], "SuperCollider": [ - ".sc", ".scd" ], + "Swift": [ + ".swift" + ], + "SystemVerilog": [ + ".sv", + ".svh", + ".vh" + ], + "Tcl": [ + ".tm" + ], "Tea": [ ".tea" ], @@ -313,6 +634,12 @@ "TypeScript": [ ".ts" ], + "UnrealScript": [ + ".uc" + ], + "VCL": [ + ".vcl" + ], "Verilog": [ ".v" ], @@ -320,7 +647,12 @@ ".vhd" ], "Visual Basic": [ - ".cls" + ".cls", + ".vb", + ".vbhtml" + ], + "Volt": [ + ".volt" ], "wisp": [ ".wisp" @@ -330,9 +662,26 @@ ], "XML": [ ".ant", + ".csproj", + ".filters", + ".fsproj", ".ivy", + ".nproj", + ".nuspec", + ".pluginspec", + ".targets", + ".vbproj", + ".vcxproj", ".xml" ], + "Xojo": [ + ".xojo_code", + ".xojo_menu", + ".xojo_report", + ".xojo_script", + ".xojo_toolbar", + ".xojo_window" + ], "XProc": [ ".xpl" ], @@ -344,7 +693,19 @@ ], "Xtend": [ ".xtend" + ], + "YAML": [ + ".yml" + ], + "Zephir": [ + ".zep" + ], + "Zimpl": [ + ".zmpl" ] + }, + "interpreters": { + }, "filenames": { "ApacheConf": [ @@ -365,7 +726,11 @@ "Perl": [ "ack" ], + "R": [ + "expr-dist" + ], "Ruby": [ + "Appraisals", "Capfile", "Rakefile" ], @@ -401,10 +766,15 @@ ], "YAML": [ ".gemrc" + ], + "Zephir": [ + "exception.zep.c", + "exception.zep.h", + "exception.zep.php" ] }, - "tokens_total": 407642, - "languages_total": 439, + "tokens_total": 643251, + "languages_total": 836, "tokens": { "ABAP": { "*/**": 1, @@ -665,6 +1035,299 @@ "pos": 2, "endclass.": 1 }, + "Agda": { + "module": 3, + "NatCat": 1, + "where": 2, + "open": 2, + "import": 2, + "Relation.Binary.PropositionalEquality": 1, + "-": 21, + "If": 1, + "you": 2, + "can": 1, + "show": 1, + "that": 1, + "a": 1, + "relation": 1, + "only": 1, + "ever": 1, + "has": 1, + "one": 1, + "inhabitant": 5, + "get": 1, + "the": 1, + "category": 1, + "laws": 1, + "for": 1, + "free": 1, + "EasyCategory": 3, + "(": 36, + "obj": 4, + "Set": 2, + ")": 36, + "_": 6, + "{": 10, + "x": 34, + "y": 28, + "z": 18, + "}": 10, + "id": 9, + "single": 4, + "r": 26, + "s": 29, + "assoc": 2, + "w": 4, + "t": 6, + "Data.Nat": 1, + "same": 5, + ".0": 2, + "n": 14, + "refl": 6, + ".": 5, + "suc": 6, + "m": 6, + "cong": 1, + "trans": 5, + ".n": 1, + "zero": 1, + "Nat": 1 + }, + "Alloy": { + "module": 3, + "examples/systems/file_system": 1, + "abstract": 2, + "sig": 20, + "Object": 10, + "{": 54, + "}": 60, + "Name": 2, + "File": 1, + "extends": 10, + "some": 3, + "d": 3, + "Dir": 8, + "|": 19, + "this": 14, + "in": 19, + "d.entries.contents": 1, + "entries": 3, + "set": 10, + "DirEntry": 2, + "parent": 3, + "lone": 6, + "this.": 4, + "@contents.": 1, + "@entries": 1, + "all": 16, + "e1": 2, + "e2": 2, + "e1.name": 1, + "e2.name": 1, + "@parent": 2, + "Root": 5, + "one": 8, + "no": 8, + "Cur": 1, + "name": 1, + "contents": 2, + "pred": 16, + "OneParent_buggyVersion": 2, + "-": 41, + "d.parent": 2, + "OneParent_correctVersion": 2, + "(": 12, + "&&": 2, + "contents.d": 1, + ")": 9, + "NoDirAliases": 3, + "o": 1, + "o.": 1, + "check": 6, + "for": 7, + "expect": 6, + "examples/systems/marksweepgc": 1, + "Node": 10, + "HeapState": 5, + "left": 3, + "right": 1, + "marked": 1, + "freeList": 1, + "clearMarks": 1, + "[": 82, + "hs": 16, + ".marked": 3, + ".right": 4, + "hs.right": 3, + "fun": 1, + "reachable": 1, + "n": 5, + "]": 80, + "+": 14, + "n.": 1, + "hs.left": 2, + "mark": 1, + "from": 2, + "hs.reachable": 1, + "setFreeList": 1, + ".freeList.*": 3, + ".left": 5, + "hs.marked": 1, + "GC": 1, + "root": 5, + "assert": 3, + "Soundness1": 2, + "h": 9, + "live": 3, + "h.reachable": 1, + "h.right": 1, + "Soundness2": 2, + ".reachable": 2, + "h.GC": 1, + ".freeList": 1, + "Completeness": 1, + "examples/systems/views": 1, + "open": 2, + "util/ordering": 1, + "State": 16, + "as": 2, + "so": 1, + "util/relation": 1, + "rel": 1, + "Ref": 19, + "t": 16, + "b": 13, + "v": 25, + "views": 2, + "when": 1, + "is": 1, + "view": 2, + "of": 3, + "type": 1, + "backing": 1, + "dirty": 3, + "contains": 1, + "refs": 7, + "that": 1, + "have": 1, + "been": 1, + "invalidated": 1, + "obj": 1, + "ViewType": 8, + "anyviews": 2, + "visualization": 1, + "ViewType.views": 1, + "Map": 2, + "keys": 3, + "map": 2, + "s": 6, + "Ref.map": 1, + "s.refs": 3, + "MapRef": 4, + "fact": 4, + "State.obj": 3, + "Iterator": 2, + "done": 3, + "lastRef": 2, + "IteratorRef": 5, + "Set": 2, + "elts": 2, + "SetRef": 5, + "KeySetView": 6, + "State.views": 1, + "IteratorView": 3, + "s.views": 2, + "handle": 1, + "possibility": 1, + "modifying": 1, + "an": 1, + "object": 1, + "and": 1, + "its": 1, + "at": 1, + "once": 1, + "*": 1, + "should": 1, + "we": 1, + "limit": 1, + "frame": 1, + "conds": 1, + "to": 1, + "non": 1, + "*/": 1, + "modifies": 5, + "pre": 15, + "post": 14, + "rs": 4, + "let": 5, + "vr": 1, + "pre.views": 8, + "mods": 3, + "rs.*vr": 1, + "r": 3, + "pre.refs": 6, + "pre.obj": 10, + "post.obj": 7, + "viewFrame": 4, + "post.dirty": 1, + "pre.dirty": 1, + "allocates": 5, + "&": 3, + "post.refs": 1, + ".map": 3, + ".elts": 3, + "dom": 1, + "<:>": 1, + "setRefs": 1, + "MapRef.put": 1, + "k": 5, + "none": 4, + "post.views": 4, + "SetRef.iterator": 1, + "iterRef": 4, + "i": 7, + "i.left": 3, + "i.done": 1, + "i.lastRef": 1, + "IteratorRef.remove": 1, + ".lastRef": 2, + "IteratorRef.next": 1, + "ref": 3, + "IteratorRef.hasNext": 1, + "s.obj": 1, + "zippishOK": 2, + "ks": 6, + "vs": 6, + "m": 4, + "ki": 2, + "vi": 2, + "s0": 4, + "so/first": 1, + "s1": 4, + "so/next": 7, + "s2": 6, + "s3": 4, + "s4": 4, + "s5": 4, + "s6": 4, + "s7": 2, + "precondition": 2, + "s0.dirty": 1, + "ks.iterator": 1, + "vs.iterator": 1, + "ki.hasNext": 1, + "vi.hasNext": 1, + "ki.this/next": 1, + "vi.this/next": 1, + "m.put": 1, + "ki.remove": 1, + "vi.remove": 1, + "State.dirty": 1, + "ViewType.pre.views": 2, + "but": 1, + "#s.obj": 1, + "<": 1 + }, "ApacheConf": { "ServerSignature": 1, "Off": 1, @@ -1775,6 +2438,2029 @@ "loop": 1, "Serial.print": 1 }, + "AsciiDoc": { + "Gregory": 2, + "Rom": 2, + "has": 2, + "written": 2, + "an": 2, + "AsciiDoc": 3, + "plugin": 2, + "for": 2, + "the": 2, + "Redmine": 2, + "project": 2, + "management": 2, + "application.": 2, + "https": 1, + "//github.com/foo": 1, + "-": 4, + "users/foo": 1, + "vicmd": 1, + "gif": 1, + "tag": 1, + "rom": 2, + "[": 2, + "]": 2, + "end": 1, + "berschrift": 1, + "*": 4, + "Codierungen": 1, + "sind": 1, + "verr": 1, + "ckt": 1, + "auf": 1, + "lteren": 1, + "Versionen": 1, + "von": 1, + "Ruby": 1, + "Home": 1, + "Page": 1, + "Example": 1, + "Articles": 1, + "Item": 6, + "Document": 1, + "Title": 1, + "Doc": 1, + "Writer": 1, + "": 1, + "idprefix": 1, + "id_": 1, + "Preamble": 1, + "paragraph.": 4, + "NOTE": 1, + "This": 1, + "is": 1, + "test": 1, + "only": 1, + "a": 1, + "test.": 1, + "Section": 3, + "A": 2, + "*Section": 3, + "A*": 2, + "Subsection": 1, + "B": 2, + "B*": 1, + ".Section": 1, + "list": 1 + }, + "AspectJ": { + "package": 2, + "com.blogspot.miguelinlas3.aspectj.cache": 1, + ";": 29, + "import": 5, + "java.util.Map": 2, + "java.util.WeakHashMap": 1, + "org.aspectj.lang.JoinPoint": 1, + "com.blogspot.miguelinlas3.aspectj.cache.marker.Cachable": 1, + "public": 6, + "aspect": 2, + "CacheAspect": 1, + "{": 11, + "pointcut": 3, + "cache": 3, + "(": 46, + "Cachable": 2, + "cachable": 5, + ")": 46, + "execution": 1, + "@Cachable": 2, + "*": 2, + "..": 1, + "&&": 2, + "@annotation": 1, + "Object": 15, + "around": 2, + "String": 3, + "evaluatedKey": 6, + "this.evaluateKey": 1, + "cachable.scriptKey": 1, + "thisJoinPoint": 1, + "if": 2, + "cache.containsKey": 1, + "System.out.println": 5, + "+": 7, + "return": 5, + "this.cache.get": 1, + "}": 11, + "value": 3, + "proceed": 2, + "cache.put": 1, + "protected": 2, + "evaluateKey": 1, + "key": 2, + "JoinPoint": 1, + "joinPoint": 1, + "//": 1, + "TODO": 1, + "add": 1, + "some": 1, + "smart": 1, + "staff": 1, + "to": 1, + "allow": 1, + "simple": 1, + "scripting": 1, + "in": 1, + "annotation": 1, + "Map": 3, + "": 2, + "new": 1, + "WeakHashMap": 1, + "aspects.caching": 1, + "abstract": 3, + "OptimizeRecursionCache": 2, + "@SuppressWarnings": 3, + "private": 1, + "_cache": 2, + "getCache": 2, + "operation": 4, + "o": 16, + "topLevelOperation": 4, + "cflowbelow": 1, + "before": 1, + "cachedValue": 4, + "_cache.get": 1, + "null": 1, + "after": 2, + "returning": 2, + "result": 3, + "_cache.put": 1, + "_cache.size": 1 + }, + "Assembly": { + ";": 20, + "flat": 4, + "assembler": 6, + "core": 2, + "Copyright": 4, + "(": 13, + "c": 4, + ")": 6, + "-": 87, + "Tomasz": 4, + "Grysztar.": 4, + "All": 4, + "rights": 4, + "reserved.": 4, + "xor": 52, + "eax": 510, + "mov": 1253, + "[": 2026, + "stub_size": 1, + "]": 2026, + "current_pass": 16, + "ax": 87, + "resolver_flags": 1, + "number_of_sections": 1, + "actual_fixups_size": 1, + "assembler_loop": 2, + "labels_list": 3, + "tagged_blocks": 23, + "additional_memory": 6, + "free_additional_memory": 2, + "additional_memory_end": 9, + "structures_buffer": 9, + "esi": 619, + "source_start": 1, + "edi": 250, + "code_start": 2, + "dword": 87, + "adjustment": 4, + "+": 232, + "addressing_space": 17, + "error_line": 16, + "counter": 13, + "format_flags": 2, + "number_of_relocations": 1, + "undefined_data_end": 4, + "file_extension": 1, + "next_pass_needed": 16, + "al": 1174, + "output_format": 3, + "adjustment_sign": 2, + "code_type": 106, + "call": 845, + "init_addressing_space": 6, + "pass_loop": 2, + "assemble_line": 3, + "jnc": 11, + "cmp": 1088, + "je": 485, + "pass_done": 2, + "sub": 64, + "h": 376, + "current_line": 24, + "jmp": 450, + "missing_end_directive": 7, + "close_pass": 1, + "check_symbols": 2, + "memory_end": 7, + "jae": 34, + "symbols_checked": 2, + "test": 95, + "byte": 549, + "jz": 107, + "symbol_defined_ok": 5, + "cx": 42, + "jne": 485, + "and": 50, + "not": 42, + "or": 194, + "use_prediction_ok": 5, + "jnz": 125, + "check_use_prediction": 2, + "use_misprediction": 3, + "check_next_symbol": 5, + "define_misprediction": 4, + "check_define_prediction": 2, + "add": 76, + "LABEL_STRUCTURE_SIZE": 1, + "next_pass": 3, + "assemble_ok": 2, + "error": 7, + "undefined_symbol": 2, + "error_confirmed": 3, + "error_info": 2, + "error_handler": 3, + "esp": 14, + "ret": 70, + "inc": 87, + "passes_limit": 3, + "code_cannot_be_generated": 1, + "create_addressing_space": 1, + "ebx": 336, + "Ah": 25, + "illegal_instruction": 48, + "Ch": 11, + "jbe": 11, + "out_of_memory": 19, + "ja": 28, + "lods": 366, + "assemble_instruction": 2, + "jb": 34, + "source_end": 2, + "define_label": 2, + "define_constant": 2, + "label_addressing_space": 2, + "Fh": 73, + "new_line": 2, + "code_type_setting": 2, + "segment_prefix": 2, + "instruction_assembled": 138, + "prefixed_instruction": 11, + "symbols_file": 4, + "continue_line": 8, + "line_assembled": 3, + "invalid_use_of_symbol": 17, + "reserved_word_used_as_symbol": 6, + "label_size": 5, + "make_label": 3, + "edx": 219, + "cl": 42, + "ebp": 49, + "ds": 21, + "sbb": 9, + "jp": 2, + "label_value_ok": 2, + "recoverable_overflow": 4, + "address_sign": 4, + "make_virtual_label": 2, + "xchg": 31, + "ch": 55, + "shr": 30, + "neg": 4, + "setnz": 5, + "ah": 229, + "finish_label": 2, + "setne": 14, + "finish_label_symbol": 2, + "b": 30, + "label_symbol_ok": 2, + "new_label": 2, + "symbol_already_defined": 3, + "btr": 2, + "jc": 28, + "requalified_label": 2, + "label_made": 4, + "push": 150, + "get_constant_value": 4, + "dl": 58, + "size_override": 7, + "get_value": 2, + "pop": 99, + "bl": 124, + "ecx": 153, + "constant_referencing_mode_ok": 2, + "value_type": 42, + "make_constant": 2, + "value_sign": 3, + "constant_symbol_ok": 2, + "symbol_identifier": 4, + "new_constant": 2, + "redeclare_constant": 2, + "requalified_constant": 2, + "make_addressing_space_label": 3, + "dx": 27, + "operand_size": 121, + "operand_prefix": 9, + "opcode_prefix": 30, + "rex_prefix": 9, + "vex_required": 2, + "vex_register": 1, + "immediate_size": 9, + "instruction_handler": 32, + "movzx": 13, + "word": 79, + "extra_characters_on_line": 8, + "clc": 11, + "dec": 30, + "stc": 9, + "org_directive": 1, + "invalid_argument": 28, + "invalid_value": 21, + "get_qword_value": 5, + "in_virtual": 2, + "org_space_ok": 2, + "close_virtual_addressing_space": 3, + "org_value_ok": 2, + "bts": 1, + "label_directive": 1, + "get_label_size": 2, + "label_size_ok": 2, + "get_free_label_value": 2, + "get_address_value": 3, + "bh": 34, + "bp": 2, + "shl": 17, + "bx": 8, + "make_free_label": 1, + "address_symbol": 2, + "load_directive": 1, + "load_size_ok": 2, + "value": 38, + "get_data_point": 3, + "value_loaded": 2, + "rep": 7, + "movs": 8, + "get_data_address": 5, + "addressing_space_unavailable": 3, + "symbol_out_of_scope": 1, + "get_addressing_space": 3, + "store_label_reference": 1, + "calculate_relative_offset": 2, + "data_address_type_ok": 2, + "adc": 9, + "bad_data_address": 3, + "store_directive": 1, + "sized_store": 2, + "get_byte_value": 23, + "store_value_ok": 2, + "undefined_data_start": 3, + "display_directive": 2, + "display_byte": 2, + "stos": 107, + "display_next": 2, + "show_display_buffer": 2, + "display_done": 3, + "display_messages": 2, + "skip_block": 2, + "display_block": 4, + "times_directive": 1, + "get_count_value": 6, + "zero_times": 3, + "times_argument_ok": 2, + "counter_limit": 7, + "times_loop": 2, + "stack_overflow": 2, + "stack_limit": 2, + "times_done": 2, + "skip_symbol": 5, + "virtual_directive": 3, + "virtual_at_current": 2, + "set_virtual": 2, + "allocate_structure_data": 5, + "find_structure_data": 6, + "scan_structures": 2, + "no_such_structure": 2, + "structure_data_found": 2, + "end_virtual": 2, + "unexpected_instruction": 18, + "remove_structure_data": 7, + "lea": 8, + "std": 2, + "cld": 2, + "addressing_space_closed": 2, + "virtual_byte_ok": 2, + "virtual_word_ok": 2, + "repeat_directive": 7, + "zero_repeat": 2, + "end_repeat": 2, + "continue_repeating": 2, + "stop_repeat": 2, + "find_end_repeat": 4, + "find_structure_end": 5, + "while_directive": 7, + "do_while": 2, + "calculate_logical_expression": 3, + "while_true": 2, + "stop_while": 2, + "find_end_while": 3, + "end_while": 2, + "too_many_repeats": 1, + "if_directive": 13, + "if_true": 2, + "find_else": 4, + "else_true": 3, + "make_if_structure": 2, + "else_directive": 3, + "found_else": 2, + "skip_else": 3, + "find_end_if": 3, + "end_if": 2, + "else_found": 2, + "find_end_directive": 10, + "no_end_directive": 2, + "skip_labels": 2, + "labels_ok": 2, + "prefix_instruction": 2, + "skip_repeat": 2, + "skip_while": 2, + "skip_if": 2, + "structure_end": 4, + "end_directive": 2, + "skip_if_block": 4, + "if_block_skipped": 2, + "skip_after_else": 3, + "data_directive": 1, + "end_data": 1, + "break_directive": 1, + "find_breakable_structure": 4, + "break_repeat": 2, + "break_while": 2, + "break_if": 2, + "data_bytes": 1, + "define_data": 8, + "get_byte": 2, + "undefined_data": 7, + "get_string": 2, + "mark_undefined_data": 2, + "undefined_data_ok": 2, + "simple_data_value": 3, + "skip_expression": 1, + "duplicate_zero_times": 2, + "duplicate_single_data_value": 3, + "duplicate_data": 2, + "duplicated_values": 2, + "near": 3, + "data_defined": 5, + "skip_single_data_value": 2, + "skip_data_value": 2, + "data_unicode": 1, + "base_code": 195, + "define_words": 2, + "data_words": 1, + "get_word": 2, + "scas": 10, + "word_data_value": 2, + "word_string": 2, + "get_word_value": 19, + "mark_relocation": 26, + "jecxz": 1, + "word_string_ok": 2, + "ecx*2": 1, + "copy_word_string": 2, + "loop": 2, + "data_dwords": 1, + "get_dword": 2, + "get_dword_value": 13, + "complex_dword": 2, + "invalid_operand": 239, + "data_pwords": 1, + "get_pword": 2, + "get_pword_value": 1, + "complex_pword": 2, + "data_qwords": 1, + "get_qword": 2, + "data_twords": 1, + "get_tword": 2, + "complex_tword": 2, + "fp_zero_tword": 2, + "FFFh": 3, + "jo": 2, + "value_out_of_range": 10, + "jge": 5, + "jg": 1, + "tword_exp_ok": 3, + "large_shift": 2, + "shrd": 1, + "tword_mantissa_shift_done": 2, + "store_shifted_mantissa": 2, + "data_file": 2, + "open_binary_file": 2, + "lseek": 5, + "position_ok": 2, + "size_ok": 2, + "read": 3, + "error_reading_file": 1, + "close": 3, + "find_current_source_path": 2, + "get_current_path": 3, + "lodsb": 12, + "stosb": 6, + "cut_current_path": 1, + "current_path_ok": 1, + "/": 1, + ".": 7, + "invalid_align_value": 3, + "section_not_aligned_enough": 4, + "make_alignment": 3, + "pe_alignment": 2, + "nops": 2, + "reserved_data": 2, + "nops_stosb_ok": 2, + "nops_stosw_ok": 2, + "err_directive": 1, + "invoked_error": 2, + "assert_directive": 1, + "assertion_failed": 1, + "interface": 2, + "for": 2, + "Win32": 2, + "format": 1, + "PE": 1, + "console": 1, + "section": 4, + "code": 1, + "readable": 4, + "executable": 1, + "start": 1, + "con_handle": 8, + "STD_OUTPUT_HANDLE": 2, + "_logo": 2, + "display_string": 19, + "get_params": 2, + "information": 2, + "init_memory": 2, + "_memory_prefix": 2, + "memory_start": 4, + "display_number": 8, + "_memory_suffix": 2, + "GetTickCount": 3, + "start_time": 3, + "preprocessor": 1, + "parser": 1, + "formatter": 1, + "display_user_messages": 3, + "_passes_suffix": 2, + "div": 8, + "display_bytes_count": 2, + "display_character": 6, + "_seconds_suffix": 2, + "written_size": 1, + "_bytes_suffix": 2, + "exit_program": 5, + "_usage": 2, + "input_file": 4, + "output_file": 3, + "memory_setting": 4, + "GetCommandLine": 2, + "params": 2, + "find_command_start": 2, + "skip_quoted_name": 3, + "skip_name": 2, + "find_param": 7, + "all_params": 5, + "option_param": 2, + "Dh": 19, + "get_output_file": 2, + "process_param": 3, + "bad_params": 11, + "string_param": 3, + "copy_param": 2, + "param_end": 6, + "string_param_end": 2, + "memory_option": 4, + "passes_option": 4, + "symbols_option": 3, + "get_option_value": 3, + "get_option_digit": 2, + "option_value_ok": 4, + "invalid_option_value": 5, + "imul": 1, + "find_symbols_file_name": 2, + "include": 15, + "data": 3, + "writeable": 2, + "_copyright": 1, + "db": 35, + "VERSION_STRING": 1, + "align": 1, + "dd": 22, + "bytes_count": 8, + "displayed_count": 4, + "character": 3, + "last_displayed": 5, + "rb": 4, + "options": 1, + "buffer": 14, + "stack": 1, + "import": 1, + "rva": 16, + "kernel_name": 2, + "kernel_table": 2, + "ExitProcess": 2, + "_ExitProcess": 2, + "CreateFile": 3, + "_CreateFileA": 2, + "ReadFile": 2, + "_ReadFile": 2, + "WriteFile": 6, + "_WriteFile": 2, + "CloseHandle": 2, + "_CloseHandle": 2, + "SetFilePointer": 2, + "_SetFilePointer": 2, + "_GetCommandLineA": 2, + "GetEnvironmentVariable": 2, + "_GetEnvironmentVariable": 2, + "GetStdHandle": 5, + "_GetStdHandle": 2, + "VirtualAlloc": 2, + "_VirtualAlloc": 2, + "VirtualFree": 2, + "_VirtualFree": 2, + "_GetTickCount": 2, + "GetSystemTime": 2, + "_GetSystemTime": 2, + "GlobalMemoryStatus": 2, + "_GlobalMemoryStatus": 2, + "dw": 14, + "fixups": 1, + "discardable": 1, + "CREATE_NEW": 1, + "CREATE_ALWAYS": 2, + "OPEN_EXISTING": 2, + "OPEN_ALWAYS": 1, + "TRUNCATE_EXISTING": 1, + "FILE_SHARE_READ": 3, + "FILE_SHARE_WRITE": 1, + "FILE_SHARE_DELETE": 1, + "GENERIC_READ": 2, + "GENERIC_WRITE": 2, + "STD_INPUT_HANDLE": 1, + "FFFFFFF6h": 1, + "FFFFFFF5h": 1, + "STD_ERROR_HANDLE": 3, + "FFFFFFF4h": 1, + "MEM_COMMIT": 2, + "MEM_RESERVE": 1, + "MEM_DECOMMIT": 1, + "MEM_RELEASE": 2, + "MEM_FREE": 1, + "MEM_PRIVATE": 1, + "MEM_MAPPED": 1, + "MEM_RESET": 1, + "MEM_TOP_DOWN": 1, + "PAGE_NOACCESS": 1, + "PAGE_READONLY": 1, + "PAGE_READWRITE": 2, + "PAGE_WRITECOPY": 1, + "PAGE_EXECUTE": 1, + "PAGE_EXECUTE_READ": 1, + "PAGE_EXECUTE_READWRITE": 1, + "PAGE_EXECUTE_WRITECOPY": 1, + "PAGE_GUARD": 1, + "PAGE_NOCACHE": 1, + "allocate_memory": 4, + "jl": 13, + "large_memory": 3, + "not_enough_memory": 2, + "do_exit": 2, + "get_environment_variable": 1, + "buffer_for_variable_ok": 2, + "open": 2, + "file_error": 6, + "create": 1, + "write": 1, + "repne": 1, + "scasb": 1, + "display_loop": 2, + "display_digit": 3, + "digit_ok": 2, + "line_break_ok": 4, + "make_line_break": 2, + "A0Dh": 2, + "D0Ah": 1, + "take_last_two_characters": 2, + "block_displayed": 2, + "block_ok": 2, + "fatal_error": 1, + "error_prefix": 3, + "error_suffix": 3, + "FFh": 4, + "assembler_error": 1, + "get_error_lines": 2, + "get_next_error_line": 2, + "display_error_line": 3, + "find_definition_origin": 2, + "line_number_start": 3, + "FFFFFFFh": 2, + "line_number_ok": 2, + "line_data_start": 2, + "line_data_displayed": 2, + "get_line_data": 2, + "display_line_data": 5, + "cr_lf": 2, + "make_timestamp": 1, + "mul": 5, + "months_correction": 2, + "day_correction_ok": 4, + "day_correction": 2, + "simple_instruction_except64": 1, + "simple_instruction": 6, + "simple_instruction_only64": 1, + "simple_instruction_16bit_except64": 1, + "simple_instruction_16bit": 2, + "size_prefix": 3, + "simple_instruction_32bit_except64": 1, + "simple_instruction_32bit": 6, + "iret_instruction": 1, + "simple_instruction_64bit": 2, + "simple_extended_instruction_64bit": 1, + "simple_extended_instruction": 1, + "segment_register": 7, + "store_segment_prefix": 1, + "int_instruction": 1, + "get_size_operator": 137, + "invalid_operand_size": 131, + "jns": 1, + "int_imm_ok": 2, + "CDh": 1, + "aa_instruction": 1, + "aa_store": 2, + "basic_instruction": 1, + "basic_reg": 2, + "basic_mem": 1, + "get_address": 62, + "basic_mem_imm": 2, + "basic_mem_reg": 1, + "convert_register": 60, + "postbyte_register": 137, + "instruction_ready": 72, + "operand_autodetect": 47, + "store_instruction": 3, + "basic_mem_imm_nosize": 2, + "basic_mem_imm_8bit": 2, + "basic_mem_imm_16bit": 2, + "basic_mem_imm_32bit": 2, + "basic_mem_imm_64bit": 1, + "size_declared": 17, + "long_immediate_not_encodable": 14, + "operand_64bit": 18, + "get_simm32": 10, + "basic_mem_imm_32bit_ok": 2, + "recoverable_unknown_size": 19, + "store_instruction_with_imm8": 11, + "operand_16bit": 25, + "basic_mem_imm_16bit_store": 3, + "basic_mem_simm_8bit": 5, + "store_instruction_with_imm16": 4, + "operand_32bit": 27, + "basic_mem_imm_32bit_store": 3, + "store_instruction_with_imm32": 4, + "cdq": 11, + "get_simm32_ok": 2, + "basic_reg_reg": 2, + "basic_reg_imm": 2, + "basic_reg_mem": 1, + "basic_reg_mem_8bit": 2, + "nomem_instruction_ready": 53, + "store_nomem_instruction": 19, + "basic_reg_imm_8bit": 2, + "basic_reg_imm_16bit": 2, + "basic_reg_imm_32bit": 2, + "basic_reg_imm_64bit": 1, + "basic_reg_imm_32bit_ok": 2, + "basic_al_imm": 2, + "basic_reg_imm_16bit_store": 3, + "basic_reg_simm_8bit": 5, + "basic_ax_imm": 2, + "basic_store_imm_16bit": 2, + "store_instruction_code": 26, + "basic_reg_imm_32bit_store": 3, + "basic_eax_imm": 2, + "basic_store_imm_32bit": 2, + "ignore_unknown_size": 2, + "operand_size_not_specified": 1, + "single_operand_instruction": 1, + "F6h": 4, + "single_reg": 2, + "single_mem": 1, + "single_mem_8bit": 2, + "single_mem_nosize": 2, + "single_reg_8bit": 2, + "mov_instruction": 1, + "mov_reg": 2, + "mov_mem": 1, + "mov_mem_imm": 2, + "mov_mem_reg": 1, + "mov_mem_general_reg": 2, + "mov_mem_sreg": 2, + "mov_mem_reg_8bit": 2, + "mov_mem_ax": 2, + "mov_mem_al": 1, + "mov_mem_address16_al": 3, + "mov_mem_address32_al": 3, + "mov_mem_address64_al": 3, + "invalid_address_size": 18, + "store_segment_prefix_if_necessary": 17, + "address_32bit_prefix": 11, + "A2h": 3, + "store_mov_address32": 4, + "store_address_32bit_value": 1, + "address_16bit_prefix": 11, + "store_mov_address16": 4, + "invalid_address": 32, + "store_mov_address64": 4, + "store_address_64bit_value": 1, + "mov_mem_address16_ax": 3, + "mov_mem_address32_ax": 3, + "mov_mem_address64_ax": 3, + "A3h": 3, + "mov_mem_sreg_store": 2, + "mov_mem_imm_nosize": 2, + "mov_mem_imm_8bit": 2, + "mov_mem_imm_16bit": 2, + "mov_mem_imm_32bit": 2, + "mov_mem_imm_64bit": 1, + "mov_mem_imm_32bit_store": 2, + "C6h": 1, + "C7h": 4, + "F0h": 7, + "mov_sreg": 2, + "mov_reg_mem": 2, + "mov_reg_imm": 2, + "mov_reg_reg": 1, + "mov_reg_sreg": 2, + "mov_reg_reg_8bit": 2, + "mov_reg_creg": 2, + "mov_reg_dreg": 2, + "mov_reg_treg": 2, + "mov_reg_sreg64": 2, + "mov_reg_sreg32": 2, + "mov_reg_sreg_store": 3, + "extended_code": 73, + "mov_reg_xrx": 3, + "mov_reg_xrx_64bit": 2, + "mov_reg_xrx_store": 3, + "mov_reg_mem_8bit": 2, + "mov_ax_mem": 2, + "mov_al_mem": 2, + "mov_al_mem_address16": 3, + "mov_al_mem_address32": 3, + "mov_al_mem_address64": 3, + "A0h": 4, + "mov_ax_mem_address16": 3, + "mov_ax_mem_address32": 3, + "mov_ax_mem_address64": 3, + "A1h": 4, + "mov_reg_imm_8bit": 2, + "mov_reg_imm_16bit": 2, + "mov_reg_imm_32bit": 2, + "mov_reg_imm_64bit": 1, + "mov_reg_imm_64bit_store": 3, + "mov_reg_64bit_imm_32bit": 2, + "B8h": 3, + "store_mov_reg_imm_code": 5, + "B0h": 5, + "mov_store_imm_32bit": 2, + "mov_reg_imm_prefix_ok": 2, + "mov_creg": 2, + "mov_dreg": 2, + "mov_treg": 2, + "mov_sreg_mem": 2, + "mov_sreg_reg": 1, + "mov_sreg_reg_size_ok": 2, + "Eh": 8, + "mov_sreg_mem_size_ok": 2, + "mov_xrx": 3, + "mov_xrx_64bit": 2, + "mov_xrx_store": 4, + "test_instruction": 1, + "test_reg": 2, + "test_mem": 1, + "test_mem_imm": 2, + "test_mem_reg": 2, + "test_mem_reg_8bit": 2, + "test_mem_imm_nosize": 2, + "test_mem_imm_8bit": 2, + "test_mem_imm_16bit": 2, + "test_mem_imm_32bit": 2, + "test_mem_imm_64bit": 1, + "test_mem_imm_32bit_store": 2, + "F7h": 5, + "test_reg_mem": 3, + "test_reg_imm": 2, + "test_reg_reg": 1, + "test_reg_reg_8bit": 2, + "test_reg_imm_8bit": 2, + "test_reg_imm_16bit": 2, + "test_reg_imm_32bit": 2, + "test_reg_imm_64bit": 1, + "test_reg_imm_32bit_store": 2, + "test_al_imm": 2, + "A8h": 1, + "test_ax_imm": 2, + "A9h": 2, + "test_eax_imm": 2, + "test_reg_mem_8bit": 2, + "xchg_instruction": 1, + "xchg_reg": 2, + "xchg_mem": 1, + "xchg_reg_reg": 1, + "xchg_reg_reg_8bit": 2, + "xchg_ax_reg": 2, + "xchg_reg_reg_store": 3, + "xchg_ax_reg_ok": 3, + "xchg_ax_reg_store": 2, + "push_instruction": 1, + "push_size": 9, + "push_next": 2, + "push_reg": 2, + "push_imm": 2, + "push_mem": 1, + "push_mem_16bit": 3, + "push_mem_32bit": 3, + "push_mem_64bit": 3, + "push_mem_store": 4, + "push_done": 5, + "push_sreg": 2, + "push_reg_ok": 2, + "push_reg_16bit": 2, + "push_reg_32bit": 2, + "push_reg_64bit": 1, + "push_reg_store": 5, + "dh": 37, + "push_sreg16": 3, + "push_sreg32": 3, + "push_sreg64": 3, + "push_sreg_store": 4, + "push_sreg_386": 2, + "push_imm_size_ok": 3, + "push_imm_16bit": 2, + "push_imm_32bit": 2, + "push_imm_64bit": 2, + "push_imm_optimized_16bit": 3, + "push_imm_optimized_32bit": 3, + "push_imm_optimized_64bit": 2, + "push_imm_32bit_store": 8, + "push_imm_8bit": 3, + "push_imm_16bit_store": 4, + "pop_instruction": 1, + "pop_next": 2, + "pop_reg": 2, + "pop_mem": 1, + "pop_mem_16bit": 3, + "pop_mem_32bit": 3, + "pop_mem_64bit": 3, + "pop_mem_store": 4, + "pop_done": 3, + "pop_sreg": 2, + "pop_reg_ok": 2, + "pop_reg_16bit": 2, + "pop_reg_32bit": 2, + "pop_reg_64bit": 2, + "pop_reg_store": 5, + "pop_cs": 2, + "pop_sreg16": 3, + "pop_sreg32": 3, + "pop_sreg64": 3, + "pop_sreg_store": 4, + "pop_sreg_386": 2, + "pop_cs_store": 3, + "inc_instruction": 1, + "inc_reg": 2, + "inc_mem": 2, + "inc_mem_8bit": 2, + "inc_mem_nosize": 2, + "FEh": 2, + "inc_reg_8bit": 2, + "inc_reg_long_form": 2, + "set_instruction": 1, + "set_reg": 2, + "set_mem": 1, + "arpl_instruction": 1, + "arpl_reg": 2, + "bound_instruction": 1, + "bound_store": 2, + "enter_instruction": 1, + "enter_imm16_size_ok": 2, + "enter_imm16_ok": 2, + "js": 3, + "enter_imm8_size_ok": 2, + "enter_imm8_ok": 2, + "C8h": 2, + "ret_instruction_only64": 1, + "ret_instruction": 5, + "ret_instruction_32bit_except64": 1, + "ret_instruction_32bit": 1, + "ret_instruction_16bit": 1, + "retf_instruction": 1, + "ret_instruction_64bit": 1, + "simple_ret": 4, + "ret_imm": 3, + "ret_imm_ok": 2, + "ret_imm_store": 2, + "lea_instruction": 1, + "ls_instruction": 1, + "les_instruction": 2, + "lds_instruction": 2, + "ls_code_ok": 2, + "C4h": 1, + "ls_short_code": 2, + "C5h": 2, + "ls_16bit": 2, + "ls_32bit": 2, + "ls_64bit": 2, + "sh_instruction": 1, + "sh_reg": 2, + "sh_mem": 1, + "sh_mem_imm": 2, + "sh_mem_reg": 1, + "sh_mem_cl_8bit": 2, + "sh_mem_cl_nosize": 2, + "D3h": 2, + "D2h": 2, + "sh_mem_imm_size_ok": 2, + "sh_mem_imm_8bit": 2, + "sh_mem_imm_nosize": 2, + "sh_mem_1": 2, + "C1h": 2, + "D1h": 2, + "sh_mem_1_8bit": 2, + "C0h": 2, + "D0h": 2, + "sh_reg_imm": 2, + "sh_reg_reg": 1, + "sh_reg_cl_8bit": 2, + "sh_reg_imm_size_ok": 2, + "sh_reg_imm_8bit": 2, + "sh_reg_1": 2, + "sh_reg_1_8bit": 2, + "shd_instruction": 1, + "shd_reg": 2, + "shd_mem": 1, + "shd_mem_reg_imm": 2, + "shd_mem_reg_imm_size_ok": 2, + "shd_reg_reg_imm": 2, + "shd_reg_reg_imm_size_ok": 2, + "movx_instruction": 1, + "movx_reg": 2, + "movx_unknown_size": 2, + "movx_mem_store": 3, + "movx_reg_8bit": 2, + "movx_reg_16bit": 2, + "movsxd_instruction": 1, + "movsxd_reg": 2, + "movsxd_mem_store": 2, + "bt_instruction": 1, + "bt_reg": 2, + "bt_mem_imm": 3, + "bt_mem_reg": 2, + "bt_mem_imm_size_ok": 2, + "bt_mem_imm_nosize": 2, + "bt_mem_imm_store": 2, + "BAh": 2, + "bt_reg_imm": 3, + "bt_reg_reg": 2, + "bt_reg_imm_size_ok": 2, + "bt_reg_imm_store": 1, + "bs_instruction": 1, + "get_reg_mem": 2, + "bs_reg_reg": 2, + "get_reg_reg": 2, + "imul_instruction": 1, + "imul_reg": 2, + "imul_mem": 1, + "imul_mem_8bit": 2, + "imul_mem_nosize": 2, + "imul_reg_": 2, + "imul_reg_8bit": 2, + "imul_reg_imm": 3, + "imul_reg_noimm": 2, + "imul_reg_reg": 2, + "imul_reg_mem": 1, + "imul_reg_mem_imm": 2, + "AFh": 2, + "imul_reg_mem_imm_16bit": 2, + "imul_reg_mem_imm_32bit": 2, + "imul_reg_mem_imm_64bit": 1, + "imul_reg_mem_imm_32bit_ok": 2, + "imul_reg_mem_imm_16bit_store": 4, + "imul_reg_mem_imm_8bit_store": 3, + "imul_reg_mem_imm_32bit_store": 4, + "Bh": 11, + "imul_reg_reg_imm": 3, + "imul_reg_reg_imm_16bit": 2, + "imul_reg_reg_imm_32bit": 2, + "imul_reg_reg_imm_64bit": 1, + "imul_reg_reg_imm_32bit_ok": 2, + "imul_reg_reg_imm_16bit_store": 4, + "imul_reg_reg_imm_8bit_store": 3, + "imul_reg_reg_imm_32bit_store": 4, + "in_instruction": 1, + "in_imm": 2, + "in_reg": 2, + "in_al_dx": 2, + "in_ax_dx": 2, + "EDh": 1, + "ECh": 1, + "in_imm_size_ok": 2, + "in_al_imm": 2, + "in_ax_imm": 2, + "E5h": 1, + "E4h": 1, + "out_instruction": 1, + "out_imm": 2, + "out_dx_al": 2, + "out_dx_ax": 2, + "EFh": 1, + "EEh": 1, + "out_imm_size_ok": 2, + "out_imm_al": 2, + "out_imm_ax": 2, + "E7h": 1, + "E6h": 1, + "call_instruction": 1, + "E8h": 3, + "process_jmp": 2, + "jmp_instruction": 1, + "E9h": 1, + "EAh": 1, + "get_jump_operator": 3, + "jmp_imm": 2, + "jmp_reg": 2, + "jmp_mem": 1, + "jump_type": 14, + "jmp_mem_size_not_specified": 2, + "jmp_mem_16bit": 3, + "jmp_mem_32bit": 2, + "jmp_mem_48bit": 2, + "jmp_mem_64bit": 2, + "jmp_mem_80bit": 2, + "jmp_mem_far": 2, + "jmp_mem_near": 2, + "jmp_mem_near_32bit": 3, + "jmp_mem_far_32bit": 4, + "jmp_mem_far_store": 3, + "jmp_reg_16bit": 2, + "jmp_reg_32bit": 2, + "jmp_reg_64bit": 1, + "jmp_far": 2, + "jmp_near": 1, + "jmp_imm_16bit": 3, + "jmp_imm_32bit": 2, + "jmp_imm_64bit": 3, + "get_address_dword_value": 3, + "jmp_imm_32bit_prefix_ok": 2, + "calculate_jump_offset": 10, + "check_for_short_jump": 8, + "jmp_short": 3, + "jmp_imm_32bit_store": 2, + "jno": 2, + "jmp_imm_32bit_ok": 2, + "relative_jump_out_of_range": 6, + "get_address_qword_value": 3, + "EBh": 1, + "get_address_word_value": 3, + "jmp_imm_16bit_prefix_ok": 2, + "cwde": 3, + "forced_short": 2, + "no_short_jump": 4, + "short_jump": 4, + "jmp_short_value_type_ok": 2, + "jump_out_of_range": 3, + "jmp_far_16bit": 2, + "jmp_far_32bit": 3, + "jmp_far_segment": 2, + "conditional_jump": 1, + "conditional_jump_16bit": 3, + "conditional_jump_32bit": 2, + "conditional_jump_64bit": 3, + "conditional_jump_32bit_prefix_ok": 2, + "conditional_jump_short": 4, + "conditional_jump_32bit_store": 2, + "conditional_jump_32bit_range_ok": 2, + "conditional_jump_16bit_prefix_ok": 2, + "loop_instruction_16bit": 1, + "loop_instruction": 5, + "loop_instruction_32bit": 1, + "loop_instruction_64bit": 1, + "loop_jump_16bit": 3, + "loop_jump_32bit": 2, + "loop_jump_64bit": 3, + "loop_jump_32bit_prefix_ok": 2, + "loop_counter_size": 4, + "make_loop_jump": 3, + "loop_counter_size_ok": 2, + "loop_jump_16bit_prefix_ok": 2, + "movs_instruction": 1, + "address_sizes_do_not_agree": 2, + "movs_address_16bit": 2, + "movs_address_32bit": 2, + "movs_store": 3, + "A4h": 1, + "movs_check_size": 5, + "lods_instruction": 1, + "lods_address_16bit": 2, + "lods_address_32bit": 2, + "lods_store": 3, + "ACh": 1, + "stos_instruction": 1, + "stos_address_16bit": 2, + "stos_address_32bit": 2, + "stos_store": 3, + "cmps_instruction": 1, + "cmps_address_16bit": 2, + "cmps_address_32bit": 2, + "cmps_store": 3, + "A6h": 1, + "ins_instruction": 1, + "ins_address_16bit": 2, + "ins_address_32bit": 2, + "ins_store": 3, + "ins_check_size": 2, + "outs_instruction": 1, + "outs_address_16bit": 2, + "outs_address_32bit": 2, + "outs_store": 3, + "xlat_instruction": 1, + "xlat_address_16bit": 2, + "xlat_address_32bit": 2, + "xlat_store": 3, + "D7h": 1, + "pm_word_instruction": 1, + "pm_reg": 2, + "pm_mem": 2, + "pm_mem_store": 2, + "pm_store_word_instruction": 1, + "lgdt_instruction": 1, + "lgdt_mem_48bit": 2, + "lgdt_mem_80bit": 2, + "lgdt_mem_store": 4, + "lar_instruction": 1, + "lar_reg_reg": 2, + "lar_reg_mem": 2, + "invlpg_instruction": 1, + "swapgs_instruction": 1, + "rdtscp_instruction": 1, + "basic_486_instruction": 1, + "basic_486_reg": 2, + "basic_486_mem_reg_8bit": 2, + "basic_486_reg_reg_8bit": 2, + "bswap_instruction": 1, + "bswap_reg_code_ok": 2, + "bswap_reg64": 2, + "cmpxchgx_instruction": 1, + "cmpxchgx_size_ok": 2, + "cmpxchgx_store": 2, + "nop_instruction": 1, + "extended_nop": 4, + "extended_nop_reg": 2, + "extended_nop_store": 2, + "basic_fpu_instruction": 1, + "D8h": 2, + "basic_fpu_streg": 2, + "basic_fpu_mem": 2, + "basic_fpu_mem_32bit": 2, + "basic_fpu_mem_64bit": 2, + "DCh": 2, + "convert_fpu_register": 9, + "basic_fpu_single_streg": 3, + "basic_fpu_st0": 2, + "basic_fpu_streg_st0": 2, + "simple_fpu_instruction": 1, + "D9h": 6, + "fi_instruction": 1, + "fi_mem_16bit": 2, + "fi_mem_32bit": 2, + "DAh": 2, + "DEh": 2, + "fld_instruction": 1, + "fld_streg": 2, + "fld_mem_32bit": 2, + "fld_mem_64bit": 2, + "fld_mem_80bit": 2, + "DDh": 6, + "fld_mem_80bit_store": 3, + "DBh": 4, + "fst_streg": 2, + "fild_instruction": 1, + "fild_mem_16bit": 2, + "fild_mem_32bit": 2, + "fild_mem_64bit": 2, + "DFh": 5, + "fisttp_64bit_store": 2, + "fild_mem_64bit_store": 3, + "fbld_instruction": 1, + "fbld_mem_80bit": 3, + "faddp_instruction": 1, + "faddp_streg": 2, + "fcompp_instruction": 1, + "D9DEh": 1, + "fucompp_instruction": 1, + "E9DAh": 1, + "fxch_instruction": 1, + "fpu_single_operand": 3, + "ffreep_instruction": 1, + "ffree_instruction": 1, + "fpu_streg": 2, + "fstenv_instruction": 1, + "fldenv_instruction": 3, + "fpu_mem": 2, + "fstenv_instruction_16bit": 1, + "fldenv_instruction_16bit": 1, + "fstenv_instruction_32bit": 1, + "fldenv_instruction_32bit": 1, + "fsave_instruction_32bit": 1, + "fnsave_instruction_32bit": 1, + "fnsave_instruction": 3, + "fsave_instruction_16bit": 1, + "fnsave_instruction_16bit": 1, + "fsave_instruction": 1, + "fstcw_instruction": 1, + "fldcw_instruction": 1, + "fldcw_mem_16bit": 3, + "fstsw_instruction": 1, + "fnstsw_instruction": 1, + "fstsw_reg": 2, + "fstsw_mem_16bit": 3, + "E0DFh": 1, + "finit_instruction": 1, + "fninit_instruction": 1, + "fcmov_instruction": 1, + "fcomi_streg": 3, + "fcomi_instruction": 1, + "fcomip_instruction": 1, + "fcomi_st0_streg": 2, + "basic_mmx_instruction": 1, + "mmx_instruction": 1, + "convert_mmx_register": 18, + "make_mmx_prefix": 9, + "mmx_mmreg_mmreg": 3, + "mmx_mmreg_mem": 2, + "mmx_bit_shift_instruction": 1, + "mmx_ps_mmreg_imm8": 2, + "pmovmskb_instruction": 1, + "pmovmskb_reg_size_ok": 2, + "mmx_nomem_imm8": 7, + "mmx_imm8": 6, + "append_imm8": 2, + "pinsrw_instruction": 1, + "pinsrw_mmreg_reg": 2, + "pshufw_instruction": 1, + "mmx_size": 30, + "pshuf_instruction": 2, + "pshufd_instruction": 1, + "pshuf_mmreg_mmreg": 2, + "movd_instruction": 1, + "movd_reg": 2, + "movd_mmreg": 2, + "movd_mmreg_reg": 2, + "mmx_prefix_for_vex": 2, + "no_mmx_prefix": 2, + "movq_instruction": 1, + "movq_reg": 2, + "movq_mem_xmmreg": 2, + "D6h": 2, + "movq_mmreg": 2, + "movq_mmreg_": 2, + "F3h": 7, + "movq_mmreg_reg": 2, + "movq_mmreg_mmreg": 2, + "movq_mmreg_reg_store": 2, + "movdq_instruction": 1, + "movdq_mmreg": 2, + "convert_xmm_register": 12, + "movdq_mmreg_mmreg": 2, + "lddqu_instruction": 1, + "F2h": 6, + "movdq2q_instruction": 1, + "movq2dq_": 2, + "movq2dq_instruction": 1, + "sse_ps_instruction_imm8": 1, + "sse_ps_instruction": 1, + "sse_instruction": 11, + "sse_pd_instruction_imm8": 1, + "sse_pd_instruction": 1, + "sse_ss_instruction": 1, + "sse_sd_instruction": 1, + "cmp_pd_instruction": 1, + "cmp_ps_instruction": 1, + "C2h": 4, + "cmp_ss_instruction": 1, + "cmp_sx_instruction": 2, + "cmpsd_instruction": 1, + "A7h": 1, + "cmp_sd_instruction": 1, + "comiss_instruction": 1, + "comisd_instruction": 1, + "cvtdq2pd_instruction": 1, + "cvtps2pd_instruction": 1, + "cvtpd2dq_instruction": 1, + "movshdup_instruction": 1, + "sse_xmmreg": 2, + "sse_reg": 1, + "sse_xmmreg_xmmreg": 2, + "sse_reg_mem": 2, + "sse_mem_size_ok": 2, + "supplemental_code": 2, + "sse_cmp_mem_ok": 3, + "sse_ok": 2, + "take_additional_xmm0": 3, + "sse_xmmreg_xmmreg_ok": 4, + "sse_cmp_nomem_ok": 3, + "sse_nomem_ok": 2, + "additional_xmm0_ok": 2, + "pslldq_instruction": 1, + "movpd_instruction": 1, + "movps_instruction": 1, + "sse_mov_instruction": 3, + "movss_instruction": 1, + "sse_movs": 2, + "movsd_instruction": 1, + "A5h": 1, + "sse_mem": 2, + "sse_mem_xmmreg": 2, + "movlpd_instruction": 1, + "movlps_instruction": 1, + "movhlps_instruction": 1, + "maskmovq_instruction": 1, + "maskmov_instruction": 2, + "maskmovdqu_instruction": 1, + "movmskpd_instruction": 1, + "movmskps_instruction": 1, + "movmskps_reg_ok": 2, + "cvtpi2pd_instruction": 1, + "cvtpi2ps_instruction": 1 + }, + "ATS": { + "//": 211, + "#include": 16, + "staload": 25, + "_": 25, + "sortdef": 2, + "ftype": 13, + "type": 30, + "-": 49, + "infixr": 2, + "(": 562, + ")": 567, + "typedef": 10, + "a": 200, + "b": 26, + "": 2, + "functor": 12, + "F": 34, + "{": 142, + "}": 141, + "list0": 9, + "extern": 13, + "val": 95, + "functor_list0": 7, + "implement": 55, + "f": 22, + "lam": 20, + "xs": 82, + "list0_map": 2, + "": 14, + "": 3, + "datatype": 4, + "CoYoneda": 7, + "r": 25, + "of": 59, + "fun": 56, + "CoYoneda_phi": 2, + "CoYoneda_psi": 3, + "ftor": 9, + "fx": 8, + "x": 48, + "int0": 4, + "I": 8, + "int": 2, + "bool": 27, + "True": 7, + "|": 22, + "False": 8, + "boxed": 2, + "boolean": 2, + "bool2string": 4, + "string": 2, + "case": 9, + "+": 20, + "fprint_val": 2, + "": 2, + "out": 8, + "fprint": 3, + "int2bool": 2, + "i": 6, + "let": 34, + "in": 48, + "if": 7, + "then": 11, + "else": 7, + "end": 73, + "myintlist0": 2, + "g0ofg1": 1, + "list": 1, + "myboolist0": 9, + "fprintln": 3, + "stdout_ref": 4, + "main0": 3, + "UN": 3, + "phil_left": 3, + "n": 51, + "phil_right": 3, + "nmod": 1, + "NPHIL": 6, + "randsleep": 6, + "intGte": 1, + "void": 14, + "ignoret": 2, + "sleep": 2, + "UN.cast": 2, + "uInt": 1, + "rand": 1, + "mod": 1, + "phil_think": 3, + "println": 9, + "phil_dine": 3, + "lf": 5, + "rf": 5, + "phil_loop": 10, + "nl": 2, + "nr": 2, + "ch_lfork": 2, + "fork_changet": 5, + "ch_rfork": 2, + "channel_takeout": 4, + "HX": 1, + "try": 1, + "to": 16, + "actively": 1, + "induce": 1, + "deadlock": 2, + "ch_forktray": 3, + "forktray_changet": 4, + "channel_insert": 5, + "[": 49, + "]": 48, + "cleaner_wash": 3, + "fork_get_num": 4, + "cleaner_return": 4, + "ch": 7, + "cleaner_loop": 6, + "f0": 3, + "dynload": 3, + "local": 10, + "mythread_create_cloptr": 6, + "llam": 6, + "while": 1, + "true": 5, + "%": 7, + "#": 7, + "#define": 4, + "nphil": 13, + "natLt": 2, + "absvtype": 2, + "fork_vtype": 3, + "ptr": 2, + "vtypedef": 2, + "fork": 16, + "channel": 11, + "datavtype": 1, + "FORK": 3, + "assume": 2, + "the_forkarray": 2, + "t": 1, + "array_tabulate": 1, + "fopr": 1, + "": 2, + "where": 6, + "channel_create_exn": 2, + "": 2, + "i2sz": 4, + "arrayref_tabulate": 1, + "the_forktray": 2, + "set_vtype": 3, + "t@ype": 2, + "set": 34, + "t0p": 31, + "compare_elt_elt": 4, + "x1": 1, + "x2": 1, + "<": 14, + "linset_nil": 2, + "linset_make_nil": 2, + "linset_sing": 2, + "": 16, + "linset_make_sing": 2, + "linset_make_list": 1, + "List": 1, + "INV": 24, + "linset_is_nil": 2, + "linset_isnot_nil": 2, + "linset_size": 2, + "size_t": 1, + "linset_is_member": 3, + "x0": 22, + "linset_isnot_member": 1, + "linset_copy": 2, + "linset_free": 2, + "linset_insert": 3, + "&": 17, + "linset_takeout": 1, + "res": 9, + "opt": 6, + "endfun": 1, + "linset_takeout_opt": 1, + "Option_vt": 4, + "linset_remove": 2, + "linset_choose": 3, + "linset_choose_opt": 1, + "linset_takeoutmax": 1, + "linset_takeoutmax_opt": 1, + "linset_takeoutmin": 1, + "linset_takeoutmin_opt": 1, + "fprint_linset": 3, + "sep": 1, + "FILEref": 2, + "overload": 1, + "with": 1, + "env": 11, + "vt0p": 2, + "linset_foreach": 3, + "fwork": 3, + "linset_foreach_env": 3, + "linset_listize": 2, + "List0_vt": 5, + "linset_listize1": 2, + "code": 6, + "reuse": 2, + "elt": 2, + "list_vt_nil": 16, + "list_vt_cons": 17, + "list_vt_is_nil": 1, + "list_vt_is_cons": 1, + "list_vt_length": 1, + "aux": 4, + "nat": 4, + ".": 14, + "": 3, + "list_vt": 7, + "sgn": 9, + "false": 6, + "list_vt_copy": 2, + "list_vt_free": 1, + "mynode_cons": 4, + "nx": 22, + "mynode1": 6, + "xs1": 15, + "UN.castvwtp0": 8, + "List1_vt": 5, + "@list_vt_cons": 5, + "xs2": 3, + "prval": 20, + "UN.cast2void": 5, + ";": 4, + "fold@": 8, + "ins": 3, + "tail": 1, + "recursive": 1, + "n1": 4, + "<=>": 1, + "1": 3, + "mynode_make_elt": 4, + "ans": 2, + "is": 26, + "found": 1, + "effmask_all": 3, + "free@": 1, + "xs1_": 3, + "rem": 1, + "*": 2, + "opt_some": 1, + "opt_none": 1, + "list_vt_foreach": 1, + "": 3, + "list_vt_foreach_env": 1, + "mynode_null": 5, + "mynode": 3, + "null": 1, + "the_null_ptr": 1, + "mynode_free": 1, + "nx2": 4, + "mynode_get_elt": 1, + "nx1": 7, + "UN.castvwtp1": 2, + "mynode_set_elt": 1, + "l": 3, + "__assert": 2, + "praxi": 1, + "mynode_getfree_elt": 1, + "linset_takeout_ngc": 2, + "takeout": 3, + "mynode0": 1, + "pf_x": 6, + "view@x": 3, + "pf_xs1": 6, + "view@xs1": 3, + "linset_takeoutmax_ngc": 2, + "xs_": 4, + "@list_vt_nil": 1, + "linset_takeoutmin_ngc": 2, + "unsnoc": 4, + "pos": 1, + "and": 10, + "fold@xs": 1, + "ATS_PACKNAME": 1, + "ATS_STALOADFLAG": 1, + "no": 2, + "static": 1, + "loading": 1, + "at": 2, + "run": 1, + "time": 1, + "castfn": 1, + "linset2list": 1, + "": 1, + "html": 1, + "PUBLIC": 1, + "W3C": 1, + "DTD": 2, + "XHTML": 1, + "EN": 1, + "http": 2, + "www": 1, + "w3": 1, + "org": 1, + "TR": 1, + "xhtml11": 2, + "dtd": 1, + "": 1, + "xmlns=": 1, + "": 1, + "": 1, + "equiv=": 1, + "content=": 1, + "": 1, + "EFFECTIVATS": 1, + "DiningPhil2": 1, + "": 1, + "#patscode_style": 1, + "": 1, + "": 1, + "

": 1, + "Effective": 1, + "ATS": 2, + "Dining": 2, + "Philosophers": 2, + "

": 1, + "In": 2, + "this": 2, + "article": 2, + "present": 1, + "an": 6, + "implementation": 3, + "slight": 1, + "variant": 1, + "the": 30, + "famous": 1, + "problem": 1, + "by": 4, + "Dijkstra": 1, + "that": 8, + "makes": 1, + "simple": 1, + "but": 1, + "convincing": 1, + "use": 1, + "linear": 2, + "types.": 1, + "

": 8, + "The": 8, + "Original": 2, + "Problem": 2, + "

": 8, + "There": 3, + "are": 7, + "five": 1, + "philosophers": 1, + "sitting": 1, + "around": 1, + "table": 3, + "there": 3, + "also": 3, + "forks": 7, + "placed": 1, + "on": 8, + "such": 1, + "each": 2, + "located": 2, + "between": 1, + "left": 3, + "hand": 6, + "philosopher": 5, + "right": 3, + "another": 1, + "philosopher.": 1, + "Each": 4, + "does": 1, + "following": 6, + "routine": 1, + "repeatedly": 1, + "thinking": 1, + "dining.": 1, + "order": 1, + "dine": 1, + "needs": 2, + "first": 2, + "acquire": 1, + "two": 3, + "one": 3, + "his": 4, + "side": 2, + "other": 2, + "side.": 2, + "After": 2, + "finishing": 1, + "dining": 1, + "puts": 2, + "acquired": 1, + "onto": 1, + "A": 6, + "Variant": 1, + "twist": 1, + "added": 1, + "original": 1, + "version": 1, + "

": 1, + "used": 1, + "it": 2, + "becomes": 1, + "be": 9, + "put": 1, + "tray": 2, + "for": 15, + "dirty": 2, + "forks.": 1, + "cleaner": 2, + "who": 1, + "cleans": 1, + "them": 2, + "back": 1, + "table.": 1, + "Channels": 1, + "Communication": 1, + "just": 1, + "shared": 1, + "queue": 1, + "fixed": 1, + "capacity.": 1, + "functions": 1, + "inserting": 1, + "element": 5, + "into": 3, + "taking": 1, + "given": 4, + "

": 7,
+      "class=": 6,
+      "#pats2xhtml_sats": 3,
+      "
": 7, + "If": 2, + "called": 2, + "full": 4, + "caller": 2, + "blocked": 3, + "until": 2, + "taken": 1, + "channel.": 2, + "empty": 1, + "inserted": 1, + "Channel": 2, + "Fork": 3, + "Forks": 1, + "resources": 1, + "type.": 1, + "initially": 1, + "stored": 2, + "which": 2, + "can": 4, + "obtained": 2, + "calling": 2, + "function": 3, + "defined": 1, + "natural": 1, + "numbers": 1, + "less": 1, + "than": 1, + "channels": 4, + "storing": 3, + "chosen": 3, + "capacity": 3, + "reason": 1, + "store": 1, + "most": 1, + "guarantee": 1, + "these": 1, + "never": 2, + "so": 2, + "attempt": 1, + "made": 1, + "send": 1, + "signals": 1, + "awake": 1, + "callers": 1, + "supposedly": 1, + "being": 2, + "due": 1, + "Tray": 1, + "instead": 1, + "become": 1, + "as": 4, + "only": 1, + "total": 1, + "Philosopher": 1, + "Loop": 2, + "implemented": 2, + "loop": 2, + "#pats2xhtml_dats": 3, + "It": 2, + "should": 3, + "straighforward": 2, + "follow": 2, + "Cleaner": 1, + "finds": 1, + "number": 2, + "uses": 1, + "locate": 1, + "fork.": 1, + "Its": 1, + "actual": 1, + "follows": 1, + "now": 1, + "Testing": 1, + "entire": 1, + "files": 1, + "DiningPhil2.sats": 1, + "DiningPhil2.dats": 1, + "DiningPhil2_fork.dats": 1, + "DiningPhil2_thread.dats": 1, + "Makefile": 1, + "available": 1, + "compiling": 1, + "source": 1, + "excutable": 1, + "testing.": 1, + "One": 1, + "able": 1, + "encounter": 1, + "after": 1, + "running": 1, + "simulation": 1, + "while.": 1, + "
": 1, + "size=": 1, + "This": 1, + "written": 1, + "href=": 1, + "Hongwei": 1, + "Xi": 1, + "
": 1, + "": 1, + "": 1, + "main": 1, + "fprint_filsub": 1, + "option0": 3, + "functor_option0": 2, + "option0_map": 1, + "functor_homres": 2, + "c": 3, + "Yoneda_phi": 3, + "Yoneda_psi": 3, + "m": 4, + "mf": 4, + "natrans": 3, + "G": 2, + "Yoneda_phi_nat": 2, + "Yoneda_psi_nat": 2, + "list_t": 1, + "g0ofg1_list": 1, + "Yoneda_bool_list0": 3, + "myboolist1": 2 + }, "AutoHotkey": { "MsgBox": 1, "Hello": 1, @@ -1893,21 +4579,831 @@ "fragments": 1, "END": 1 }, + "BlitzBasic": { + "Local": 34, + "bk": 3, + "CreateBank": 5, + "(": 125, + ")": 126, + "PokeFloat": 3, + "-": 24, + "Print": 13, + "Bin": 4, + "PeekInt": 4, + "%": 6, + "Shl": 7, + "f": 5, + "ff": 1, + "+": 11, + "Hex": 2, + "FloatToHalf": 3, + "HalfToFloat": 1, + "FToI": 2, + "WaitKey": 2, + "End": 58, + ";": 57, + "Half": 1, + "precision": 2, + "bit": 2, + "arithmetic": 2, + "library": 2, + "Global": 2, + "Half_CBank_": 13, + "Function": 101, + "f#": 3, + "If": 25, + "Then": 18, + "Return": 36, + "HalfToFloat#": 1, + "h": 4, + "signBit": 6, + "exponent": 22, + "fraction": 9, + "fBits": 8, + "And": 8, + "<": 18, + "Shr": 3, + "F": 3, + "FF": 2, + "ElseIf": 1, + "Or": 4, + "PokeInt": 2, + "PeekFloat": 1, + "F800000": 1, + "FFFFF": 1, + "Abs": 1, + "*": 2, + "Sgn": 1, + "Else": 7, + "EndIf": 7, + "HalfAdd": 1, + "l": 84, + "r": 12, + "HalfSub": 1, + "HalfMul": 1, + "HalfDiv": 1, + "HalfLT": 1, + "HalfGT": 1, + "Double": 2, + "DoubleOut": 1, + "[": 2, + "]": 2, + "Double_CBank_": 1, + "DoubleToFloat#": 1, + "d": 1, + "FloatToDouble": 1, + "IntToDouble": 1, + "i": 49, + "SefToDouble": 1, + "s": 12, + "e": 4, + "DoubleAdd": 1, + "DoubleSub": 1, + "DoubleMul": 1, + "DoubleDiv": 1, + "DoubleLT": 1, + "DoubleGT": 1, + "IDEal": 3, + "Editor": 3, + "Parameters": 3, + "F#1A#20#2F": 1, + "C#Blitz3D": 3, + "linked": 2, + "list": 32, + "container": 1, + "class": 1, + "with": 3, + "thanks": 1, + "to": 11, + "MusicianKool": 3, + "for": 3, + "concept": 1, + "and": 9, + "issue": 1, + "fixes": 1, + "Type": 8, + "LList": 3, + "Field": 10, + "head_.ListNode": 1, + "tail_.ListNode": 1, + "ListNode": 8, + "pv_.ListNode": 1, + "nx_.ListNode": 1, + "Value": 37, + "Iterator": 2, + "l_.LList": 1, + "cn_.ListNode": 1, + "cni_": 8, + "Create": 4, + "a": 46, + "new": 4, + "object": 2, + "CreateList.LList": 1, + "l.LList": 20, + "New": 11, + "head_": 35, + "tail_": 34, + "nx_": 33, + "caps": 1, + "pv_": 27, + "These": 1, + "make": 1, + "it": 1, + "more": 1, + "or": 4, + "less": 1, + "safe": 1, + "iterate": 2, + "freely": 1, + "Free": 1, + "all": 3, + "elements": 4, + "not": 4, + "any": 1, + "values": 4, + "FreeList": 1, + "ClearList": 2, + "Delete": 6, + "Remove": 7, + "the": 52, + "from": 15, + "does": 1, + "free": 1, + "n.ListNode": 12, + "While": 7, + "n": 54, + "nx.ListNode": 1, + "nx": 1, + "Wend": 6, + "Count": 1, + "number": 1, + "of": 16, + "in": 4, + "slow": 3, + "ListLength": 2, + "i.Iterator": 6, + "GetIterator": 3, + "elems": 4, + "EachIn": 5, + "True": 4, + "if": 2, + "contains": 1, + "given": 7, + "value": 16, + "ListContains": 1, + "ListFindNode": 2, + "Null": 15, + "intvalues": 1, + "bank": 8, + "ListFromBank.LList": 1, + "CreateList": 2, + "size": 4, + "BankSize": 1, + "p": 7, + "For": 6, + "To": 6, + "Step": 2, + "ListAddLast": 2, + "Next": 7, + "containing": 3, + "ListToBank": 1, + "Swap": 1, + "contents": 1, + "two": 1, + "objects": 1, + "SwapLists": 1, + "l1.LList": 1, + "l2.LList": 1, + "tempH.ListNode": 1, + "l1": 4, + "tempT.ListNode": 1, + "l2": 4, + "tempH": 1, + "tempT": 1, + "same": 1, + "as": 2, + "first": 5, + "CopyList.LList": 1, + "lo.LList": 1, + "ln.LList": 1, + "lo": 1, + "ln": 2, + "Reverse": 1, + "order": 1, + "ReverseList": 1, + "n1.ListNode": 1, + "n2.ListNode": 1, + "tmp.ListNode": 1, + "n1": 5, + "n2": 6, + "tmp": 4, + "Search": 1, + "retrieve": 1, + "node": 8, + "ListFindNode.ListNode": 1, + "Append": 1, + "end": 5, + "fast": 2, + "return": 7, + "ListAddLast.ListNode": 1, + "Attach": 1, + "start": 13, + "ListAddFirst.ListNode": 1, + "occurence": 1, + "ListRemove": 1, + "RemoveListNode": 6, + "element": 4, + "at": 5, + "position": 4, + "backwards": 2, + "negative": 2, + "index": 13, + "ValueAtIndex": 1, + "ListNodeAtIndex": 3, + "invalid": 1, + "ListNodeAtIndex.ListNode": 1, + "Beyond": 1, + "valid": 2, + "Negative": 1, + "count": 1, + "backward": 1, + "Before": 3, + "Replace": 1, + "added": 2, + "by": 3, + "ReplaceValueAtIndex": 1, + "RemoveNodeAtIndex": 1, + "tval": 3, + "Retrieve": 2, + "ListFirst": 1, + "last": 2, + "ListLast": 1, + "its": 2, + "ListRemoveFirst": 1, + "val": 6, + "ListRemoveLast": 1, + "Insert": 3, + "into": 2, + "before": 2, + "specified": 2, + "InsertBeforeNode.ListNode": 1, + "bef.ListNode": 1, + "bef": 7, + "after": 1, + "then": 1, + "InsertAfterNode.ListNode": 1, + "aft.ListNode": 1, + "aft": 7, + "Get": 1, + "an": 4, + "iterator": 4, + "use": 1, + "loop": 2, + "This": 1, + "function": 1, + "means": 1, + "that": 1, + "most": 1, + "programs": 1, + "won": 1, + "available": 1, + "moment": 1, + "l_": 7, + "Exit": 1, + "there": 1, + "wasn": 1, + "t": 1, + "create": 1, + "one": 1, + "cn_": 12, + "No": 1, + "especial": 1, + "reason": 1, + "why": 1, + "this": 2, + "has": 1, + "be": 1, + "anything": 1, + "but": 1, + "meh": 1, + "Use": 1, + "argument": 1, + "over": 1, + "members": 1, + "Still": 1, + "items": 1, + "Disconnect": 1, + "having": 1, + "reached": 1, + "False": 3, + "currently": 1, + "pointed": 1, + "IteratorRemove": 1, + "temp.ListNode": 1, + "temp": 1, + "Call": 1, + "breaking": 1, + "out": 1, + "disconnect": 1, + "IteratorBreak": 1, + "F#5#A#10#18#2A#32#3E#47#4C#58#66#6F#78#8F#9B#A9#B7#BD#C5#CC": 1, + "F#E3#E9#EF#F4#F9#103#10D#11B#12B#13F#152#163": 1, + "result": 4, + "s.Sum3Obj": 2, + "Sum3Obj": 6, + "Handle": 2, + "MilliSecs": 4, + "Sum3_": 2, + "MakeSum3Obj": 2, + "Sum3": 2, + "b": 7, + "c": 7, + "isActive": 4, + "Last": 1, + "Restore": 1, + "label": 1, + "Read": 1, + "foo": 1, + ".label": 1, + "Data": 1, + "a_": 2, + "a.Sum3Obj": 1, + "Object.Sum3Obj": 1, + "return_": 2, + "First": 1 + }, + "Bluespec": { + "package": 2, + "TbTL": 1, + ";": 156, + "import": 1, + "TL": 6, + "*": 1, + "interface": 2, + "Lamp": 3, + "method": 42, + "Bool": 32, + "changed": 2, + "Action": 17, + "show_offs": 2, + "show_ons": 2, + "reset": 2, + "endinterface": 2, + "module": 3, + "mkLamp#": 1, + "(": 158, + "String": 1, + "name": 3, + "lamp": 5, + ")": 163, + "Reg#": 15, + "prev": 5, + "<": 44, + "-": 29, + "mkReg": 15, + "False": 9, + "if": 9, + "&&": 3, + "write": 2, + "+": 7, + "endmethod": 8, + "endmodule": 3, + "mkTest": 1, + "let": 1, + "dut": 2, + "sysTL": 3, + "Bit#": 1, + "ctr": 8, + "carN": 4, + "carS": 2, + "carE": 2, + "carW": 2, + "lamps": 15, + "[": 17, + "]": 17, + "mkLamp": 12, + "dut.lampRedNS": 1, + "dut.lampAmberNS": 1, + "dut.lampGreenNS": 1, + "dut.lampRedE": 1, + "dut.lampAmberE": 1, + "dut.lampGreenE": 1, + "dut.lampRedW": 1, + "dut.lampAmberW": 1, + "dut.lampGreenW": 1, + "dut.lampRedPed": 1, + "dut.lampAmberPed": 1, + "dut.lampGreenPed": 1, + "rule": 10, + "start": 1, + "dumpvars": 1, + "endrule": 10, + "detect_cars": 1, + "dut.set_car_state_N": 1, + "dut.set_car_state_S": 1, + "dut.set_car_state_E": 1, + "dut.set_car_state_W": 1, + "go": 1, + "True": 6, + "<=>": 3, + "12_000": 1, + "ped_button_push": 4, + "stop": 1, + "display": 2, + "finish": 1, + "function": 10, + "do_offs": 2, + "l": 3, + "l.show_offs": 1, + "do_ons": 2, + "l.show_ons": 1, + "do_reset": 2, + "l.reset": 1, + "do_it": 4, + "f": 2, + "action": 3, + "for": 3, + "Integer": 3, + "i": 15, + "endaction": 3, + "endfunction": 7, + "any_changes": 2, + "b": 12, + "||": 7, + ".changed": 1, + "return": 9, + "show": 1, + "time": 1, + "endpackage": 2, + "set_car_state_N": 2, + "x": 8, + "set_car_state_S": 2, + "set_car_state_E": 2, + "set_car_state_W": 2, + "lampRedNS": 2, + "lampAmberNS": 2, + "lampGreenNS": 2, + "lampRedE": 2, + "lampAmberE": 2, + "lampGreenE": 2, + "lampRedW": 2, + "lampAmberW": 2, + "lampGreenW": 2, + "lampRedPed": 2, + "lampAmberPed": 2, + "lampGreenPed": 2, + "typedef": 3, + "enum": 1, + "{": 1, + "AllRed": 4, + "GreenNS": 9, + "AmberNS": 5, + "GreenE": 8, + "AmberE": 5, + "GreenW": 8, + "AmberW": 5, + "GreenPed": 4, + "AmberPed": 3, + "}": 1, + "TLstates": 11, + "deriving": 1, + "Eq": 1, + "Bits": 1, + "UInt#": 2, + "Time32": 9, + "CtrSize": 3, + "allRedDelay": 2, + "amberDelay": 2, + "nsGreenDelay": 2, + "ewGreenDelay": 3, + "pedGreenDelay": 1, + "pedAmberDelay": 1, + "clocks_per_sec": 2, + "state": 21, + "next_green": 8, + "secs": 7, + "ped_button_pushed": 4, + "car_present_N": 3, + "car_present_S": 3, + "car_present_E": 4, + "car_present_W": 4, + "car_present_NS": 3, + "cycle_ctr": 6, + "dec_cycle_ctr": 1, + "Rules": 5, + "low_priority_rule": 2, + "rules": 4, + "inc_sec": 1, + "endrules": 4, + "next_state": 8, + "ns": 4, + "0": 2, + "green_seq": 7, + "case": 2, + "endcase": 2, + "car_present": 4, + "make_from_green_rule": 5, + "green_state": 2, + "delay": 2, + "car_is_present": 2, + "from_green": 1, + "make_from_amber_rule": 5, + "amber_state": 2, + "ng": 2, + "from_amber": 1, + "hprs": 10, + "7": 1, + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "fromAllRed": 2, + "else": 4, + "noAction": 1, + "high_priority_rules": 4, + "rJoin": 1, + "addRules": 1, + "preempts": 1 + }, + "Brightscript": { + "**": 17, + "Simple": 1, + "Grid": 2, + "Screen": 2, + "Demonstration": 1, + "App": 1, + "Copyright": 1, + "(": 32, + "c": 1, + ")": 31, + "Roku": 1, + "Inc.": 1, + "All": 3, + "Rights": 1, + "Reserved.": 1, + "************************************************************": 2, + "Sub": 2, + "Main": 1, + "set": 2, + "to": 10, + "go": 1, + "time": 1, + "get": 1, + "started": 1, + "while": 4, + "gridstyle": 7, + "<": 1, + "print": 7, + ";": 10, + "screen": 5, + "preShowGridScreen": 2, + "showGridScreen": 2, + "end": 2, + "End": 4, + "Set": 1, + "the": 17, + "configurable": 1, + "theme": 3, + "attributes": 2, + "for": 10, + "application": 1, + "Configure": 1, + "custom": 1, + "overhang": 1, + "and": 4, + "Logo": 1, + "are": 2, + "artwork": 2, + "colors": 1, + "offsets": 1, + "specific": 1, + "app": 1, + "******************************************************": 4, + "Screens": 1, + "can": 2, + "make": 1, + "slight": 1, + "adjustments": 1, + "default": 1, + "individual": 1, + "attributes.": 1, + "these": 1, + "greyscales": 1, + "theme.GridScreenBackgroundColor": 1, + "theme.GridScreenMessageColor": 1, + "theme.GridScreenRetrievingColor": 1, + "theme.GridScreenListNameColor": 1, + "used": 1, + "in": 3, + "theme.CounterTextLeft": 1, + "theme.CounterSeparator": 1, + "theme.CounterTextRight": 1, + "theme.GridScreenLogoHD": 1, + "theme.GridScreenLogoOffsetHD_X": 1, + "theme.GridScreenLogoOffsetHD_Y": 1, + "theme.GridScreenOverhangHeightHD": 1, + "theme.GridScreenLogoSD": 1, + "theme.GridScreenOverhangHeightSD": 1, + "theme.GridScreenLogoOffsetSD_X": 1, + "theme.GridScreenLogoOffsetSD_Y": 1, + "theme.GridScreenFocusBorderSD": 1, + "theme.GridScreenFocusBorderHD": 1, + "use": 1, + "your": 1, + "own": 1, + "description": 1, + "background": 1, + "theme.GridScreenDescriptionOffsetSD": 1, + "theme.GridScreenDescriptionOffsetHD": 1, + "return": 5, + "Function": 5, + "Perform": 1, + "any": 1, + "startup/initialization": 1, + "stuff": 1, + "prior": 1, + "style": 6, + "as": 2, + "string": 3, + "As": 3, + "Object": 2, + "m.port": 3, + "CreateObject": 2, + "screen.SetMessagePort": 1, + "screen.": 1, + "The": 1, + "will": 3, + "show": 1, + "retreiving": 1, + "categoryList": 4, + "getCategoryList": 1, + "[": 3, + "]": 4, + "+": 1, + "screen.setupLists": 1, + "categoryList.count": 2, + "screen.SetListNames": 1, + "StyleButtons": 3, + "getGridControlButtons": 1, + "screen.SetContentList": 2, + "i": 3, + "-": 15, + "getShowsForCategoryItem": 1, + "screen.Show": 1, + "true": 1, + "msg": 3, + "wait": 1, + "getmessageport": 1, + "does": 1, + "not": 2, + "work": 1, + "on": 1, + "gridscreen": 1, + "type": 2, + "if": 3, + "then": 3, + "msg.GetMessage": 1, + "msg.GetIndex": 3, + "msg.getData": 2, + "msg.isListItemFocused": 1, + "else": 1, + "msg.isListItemSelected": 1, + "row": 2, + "selection": 3, + "yes": 1, + "so": 2, + "we": 3, + "come": 1, + "back": 1, + "with": 2, + "new": 1, + ".Title": 1, + "endif": 1, + "**********************************************************": 1, + "this": 3, + "function": 1, + "passing": 1, + "an": 1, + "roAssociativeArray": 2, + "be": 2, + "sufficient": 1, + "springboard": 2, + "display": 2, + "add": 1, + "code": 1, + "create": 1, + "now": 1, + "do": 1, + "nothing": 1, + "Return": 1, + "list": 1, + "of": 5, + "categories": 1, + "filter": 1, + "all": 1, + "categories.": 1, + "just": 2, + "static": 1, + "data": 2, + "example.": 1, + "********************************************************************": 1, + "ContentMetaData": 1, + "objects": 1, + "shows": 1, + "category.": 1, + "For": 1, + "example": 1, + "cheat": 1, + "but": 2, + "ideally": 1, + "you": 1, + "dynamically": 1, + "content": 2, + "each": 1, + "category": 1, + "is": 1, + "dynamic": 1, + "s": 1, + "one": 3, + "small": 1, + "step": 1, + "a": 4, + "man": 1, + "giant": 1, + "leap": 1, + "mankind.": 1, + "http": 14, + "//upload.wikimedia.org/wikipedia/commons/1/1e/Apollo_11_first_step.jpg": 2, + "I": 2, + "have": 2, + "Dream": 1, + "PG": 1, + "dream": 1, + "that": 1, + "my": 1, + "four": 1, + "little": 1, + "children": 1, + "day": 1, + "live": 1, + "nation": 1, + "where": 1, + "they": 1, + "judged": 1, + "by": 2, + "color": 1, + "their": 2, + "skin": 1, + "character.": 1, + "//upload.wikimedia.org/wikipedia/commons/8/81/Martin_Luther_King_": 2, + "_March_on_Washington.jpg": 2, + "Flat": 6, + "Movie": 2, + "HD": 6, + "x2": 4, + "SD": 5, + "Netflix": 1, + "//upload.wikimedia.org/wikipedia/commons/4/43/Gold_star_on_blue.gif": 2, + "Landscape": 1, + "x3": 6, + "Channel": 1, + "Store": 1, + "//upload.wikimedia.org/wikipedia/commons/thumb/9/96/Dunkery_Hill.jpg/800px": 2, + "Dunkery_Hill.jpg": 2, + "Portrait": 1, + "x4": 1, + "posters": 3, + "//upload.wikimedia.org/wikipedia/commons/9/9f/Kane_George_Gurnett.jpg": 2, + "Square": 1, + "x1": 1, + "//upload.wikimedia.org/wikipedia/commons/thumb/d/de/SQUARE_SHAPE.svg/536px": 2, + "SQUARE_SHAPE.svg.png": 2, + "x9": 1, + "//upload.wikimedia.org/wikipedia/commons/thumb/2/22/": 2, + "%": 8, + "C3": 4, + "cran_TV_plat.svg/200px": 2, + "cran_TV_plat.svg.png": 2, + "}": 1, + "buttons": 1 + }, "C": { - "#include": 149, - "const": 357, - "char": 529, + "#include": 154, + "const": 358, + "char": 530, "*blob_type": 2, - ";": 5439, - "struct": 359, + ";": 5465, + "struct": 360, "blob": 6, "*lookup_blob": 2, - "(": 6213, + "(": 6243, "unsigned": 140, "*sha1": 16, - ")": 6215, - "{": 1528, - "object": 10, + ")": 6245, + "{": 1531, + "object": 41, "*obj": 9, "lookup_object": 2, "sha1": 20, @@ -1923,22 +5419,66 @@ "sha1_to_hex": 8, "typename": 2, "NULL": 330, - "}": 1544, - "*": 253, + "}": 1547, + "*": 261, "int": 446, "parse_blob_buffer": 2, "*item": 10, - "void": 279, + "void": 288, "*buffer": 6, "long": 105, "size": 120, "item": 24, "object.parsed": 4, - "#ifndef": 84, + "#ifndef": 89, "BLOB_H": 2, - "#define": 911, - "extern": 37, - "#endif": 236, + "#define": 920, + "extern": 38, + "#endif": 243, + "BOOTSTRAP_H": 2, + "": 8, + "__GNUC__": 8, + "typedef": 191, + "*true": 1, + "*false": 1, + "*eof": 1, + "*empty_list": 1, + "*global_enviroment": 1, + "enum": 30, + "obj_type": 1, + "scm_bool": 1, + "scm_empty_list": 1, + "scm_eof": 1, + "scm_char": 1, + "scm_int": 1, + "scm_pair": 1, + "scm_symbol": 1, + "scm_prim_fun": 1, + "scm_lambda": 1, + "scm_str": 1, + "scm_file": 1, + "*eval_proc": 1, + "*maybe_add_begin": 1, + "*code": 2, + "init_enviroment": 1, + "*env": 4, + "eval_err": 1, + "*msg": 7, + "__attribute__": 1, + "noreturn": 1, + "define_var": 1, + "*var": 4, + "*val": 6, + "set_var": 1, + "*get_var": 1, + "*cond2nested_if": 1, + "*cond": 1, + "*let2lambda": 1, + "*let": 1, + "*and2nested_if": 1, + "*and": 1, + "*or2nested_if": 1, + "*or": 1, "git_cache_init": 1, "git_cache": 4, "*cache": 4, @@ -1964,8 +5504,8 @@ "i": 410, "for": 88, "+": 551, - "[": 597, - "]": 597, + "[": 601, + "]": 601, "git_cached_obj_decref": 3, "git__free": 15, "*git_cache_get": 1, @@ -1975,7 +5515,7 @@ "hash": 12, "*node": 2, "*result": 1, - "memcpy": 34, + "memcpy": 35, "oid": 17, "id": 13, "git_mutex_lock": 2, @@ -1993,7 +5533,7 @@ "else": 190, "save_commit_buffer": 3, "*commit_type": 2, - "static": 454, + "static": 455, "commit": 59, "*check_commit": 1, "quiet": 5, @@ -2086,7 +5626,6 @@ "commit_list_insert": 2, "next": 8, "date": 5, - "enum": 29, "object_type": 1, "ret": 142, "read_sha1_file": 1, @@ -2168,7 +5707,6 @@ "*format_subject": 1, "strbuf": 12, "*sb": 7, - "*msg": 6, "*line_separator": 1, "userformat_find_requirements": 1, "*fmt": 2, @@ -2199,7 +5737,6 @@ "list": 1, "lifo": 1, "FLEX_ARRAY": 1, - "typedef": 189, "*read_graft_line": 1, "len": 30, "*lookup_commit_graft": 1, @@ -2271,7 +5808,7 @@ "": 1, "": 1, "": 1, - "#ifdef": 64, + "#ifdef": 66, "CONFIG_SMP": 1, "DEFINE_MUTEX": 1, "cpu_add_remove_lock": 3, @@ -2777,6 +6314,13 @@ "diff_delta__merge_like_cgit": 1, "git_vector_swap": 1, "git_pool_swap": 1, + "ATSHOME_LIBATS_DYNARRAY_CATS": 3, + "": 5, + "atslib_dynarray_memcpy": 1, + "atslib_dynarray_memmove": 1, + "memmove": 2, + "//": 262, + "ifndef": 2, "git_usage_string": 2, "git_more_info_string": 2, "N_": 1, @@ -2787,7 +6331,6 @@ "*cmd": 5, "want": 3, "pager_command_config": 2, - "*var": 1, "*data": 12, "data": 69, "prefixcmp": 3, @@ -3008,14 +6551,12 @@ "vec": 2, ".data": 1, ".len": 3, - "": 7, "HELLO_H": 2, "hello": 1, "": 5, "": 2, "": 3, "": 3, - "": 4, "": 2, "ULLONG_MAX": 10, "MIN": 3, @@ -3320,7 +6861,7 @@ "paused": 3, "HPE_PAUSED": 2, "http_parser_h": 2, - "__cplusplus": 18, + "__cplusplus": 20, "HTTP_PARSER_VERSION_MAJOR": 1, "HTTP_PARSER_VERSION_MINOR": 1, "": 2, @@ -3411,6 +6952,22 @@ "*http_method_str": 1, "*http_errno_name": 1, "*http_errno_description": 1, + "": 1, + "_Included_jni_JniLayer": 2, + "JNIEXPORT": 6, + "jlong": 6, + "JNICALL": 6, + "Java_jni_JniLayer_jni_1layer_1initialize": 1, + "JNIEnv": 6, + "jobject": 6, + "jintArray": 1, + "jint": 7, + "Java_jni_JniLayer_jni_1layer_1mainloop": 1, + "Java_jni_JniLayer_jni_1layer_1set_1button": 1, + "Java_jni_JniLayer_jni_1layer_1set_1analog": 1, + "jfloat": 1, + "Java_jni_JniLayer_jni_1layer_1report_1analog_1chg": 1, + "Java_jni_JniLayer_jni_1layer_1kill": 1, "strncasecmp": 2, "_strnicmp": 1, "REF_TABLE_SIZE": 1, @@ -3695,6 +7252,15 @@ "rb_define_class": 1, "rb_cObject": 1, "rb_define_method": 2, + "READLINE_READLINE_CATS": 3, + "": 1, + "atscntrb_readline_rl_library_version": 1, + "char*": 167, + "rl_library_version": 1, + "atscntrb_readline_rl_readline_version": 1, + "rl_readline_version": 1, + "atscntrb_readline_readline": 1, + "readline": 1, "": 1, "": 1, "": 1, @@ -3918,7 +7484,6 @@ "COVERAGE_TEST": 1, "dictVanillaFree": 1, "*privdata": 8, - "*val": 4, "DICT_NOTUSED": 6, "privdata": 8, "zfree": 2, @@ -3951,7 +7516,6 @@ "key": 9, "dictGenHashFunction": 5, "dictSdsHash": 4, - "char*": 166, "dictSdsCaseHash": 2, "dictGenCaseHashFunction": 1, "dictEncObjKeyCompare": 4, @@ -4444,7 +8008,6 @@ "name.release": 1, "name.machine": 1, "aeGetApiName": 1, - "__GNUC__": 7, "__GNUC_MINOR__": 2, "__GNUC_PATCHLEVEL__": 1, "uptime/": 1, @@ -4575,7 +8138,6 @@ "": 1, "": 2, "": 2, - "//": 257, "rfUTF8_IsContinuationbyte": 1, "e.t.c.": 1, "rfFReadLine_UTF8": 5, @@ -5052,7 +8614,6 @@ "use": 1, "determine": 1, "backs": 1, - "memmove": 1, "by": 1, "contiuing": 1, "make": 3, @@ -6446,6 +10007,13 @@ "__pyx_pf_7sklearn_12linear_model_8sgd_fast_10Regression_loss": 1, "__pyx_base.__pyx_vtab": 1, "__pyx_base.loss": 1, + "syscalldef": 1, + "syscalldefs": 1, + "SYSCALL_OR_NUM": 3, + "SYS_restart_syscall": 1, + "MAKE_UINT16": 3, + "SYS_exit": 1, + "SYS_fork": 1, "__wglew_h__": 2, "__WGLEW_H__": 1, "__wglext_h_": 2, @@ -7493,112 +11061,1827 @@ "yajl_get_bytes_consumed": 1, "yajl_free_error": 1 }, + "C#": { + "@": 1, + "{": 5, + "ViewBag.Title": 1, + ";": 8, + "}": 5, + "@section": 1, + "featured": 1, + "
": 1, + "class=": 7, + "
": 1, + "
": 1, + "

": 1, + "@ViewBag.Title.": 1, + "

": 1, + "

": 1, + "@ViewBag.Message": 1, + "

": 1, + "
": 1, + "

": 1, + "To": 1, + "learn": 1, + "more": 4, + "about": 2, + "ASP.NET": 5, + "MVC": 4, + "visit": 2, + "": 5, + "href=": 5, + "title=": 2, + "http": 1, + "//asp.net/mvc": 1, + "": 5, + ".": 2, + "The": 1, + "page": 1, + "features": 3, + "": 1, + "videos": 1, + "tutorials": 1, + "and": 6, + "samples": 1, + "": 1, + "to": 4, + "help": 1, + "you": 4, + "get": 1, + "the": 5, + "most": 1, + "from": 1, + "MVC.": 1, + "If": 1, + "have": 1, + "any": 1, + "questions": 1, + "our": 1, + "forums": 1, + "

": 1, + "
": 1, + "
": 1, + "

": 1, + "We": 1, + "suggest": 1, + "following": 1, + "

": 1, + "
    ": 1, + "
  1. ": 3, + "
    ": 3, + "Getting": 1, + "Started": 1, + "
    ": 3, + "gives": 2, + "a": 3, + "powerful": 1, + "patterns": 1, + "-": 3, + "based": 1, + "way": 1, + "build": 1, + "dynamic": 1, + "websites": 1, + "that": 5, + "enables": 1, + "clean": 1, + "separation": 1, + "of": 2, + "concerns": 1, + "full": 1, + "control": 1, + "over": 1, + "markup": 1, + "for": 4, + "enjoyable": 1, + "agile": 1, + "development.": 1, + "includes": 1, + "many": 1, + "enable": 1, + "fast": 1, + "TDD": 1, + "friendly": 1, + "development": 1, + "creating": 1, + "sophisticated": 1, + "applications": 1, + "use": 1, + "latest": 1, + "web": 2, + "standards.": 1, + "Learn": 3, + "
  2. ": 3, + "Add": 1, + "NuGet": 2, + "packages": 1, + "jump": 1, + "start": 1, + "your": 2, + "coding": 1, + "makes": 1, + "it": 2, + "easy": 1, + "install": 1, + "update": 1, + "free": 1, + "libraries": 1, + "tools.": 1, + "Find": 1, + "Web": 1, + "Hosting": 1, + "You": 1, + "can": 1, + "easily": 1, + "find": 1, + "hosting": 1, + "company": 1, + "offers": 1, + "right": 1, + "mix": 1, + "price": 1, + "applications.": 1, + "
": 1, + "using": 5, + "System": 1, + "System.Collections.Generic": 1, + "System.Linq": 1, + "System.Text": 1, + "System.Threading.Tasks": 1, + "namespace": 1, + "LittleSampleApp": 1, + "///": 4, + "": 1, + "Just": 1, + "what": 1, + "says": 1, + "on": 1, + "tin.": 1, + "A": 1, + "little": 1, + "sample": 1, + "application": 1, + "Linguist": 1, + "try": 1, + "out.": 1, + "": 1, + "class": 1, + "Program": 1, + "static": 1, + "void": 1, + "Main": 1, + "(": 3, + "string": 1, + "[": 1, + "]": 1, + "args": 1, + ")": 3, + "Console.WriteLine": 2 + }, "C++": { - "class": 34, + "class": 40, "Bar": 2, - "{": 553, + "{": 726, "protected": 4, - "char": 122, + "char": 127, "*name": 6, - ";": 2308, - "public": 27, - "void": 152, + ";": 2783, + "public": 33, + "void": 241, "hello": 2, - "(": 2438, - ")": 2440, - "}": 552, - "foo": 2, - "cudaArray*": 1, - "cu_array": 4, - "texture": 1, - "": 1, - "2": 1, - "cudaReadModeElementType": 1, - "tex": 4, - "cudaChannelFormatDesc": 1, - "description": 5, - "cudaCreateChannelDesc": 1, - "": 1, - "cudaMallocArray": 1, - "&": 148, - "width": 5, - "height": 5, - "cudaMemcpyToArray": 1, - "image": 1, - "width*height*sizeof": 1, - "float": 9, - "cudaMemcpyHostToDevice": 1, - "tex.addressMode": 2, - "[": 204, - "]": 204, - "cudaAddressModeClamp": 2, - "tex.filterMode": 1, - "cudaFilterModePoint": 1, - "tex.normalized": 1, - "false": 43, - "//": 239, - "do": 5, - "not": 2, - "normalize": 1, - "coordinates": 1, - "cudaBindTextureToArray": 1, - "dim3": 2, - "blockDim": 2, - "gridDim": 2, - "+": 55, - "blockDim.x": 2, - "-": 227, - "/": 15, - "blockDim.y": 2, - "kernel": 2, - "<<": 19, - "<": 56, - "d_data": 1, - "cudaUnbindTexture": 1, - "//end": 1, - "__global__": 1, - "float*": 1, - "odata": 2, - "int": 148, + "(": 3102, + ")": 3105, + "}": 726, + "//": 315, + "///": 843, + "mainpage": 1, + "C": 6, + "library": 14, + "for": 105, + "Broadcom": 3, + "BCM": 14, + "as": 28, + "used": 17, + "in": 165, + "Raspberry": 6, + "Pi": 5, + "This": 19, + "is": 102, + "a": 157, + "RPi": 17, + ".": 16, + "It": 7, + "provides": 3, + "access": 17, + "to": 254, + "GPIO": 87, + "and": 118, + "other": 17, + "IO": 2, + "functions": 19, + "on": 55, + "the": 541, + "chip": 9, + "allowing": 3, + "pins": 40, + "pin": 90, + "IDE": 4, + "plug": 3, + "board": 2, + "so": 2, + "you": 29, + "can": 21, + "control": 17, + "interface": 9, + "with": 33, + "various": 4, + "external": 3, + "devices.": 1, + "reading": 3, + "digital": 2, + "inputs": 2, + "setting": 2, + "outputs": 1, + "using": 11, + "SPI": 44, + "I2C": 29, + "accessing": 2, + "system": 13, + "timers.": 1, + "Pin": 65, + "event": 3, + "detection": 2, + "supported": 3, + "by": 53, + "polling": 1, + "interrupts": 1, + "are": 36, + "not": 29, + "+": 80, + "compatible": 1, + "installs": 1, + "header": 7, + "file": 31, + "non": 2, + "-": 438, + "shared": 2, + "any": 23, + "Linux": 2, + "based": 4, + "distro": 1, + "but": 5, + "clearly": 1, + "no": 7, + "use": 37, + "except": 2, + "or": 44, + "another": 1, + "The": 50, + "version": 38, + "of": 215, + "package": 1, + "that": 36, + "this": 57, + "documentation": 3, + "refers": 1, + "be": 35, + "downloaded": 1, + "from": 91, + "http": 11, + "//www.airspayce.com/mikem/bcm2835/bcm2835": 1, + "tar.gz": 1, + "You": 9, + "find": 2, + "latest": 2, + "at": 20, + "//www.airspayce.com/mikem/bcm2835": 1, + "Several": 1, + "example": 3, + "programs": 4, + "provided.": 1, + "Based": 1, + "data": 26, + "//elinux.org/RPi_Low": 1, + "level_peripherals": 1, + "//www.raspberrypi.org/wp": 1, + "content/uploads/2012/02/BCM2835": 1, + "ARM": 5, + "Peripherals.pdf": 1, + "//www.scribd.com/doc/101830961/GPIO": 2, + "Pads": 3, + "Control2": 2, + "also": 3, + "online": 1, + "help": 1, + "discussion": 1, + "//groups.google.com/group/bcm2835": 1, + "Please": 4, + "group": 23, + "all": 11, + "questions": 1, + "discussions": 1, + "topic.": 1, + "Do": 1, + "contact": 1, + "author": 3, + "directly": 2, + "unless": 1, + "it": 19, + "discuss": 1, + "commercial": 1, + "licensing.": 1, + "Tested": 1, + "debian6": 1, + "wheezy": 3, + "raspbian": 3, + "Occidentalisv01": 2, + "CAUTION": 1, + "has": 29, + "been": 14, + "observed": 1, + "when": 22, + "detect": 3, + "enables": 3, + "such": 4, + "bcm2835_gpio_len": 5, + "pulled": 1, + "LOW": 8, + "cause": 1, + "temporary": 1, + "hangs": 1, + "Occidentalisv01.": 1, + "Reason": 1, + "yet": 1, + "determined": 1, + "suspect": 1, + "an": 23, + "interrupt": 3, + "handler": 1, + "hitting": 1, + "hard": 1, + "loop": 2, + "those": 3, + "OSs.": 1, + "If": 11, + "must": 6, + "friends": 2, + "make": 6, + "sure": 6, + "disable": 2, + "bcm2835_gpio_cler_len": 1, + "after": 18, + "use.": 1, + "par": 9, + "Installation": 1, + "consists": 1, + "single": 2, + "which": 14, + "will": 15, + "installed": 1, + "usual": 3, + "places": 1, + "install": 3, + "code": 12, + "#": 1, + "download": 2, + "say": 1, + "bcm2835": 7, + "xx.tar.gz": 2, + "then": 15, + "tar": 1, + "zxvf": 1, + "cd": 1, + "xx": 2, + "./configure": 1, + "sudo": 2, + "check": 4, + "endcode": 2, + "Physical": 21, + "Addresses": 6, + "bcm2835_peri_read": 3, + "bcm2835_peri_write": 3, + "bcm2835_peri_set_bits": 2, + "low": 5, + "level": 10, + "peripheral": 14, + "register": 17, + "functions.": 4, + "They": 1, + "designed": 3, + "physical": 4, + "addresses": 4, + "described": 1, + "section": 6, + "BCM2835": 2, + "Peripherals": 1, + "manual.": 1, + "range": 3, + "FFFFFF": 1, + "peripherals.": 1, + "bus": 4, + "peripherals": 2, + "set": 18, + "up": 18, + "map": 3, + "onto": 1, + "address": 13, + "starting": 1, + "E000000.": 1, + "Thus": 1, + "advertised": 1, + "manual": 8, + "Ennnnnn": 1, + "available": 6, + "nnnnnn.": 1, + "base": 8, + "registers": 12, + "following": 2, + "externals": 1, + "bcm2835_gpio": 2, + "bcm2835_pwm": 2, + "bcm2835_clk": 2, + "bcm2835_pads": 2, + "bcm2835_spio0": 1, + "bcm2835_st": 1, + "bcm2835_bsc0": 1, + "bcm2835_bsc1": 1, + "Numbering": 1, + "numbering": 1, + "different": 5, + "inconsistent": 1, + "underlying": 4, + "numbering.": 1, + "//elinux.org/RPi_BCM2835_GPIOs": 1, + "some": 4, + "well": 1, + "power": 1, + "ground": 1, + "pins.": 1, + "Not": 4, + "header.": 1, + "Version": 40, + "P5": 6, + "connector": 1, + "V": 2, + "Gnd.": 1, + "passed": 4, + "number": 52, + "_not_": 1, + "number.": 1, + "There": 1, + "symbolic": 1, + "definitions": 3, + "each": 7, + "should": 10, + "convenience.": 1, + "See": 7, + "ref": 32, + "RPiGPIOPin.": 22, + "Pins": 2, + "bcm2835_spi_*": 1, + "allow": 5, + "SPI0": 17, + "send": 3, + "received": 3, + "Serial": 3, + "Peripheral": 6, + "Interface": 2, + "For": 6, + "more": 4, + "information": 3, + "about": 6, + "see": 14, + "//en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus": 1, + "When": 12, + "bcm2835_spi_begin": 3, + "called": 13, + "changes": 2, + "bahaviour": 1, + "their": 6, + "default": 14, + "behaviour": 1, + "order": 14, + "support": 4, + "SPI.": 1, + "While": 1, + "able": 2, + "state": 33, + "through": 4, + "bcm2835_spi_gpio_write": 1, + "bcm2835_spi_end": 4, + "revert": 1, + "configured": 1, + "controled": 1, + "bcm2835_gpio_*": 1, + "calls.": 1, + "P1": 56, + "MOSI": 8, + "MISO": 6, + "CLK": 6, + "CE0": 5, + "CE1": 6, + "bcm2835_i2c_*": 2, + "BSC": 10, + "generically": 1, + "referred": 1, + "I": 4, + "//en.wikipedia.org/wiki/I": 1, + "%": 7, + "C2": 1, + "B2C": 1, + "V2": 2, + "SDA": 3, + "SLC": 1, + "Real": 1, + "Time": 1, + "performance": 2, + "constraints": 2, + "user": 3, + "i.e.": 1, + "they": 2, + "run": 2, + "Such": 1, + "part": 1, + "kernel": 4, + "usually": 2, + "subject": 1, + "paging": 1, + "swapping": 2, + "while": 17, + "does": 4, + "things": 1, + "besides": 1, + "running": 1, + "your": 12, + "program.": 1, + "means": 8, + "expect": 2, + "get": 5, + "real": 4, + "time": 10, + "timing": 3, + "programs.": 1, + "In": 2, + "particular": 1, + "there": 4, + "guarantee": 1, + "bcm2835_delay": 5, + "bcm2835_delayMicroseconds": 6, + "return": 240, + "exactly": 2, + "requested.": 1, + "fact": 2, + "depending": 1, + "activity": 1, + "host": 1, + "etc": 1, + "might": 1, + "significantly": 1, + "longer": 1, + "delay": 9, + "times": 2, + "than": 6, + "one": 73, + "asked": 1, + "for.": 1, + "So": 1, + "please": 2, + "dont": 1, + "request.": 1, + "Arjan": 2, + "reports": 1, + "prevent": 4, + "fragment": 2, + "struct": 13, + "sched_param": 1, + "sp": 4, + "memset": 3, + "&": 203, + "sizeof": 15, + "sp.sched_priority": 1, + "sched_get_priority_max": 1, + "SCHED_FIFO": 2, + "sched_setscheduler": 1, + "mlockall": 1, + "MCL_CURRENT": 1, + "|": 40, + "MCL_FUTURE": 1, + "Open": 2, + "Source": 2, + "Licensing": 2, + "GPL": 2, + "appropriate": 7, + "option": 1, + "if": 359, + "want": 5, + "share": 2, + "source": 12, + "application": 2, + "everyone": 1, + "distribute": 1, + "give": 2, + "them": 1, + "right": 9, + "who": 1, + "uses": 4, + "it.": 3, + "wish": 2, + "software": 1, + "under": 2, + "contribute": 1, + "open": 6, + "community": 1, + "accordance": 1, + "distributed.": 1, + "//www.gnu.org/copyleft/gpl.html": 1, + "COPYING": 1, + "Acknowledgements": 1, + "Some": 1, + "inspired": 2, + "Dom": 1, + "Gert.": 1, + "Alan": 1, + "Barr.": 1, + "Revision": 1, + "History": 1, + "Initial": 1, + "release": 1, + "Minor": 1, + "bug": 1, + "fixes": 1, + "Added": 11, + "bcm2835_spi_transfern": 3, + "Fixed": 4, + "problem": 2, + "prevented": 1, + "being": 4, + "used.": 2, + "Reported": 5, + "David": 1, + "Robinson.": 1, + "bcm2835_close": 4, + "deinit": 1, + "library.": 3, + "Suggested": 1, + "sar": 1, + "Ortiz": 1, + "Document": 1, + "testing": 2, + "Functions": 1, + "bcm2835_gpio_ren": 3, + "bcm2835_gpio_fen": 3, + "bcm2835_gpio_hen": 3, + "bcm2835_gpio_aren": 3, + "bcm2835_gpio_afen": 3, + "now": 4, + "only": 6, + "specified.": 1, + "Other": 1, + "were": 1, + "already": 1, + "previously": 10, + "enabled": 4, + "stay": 1, + "enabled.": 1, + "bcm2835_gpio_clr_ren": 2, + "bcm2835_gpio_clr_fen": 2, + "bcm2835_gpio_clr_hen": 2, + "bcm2835_gpio_clr_len": 2, + "bcm2835_gpio_clr_aren": 2, + "bcm2835_gpio_clr_afen": 2, + "clear": 3, + "enable": 3, + "individual": 1, + "suggested": 3, + "Andreas": 1, + "Sundstrom.": 1, + "bcm2835_spi_transfernb": 2, + "buffers": 3, + "read": 21, + "write.": 1, + "Improvements": 3, + "barrier": 3, + "maddin.": 1, + "contributed": 1, + "mikew": 1, + "noticed": 1, + "was": 6, + "mallocing": 1, + "memory": 14, + "mmaps": 1, + "/dev/mem.": 1, + "ve": 4, + "removed": 1, + "mallocs": 1, + "frees": 1, + "found": 1, + "calling": 9, + "nanosleep": 7, + "takes": 1, + "least": 2, + "us.": 1, + "need": 6, + "link": 3, + "version.": 1, + "s": 26, + "doc": 1, + "Also": 1, + "added": 2, + "define": 2, + "passwrd": 1, + "value": 50, + "Gert": 1, + "says": 1, + "needed": 3, + "change": 3, + "pad": 4, + "settings.": 1, + "Changed": 1, + "names": 3, + "collisions": 1, + "wiringPi.": 1, + "Macros": 2, + "delayMicroseconds": 3, + "disabled": 2, + "defining": 1, + "BCM2835_NO_DELAY_COMPATIBILITY": 2, + "incorrect": 2, + "New": 6, + "mapping": 3, + "Hardware": 1, + "pointers": 2, + "initialisation": 2, + "externally": 1, + "bcm2835_spi0.": 1, + "Now": 4, + "compiles": 1, + "even": 2, + "CLOCK_MONOTONIC_RAW": 1, + "CLOCK_MONOTONIC": 3, + "instead.": 1, + "errors": 1, + "divider": 15, + "frequencies": 2, + "MHz": 14, + "clock.": 6, + "Ben": 1, + "Simpson.": 1, + "end": 23, + "examples": 1, + "Mark": 5, + "Wolfe.": 1, + "bcm2835_gpio_set_multi": 2, + "bcm2835_gpio_clr_multi": 2, + "bcm2835_gpio_write_multi": 4, + "mask": 20, + "once.": 1, + "Requested": 2, + "Sebastian": 2, + "Loncar.": 2, + "bcm2835_gpio_write_mask.": 1, + "Changes": 1, + "timer": 2, + "counter": 1, + "instead": 4, + "clock_gettime": 1, + "improved": 1, + "accuracy.": 1, + "No": 2, + "lrt": 1, + "now.": 1, + "Contributed": 1, + "van": 1, + "Vught.": 1, + "Removed": 1, + "inlines": 1, + "previous": 6, + "patch": 1, + "since": 3, + "don": 1, + "t": 15, + "seem": 1, + "work": 1, + "everywhere.": 1, + "olly.": 1, + "Patch": 2, + "Dootson": 2, + "close": 7, + "/dev/mem": 4, + "granted.": 1, + "susceptible": 1, + "bit": 19, + "overruns.": 1, + "courtesy": 1, + "Jeremy": 1, + "Mortis.": 1, + "definition": 3, + "BCM2835_GPFEN0": 2, + "broke": 1, + "ability": 1, + "falling": 4, + "edge": 8, + "events.": 1, + "Dootson.": 2, + "bcm2835_i2c_set_baudrate": 2, + "bcm2835_i2c_read_register_rs.": 1, + "bcm2835_i2c_read": 4, + "bcm2835_i2c_write": 4, + "fix": 1, + "ocasional": 1, + "reads": 2, + "completing.": 1, + "Patched": 1, + "p": 6, + "[": 293, + "atched": 1, + "his": 1, + "submitted": 1, + "high": 5, + "load": 1, + "processes.": 1, + "Updated": 1, + "distribution": 1, + "location": 6, + "details": 1, + "airspayce.com": 1, + "missing": 1, + "unmapmem": 1, + "pads": 7, + "leak.": 1, + "Hartmut": 1, + "Henkel.": 1, + "Mike": 1, + "McCauley": 1, + "mikem@airspayce.com": 1, + "DO": 1, + "NOT": 3, + "CONTACT": 1, + "THE": 2, + "AUTHOR": 1, + "DIRECTLY": 1, + "USE": 1, + "LISTS": 1, + "#ifndef": 29, + "BCM2835_H": 3, + "#define": 343, + "#include": 129, + "": 2, + "defgroup": 7, + "constants": 1, + "Constants": 1, + "passing": 1, + "values": 3, + "here": 1, + "@": 14, + "HIGH": 12, + "true": 49, + "volts": 2, + "pin.": 21, + "false": 48, + "Speed": 1, + "core": 1, + "clock": 21, + "core_clk": 1, + "BCM2835_CORE_CLK_HZ": 1, + "<": 255, + "Base": 17, + "Address": 10, + "BCM2835_PERI_BASE": 9, + "System": 10, + "Timer": 9, + "BCM2835_ST_BASE": 1, + "BCM2835_GPIO_PADS": 2, + "Clock/timer": 1, + "BCM2835_CLOCK_BASE": 1, + "BCM2835_GPIO_BASE": 6, + "BCM2835_SPI0_BASE": 1, + "BSC0": 2, + "BCM2835_BSC0_BASE": 1, + "PWM": 2, + "BCM2835_GPIO_PWM": 1, + "C000": 1, + "BSC1": 2, + "BCM2835_BSC1_BASE": 1, + "ST": 1, + "registers.": 10, + "Available": 8, + "bcm2835_init": 11, + "extern": 72, + "volatile": 13, + "uint32_t": 39, + "*bcm2835_st": 1, + "*bcm2835_gpio": 1, + "*bcm2835_pwm": 1, + "*bcm2835_clk": 1, + "PADS": 1, + "*bcm2835_pads": 1, + "*bcm2835_spi0": 1, + "*bcm2835_bsc0": 1, + "*bcm2835_bsc1": 1, + "Size": 2, + "page": 5, + "BCM2835_PAGE_SIZE": 1, + "*1024": 2, + "block": 7, + "BCM2835_BLOCK_SIZE": 1, + "offsets": 2, + "BCM2835_GPIO_BASE.": 1, + "Offsets": 1, + "into": 6, + "bytes": 29, + "per": 3, + "Register": 1, + "View": 1, + "BCM2835_GPFSEL0": 1, + "Function": 8, + "Select": 49, + "BCM2835_GPFSEL1": 1, + "BCM2835_GPFSEL2": 1, + "BCM2835_GPFSEL3": 1, + "c": 72, + "BCM2835_GPFSEL4": 1, + "BCM2835_GPFSEL5": 1, + "BCM2835_GPSET0": 1, + "Output": 6, + "Set": 2, + "BCM2835_GPSET1": 1, + "BCM2835_GPCLR0": 1, + "Clear": 18, + "BCM2835_GPCLR1": 1, + "BCM2835_GPLEV0": 1, + "Level": 2, + "BCM2835_GPLEV1": 1, + "BCM2835_GPEDS0": 1, + "Event": 11, + "Detect": 35, + "Status": 6, + "BCM2835_GPEDS1": 1, + "BCM2835_GPREN0": 1, + "Rising": 8, + "Edge": 16, + "Enable": 38, + "BCM2835_GPREN1": 1, + "Falling": 8, + "BCM2835_GPFEN1": 1, + "BCM2835_GPHEN0": 1, + "High": 4, + "BCM2835_GPHEN1": 1, + "BCM2835_GPLEN0": 1, + "Low": 5, + "BCM2835_GPLEN1": 1, + "BCM2835_GPAREN0": 1, + "Async.": 4, + "BCM2835_GPAREN1": 1, + "BCM2835_GPAFEN0": 1, + "BCM2835_GPAFEN1": 1, + "BCM2835_GPPUD": 1, + "Pull": 11, + "up/down": 10, + "BCM2835_GPPUDCLK0": 1, + "Clock": 11, + "BCM2835_GPPUDCLK1": 1, + "brief": 12, + "bcm2835PortFunction": 1, + "Port": 1, + "function": 19, + "select": 9, + "modes": 1, + "bcm2835_gpio_fsel": 2, + "typedef": 50, + "enum": 17, + "BCM2835_GPIO_FSEL_INPT": 1, + "b000": 1, + "Input": 2, + "BCM2835_GPIO_FSEL_OUTP": 1, + "b001": 1, + "BCM2835_GPIO_FSEL_ALT0": 1, + "b100": 1, + "Alternate": 6, + "BCM2835_GPIO_FSEL_ALT1": 1, + "b101": 1, + "BCM2835_GPIO_FSEL_ALT2": 1, + "b110": 1, + "BCM2835_GPIO_FSEL_ALT3": 1, + "b111": 2, + "BCM2835_GPIO_FSEL_ALT4": 1, + "b011": 1, + "BCM2835_GPIO_FSEL_ALT5": 1, + "b010": 1, + "BCM2835_GPIO_FSEL_MASK": 1, + "bits": 11, + "bcm2835FunctionSelect": 2, + "bcm2835PUDControl": 4, + "Pullup/Pulldown": 1, + "defines": 3, + "bcm2835_gpio_pud": 5, + "BCM2835_GPIO_PUD_OFF": 1, + "b00": 1, + "Off": 3, + "pull": 1, + "BCM2835_GPIO_PUD_DOWN": 1, + "b01": 1, + "Down": 1, + "BCM2835_GPIO_PUD_UP": 1, + "b10": 1, + "Up": 1, + "Pad": 11, + "BCM2835_PADS_GPIO_0_27": 1, + "BCM2835_PADS_GPIO_28_45": 1, + "BCM2835_PADS_GPIO_46_53": 1, + "Control": 6, + "masks": 1, + "BCM2835_PAD_PASSWRD": 1, + "A": 7, + "<<": 29, + "Password": 1, + "BCM2835_PAD_SLEW_RATE_UNLIMITED": 1, + "Slew": 1, + "rate": 3, + "unlimited": 1, + "BCM2835_PAD_HYSTERESIS_ENABLED": 1, + "Hysteresis": 1, + "BCM2835_PAD_DRIVE_2mA": 1, + "mA": 8, + "drive": 8, + "current": 26, + "BCM2835_PAD_DRIVE_4mA": 1, + "BCM2835_PAD_DRIVE_6mA": 1, + "BCM2835_PAD_DRIVE_8mA": 1, + "BCM2835_PAD_DRIVE_10mA": 1, + "BCM2835_PAD_DRIVE_12mA": 1, + "BCM2835_PAD_DRIVE_14mA": 1, + "BCM2835_PAD_DRIVE_16mA": 1, + "bcm2835PadGroup": 4, + "specification": 1, + "bcm2835_gpio_pad": 2, + "BCM2835_PAD_GROUP_GPIO_0_27": 1, + "BCM2835_PAD_GROUP_GPIO_28_45": 1, + "BCM2835_PAD_GROUP_GPIO_46_53": 1, + "Numbers": 1, + "Here": 1, + "we": 10, + "terms": 4, + "numbers.": 1, + "These": 6, + "requiring": 1, + "bin": 1, + "connected": 1, + "adopt": 1, + "alternate": 7, + "function.": 3, + "slightly": 1, + "pinouts": 1, + "these": 1, + "RPI_V2_*.": 1, + "At": 1, + "bootup": 1, + "UART0_TXD": 3, + "UART0_RXD": 3, + "ie": 3, + "alt0": 1, + "respectively": 1, + "dedicated": 1, + "cant": 1, + "controlled": 1, + "independently": 1, + "RPI_GPIO_P1_03": 6, + "RPI_GPIO_P1_05": 6, + "RPI_GPIO_P1_07": 1, + "RPI_GPIO_P1_08": 1, + "defaults": 4, + "alt": 4, + "RPI_GPIO_P1_10": 1, + "RPI_GPIO_P1_11": 1, + "RPI_GPIO_P1_12": 1, + "RPI_GPIO_P1_13": 1, + "RPI_GPIO_P1_15": 1, + "RPI_GPIO_P1_16": 1, + "RPI_GPIO_P1_18": 1, + "RPI_GPIO_P1_19": 1, + "RPI_GPIO_P1_21": 1, + "RPI_GPIO_P1_22": 1, + "RPI_GPIO_P1_23": 1, + "RPI_GPIO_P1_24": 1, + "RPI_GPIO_P1_26": 1, + "RPI_V2_GPIO_P1_03": 1, + "RPI_V2_GPIO_P1_05": 1, + "RPI_V2_GPIO_P1_07": 1, + "RPI_V2_GPIO_P1_08": 1, + "RPI_V2_GPIO_P1_10": 1, + "RPI_V2_GPIO_P1_11": 1, + "RPI_V2_GPIO_P1_12": 1, + "RPI_V2_GPIO_P1_13": 1, + "RPI_V2_GPIO_P1_15": 1, + "RPI_V2_GPIO_P1_16": 1, + "RPI_V2_GPIO_P1_18": 1, + "RPI_V2_GPIO_P1_19": 1, + "RPI_V2_GPIO_P1_21": 1, + "RPI_V2_GPIO_P1_22": 1, + "RPI_V2_GPIO_P1_23": 1, + "RPI_V2_GPIO_P1_24": 1, + "RPI_V2_GPIO_P1_26": 1, + "RPI_V2_GPIO_P5_03": 1, + "RPI_V2_GPIO_P5_04": 1, + "RPI_V2_GPIO_P5_05": 1, + "RPI_V2_GPIO_P5_06": 1, + "RPiGPIOPin": 1, + "BCM2835_SPI0_CS": 1, + "Master": 12, + "BCM2835_SPI0_FIFO": 1, + "TX": 5, + "RX": 7, + "FIFOs": 1, + "BCM2835_SPI0_CLK": 1, + "Divider": 2, + "BCM2835_SPI0_DLEN": 1, + "Data": 9, + "Length": 2, + "BCM2835_SPI0_LTOH": 1, + "LOSSI": 1, + "mode": 24, + "TOH": 1, + "BCM2835_SPI0_DC": 1, + "DMA": 3, + "DREQ": 1, + "Controls": 1, + "BCM2835_SPI0_CS_LEN_LONG": 1, + "Long": 1, + "word": 7, + "Lossi": 2, + "DMA_LEN": 1, + "BCM2835_SPI0_CS_DMA_LEN": 1, + "BCM2835_SPI0_CS_CSPOL2": 1, + "Chip": 9, + "Polarity": 5, + "BCM2835_SPI0_CS_CSPOL1": 1, + "BCM2835_SPI0_CS_CSPOL0": 1, + "BCM2835_SPI0_CS_RXF": 1, + "RXF": 2, + "FIFO": 25, + "Full": 1, + "BCM2835_SPI0_CS_RXR": 1, + "RXR": 3, + "needs": 4, + "Reading": 1, + "full": 9, + "BCM2835_SPI0_CS_TXD": 1, + "TXD": 2, + "accept": 2, + "BCM2835_SPI0_CS_RXD": 1, + "RXD": 2, + "contains": 2, + "BCM2835_SPI0_CS_DONE": 1, + "Done": 3, + "transfer": 8, + "BCM2835_SPI0_CS_TE_EN": 1, + "Unused": 2, + "BCM2835_SPI0_CS_LMONO": 1, + "BCM2835_SPI0_CS_LEN": 1, + "LEN": 1, + "LoSSI": 1, + "BCM2835_SPI0_CS_REN": 1, + "REN": 1, + "Read": 3, + "BCM2835_SPI0_CS_ADCS": 1, + "ADCS": 1, + "Automatically": 1, + "Deassert": 1, + "BCM2835_SPI0_CS_INTR": 1, + "INTR": 1, + "Interrupt": 5, + "BCM2835_SPI0_CS_INTD": 1, + "INTD": 1, + "BCM2835_SPI0_CS_DMAEN": 1, + "DMAEN": 1, + "BCM2835_SPI0_CS_TA": 1, + "Transfer": 3, + "Active": 2, + "BCM2835_SPI0_CS_CSPOL": 1, + "BCM2835_SPI0_CS_CLEAR": 1, + "BCM2835_SPI0_CS_CLEAR_RX": 1, + "BCM2835_SPI0_CS_CLEAR_TX": 1, + "BCM2835_SPI0_CS_CPOL": 1, + "BCM2835_SPI0_CS_CPHA": 1, + "Phase": 1, + "BCM2835_SPI0_CS_CS": 1, + "bcm2835SPIBitOrder": 3, + "Bit": 1, + "Specifies": 5, + "ordering": 4, + "bcm2835_spi_setBitOrder": 2, + "BCM2835_SPI_BIT_ORDER_LSBFIRST": 1, + "LSB": 1, + "First": 2, + "BCM2835_SPI_BIT_ORDER_MSBFIRST": 1, + "MSB": 1, + "Specify": 2, + "bcm2835_spi_setDataMode": 2, + "BCM2835_SPI_MODE0": 1, + "CPOL": 4, + "CPHA": 4, + "BCM2835_SPI_MODE1": 1, + "BCM2835_SPI_MODE2": 1, + "BCM2835_SPI_MODE3": 1, + "bcm2835SPIMode": 2, + "bcm2835SPIChipSelect": 3, + "BCM2835_SPI_CS0": 1, + "BCM2835_SPI_CS1": 1, + "BCM2835_SPI_CS2": 1, + "CS1": 1, + "CS2": 1, + "asserted": 3, + "BCM2835_SPI_CS_NONE": 1, + "CS": 5, + "yourself": 1, + "bcm2835SPIClockDivider": 3, + "generate": 2, + "Figures": 1, + "below": 1, + "period": 1, + "frequency.": 1, + "divided": 2, + "nominal": 2, + "reported": 2, + "contrary": 1, + "may": 9, + "shown": 1, + "have": 4, + "confirmed": 1, + "measurement": 2, + "BCM2835_SPI_CLOCK_DIVIDER_65536": 1, + "us": 12, + "kHz": 10, + "BCM2835_SPI_CLOCK_DIVIDER_32768": 1, + "BCM2835_SPI_CLOCK_DIVIDER_16384": 1, + "BCM2835_SPI_CLOCK_DIVIDER_8192": 1, + "/51757813kHz": 1, + "BCM2835_SPI_CLOCK_DIVIDER_4096": 1, + "BCM2835_SPI_CLOCK_DIVIDER_2048": 1, + "BCM2835_SPI_CLOCK_DIVIDER_1024": 1, + "BCM2835_SPI_CLOCK_DIVIDER_512": 1, + "BCM2835_SPI_CLOCK_DIVIDER_256": 1, + "BCM2835_SPI_CLOCK_DIVIDER_128": 1, + "ns": 9, + "BCM2835_SPI_CLOCK_DIVIDER_64": 1, + "BCM2835_SPI_CLOCK_DIVIDER_32": 1, + "BCM2835_SPI_CLOCK_DIVIDER_16": 1, + "BCM2835_SPI_CLOCK_DIVIDER_8": 1, + "BCM2835_SPI_CLOCK_DIVIDER_4": 1, + "BCM2835_SPI_CLOCK_DIVIDER_2": 1, + "fastest": 1, + "BCM2835_SPI_CLOCK_DIVIDER_1": 1, + "same": 3, + "/65536": 1, + "BCM2835_BSC_C": 1, + "BCM2835_BSC_S": 1, + "BCM2835_BSC_DLEN": 1, + "BCM2835_BSC_A": 1, + "Slave": 1, + "BCM2835_BSC_FIFO": 1, + "BCM2835_BSC_DIV": 1, + "BCM2835_BSC_DEL": 1, + "Delay": 4, + "BCM2835_BSC_CLKT": 1, + "Stretch": 2, + "Timeout": 2, + "BCM2835_BSC_C_I2CEN": 1, + "BCM2835_BSC_C_INTR": 1, + "BCM2835_BSC_C_INTT": 1, + "BCM2835_BSC_C_INTD": 1, + "DONE": 2, + "BCM2835_BSC_C_ST": 1, + "Start": 4, + "new": 13, + "BCM2835_BSC_C_CLEAR_1": 1, + "BCM2835_BSC_C_CLEAR_2": 1, + "BCM2835_BSC_C_READ": 1, + "BCM2835_BSC_S_CLKT": 1, + "stretch": 1, + "timeout": 5, + "BCM2835_BSC_S_ERR": 1, + "ACK": 1, + "error": 8, + "BCM2835_BSC_S_RXF": 1, + "BCM2835_BSC_S_TXE": 1, + "TXE": 1, + "BCM2835_BSC_S_RXD": 1, + "BCM2835_BSC_S_TXD": 1, + "BCM2835_BSC_S_RXR": 1, + "BCM2835_BSC_S_TXW": 1, + "TXW": 1, + "writing": 2, + "BCM2835_BSC_S_DONE": 1, + "BCM2835_BSC_S_TA": 1, + "BCM2835_BSC_FIFO_SIZE": 1, + "size": 13, + "bcm2835I2CClockDivider": 3, + "BCM2835_I2C_CLOCK_DIVIDER_2500": 1, + "BCM2835_I2C_CLOCK_DIVIDER_626": 1, + "BCM2835_I2C_CLOCK_DIVIDER_150": 1, + "reset": 1, + "BCM2835_I2C_CLOCK_DIVIDER_148": 1, + "bcm2835I2CReasonCodes": 5, + "reason": 4, + "codes": 1, + "BCM2835_I2C_REASON_OK": 1, + "Success": 1, + "BCM2835_I2C_REASON_ERROR_NACK": 1, + "Received": 4, + "NACK": 1, + "BCM2835_I2C_REASON_ERROR_CLKT": 1, + "BCM2835_I2C_REASON_ERROR_DATA": 1, + "sent": 1, + "/": 16, + "BCM2835_ST_CS": 1, + "Control/Status": 1, + "BCM2835_ST_CLO": 1, + "Counter": 4, + "Lower": 2, + "BCM2835_ST_CHI": 1, + "Upper": 1, + "BCM2835_PWM_CONTROL": 1, + "BCM2835_PWM_STATUS": 1, + "BCM2835_PWM0_RANGE": 1, + "BCM2835_PWM0_DATA": 1, + "BCM2835_PWM1_RANGE": 1, + "BCM2835_PWM1_DATA": 1, + "BCM2835_PWMCLK_CNTL": 1, + "BCM2835_PWMCLK_DIV": 1, + "BCM2835_PWM1_MS_MODE": 1, + "Run": 4, + "MS": 2, + "BCM2835_PWM1_USEFIFO": 1, + "BCM2835_PWM1_REVPOLAR": 1, + "Reverse": 2, + "polarity": 3, + "BCM2835_PWM1_OFFSTATE": 1, + "Ouput": 2, + "BCM2835_PWM1_REPEATFF": 1, + "Repeat": 2, + "last": 6, + "empty": 2, + "BCM2835_PWM1_SERIAL": 1, + "serial": 2, + "BCM2835_PWM1_ENABLE": 1, + "Channel": 2, + "BCM2835_PWM0_MS_MODE": 1, + "BCM2835_PWM0_USEFIFO": 1, + "BCM2835_PWM0_REVPOLAR": 1, + "BCM2835_PWM0_OFFSTATE": 1, + "BCM2835_PWM0_REPEATFF": 1, + "BCM2835_PWM0_SERIAL": 1, + "BCM2835_PWM0_ENABLE": 1, + "x": 86, + "#endif": 110, + "#ifdef": 19, + "__cplusplus": 12, + "init": 2, + "Library": 1, + "management": 1, + "intialise": 1, + "Initialise": 1, + "opening": 1, + "getting": 1, + "internal": 47, + "device": 7, + "call": 4, + "successfully": 1, + "before": 7, + "bcm2835_set_debug": 2, + "fails": 1, + "returning": 1, + "result": 8, + "crashes": 1, + "failures.": 1, + "Prints": 1, + "messages": 1, + "stderr": 1, + "case": 34, + "errors.": 1, + "successful": 2, + "else": 58, + "int": 218, + "Close": 1, + "deallocating": 1, + "allocated": 2, + "closing": 3, + "Sets": 24, + "debug": 6, + "prevents": 1, + "makes": 1, + "print": 5, + "out": 5, + "what": 2, + "would": 2, + "do": 13, + "rather": 2, + "causes": 1, + "normal": 1, + "operation.": 2, + "Call": 2, + "param": 72, + "]": 292, + "level.": 3, + "uint8_t": 43, + "lowlevel": 2, + "provide": 1, + "generally": 1, + "Reads": 5, + "done": 3, + "twice": 3, + "therefore": 6, + "always": 3, + "safe": 4, + "precautions": 3, + "correct": 3, + "paddr": 10, + "from.": 6, + "etc.": 5, + "sa": 30, + "uint32_t*": 7, + "without": 3, + "within": 4, + "occurred": 2, + "since.": 2, + "bcm2835_peri_read_nb": 1, + "Writes": 2, + "write": 8, + "bcm2835_peri_write_nb": 1, + "Alters": 1, + "regsiter.": 1, + "valu": 1, + "alters": 1, + "deines": 1, + "according": 1, + "value.": 2, + "All": 1, + "unaffected.": 1, + "Use": 8, + "alter": 2, + "subset": 1, + "register.": 3, + "masked": 2, + "mask.": 1, + "Bitmask": 1, + "altered": 1, + "gpio": 1, + "interface.": 3, + "input": 12, + "output": 21, + "state.": 1, + "given": 16, + "configures": 1, + "RPI_GPIO_P1_*": 21, + "Mode": 1, + "BCM2835_GPIO_FSEL_*": 1, + "specified": 27, + "HIGH.": 2, + "bcm2835_gpio_write": 3, + "bcm2835_gpio_set": 1, + "LOW.": 5, + "bcm2835_gpio_clr": 1, + "first": 13, + "Mask": 6, + "affect.": 4, + "eg": 5, + "returns": 4, + "either": 4, + "Works": 1, + "whether": 4, + "output.": 1, + "bcm2835_gpio_lev": 1, + "Status.": 7, + "Tests": 1, + "detected": 7, + "requested": 1, + "flag": 3, + "bcm2835_gpio_set_eds": 2, + "status": 1, + "th": 1, + "true.": 2, + "bcm2835_gpio_eds": 1, + "effect": 3, + "clearing": 1, + "flag.": 1, + "afer": 1, + "seeing": 1, + "rising": 3, + "sets": 8, + "GPRENn": 2, + "synchronous": 2, + "detection.": 2, + "signal": 4, + "sampled": 6, + "looking": 2, + "pattern": 2, + "signal.": 2, + "suppressing": 2, + "glitches.": 2, + "Disable": 6, + "Asynchronous": 6, + "incoming": 2, + "As": 2, + "edges": 2, + "very": 2, + "short": 5, + "duration": 2, + "detected.": 2, + "bcm2835_gpio_pudclk": 3, + "resistor": 1, + "However": 3, + "convenient": 2, + "bcm2835_gpio_set_pud": 4, + "pud": 4, + "desired": 7, + "mode.": 4, + "One": 3, + "BCM2835_GPIO_PUD_*": 2, + "Clocks": 3, + "earlier": 1, + "remove": 2, + "group.": 2, + "BCM2835_PAD_GROUP_GPIO_*": 2, + "BCM2835_PAD_*": 2, + "bcm2835_gpio_set_pad": 1, + "Delays": 3, + "milliseconds.": 1, + "Uses": 4, + "CPU": 5, + "until": 1, + "up.": 1, + "mercy": 2, + "From": 2, + "interval": 4, + "req": 2, + "exact": 2, + "multiple": 2, + "granularity": 2, + "rounded": 2, + "next": 9, + "multiple.": 2, + "Furthermore": 2, + "sleep": 2, + "completes": 2, + "still": 3, + "becomes": 2, + "free": 4, + "once": 5, + "again": 2, + "execute": 3, + "thread.": 2, + "millis": 2, + "milliseconds": 1, "unsigned": 22, - "x": 48, - "blockIdx.x*blockDim.x": 1, - "threadIdx.x": 1, - "y": 16, - "blockIdx.y*blockDim.y": 1, - "threadIdx.y": 1, - "if": 296, - "&&": 24, - "c": 52, - "tex2D": 1, - "y*width": 1, - "#include": 106, + "microseconds.": 2, + "combination": 2, + "busy": 2, + "wait": 2, + "timers": 1, + "less": 1, + "microseconds": 6, + "Timer.": 1, + "RaspberryPi": 1, + "Your": 1, + "mileage": 1, + "vary.": 1, + "micros": 5, + "uint64_t": 8, + "required": 2, + "bcm2835_gpio_write_mask": 1, + "clocking": 1, + "spi": 1, + "let": 2, + "device.": 2, + "operations.": 4, + "Forces": 2, + "ALT0": 2, + "funcitons": 1, + "complete": 3, + "End": 2, + "returned": 5, + "INPUT": 2, + "behaviour.": 2, + "NOTE": 1, + "effect.": 1, + "SPI0.": 1, + "Defaults": 1, + "BCM2835_SPI_BIT_ORDER_*": 1, + "speed.": 2, + "BCM2835_SPI_CLOCK_DIVIDER_*": 1, + "bcm2835_spi_setClockDivider": 1, + "uint16_t": 2, + "polariy": 1, + "phase": 1, + "BCM2835_SPI_MODE*": 1, + "bcm2835_spi_transfer": 5, + "made": 1, + "selected": 13, + "during": 4, + "transfer.": 4, + "cs": 4, + "activate": 1, + "slave.": 7, + "BCM2835_SPI_CS*": 1, + "bcm2835_spi_chipSelect": 4, + "occurs": 1, + "currently": 12, + "active.": 1, + "transfers": 1, + "happening": 1, + "complement": 1, + "inactive": 1, + "affect": 1, + "active": 3, + "Whether": 1, + "bcm2835_spi_setChipSelectPolarity": 1, + "Transfers": 6, + "byte": 6, + "Asserts": 3, + "simultaneously": 3, + "clocks": 2, + "MISO.": 2, + "Returns": 2, + "polled": 2, + "Peripherls": 2, + "len": 15, + "slave": 8, + "placed": 1, + "rbuf.": 1, + "rbuf": 3, + "long": 15, + "tbuf": 4, + "Buffer": 10, + "send.": 5, + "put": 1, + "buffer": 9, + "Number": 8, + "send/received": 2, + "char*": 24, + "bcm2835_spi_transfernb.": 1, + "replaces": 1, + "transmitted": 1, + "buffer.": 1, + "buf": 14, + "replace": 1, + "contents": 3, + "eh": 2, + "bcm2835_spi_writenb": 1, + "i2c": 1, + "Philips": 1, + "bus/interface": 1, + "January": 1, + "SCL": 2, + "bcm2835_i2c_end": 3, + "bcm2835_i2c_begin": 1, + "address.": 2, + "addr": 2, + "bcm2835_i2c_setSlaveAddress": 4, + "BCM2835_I2C_CLOCK_DIVIDER_*": 1, + "bcm2835_i2c_setClockDivider": 2, + "converting": 1, + "baudrate": 4, + "parameter": 1, + "equivalent": 1, + "divider.": 1, + "standard": 2, + "khz": 1, + "corresponds": 1, + "its": 1, + "driver.": 1, + "Of": 1, + "course": 2, + "nothing": 1, + "driver": 1, + "const": 172, + "*": 183, + "receive.": 2, + "received.": 2, + "Allows": 2, + "slaves": 1, + "require": 3, + "repeated": 1, + "start": 12, + "prior": 1, + "stop": 1, + "set.": 1, + "popular": 1, + "MPL3115A2": 1, + "pressure": 1, + "temperature": 1, + "sensor.": 1, + "Note": 1, + "combined": 1, + "better": 1, + "choice.": 1, + "Will": 1, + "regaddr": 2, + "containing": 2, + "bcm2835_i2c_read_register_rs": 1, + "st": 1, + "delays": 1, + "Counter.": 1, + "bcm2835_st_read": 1, + "offset.": 1, + "offset_micros": 2, + "Offset": 1, + "bcm2835_st_delay": 1, + "@example": 5, + "blink.c": 1, + "Blinks": 1, + "off": 1, + "input.c": 1, + "event.c": 1, + "Shows": 3, + "how": 3, + "spi.c": 1, + "spin.c": 1, + "#pragma": 3, + "": 4, + "": 4, + "": 2, + "namespace": 38, + "std": 53, + "DEFAULT_DELIMITER": 1, + "CsvStreamer": 5, + "private": 16, + "ofstream": 1, + "File": 1, + "stream": 6, + "vector": 16, + "row_buffer": 1, + "stores": 3, + "row": 12, + "flushed/written": 1, + "fields": 4, + "columns": 2, + "rows": 3, + "records": 2, + "including": 2, + "delimiter": 2, + "Delimiter": 1, + "character": 10, + "comma": 2, + "string": 24, + "sanitize": 1, + "ready": 1, + "Empty": 1, + "CSV": 4, + "streamer...": 1, + "Same": 1, + "...": 1, + "Opens": 3, + "path/name": 3, + "Ensures": 1, + "closed": 1, + "saved": 1, + "delimiting": 1, + "add_field": 1, + "line": 11, + "adds": 1, + "field": 5, + "save_fields": 1, + "save": 1, + "writes": 2, + "append": 8, + "Appends": 5, + "quoted": 1, + "leading/trailing": 1, + "spaces": 3, + "trimmed": 1, + "bool": 111, + "Like": 1, + "specify": 1, + "trim": 2, + "keep": 1, + "float": 74, + "double": 25, + "writeln": 1, + "Flushes": 1, + "Saves": 1, + "closes": 1, + "field_count": 1, + "Gets": 2, + "row_count": 1, "": 1, "": 1, "": 2, - "static": 260, + "static": 263, "Env": 13, "*env_instance": 1, - "*": 159, - "NULL": 108, + "NULL": 109, "*Env": 1, "instance": 4, "env_instance": 3, - "new": 9, - "return": 147, "QObject": 2, "QCoreApplication": 1, "parse": 3, - "const": 166, "**envp": 1, "**env": 1, "**": 2, "QString": 20, "envvar": 2, - "name": 21, - "value": 18, + "name": 25, "indexOfEquals": 5, - "for": 18, "env": 3, "envp": 4, "*env": 1, @@ -7610,19 +12893,215 @@ "QVariantMap": 3, "asVariantMap": 2, "m_map": 2, - "#ifndef": 23, "ENV_H": 3, - "#define": 190, "": 1, "Q_OBJECT": 1, "*instance": 1, - "private": 12, - "#endif": 82, + "BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_IPP": 3, + "#if": 63, + "defined": 49, + "_MSC_VER": 7, + "&&": 29, + "": 1, + "BOOST_ASIO_HAS_EPOLL": 2, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "BOOST_ASIO_HAS_TIMERFD": 19, + "": 1, + "boost": 18, + "asio": 14, + "detail": 5, + "epoll_reactor": 40, + "io_service": 6, + "service_base": 1, + "": 1, + "io_service_": 1, + "use_service": 1, + "": 1, + "mutex_": 13, + "interrupter_": 5, + "epoll_fd_": 20, + "do_epoll_create": 3, + "timer_fd_": 21, + "do_timerfd_create": 3, + "shutdown_": 10, + "epoll_event": 10, + "ev": 21, + "ev.events": 13, + "EPOLLIN": 8, + "EPOLLERR": 8, + "EPOLLET": 5, + "ev.data.ptr": 10, + "epoll_ctl": 12, + "EPOLL_CTL_ADD": 7, + "interrupter_.read_descriptor": 3, + "interrupter_.interrupt": 2, + "shutdown_service": 1, + "mutex": 16, + "scoped_lock": 16, + "lock": 5, + "lock.unlock": 1, + "op_queue": 6, + "": 6, + "ops": 10, + "descriptor_state*": 6, + "registered_descriptors_.first": 2, + "i": 106, + "max_ops": 6, + "ops.push": 5, + "op_queue_": 12, + "registered_descriptors_.free": 2, + "timer_queues_.get_all_timers": 1, + "io_service_.abandon_operations": 1, + "fork_service": 1, + "fork_event": 1, + "fork_ev": 2, + "fork_child": 1, + "interrupter_.recreate": 1, + "update_timeout": 2, + "descriptors_lock": 3, + "registered_descriptors_mutex_": 3, + "next_": 3, + "registered_events_": 8, + "descriptor_": 5, + "error_code": 4, + "ec": 6, + "errno": 10, + "get_system_category": 3, + "throw_error": 2, + "init_task": 1, + "io_service_.init_task": 1, + "register_descriptor": 1, + "socket_type": 7, + "descriptor": 15, + "per_descriptor_data": 8, + "descriptor_data": 60, + "allocate_descriptor_state": 3, + "descriptor_lock": 7, + "reactor_": 7, + "EPOLLHUP": 3, + "EPOLLPRI": 3, + "register_internal_descriptor": 1, + "op_type": 8, + "reactor_op*": 5, + "op": 28, + ".push": 2, + "move_descriptor": 1, + "target_descriptor_data": 2, + "source_descriptor_data": 3, + "start_op": 1, + "is_continuation": 5, + "allow_speculative": 2, + "ec_": 4, + "bad_descriptor": 1, + "post_immediate_completion": 2, + ".empty": 5, + "read_op": 1, + "||": 19, + "except_op": 1, + "perform": 2, + "descriptor_lock.unlock": 4, + "io_service_.post_immediate_completion": 2, + "write_op": 2, + "EPOLLOUT": 4, + "EPOLL_CTL_MOD": 3, + "io_service_.work_started": 2, + "cancel_ops": 1, + ".front": 3, + "operation_aborted": 2, + ".pop": 3, + "io_service_.post_deferred_completions": 3, + "deregister_descriptor": 1, + "EPOLL_CTL_DEL": 2, + "free_descriptor_state": 3, + "deregister_internal_descriptor": 1, + "get_timeout": 5, + "events": 8, + "num_events": 2, + "epoll_wait": 1, + "check_timers": 6, + "#else": 35, + "void*": 2, + "ptr": 6, + ".data.ptr": 1, + "static_cast": 14, + "": 2, + "set_ready_events": 1, + ".events": 1, + "common_lock": 1, + "timer_queues_.get_ready_timers": 1, + "itimerspec": 5, + "new_timeout": 6, + "old_timeout": 4, + "flags": 4, + "timerfd_settime": 2, + "EPOLL_CLOEXEC": 4, + "fd": 15, + "epoll_create1": 1, + "EINVAL": 4, + "ENOSYS": 1, + "epoll_create": 1, + "epoll_size": 1, + "fcntl": 2, + "F_SETFD": 2, + "FD_CLOEXEC": 2, + "timerfd_create": 2, + "TFD_CLOEXEC": 1, + "registered_descriptors_.alloc": 1, + "do_add_timer_queue": 1, + "timer_queue_base": 2, + "queue": 4, + "timer_queues_.insert": 1, + "do_remove_timer_queue": 1, + "timer_queues_.erase": 1, + "timer_queues_.wait_duration_msec": 1, + "ts": 1, + "ts.it_interval.tv_sec": 1, + "ts.it_interval.tv_nsec": 1, + "usec": 5, + "timer_queues_.wait_duration_usec": 1, + "ts.it_value.tv_sec": 1, + "ts.it_value.tv_nsec": 1, + "TFD_TIMER_ABSTIME": 1, + "perform_io_cleanup_on_block_exit": 4, + "explicit": 5, + "epoll_reactor*": 2, + "r": 38, + "first_op_": 3, + "ops_.empty": 1, + "ops_": 2, + "operation*": 4, + "descriptor_state": 5, + "operation": 2, + "do_complete": 2, + "perform_io": 2, + "mutex_.lock": 1, + "io_cleanup": 1, + "adopt_lock": 1, + "j": 10, + "io_cleanup.ops_.push": 1, + "break": 35, + "io_cleanup.first_op_": 2, + "io_cleanup.ops_.front": 1, + "io_cleanup.ops_.pop": 1, + "io_service_impl*": 1, + "owner": 3, + "size_t": 6, + "bytes_transferred": 2, + "": 1, + "": 1, + "Field": 2, + "Free": 1, + "Black": 1, + "White": 1, + "Illegal": 1, + "Player": 1, "GDSDBREADER_H": 3, "": 1, "GDS_DIR": 1, - "enum": 6, - "level": 1, "LEVEL_ONE": 1, "LEVEL_TWO": 1, "LEVEL_THREE": 1, @@ -7632,14 +13111,10 @@ "depth": 1, "userIndex": 1, "QByteArray": 1, - "data": 2, - "This": 6, - "is": 35, "COMPRESSED": 1, "optimize": 1, "ram": 1, - "and": 14, - "disk": 1, + "disk": 2, "space": 2, "decompressed": 1, "quint64": 1, @@ -7652,28 +13127,17 @@ "dbDataStructure*": 1, "father": 1, "fatherIndex": 1, - "bool": 99, "noFatherRoot": 1, - "Used": 1, - "to": 75, + "Used": 2, "tell": 1, - "this": 22, "node": 1, - "the": 178, "root": 1, - "so": 1, "hasn": 1, - "t": 13, - "in": 9, "argument": 1, - "list": 2, - "of": 48, - "an": 3, + "list": 3, "operator": 10, "overload.": 1, - "A": 1, "friend": 10, - "stream": 5, "myclass.label": 2, "myclass.depth": 2, "myclass.userIndex": 2, @@ -7689,16 +13153,10 @@ "QDataStream": 2, "myclass": 1, "//Don": 1, - "read": 1, - "it": 2, - "either": 1, "qUncompress": 2, - "": 1, - "using": 1, - "namespace": 26, - "std": 49, + "": 2, "main": 2, - "cout": 1, + "cout": 2, "endl": 1, "": 1, "": 1, @@ -7723,7 +13181,6 @@ "err": 26, "pub_key": 6, "EC_POINT_new": 4, - "group": 12, "EC_POINT_mul": 3, "priv_key": 2, "EC_KEY_set_private_key": 1, @@ -7736,7 +13193,6 @@ "*msg": 2, "msglen": 2, "recid": 3, - "check": 2, "ret": 24, "*x": 1, "*e": 1, @@ -7750,39 +13206,33 @@ "*rr": 1, "*zero": 1, "n": 28, - "i": 47, "BN_CTX_start": 1, - "order": 8, "BN_CTX_get": 8, "EC_GROUP_get_order": 1, "BN_copy": 1, "BN_mul_word": 1, "BN_add": 1, "ecsig": 3, - "r": 36, - "field": 3, "EC_GROUP_get_curve_GFp": 1, "BN_cmp": 1, "R": 6, "EC_POINT_set_compressed_coordinates_GFp": 1, - "%": 4, "O": 5, "EC_POINT_is_at_infinity": 1, "Q": 5, "EC_GROUP_get_degree": 1, - "e": 14, + "e": 15, "BN_bin2bn": 3, "msg": 1, "*msglen": 1, "BN_rshift": 1, - "zero": 3, + "zero": 5, "BN_zero": 1, "BN_mod_sub": 1, "rr": 4, "BN_mod_inverse": 1, "sor": 3, "BN_mod_mul": 2, - "s": 9, "eor": 3, "BN_CTX_end": 1, "CKey": 26, @@ -7791,7 +13241,6 @@ "pkey": 14, "POINT_CONVERSION_COMPRESSED": 1, "fCompressedPubKey": 5, - "true": 39, "Reset": 5, "EC_KEY_new_by_curve_name": 2, "NID_secp256k1": 2, @@ -7804,7 +13253,6 @@ "b.fSet": 2, "EC_KEY_copy": 1, "hash": 20, - "sizeof": 14, "vchSig": 18, "nSize": 2, "vchSig.clear": 2, @@ -7812,15 +13260,12 @@ "Shrink": 1, "fit": 1, "actual": 1, - "size": 9, "SignCompact": 2, "uint256": 10, - "vector": 14, "": 19, "fOk": 3, "*sig": 2, "ECDSA_do_sign": 1, - "char*": 14, "sig": 11, "nBitsR": 3, "BN_num_bits": 2, @@ -7828,9 +13273,8 @@ "nRecId": 4, "<4;>": 1, "keyRec": 5, - "1": 2, + "1": 4, "GetPubKey": 5, - "break": 34, "BN_bn2bin": 2, "/8": 2, "ECDSA_SIG_free": 2, @@ -7856,12 +13300,8 @@ "key2.GetPubKey": 1, "BITCOIN_KEY_H": 2, "": 1, - "": 2, "": 1, - "definition": 1, "runtime_error": 2, - "explicit": 3, - "string": 10, "str": 2, "CKeyID": 5, "uint160": 8, @@ -7869,7 +13309,6 @@ "CPubKey": 11, "vchPubKey": 6, "vchPubKeyIn": 2, - "a": 84, "a.vchPubKey": 3, "b.vchPubKey": 3, "IMPLEMENT_SERIALIZE": 1, @@ -7881,10 +13320,8 @@ "vchPubKey.begin": 1, "vchPubKey.end": 1, "vchPubKey.size": 3, - "||": 17, "IsCompressed": 2, "Raw": 1, - "typedef": 38, "secure_allocator": 2, "CPrivKey": 3, "EC_KEY*": 1, @@ -7897,27 +13334,155 @@ "vchSecret": 1, "GetPrivKey": 1, "SetPubKey": 1, - "Sign": 1, - "#ifdef": 16, + "Sign": 2, + "LIBCANIH": 2, + "": 1, + "": 1, + "int64": 1, + "//#define": 1, + "DEBUG": 5, + "dout": 2, + "cerr": 1, + "libcanister": 2, + "//the": 8, + "canmem": 22, + "object": 3, + "generic": 1, + "container": 2, + "commonly": 1, + "//throughout": 1, + "canister": 14, + "framework": 1, + "hold": 1, + "uncertain": 1, + "//length": 1, + "contain": 1, + "null": 3, + "bytes.": 1, + "raw": 2, + "absolute": 1, + "length": 10, + "//creates": 3, + "unallocated": 1, + "allocsize": 1, + "blank": 1, + "strdata": 1, + "//automates": 1, + "creation": 1, + "limited": 2, + "canmems": 1, + "//cleans": 1, + "zeromem": 1, + "//overwrites": 2, + "fragmem": 1, + "notation": 1, + "countlen": 1, + "//counts": 1, + "strings": 1, + "//removes": 1, + "nulls": 1, + "//returns": 2, + "singleton": 2, + "//contains": 2, + "caninfo": 2, + "path": 8, + "//physical": 1, + "internalname": 1, + "//a": 1, + "numfiles": 1, + "files": 6, + "//necessary": 1, + "type": 7, + "canfile": 7, + "//this": 1, + "holds": 2, + "//canister": 1, + "canister*": 1, + "parent": 1, + "//internal": 1, + "id": 4, + "//use": 1, + "own.": 1, + "newline": 2, + "delimited": 2, + "container.": 1, + "TOC": 1, + "info": 2, + "general": 1, + "canfiles": 1, + "recommended": 1, + "modify": 1, + "//these": 1, + "enforced.": 1, + "canfile*": 1, + "readonly": 3, + "//if": 1, + "routines": 1, + "anything": 1, + "//maximum": 1, + "//time": 1, + "whatever": 1, + "suits": 1, + "application.": 1, + "cachemax": 2, + "cachecnt": 1, + "//number": 1, + "cache": 2, + "modified": 3, + "//both": 1, + "initialize": 1, + "fspath": 3, + "//destroys": 1, + "flushing": 1, + "modded": 1, + "//open": 1, + "//does": 1, + "exist": 2, + "//close": 1, + "flush": 1, + "clean": 2, + "//deletes": 1, + "inside": 1, + "delFile": 1, + "//pulls": 1, + "getFile": 1, + "otherwise": 1, + "overwrites": 1, + "succeeded": 2, + "writeFile": 2, + "//get": 1, + "//list": 1, + "paths": 1, + "getTOC": 1, + "//brings": 1, + "back": 1, + "limit": 1, + "//important": 1, + "sCFID": 2, + "CFID": 2, + "avoid": 1, + "uncaching": 1, + "//really": 1, + "just": 2, + "internally": 1, + "harm.": 1, + "cacheclean": 1, + "dFlush": 1, "Q_OS_LINUX": 2, "": 1, - "#if": 44, "QT_VERSION": 1, "QT_VERSION_CHECK": 1, "#error": 9, "Something": 1, "wrong": 1, - "with": 6, "setup.": 1, - "Please": 3, - "report": 2, + "report": 3, "mailing": 1, "argc": 2, "char**": 2, "argv": 2, "google_breakpad": 1, "ExceptionHandler": 1, - "eh": 1, "Utils": 4, "exceptionHandler": 2, "qInstallMsgHandler": 1, @@ -7940,6 +13505,211 @@ "phantom.execute": 1, "app.exec": 1, "phantom.returnValue": 1, + "__OG_MATH_INL__": 2, + "og": 1, + "OG_INLINE": 41, + "Math": 41, + "Abs": 1, + "MASK_SIGNED": 2, + "y": 16, + "Fabs": 1, + "f": 104, + "uInt": 1, + "*pf": 1, + "reinterpret_cast": 8, + "": 1, + "pf": 1, + "fabsf": 1, + "Round": 1, + "floorf": 2, + "Floor": 1, + "Ceil": 1, + "ceilf": 1, + "Ftoi": 1, + "@todo": 1, + "note": 1, + "sse": 1, + "cvttss2si": 2, + "OG_ASM_MSVC": 4, + "OG_FTOI_USE_SSE": 2, + "SysInfo": 2, + "cpu.general.SSE": 2, + "__asm": 8, + "eax": 5, + "mov": 6, + "fld": 4, + "fistp": 3, + "//__asm": 3, + "O_o": 3, + "#elif": 7, + "OG_ASM_GNU": 4, + "__asm__": 4, + "__volatile__": 4, + "cast": 7, + "why": 3, + "did": 3, + "": 3, + "FtoiFast": 2, + "Ftol": 1, + "": 1, + "Fmod": 1, + "numerator": 2, + "denominator": 2, + "fmodf": 1, + "Modf": 2, + "modff": 2, + "Sqrt": 2, + "sqrtf": 2, + "InvSqrt": 1, + "OG_ASSERT": 4, + "RSqrt": 1, + "g": 2, + "*reinterpret_cast": 3, + "guess": 1, + "f375a86": 1, + "": 1, + "Newtons": 1, + "calculation": 1, + "Log": 1, + "logf": 3, + "Log2": 1, + "INV_LN_2": 1, + "Log10": 1, + "INV_LN_10": 1, + "Pow": 1, + "exp": 2, + "powf": 1, + "Exp": 1, + "expf": 1, + "IsPowerOfTwo": 4, + "faster": 3, + "two": 2, + "known": 1, + "methods": 2, + "moved": 1, + "beginning": 1, + "HigherPowerOfTwo": 4, + "LowerPowerOfTwo": 2, + "FloorPowerOfTwo": 1, + "CeilPowerOfTwo": 1, + "ClosestPowerOfTwo": 1, + "Digits": 1, + "digits": 6, + "step": 3, + "Sin": 2, + "sinf": 1, + "ASin": 1, + "<=>": 2, + "0f": 2, + "HALF_PI": 2, + "asinf": 1, + "Cos": 2, + "cosf": 1, + "ACos": 1, + "PI": 1, + "acosf": 1, + "Tan": 1, + "tanf": 1, + "ATan": 2, + "atanf": 1, + "f1": 2, + "f2": 2, + "atan2f": 1, + "SinCos": 1, + "sometimes": 1, + "assembler": 1, + "waaayy": 1, + "_asm": 1, + "fsincos": 1, + "ecx": 2, + "edx": 2, + "fstp": 2, + "dword": 2, + "asm": 1, + "Deg2Rad": 1, + "DEG_TO_RAD": 1, + "Rad2Deg": 1, + "RAD_TO_DEG": 1, + "Square": 1, + "v": 10, + "Cube": 1, + "Sec2Ms": 1, + "sec": 2, + "Ms2Sec": 1, + "ms": 2, + "NINJA_METRICS_H_": 3, + "int64_t.": 1, + "Metrics": 2, + "module": 1, + "dumps": 1, + "stats": 2, + "actions.": 1, + "To": 1, + "METRIC_RECORD": 4, + "below.": 1, + "metrics": 2, + "hit": 1, + "path.": 2, + "count": 1, + "Total": 1, + "spent": 1, + "int64_t": 3, + "sum": 1, + "scoped": 1, + "recording": 1, + "metric": 2, + "across": 1, + "body": 1, + "macro.": 1, + "ScopedMetric": 4, + "Metric*": 4, + "metric_": 1, + "Timestamp": 1, + "started.": 1, + "Value": 24, + "platform": 2, + "dependent.": 1, + "start_": 1, + "prints": 1, + "report.": 1, + "NewMetric": 2, + "Print": 2, + "summary": 1, + "stdout.": 1, + "Report": 1, + "": 1, + "metrics_": 1, + "Get": 1, + "relative": 2, + "epoch.": 1, + "Epoch": 1, + "varies": 1, + "between": 1, + "platforms": 1, + "useful": 1, + "measuring": 1, + "elapsed": 1, + "time.": 1, + "GetTimeMillis": 1, + "simple": 1, + "stopwatch": 1, + "seconds": 1, + "Restart": 3, + "called.": 1, + "Stopwatch": 2, + "started_": 4, + "Seconds": 1, + "call.": 1, + "Elapsed": 1, + "": 1, + "primary": 1, + "metrics.": 1, + "top": 1, + "recorded": 1, + "metrics_h_metric": 2, + "g_metrics": 3, + "metrics_h_scoped": 1, + "Metrics*": 1, "INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION": 1, "": 1, "": 2, @@ -7955,13 +13725,11 @@ "protobuf": 72, "Descriptor*": 3, "Person_descriptor_": 6, - "internal": 46, "GeneratedMessageReflection*": 1, "Person_reflection_": 4, "protobuf_AssignDesc_protocol_2dbuffer_2eproto": 4, "protobuf_AddDesc_protocol_2dbuffer_2eproto": 6, "FileDescriptor*": 1, - "file": 6, "DescriptorPool": 3, "generated_pool": 2, "FindFileByName": 1, @@ -7993,47 +13761,36 @@ "InternalRegisterGeneratedFile": 1, "InitAsDefaultInstance": 3, "OnShutdown": 1, - "struct": 8, "StaticDescriptorInitializer_protocol_2dbuffer_2eproto": 2, "static_descriptor_initializer_protocol_2dbuffer_2eproto_": 1, - "_MSC_VER": 3, "kNameFieldNumber": 2, "Message": 7, "SharedCtor": 4, - "from": 25, "MergeFrom": 9, "_cached_size_": 7, "const_cast": 3, "string*": 11, "kEmptyString": 12, - "memset": 2, "SharedDtor": 3, "SetCachedSize": 2, "GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN": 2, "GOOGLE_SAFE_CONCURRENT_WRITES_END": 2, - "descriptor": 2, "*default_instance_": 1, "Person*": 7, - "New": 4, - "Clear": 5, "xffu": 3, "has_name": 6, - "clear": 2, "mutable_unknown_fields": 4, "MergePartialFromCodedStream": 2, "io": 4, "CodedInputStream*": 2, - "input": 6, "DO_": 4, "EXPRESSION": 2, "uint32": 2, "tag": 6, - "while": 11, "ReadTag": 1, "switch": 3, "WireFormatLite": 9, "GetTagFieldNumber": 1, - "case": 33, "GetTagWireType": 2, "WIRETYPE_LENGTH_DELIMITED": 1, "ReadString": 1, @@ -8043,20 +13800,16 @@ ".data": 3, ".length": 3, "PARSE": 1, - "else": 46, "handle_uninterpreted": 2, "ExpectAtEnd": 1, - "default": 4, "WIRETYPE_END_GROUP": 1, "SkipField": 1, "#undef": 3, "SerializeWithCachedSizes": 2, "CodedOutputStream*": 2, - "output": 5, "SERIALIZE": 2, "WriteString": 1, "unknown_fields": 7, - ".empty": 3, "SerializeUnknownFields": 1, "uint8*": 4, "SerializeWithCachedSizesToArray": 2, @@ -8068,7 +13821,6 @@ "StringSize": 1, "ComputeUnknownFieldsSize": 1, "GOOGLE_CHECK_NE": 2, - "source": 9, "dynamic_cast_if_available": 1, "": 12, "ReflectionOps": 1, @@ -8081,7 +13833,6 @@ "CopyFrom": 5, "IsInitialized": 3, "Swap": 2, - "other": 7, "swap": 3, "_unknown_fields_.Swap": 1, "Metadata": 3, @@ -8090,19 +13841,12 @@ "metadata.descriptor": 1, "metadata.reflection": 1, "PROTOBUF_protocol_2dbuffer_2eproto__INCLUDED": 3, - "": 1, "GOOGLE_PROTOBUF_VERSION": 1, - "was": 3, "generated": 2, - "by": 5, "newer": 2, - "version": 4, "protoc": 2, - "which": 2, "incompatible": 2, - "your": 3, "Protocol": 2, - "Buffer": 2, "headers.": 3, "update": 1, "GOOGLE_PROTOBUF_MIN_PROTOC_VERSION": 1, @@ -8120,60 +13864,37 @@ "UnknownFieldSet*": 1, "GetCachedSize": 1, "clear_name": 2, - "size_t": 5, "release_name": 2, "set_allocated_name": 2, "set_has_name": 7, "clear_has_name": 5, "mutable": 1, "u": 9, - "|": 8, "*name_": 1, "assign": 3, - "reinterpret_cast": 7, "temp": 2, "SWIG": 2, "QSCICOMMAND_H": 2, "__APPLE__": 4, - "extern": 4, "": 1, "": 2, "": 1, "QsciScintilla": 7, - "brief": 2, - "The": 8, "QsciCommand": 7, "represents": 1, "editor": 1, "command": 9, - "that": 7, - "may": 2, - "have": 1, - "one": 42, - "or": 10, - "two": 1, "keys": 3, "bound": 4, - "it.": 2, "Methods": 1, - "are": 3, "provided": 1, - "change": 1, - "remove": 1, "binding.": 1, "Each": 1, - "has": 2, - "user": 2, "friendly": 2, - "use": 1, - "mapping": 1, + "description": 3, "dialogs.": 1, "QSCINTILLA_EXPORT": 2, - "defines": 1, - "different": 1, "commands": 1, - "can": 3, - "be": 9, "assigned": 1, "key.": 1, "Command": 4, @@ -8194,7 +13915,6 @@ "view": 2, "LineScrollDown": 1, "SCI_LINESCROLLDOWN": 1, - "up": 13, "LineUp": 1, "SCI_LINEUP": 1, "LineUpExtend": 1, @@ -8203,16 +13923,13 @@ "SCI_LINEUPRECTEXTEND": 1, "LineScrollUp": 1, "SCI_LINESCROLLUP": 1, - "start": 11, "document.": 8, "ScrollToStart": 1, "SCI_SCROLLTOSTART": 1, - "end": 18, "ScrollToEnd": 1, "SCI_SCROLLTOEND": 1, "vertically": 1, "centre": 1, - "current": 9, "VerticalCentreCaret": 1, "SCI_VERTICALCENTRECARET": 1, "paragraph.": 4, @@ -8232,7 +13949,6 @@ "SCI_CHARLEFTEXTEND": 1, "CharLeftRectExtend": 1, "SCI_CHARLEFTRECTEXTEND": 1, - "right": 8, "CharRight": 1, "SCI_CHARRIGHT": 1, "CharRightExtend": 1, @@ -8248,17 +13964,14 @@ "SCI_WORDRIGHT": 1, "WordRightExtend": 1, "SCI_WORDRIGHTEXTEND": 1, - "previous": 5, "WordLeftEnd": 1, "SCI_WORDLEFTEND": 1, "WordLeftEndExtend": 1, "SCI_WORDLEFTENDEXTEND": 1, - "next": 6, "WordRightEnd": 1, "SCI_WORDRIGHTEND": 1, "WordRightEndExtend": 1, "SCI_WORDRIGHTENDEXTEND": 1, - "word": 6, "part.": 4, "WordPartLeft": 1, "SCI_WORDPARTLEFT": 1, @@ -8284,9 +13997,7 @@ "SCI_HOMEWRAP": 1, "HomeWrapExtend": 1, "SCI_HOMEWRAPEXTEND": 1, - "first": 8, "visible": 6, - "character": 8, "VCHome": 1, "SCI_VCHOME": 1, "VCHomeExtend": 1, @@ -8347,7 +14058,6 @@ "SCI_CLEAR": 1, "DeleteBack": 1, "SCI_DELETEBACK": 1, - "at": 4, "DeleteBackNotLine": 1, "SCI_DELETEBACKNOTLINE": 1, "left.": 2, @@ -8358,7 +14068,6 @@ "SCI_DELWORDRIGHT": 1, "DeleteWordRightEnd": 1, "SCI_DELWORDRIGHTEND": 1, - "line": 10, "DeleteLineLeft": 1, "SCI_DELLINELEFT": 1, "DeleteLineRight": 1, @@ -8379,11 +14088,9 @@ "Duplicate": 2, "LineDuplicate": 1, "SCI_LINEDUPLICATE": 1, - "Select": 33, "whole": 2, "SelectAll": 1, "SCI_SELECTALL": 1, - "selected": 2, "lines": 3, "MoveSelectedLinesUp": 1, "SCI_MOVESELECTEDLINESUP": 1, @@ -8411,7 +14118,6 @@ "EditToggleOvertype": 1, "SCI_EDITTOGGLEOVERTYPE": 1, "Insert": 2, - "platform": 1, "dependent": 1, "newline.": 1, "Newline": 1, @@ -8420,7 +14126,6 @@ "Formfeed": 1, "SCI_FORMFEED": 1, "Indent": 1, - "level.": 2, "Tab": 1, "SCI_TAB": 1, "De": 1, @@ -8428,11 +14133,8 @@ "Backtab": 1, "SCI_BACKTAB": 1, "Cancel": 2, - "any": 5, - "operation.": 1, "SCI_CANCEL": 1, "Undo": 2, - "last": 4, "command.": 5, "SCI_UNDO": 1, "Redo": 2, @@ -8445,21 +14147,16 @@ "ZoomOut": 1, "SCI_ZOOMOUT": 1, "Return": 3, - "will": 2, "executed": 1, "instance.": 2, "scicmd": 2, "Execute": 1, - "execute": 1, "Binds": 2, - "If": 4, - "then": 6, "binding": 3, "removed.": 2, "invalid": 5, "unchanged.": 1, "Valid": 1, - "control": 1, "Key_Down": 1, "Key_Up": 1, "Key_Left": 1, @@ -8475,20 +14172,15 @@ "Key_Tab": 1, "Key_Return.": 1, "Keys": 1, - "modified": 2, - "combination": 1, "SHIFT": 1, "CTRL": 1, "ALT": 1, "META.": 1, - "sa": 8, "setAlternateKey": 3, "validKey": 3, "setKey": 3, - "alternate": 3, "altkey": 3, "alternateKey": 3, - "currently": 2, "returned.": 4, "qkey": 2, "qaltkey": 2, @@ -8515,13 +14207,10 @@ "sub": 2, "Qt": 1, "QPrinter": 3, - "able": 1, - "print": 4, "text": 5, "Scintilla": 2, "further": 1, "classed": 1, - "alter": 1, "layout": 1, "adding": 2, "headers": 3, @@ -8530,75 +14219,44 @@ "Constructs": 1, "printer": 1, "paint": 1, - "device": 1, - "mode": 4, - "mode.": 1, "PrinterMode": 1, "ScreenResolution": 1, "Destroys": 1, "Format": 1, - "page": 4, - "example": 1, - "before": 1, "drawn": 2, - "on": 1, "painter": 4, - "used": 4, "add": 3, "customised": 2, "graphics.": 2, "drawing": 4, "actually": 1, - "being": 2, - "rather": 1, - "than": 1, "sized.": 1, - "methods": 1, - "must": 1, - "only": 1, - "called": 1, - "when": 5, - "true.": 1, "area": 5, "draw": 1, "text.": 3, - "should": 1, "necessary": 1, "reserve": 1, "By": 1, - "relative": 1, "printable": 1, - "Use": 1, "setFullPage": 1, "because": 2, - "calling": 1, "printRange": 2, - "you": 1, - "want": 2, "try": 1, "over": 1, "pagenr": 2, - "number": 3, "numbered": 1, "formatPage": 1, "points": 2, - "each": 2, "font": 2, "printing.": 2, "setMagnification": 2, "magnification": 3, "mag": 2, - "Sets": 2, "printing": 2, "magnification.": 1, - "Print": 1, - "range": 1, "qsb.": 1, "negative": 2, "signifies": 2, - "returned": 2, - "there": 1, - "no": 1, "error.": 1, "*qsb": 1, "wrap": 4, @@ -8608,6 +14266,10 @@ "wrapMode": 2, "wmode.": 1, "wmode": 1, + "": 2, + "Gui": 1, + "rpc_init": 1, + "rpc_server_loop": 1, "v8": 9, "Scanner": 16, "UnicodeCache*": 4, @@ -8628,19 +14290,15 @@ "ScanHexNumber": 2, "expected_length": 4, "ASSERT": 17, - "prevent": 1, "overflow": 1, - "digits": 3, "c0_": 64, "d": 8, "HexValue": 2, - "j": 4, "PushBack": 8, "Advance": 44, "STATIC_ASSERT": 5, "Token": 212, "NUM_TOKENS": 1, - "byte": 1, "one_char_tokens": 2, "ILLEGAL": 120, "LPAREN": 2, @@ -8649,18 +14307,14 @@ "COLON": 2, "SEMICOLON": 2, "CONDITIONAL": 2, - "f": 5, "LBRACK": 2, "RBRACK": 2, "LBRACE": 2, "RBRACE": 2, "BIT_NOT": 2, - "Value": 23, "Next": 3, "current_": 2, - "next_": 2, "has_multiline_comment_before_next_": 5, - "static_cast": 7, "token": 64, "": 1, "pos": 12, @@ -8698,7 +14352,6 @@ "ASSIGN": 1, "NE_STRICT": 1, "NE": 1, - "NOT": 1, "INC": 1, "ASSIGN_ADD": 1, "ADD": 1, @@ -8732,11 +14385,7 @@ "IsCarriageReturn": 2, "IsLineFeed": 2, "fall": 2, - "through": 2, - "v": 3, - "xx": 1, "xxx": 1, - "error": 1, "immediately": 1, "octal": 1, "escape": 1, @@ -8744,11 +14393,9 @@ "consume": 2, "LiteralScope": 4, "literal": 2, - ".": 2, "X": 2, "E": 3, "l": 1, - "p": 5, "w": 1, "keyword": 1, "Unescaped": 1, @@ -8766,7 +14413,6 @@ "CLASSIC_MODE": 2, "STRICT_MODE": 2, "EXTENDED_MODE": 2, - "detect": 1, "x16": 1, "x36.": 1, "Utf16CharacterStream": 3, @@ -8816,13 +14462,11 @@ "backing_store_.Dispose": 3, "INLINE": 2, "AddChar": 2, - "uint32_t": 8, "ExpandBuffer": 2, "kMaxAsciiCharCodeU": 1, "": 6, "kASCIISize": 1, "ConvertToUtf16": 2, - "*reinterpret_cast": 1, "": 2, "kUC16Size": 2, "is_ascii": 3, @@ -8831,7 +14475,6 @@ "utf16_literal": 3, "backing_store_.start": 5, "ascii_literal": 3, - "length": 8, "kInitialCapacity": 2, "kGrowthFactory": 2, "kMinConversionSlack": 1, @@ -8863,7 +14506,6 @@ "kNoOctalLocation": 1, "scanner_contants": 1, "current_token": 1, - "location": 4, "current_.location": 2, "literal_ascii_string": 1, "ASSERT_NOT_NULL": 9, @@ -8899,7 +14541,6 @@ "ScanRegExpFlags": 1, "IsIdentifier": 1, "CharacterStream*": 1, - "buffer": 1, "TokenDesc": 3, "LiteralBuffer*": 2, "literal_chars": 1, @@ -8915,9 +14556,9 @@ "LiteralScope*": 1, "ScanIdentifierUnicodeEscape": 1, "desc": 2, - "as": 1, "look": 1, "ahead": 1, + "smallPrime_t": 1, "UTILS_H": 3, "": 1, "": 1, @@ -8925,12 +14566,9 @@ "QTemporaryFile": 1, "showUsage": 1, "QtMsgType": 1, - "type": 6, "dump_path": 1, "minidump_id": 1, - "void*": 1, "context": 8, - "succeeded": 1, "QVariant": 1, "coffee2js": 1, "script": 1, @@ -8956,10 +14594,6 @@ "QTemporaryFile*": 2, "m_tempHarness": 1, "We": 1, - "make": 1, - "sure": 1, - "clean": 1, - "after": 1, "ourselves": 1, "m_tempWrapper": 1, "V8_DECLARE_ONCE": 1, @@ -9003,12 +14637,9 @@ "UnregisterAll": 1, "OS": 3, "seed_random": 2, - "uint32_t*": 2, - "state": 15, "FLAG_random_seed": 2, "val": 3, "ScopedLock": 1, - "lock": 1, "entropy_mutex.Pointer": 1, "random": 1, "random_base": 3, @@ -9048,9 +14679,7 @@ "IncrementCallDepth": 1, "DecrementCallDepth": 1, "union": 1, - "double": 23, "double_value": 1, - "uint64_t": 2, "uint64_t_value": 1, "double_int_union": 2, "Object*": 4, @@ -9061,14 +14690,11 @@ "r.double_value": 3, "r.uint64_t_value": 1, "HeapNumber": 1, - "cast": 1, "set_value": 1, "InitializeOncePerProcessImpl": 3, "SetUp": 4, "FLAG_crankshaft": 1, "Serializer": 1, - "enabled": 1, - "CPU": 2, "SupportsCrankshaft": 1, "PostSetUp": 1, "RuntimeProfiler": 1, @@ -9084,12 +14710,9 @@ "ExternalReference": 1, "CallOnce": 1, "V8_V8_H_": 3, - "defined": 21, "GOOGLE3": 2, - "DEBUG": 3, "NDEBUG": 4, "both": 1, - "set": 1, "Deserializer": 1, "AllStatic": 1, "IsRunning": 1, @@ -9105,15 +14728,10 @@ "PY_SSIZE_T_CLEAN": 1, "Py_PYTHON_H": 1, "Python": 1, - "needed": 1, "compile": 1, - "C": 1, "extensions": 1, - "please": 1, - "install": 1, "development": 1, "Python.": 1, - "#else": 24, "": 1, "offsetof": 2, "member": 2, @@ -9130,7 +14748,6 @@ "PY_VERSION_HEX": 9, "METH_COEXIST": 1, "PyDict_CheckExact": 1, - "op": 6, "Py_TYPE": 4, "PyDict_Type": 1, "PyDict_Contains": 1, @@ -9170,9 +14787,7 @@ "*buf": 1, "PyObject": 221, "*obj": 2, - "len": 1, "itemsize": 2, - "readonly": 2, "ndim": 2, "*format": 1, "*shape": 1, @@ -9297,7 +14912,6 @@ "PyObject_DelAttrString": 2, "__Pyx_NAMESTR": 3, "__Pyx_DOCSTR": 3, - "__cplusplus": 10, "__PYX_EXTERN_C": 2, "_USE_MATH_DEFINES": 1, "": 1, @@ -9307,14 +14921,12 @@ "CYTHON_INLINE": 68, "__GNUC__": 5, "__inline__": 1, - "#elif": 3, "__inline": 1, "__STDC_VERSION__": 2, "L": 1, "CYTHON_UNUSED": 7, "**p": 1, "*s": 1, - "long": 5, "encoding": 1, "is_unicode": 1, "is_str": 1, @@ -9393,7 +15005,6 @@ "complex": 2, "__pyx_t_float_complex": 27, "_Complex": 2, - "real": 2, "imag": 2, "__pyx_t_double_complex": 27, "npy_cfloat": 1, @@ -9503,7 +15114,6 @@ "cabs": 1, "cpow": 1, "__Pyx_PyInt_AsUnsignedChar": 1, - "short": 3, "__Pyx_PyInt_AsUnsignedShort": 1, "__Pyx_PyInt_AsUnsignedInt": 1, "__Pyx_PyInt_AsChar": 1, @@ -9725,7 +15335,6 @@ "NPY_F_CONTIGUOUS": 1, "__pyx_k_tuple_8": 1, "__pyx_L7": 2, - "buf": 1, "PyArray_DATA": 1, "strides": 5, "malloc": 2, @@ -9772,7 +15381,6 @@ "__pyx_L2": 2, "__pyx_pf_5numpy_7ndarray_1__releasebuffer__": 2, "PyArray_HASFIELDS": 1, - "free": 2, "*__pyx_f_5numpy_PyArray_MultiIterNew1": 1, "*__pyx_v_a": 5, "PyArray_MultiIterNew": 5, @@ -9799,11 +15407,9 @@ "__pyx_v_fields": 7, "__pyx_v_childname": 4, "__pyx_v_new_offset": 5, - "names": 2, "PyTuple_GET_SIZE": 2, "PyTuple_GET_ITEM": 3, "PyObject_GetItem": 1, - "fields": 1, "PyTuple_CheckExact": 1, "tuple": 3, "__pyx_ptype_5numpy_dtype": 1, @@ -9848,6 +15454,204 @@ "<=>": 1, "other.name": 1 }, + "Cirru": { + "print": 38, + "array": 14, + "int": 36, + "string": 7, + "set": 12, + "f": 3, + "block": 1, + "(": 20, + "a": 22, + "b": 7, + "c": 9, + ")": 20, + "call": 1, + "bool": 6, + "true": 1, + "false": 1, + "yes": 1, + "no": 1, + "map": 8, + "m": 3, + "float": 1, + "require": 1, + "./stdio.cr": 1, + "self": 2, + "child": 1, + "under": 2, + "parent": 1, + "get": 4, + "x": 2, + "just": 4, + "-": 4, + "code": 4, + "eval": 2, + "nothing": 1, + "container": 3 + }, + "Clojure": { + "(": 83, + "defn": 4, + "prime": 2, + "[": 41, + "n": 9, + "]": 41, + "not": 3, + "-": 14, + "any": 1, + "zero": 1, + "map": 2, + "#": 1, + "rem": 2, + "%": 1, + ")": 84, + "range": 3, + ";": 8, + "while": 3, + "stops": 1, + "at": 1, + "the": 1, + "first": 2, + "collection": 1, + "element": 1, + "that": 1, + "evaluates": 1, + "to": 1, + "false": 2, + "like": 1, + "take": 1, + "for": 2, + "x": 6, + "html": 1, + "head": 1, + "meta": 1, + "{": 8, + "charset": 1, + "}": 8, + "link": 1, + "rel": 1, + "href": 1, + "script": 1, + "src": 1, + "body": 1, + "div.nav": 1, + "p": 1, + "into": 2, + "array": 3, + "aseq": 8, + "nil": 1, + "type": 2, + "let": 1, + "count": 3, + "a": 3, + "make": 1, + "loop": 1, + "seq": 1, + "i": 4, + "if": 1, + "<": 1, + "do": 1, + "aset": 1, + "recur": 1, + "next": 1, + "inc": 1, + "defprotocol": 1, + "ISound": 4, + "sound": 5, + "deftype": 2, + "Cat": 1, + "_": 3, + "Dog": 1, + "extend": 1, + "default": 1, + "rand": 2, + "scm*": 1, + "random": 1, + "real": 1, + "clj": 1, + "ns": 2, + "c2.svg": 2, + "use": 2, + "c2.core": 2, + "only": 4, + "unify": 2, + "c2.maths": 2, + "Pi": 2, + "Tau": 2, + "radians": 2, + "per": 2, + "degree": 2, + "sin": 2, + "cos": 2, + "mean": 2, + "cljs": 3, + "require": 1, + "c2.dom": 1, + "as": 1, + "dom": 1, + "Stub": 1, + "float": 2, + "fn": 2, + "which": 1, + "does": 1, + "exist": 1, + "on": 1, + "runtime": 1, + "def": 1, + "identity": 1, + "xy": 1, + "coordinates": 7, + "cond": 1, + "and": 1, + "vector": 1, + "y": 1, + "deftest": 1, + "function": 1, + "tests": 1, + "is": 7, + "true": 2, + "contains": 1, + "foo": 6, + "bar": 4, + "select": 1, + "keys": 2, + "baz": 4, + "vals": 1, + "filter": 1 + }, + "COBOL": { + "program": 1, + "-": 19, + "id.": 1, + "hello.": 3, + "procedure": 1, + "division.": 1, + "display": 1, + ".": 3, + "stop": 1, + "run.": 1, + "IDENTIFICATION": 2, + "DIVISION.": 4, + "PROGRAM": 2, + "ID.": 2, + "PROCEDURE": 2, + "DISPLAY": 2, + "STOP": 2, + "RUN.": 2, + "COBOL": 7, + "TEST": 2, + "RECORD.": 1, + "USAGES.": 1, + "COMP": 5, + "PIC": 5, + "S9": 4, + "(": 5, + ")": 5, + "COMP.": 3, + "COMP2": 2 + }, "CoffeeScript": { "CoffeeScript": 1, "require": 21, @@ -10563,6 +16367,511 @@ "xFF": 1, "ip.join": 1 }, + "Common Lisp": { + ";": 152, + "@file": 1, + "macros": 2, + "-": 161, + "advanced.cl": 1, + "@breif": 1, + "Advanced": 1, + "macro": 5, + "practices": 1, + "defining": 1, + "your": 1, + "own": 1, + "Macro": 1, + "definition": 1, + "skeleton": 1, + "(": 365, + "defmacro": 5, + "name": 6, + "parameter*": 1, + ")": 372, + "body": 8, + "form*": 1, + "Note": 2, + "that": 5, + "backquote": 1, + "expression": 2, + "is": 6, + "most": 2, + "often": 1, + "used": 2, + "in": 23, + "the": 35, + "form": 1, + "primep": 4, + "test": 1, + "a": 7, + "number": 2, + "for": 3, + "prime": 12, + "defun": 23, + "n": 8, + "if": 14, + "<": 1, + "return": 3, + "from": 8, + "do": 9, + "i": 8, + "+": 35, + "p": 10, + "t": 7, + "not": 6, + "zerop": 1, + "mod": 1, + "sqrt": 1, + "when": 4, + "next": 11, + "bigger": 1, + "than": 1, + "specified": 2, + "The": 2, + "recommended": 1, + "procedures": 1, + "to": 4, + "writting": 1, + "new": 6, + "are": 2, + "as": 1, + "follows": 1, + "Write": 2, + "sample": 2, + "call": 2, + "and": 12, + "code": 2, + "it": 2, + "should": 1, + "expand": 1, + "into": 2, + "primes": 3, + "format": 3, + "Expected": 1, + "expanded": 1, + "codes": 1, + "generate": 1, + "hardwritten": 1, + "expansion": 2, + "arguments": 1, + "var": 49, + "range": 4, + "&": 8, + "rest": 5, + "let": 6, + "first": 5, + "start": 5, + "second": 3, + "end": 8, + "third": 2, + "@body": 4, + "More": 1, + "concise": 1, + "implementations": 1, + "with": 7, + "synonym": 1, + "also": 1, + "emits": 1, + "more": 1, + "friendly": 1, + "messages": 1, + "on": 1, + "incorrent": 1, + "input.": 1, + "Test": 1, + "result": 1, + "of": 3, + "macroexpand": 2, + "function": 2, + "gensyms": 4, + "value": 8, + "Define": 1, + "note": 1, + "how": 1, + "comma": 1, + "interpolate": 1, + "loop": 2, + "names": 2, + "collect": 1, + "gensym": 1, + "#": 15, + "|": 9, + "ESCUELA": 1, + "POLITECNICA": 1, + "SUPERIOR": 1, + "UNIVERSIDAD": 1, + "AUTONOMA": 1, + "DE": 1, + "MADRID": 1, + "INTELIGENCIA": 1, + "ARTIFICIAL": 1, + "Motor": 1, + "de": 2, + "inferencia": 1, + "Basado": 1, + "en": 2, + "parte": 1, + "Peter": 1, + "Norvig": 1, + "Global": 1, + "variables": 6, + "defvar": 4, + "*hypothesis": 1, + "list*": 7, + "*rule": 4, + "*fact": 2, + "Constants": 1, + "defconstant": 2, + "fail": 10, + "nil": 3, + "no": 6, + "bindings": 45, + "lambda": 4, + "b": 6, + "mapcar": 2, + "man": 3, + "luis": 1, + "pedro": 1, + "woman": 2, + "mart": 1, + "daniel": 1, + "laura": 1, + "facts": 1, + "x": 47, + "aux": 3, + "unify": 12, + "hypothesis": 10, + "list": 9, + "____________________________________________________________________________": 5, + "FUNCTION": 3, + "FIND": 1, + "RULES": 2, + "COMMENTS": 3, + "Returns": 2, + "rules": 5, + "whose": 1, + "THENs": 1, + "term": 1, + "given": 3, + "": 2, + "satisfy": 1, + "this": 1, + "requirement": 1, + "renamed.": 1, + "EXAMPLES": 2, + "setq": 1, + "renamed": 3, + "rule": 17, + "rename": 1, + "then": 7, + "unless": 3, + "null": 1, + "equal": 4, + "VALUE": 1, + "FROM": 1, + "all": 2, + "solutions": 1, + "found": 5, + "using": 1, + "": 1, + ".": 10, + "single": 1, + "can": 4, + "have": 1, + "multiple": 1, + "solutions.": 1, + "mapcan": 1, + "R1": 2, + "pertenece": 3, + "E": 4, + "_": 8, + "R2": 2, + "Xs": 2, + "Then": 1, + "EVAL": 2, + "RULE": 2, + "PERTENECE": 6, + "E.42": 2, + "returns": 4, + "NIL": 3, + "That": 2, + "query": 4, + "be": 2, + "proven": 2, + "binding": 17, + "necessary": 2, + "fact": 4, + "has": 1, + "On": 1, + "other": 1, + "hand": 1, + "E.49": 2, + "XS.50": 2, + "R2.": 1, + "eval": 6, + "ifs": 1, + "NOT": 2, + "question": 1, + "T": 1, + "equality": 2, + "UNIFY": 1, + "Finds": 1, + "general": 1, + "unifier": 1, + "two": 2, + "input": 2, + "expressions": 2, + "taking": 1, + "account": 1, + "": 1, + "In": 1, + "case": 1, + "total": 1, + "unification.": 1, + "Otherwise": 1, + "which": 1, + "constant": 1, + "anonymous": 4, + "make": 4, + "variable": 6, + "Auxiliary": 1, + "Functions": 1, + "cond": 3, + "or": 4, + "get": 5, + "lookup": 5, + "occurs": 5, + "extend": 2, + "symbolp": 2, + "eql": 2, + "char": 2, + "symbol": 2, + "assoc": 1, + "car": 2, + "val": 6, + "cdr": 2, + "cons": 2, + "append": 1, + "eq": 7, + "consp": 2, + "subst": 3, + "listp": 1, + "exp": 1, + "unique": 3, + "find": 6, + "anywhere": 6, + "predicate": 8, + "tree": 11, + "optional": 2, + "so": 4, + "far": 4, + "atom": 3, + "funcall": 2, + "pushnew": 1, + "gentemp": 2, + "quote": 3, + "s/reuse": 1, + "cons/cons": 1, + "expresion": 2, + "some": 1, + "EOF": 1, + "*": 2, + "lisp": 1, + "package": 1, + "foo": 2, + "Header": 1, + "comment.": 4, + "*foo*": 1, + "execute": 1, + "compile": 1, + "toplevel": 2, + "load": 1, + "add": 1, + "y": 2, + "key": 1, + "z": 2, + "declare": 1, + "ignore": 1, + "Inline": 1, + "Multi": 1, + "line": 2, + "After": 1 + }, + "Component Pascal": { + "MODULE": 2, + "ObxControls": 1, + ";": 123, + "IMPORT": 2, + "Dialog": 1, + "Ports": 1, + "Properties": 1, + "Views": 1, + "CONST": 1, + "beginner": 5, + "advanced": 3, + "expert": 1, + "guru": 2, + "TYPE": 1, + "View": 6, + "POINTER": 2, + "TO": 2, + "RECORD": 2, + "(": 91, + "Views.View": 2, + ")": 94, + "size": 1, + "INTEGER": 10, + "END": 31, + "VAR": 9, + "data*": 1, + "class*": 1, + "list*": 1, + "Dialog.List": 1, + "width*": 1, + "predef": 12, + "ARRAY": 2, + "OF": 2, + "PROCEDURE": 12, + "SetList": 4, + "BEGIN": 13, + "IF": 11, + "data.class": 5, + "THEN": 12, + "data.list.SetLen": 3, + "data.list.SetItem": 11, + "ELSIF": 1, + "ELSE": 3, + "v": 6, + "CopyFromSimpleView": 2, + "source": 2, + "v.size": 10, + ".size": 1, + "Restore": 2, + "f": 1, + "Views.Frame": 1, + "l": 1, + "t": 1, + "r": 7, + "b": 1, + "[": 13, + "]": 13, + "f.DrawRect": 1, + "Ports.fill": 1, + "Ports.red": 1, + "HandlePropMsg": 2, + "msg": 2, + "Views.PropMessage": 1, + "WITH": 1, + "Properties.SizePref": 1, + "DO": 4, + "msg.w": 1, + "msg.h": 1, + "ClassNotify*": 1, + "op": 4, + "from": 2, + "to": 5, + "Dialog.changed": 2, + "OR": 4, + "&": 8, + "data.list.index": 3, + "data.width": 4, + "Dialog.Update": 2, + "data": 2, + "Dialog.UpdateList": 1, + "data.list": 1, + "ClassNotify": 1, + "ListNotify*": 1, + "ListNotify": 1, + "ListGuard*": 1, + "par": 2, + "Dialog.Par": 2, + "par.disabled": 1, + "ListGuard": 1, + "WidthGuard*": 1, + "par.readOnly": 1, + "#": 3, + "WidthGuard": 1, + "Open*": 1, + "NEW": 2, + "*": 1, + "Ports.mm": 1, + "Views.OpenAux": 1, + "Open": 1, + "ObxControls.": 1, + "ObxFact": 1, + "Stores": 1, + "Models": 1, + "TextModels": 1, + "TextControllers": 1, + "Integers": 1, + "Read": 3, + "TextModels.Reader": 2, + "x": 15, + "Integers.Integer": 3, + "i": 17, + "len": 5, + "beg": 11, + "ch": 14, + "CHAR": 3, + "buf": 5, + "r.ReadChar": 5, + "WHILE": 3, + "r.eot": 4, + "<=>": 1, + "ReadChar": 1, + "ASSERT": 1, + "eot": 1, + "<": 8, + "r.Pos": 2, + "-": 1, + "REPEAT": 3, + "INC": 4, + "UNTIL": 3, + "+": 1, + "r.SetPos": 2, + "X": 1, + "Integers.ConvertFromString": 1, + "Write": 3, + "w": 4, + "TextModels.Writer": 2, + "Integers.Sign": 2, + "w.WriteChar": 3, + "Integers.Digits10Of": 1, + "DEC": 1, + "Integers.ThisDigit10": 1, + "Compute*": 1, + "end": 6, + "n": 3, + "s": 3, + "Stores.Operation": 1, + "attr": 3, + "TextModels.Attributes": 1, + "c": 3, + "TextControllers.Controller": 1, + "TextControllers.Focus": 1, + "NIL": 3, + "c.HasSelection": 1, + "c.GetSelection": 1, + "c.text.NewReader": 1, + "r.ReadPrev": 2, + "r.attr": 1, + "Integers.Compare": 1, + "Integers.Long": 3, + "MAX": 1, + "LONGINT": 1, + "SHORT": 1, + "Integers.Short": 1, + "Integers.Product": 1, + "Models.BeginScript": 1, + "c.text": 2, + "c.text.Delete": 1, + "c.text.NewWriter": 1, + "w.SetPos": 1, + "w.SetAttr": 1, + "Models.EndScript": 1, + "Compute": 1, + "ObxFact.": 1 + }, "Coq": { "Inductive": 41, "day": 9, @@ -11901,6 +18210,342 @@ "IHhas_type1.": 1, "IHhas_type2.": 1 }, + "Creole": { + "Creole": 6, + "is": 3, + "a": 2, + "-": 5, + "to": 2, + "HTML": 1, + "converter": 2, + "for": 1, + "the": 5, + "lightweight": 1, + "markup": 1, + "language": 1, + "(": 5, + "http": 4, + "//wikicreole.org/": 1, + ")": 5, + ".": 1, + "Github": 1, + "uses": 1, + "this": 1, + "render": 1, + "*.creole": 1, + "files.": 1, + "Project": 1, + "page": 1, + "on": 2, + "github": 1, + "*": 5, + "//github.com/minad/creole": 1, + "Travis": 1, + "CI": 1, + "https": 1, + "//travis": 1, + "ci.org/minad/creole": 1, + "RDOC": 1, + "//rdoc.info/projects/minad/creole": 1, + "INSTALLATION": 1, + "{": 6, + "gem": 1, + "install": 1, + "creole": 1, + "}": 6, + "SYNOPSIS": 1, + "require": 1, + "html": 1, + "Creole.creolize": 1, + "BUGS": 1, + "If": 1, + "you": 1, + "found": 1, + "bug": 1, + "please": 1, + "report": 1, + "it": 1, + "at": 1, + "project": 1, + "s": 1, + "tracker": 1, + "GitHub": 1, + "//github.com/minad/creole/issues": 1, + "AUTHORS": 1, + "Lars": 2, + "Christensen": 2, + "larsch": 1, + "Daniel": 2, + "Mendler": 1, + "minad": 1, + "LICENSE": 1, + "Copyright": 1, + "c": 1, + "Mendler.": 1, + "It": 1, + "free": 1, + "software": 1, + "and": 1, + "may": 1, + "be": 1, + "redistributed": 1, + "under": 1, + "terms": 1, + "specified": 1, + "in": 1, + "README": 1, + "file": 1, + "of": 1, + "Ruby": 1, + "distribution.": 1 + }, + "Crystal": { + "SHEBANG#!bin/crystal": 2, + "require": 2, + "describe": 2, + "do": 26, + "it": 21, + "run": 14, + "(": 201, + ")": 201, + ".to_i.should": 11, + "eq": 16, + "end": 135, + ".to_f32.should": 2, + ".to_b.should": 1, + "be_true": 1, + "assert_type": 7, + "{": 7, + "int32": 8, + "}": 7, + "union_of": 1, + "char": 1, + "result": 3, + "types": 3, + "[": 9, + "]": 9, + "mod": 1, + "result.program": 1, + "foo": 3, + "mod.types": 1, + "as": 4, + "NonGenericClassType": 1, + "foo.instance_vars": 1, + ".type.should": 3, + "mod.int32": 1, + "GenericClassType": 2, + "foo_i32": 4, + "foo.instantiate": 2, + "of": 3, + "Type": 2, + "|": 8, + "ASTNode": 4, + "foo_i32.lookup_instance_var": 2, + "module": 1, + "Crystal": 1, + "class": 2, + "def": 84, + "transform": 81, + "transformer": 1, + "transformer.before_transform": 1, + "self": 77, + "node": 164, + "transformer.transform": 1, + "transformer.after_transform": 1, + "Transformer": 1, + "before_transform": 1, + "after_transform": 1, + "Expressions": 2, + "exps": 6, + "node.expressions.each": 1, + "exp": 3, + "new_exp": 3, + "exp.transform": 3, + "if": 23, + "new_exp.is_a": 1, + "exps.concat": 1, + "new_exp.expressions": 1, + "else": 2, + "<<": 1, + "exps.length": 1, + "node.expressions": 3, + "Call": 1, + "node_obj": 1, + "node.obj": 9, + "node_obj.transform": 1, + "transform_many": 23, + "node.args": 3, + "node_block": 1, + "node.block": 2, + "node_block.transform": 1, + "node_block_arg": 1, + "node.block_arg": 6, + "node_block_arg.transform": 1, + "And": 1, + "node.left": 3, + "node.left.transform": 3, + "node.right": 3, + "node.right.transform": 3, + "Or": 1, + "StringInterpolation": 1, + "ArrayLiteral": 1, + "node.elements": 1, + "node_of": 1, + "node.of": 2, + "node_of.transform": 1, + "HashLiteral": 1, + "node.keys": 1, + "node.values": 2, + "of_key": 1, + "node.of_key": 2, + "of_key.transform": 1, + "of_value": 1, + "node.of_value": 2, + "of_value.transform": 1, + "If": 1, + "node.cond": 5, + "node.cond.transform": 5, + "node.then": 3, + "node.then.transform": 3, + "node.else": 5, + "node.else.transform": 3, + "Unless": 1, + "IfDef": 1, + "MultiAssign": 1, + "node.targets": 1, + "SimpleOr": 1, + "Def": 1, + "node.body": 12, + "node.body.transform": 10, + "receiver": 2, + "node.receiver": 4, + "receiver.transform": 2, + "block_arg": 2, + "block_arg.transform": 2, + "Macro": 1, + "PointerOf": 1, + "node.exp": 3, + "node.exp.transform": 3, + "SizeOf": 1, + "InstanceSizeOf": 1, + "IsA": 1, + "node.obj.transform": 5, + "node.const": 1, + "node.const.transform": 1, + "RespondsTo": 1, + "Case": 1, + "node.whens": 1, + "node_else": 1, + "node_else.transform": 1, + "When": 1, + "node.conds": 1, + "ImplicitObj": 1, + "ClassDef": 1, + "superclass": 1, + "node.superclass": 2, + "superclass.transform": 1, + "ModuleDef": 1, + "While": 1, + "Generic": 1, + "node.name": 5, + "node.name.transform": 5, + "node.type_vars": 1, + "ExceptionHandler": 1, + "node.rescues": 1, + "node_ensure": 1, + "node.ensure": 2, + "node_ensure.transform": 1, + "Rescue": 1, + "node.types": 2, + "Union": 1, + "Hierarchy": 1, + "Metaclass": 1, + "Arg": 1, + "default_value": 1, + "node.default_value": 2, + "default_value.transform": 1, + "restriction": 1, + "node.restriction": 2, + "restriction.transform": 1, + "BlockArg": 1, + "node.fun": 1, + "node.fun.transform": 1, + "Fun": 1, + "node.inputs": 1, + "output": 1, + "node.output": 2, + "output.transform": 1, + "Block": 1, + "node.args.map": 1, + "Var": 2, + "FunLiteral": 1, + "node.def.body": 1, + "node.def.body.transform": 1, + "FunPointer": 1, + "obj": 1, + "obj.transform": 1, + "Return": 1, + "node.exps": 5, + "Break": 1, + "Next": 1, + "Yield": 1, + "scope": 1, + "node.scope": 2, + "scope.transform": 1, + "Include": 1, + "Extend": 1, + "RangeLiteral": 1, + "node.from": 1, + "node.from.transform": 1, + "node.to": 2, + "node.to.transform": 2, + "Assign": 1, + "node.target": 1, + "node.target.transform": 1, + "node.value": 3, + "node.value.transform": 3, + "Nop": 1, + "NilLiteral": 1, + "BoolLiteral": 1, + "NumberLiteral": 1, + "CharLiteral": 1, + "StringLiteral": 1, + "SymbolLiteral": 1, + "RegexLiteral": 1, + "MetaVar": 1, + "InstanceVar": 1, + "ClassVar": 1, + "Global": 1, + "Require": 1, + "Path": 1, + "Self": 1, + "LibDef": 1, + "FunDef": 1, + "body": 1, + "body.transform": 1, + "TypeDef": 1, + "StructDef": 1, + "UnionDef": 1, + "EnumDef": 1, + "ExternalVar": 1, + "IndirectRead": 1, + "IndirectWrite": 1, + "TypeOf": 1, + "Primitive": 1, + "Not": 1, + "TypeFilteredNode": 1, + "TupleLiteral": 1, + "Cast": 1, + "DeclareVar": 1, + "node.var": 1, + "node.var.transform": 1, + "node.declared_type": 1, + "node.declared_type.transform": 1, + "Alias": 1, + "TupleIndexer": 1, + "Attribute": 1, + "exps.map": 1 + }, "CSS": { ".clearfix": 8, "{": 1661, @@ -12649,60 +19294,119 @@ "backdrop.fade": 1, "backdrop.fade.in": 1 }, + "Cuda": { + "__global__": 2, + "void": 3, + "scalarProdGPU": 1, + "(": 20, + "float": 8, + "*d_C": 1, + "*d_A": 1, + "*d_B": 1, + "int": 14, + "vectorN": 2, + "elementN": 3, + ")": 20, + "{": 8, + "//Accumulators": 1, + "cache": 1, + "__shared__": 1, + "accumResult": 5, + "[": 11, + "ACCUM_N": 4, + "]": 11, + ";": 30, + "////////////////////////////////////////////////////////////////////////////": 2, + "for": 5, + "vec": 5, + "blockIdx.x": 2, + "<": 5, + "+": 12, + "gridDim.x": 1, + "vectorBase": 3, + "IMUL": 1, + "vectorEnd": 2, + "////////////////////////////////////////////////////////////////////////": 4, + "iAccum": 10, + "threadIdx.x": 4, + "blockDim.x": 3, + "sum": 3, + "pos": 5, + "d_A": 2, + "*": 2, + "d_B": 2, + "}": 8, + "stride": 5, + "/": 2, + "__syncthreads": 1, + "if": 3, + "d_C": 2, + "#include": 2, + "": 1, + "": 1, + "vectorAdd": 2, + "const": 2, + "*A": 1, + "*B": 1, + "*C": 1, + "numElements": 4, + "i": 5, + "C": 1, + "A": 1, + "B": 1, + "main": 1, + "cudaError_t": 1, + "err": 5, + "cudaSuccess": 2, + "threadsPerBlock": 4, + "blocksPerGrid": 1, + "-": 1, + "<<": 1, + "": 1, + "cudaGetLastError": 1, + "fprintf": 1, + "stderr": 1, + "cudaGetErrorString": 1, + "exit": 1, + "EXIT_FAILURE": 1, + "cudaDeviceReset": 1, + "return": 1 + }, "Dart": { + "import": 1, + "as": 1, + "math": 1, + ";": 9, "class": 1, - "Point": 7, + "Point": 5, "{": 3, + "num": 2, + "x": 2, + "y": 2, "(": 7, "this.x": 1, "this.y": 1, ")": 7, - ";": 8, "distanceTo": 1, "other": 1, - "var": 3, + "var": 4, "dx": 3, - "x": 2, "-": 2, "other.x": 1, "dy": 3, - "y": 2, "other.y": 1, "return": 1, - "Math.sqrt": 1, + "math.sqrt": 1, "*": 2, "+": 1, "}": 3, + "void": 1, "main": 1, "p": 1, "new": 2, "q": 1, "print": 1 }, - "Delphi": { - "program": 1, - "gmail": 1, - ";": 6, - "uses": 1, - "Forms": 1, - "Unit2": 1, - "in": 1, - "{": 2, - "Form2": 2, - "}": 2, - "R": 1, - "*.res": 1, - "begin": 1, - "Application.Initialize": 1, - "Application.MainFormOnTaskbar": 1, - "True": 1, - "Application.CreateForm": 1, - "(": 1, - "TForm2": 1, - ")": 1, - "Application.Run": 1, - "end.": 1 - }, "Diff": { "diff": 1, "-": 5, @@ -12713,7 +19417,777 @@ "d472341..8ad9ffb": 1, "+": 3 }, - "Ecl": { + "DM": { + "#define": 4, + "PI": 6, + "#if": 1, + "G": 1, + "#elif": 1, + "I": 1, + "#else": 1, + "K": 1, + "#endif": 1, + "var/GlobalCounter": 1, + "var/const/CONST_VARIABLE": 1, + "var/list/MyList": 1, + "list": 3, + "(": 17, + "new": 1, + "/datum/entity": 2, + ")": 17, + "var/list/EmptyList": 1, + "[": 2, + "]": 2, + "//": 6, + "creates": 1, + "a": 1, + "of": 1, + "null": 2, + "entries": 1, + "var/list/NullList": 1, + "var/name": 1, + "var/number": 1, + "/datum/entity/proc/myFunction": 1, + "world.log": 5, + "<<": 5, + "/datum/entity/New": 1, + "number": 2, + "GlobalCounter": 1, + "+": 3, + "/datum/entity/unit": 1, + "name": 1, + "/datum/entity/unit/New": 1, + "..": 1, + "calls": 1, + "the": 2, + "parent": 1, + "s": 1, + "proc": 1, + ";": 3, + "equal": 1, + "to": 1, + "super": 1, + "and": 1, + "base": 1, + "in": 1, + "other": 1, + "languages": 1, + "rand": 1, + "/datum/entity/unit/myFunction": 1, + "/proc/ReverseList": 1, + "var/list/input": 1, + "var/list/output": 1, + "for": 1, + "var/i": 1, + "input.len": 1, + "i": 3, + "-": 2, + "IMPORTANT": 1, + "List": 1, + "Arrays": 1, + "count": 1, + "from": 1, + "output": 2, + "input": 1, + "is": 2, + "return": 3, + "/proc/DoStuff": 1, + "var/bitflag": 2, + "bitflag": 4, + "|": 1, + "/proc/DoOtherStuff": 1, + "bits": 1, + "maximum": 1, + "amount": 1, + "&": 1, + "/proc/DoNothing": 1, + "var/pi": 1, + "if": 2, + "pi": 2, + "else": 2, + "CONST_VARIABLE": 1, + "#undef": 1, + "Undefine": 1 + }, + "Dogescript": { + "quiet": 1, + "wow": 4, + "such": 2, + "language": 3, + "very": 1, + "syntax": 1, + "github": 1, + "recognized": 1, + "loud": 1, + "much": 1, + "friendly": 2, + "rly": 1, + "is": 2, + "true": 1, + "plz": 2, + "console.loge": 2, + "with": 2, + "but": 1, + "module.exports": 1 + }, + "E": { + "def": 24, + "makeVehicle": 3, + "(": 65, + "self": 1, + ")": 64, + "{": 57, + "vehicle": 2, + "to": 27, + "milesTillEmpty": 1, + "return": 19, + "self.milesPerGallon": 1, + "*": 1, + "self.getFuelRemaining": 1, + "}": 57, + "makeCar": 4, + "var": 6, + "fuelRemaining": 4, + "car": 8, + "extends": 2, + "milesPerGallon": 2, + "getFuelRemaining": 2, + "makeJet": 1, + "jet": 3, + "println": 2, + "The": 2, + "can": 1, + "go": 1, + "car.milesTillEmpty": 1, + "miles.": 1, + "name": 4, + "x": 3, + "y": 3, + "moveTo": 1, + "newX": 2, + "newY": 2, + "getX": 1, + "getY": 1, + "setName": 1, + "newName": 2, + "getName": 1, + "sportsCar": 1, + "sportsCar.moveTo": 1, + "sportsCar.getName": 1, + "is": 1, + "at": 1, + "X": 1, + "location": 1, + "sportsCar.getX": 1, + "makeVOCPair": 1, + "brandName": 3, + "String": 1, + "near": 6, + "myTempContents": 6, + "none": 2, + "brand": 5, + "__printOn": 4, + "out": 4, + "TextWriter": 4, + "void": 5, + "out.print": 4, + "ProveAuth": 2, + "<$brandName>": 3, + "prover": 1, + "getBrand": 4, + "coerce": 2, + "specimen": 2, + "optEjector": 3, + "sealedBox": 2, + "offerContent": 1, + "CheckAuth": 2, + "checker": 3, + "template": 1, + "match": 4, + "[": 10, + "get": 2, + "authList": 2, + "any": 2, + "]": 10, + "specimenBox": 2, + "null": 1, + "if": 2, + "specimenBox.__respondsTo": 1, + "specimenBox.offerContent": 1, + "else": 1, + "for": 3, + "auth": 3, + "in": 1, + "throw.eject": 1, + "Unmatched": 1, + "authorization": 1, + "__respondsTo": 2, + "_": 3, + "true": 1, + "false": 1, + "__getAllegedType": 1, + "null.__getAllegedType": 1, + "#File": 1, + "objects": 1, + "hardwired": 1, + "files": 1, + "file1": 1, + "": 1, + "file2": 1, + "": 1, + "#Using": 2, + "a": 4, + "variable": 1, + "file": 3, + "filePath": 2, + "file3": 1, + "": 1, + "single": 1, + "character": 1, + "specify": 1, + "Windows": 1, + "drive": 1, + "file4": 1, + "": 1, + "file5": 1, + "": 1, + "file6": 1, + "": 1, + "pragma.syntax": 1, + "send": 1, + "message": 4, + "when": 2, + "friend": 4, + "<-receive(message))>": 1, + "chatUI.showMessage": 4, + "catch": 2, + "prob": 2, + "receive": 1, + "receiveFriend": 2, + "friendRcvr": 2, + "bind": 2, + "save": 1, + "file.setText": 1, + "makeURIFromObject": 1, + "chatController": 2, + "load": 1, + "getObjectFromURI": 1, + "file.getText": 1, + "<": 1, + "-": 2, + "tempVow": 2, + "#...use": 1, + "#....": 1, + "report": 1, + "problem": 1, + "finally": 1, + "#....log": 1, + "event": 1 + }, + "Eagle": { + "": 2, + "version=": 4, + "encoding=": 2, + "": 2, + "eagle": 4, + "SYSTEM": 2, + "dtd": 2, + "": 2, + "": 2, + "": 2, + "": 4, + "alwaysvectorfont=": 2, + "verticaltext=": 2, + "": 2, + "": 2, + "distance=": 2, + "unitdist=": 2, + "unit=": 2, + "style=": 2, + "multiple=": 2, + "display=": 2, + "altdistance=": 2, + "altunitdist=": 2, + "altunit=": 2, + "": 2, + "": 118, + "number=": 119, + "name=": 447, + "color=": 118, + "fill=": 118, + "visible=": 118, + "active=": 125, + "": 2, + "": 1, + "": 1, + "": 497, + "x1=": 630, + "y1=": 630, + "x2=": 630, + "y2=": 630, + "width=": 512, + "layer=": 822, + "": 1, + "": 2, + "": 4, + "": 60, + "&": 5501, + "lt": 2665, + ";": 5567, + "b": 64, + "gt": 2770, + "Resistors": 2, + "Capacitors": 4, + "Inductors": 2, + "/b": 64, + "p": 65, + "Based": 2, + "on": 2, + "the": 5, + "previous": 2, + "libraries": 2, + "ul": 2, + "li": 12, + "r.lbr": 2, + "cap.lbr": 2, + "cap": 2, + "-": 768, + "fe.lbr": 2, + "captant.lbr": 2, + "polcap.lbr": 2, + "ipc": 2, + "smd.lbr": 2, + "/ul": 2, + "All": 2, + "SMD": 4, + "packages": 2, + "are": 2, + "defined": 2, + "according": 2, + "to": 3, + "IPC": 2, + "specifications": 2, + "and": 5, + "CECC": 2, + "author": 3, + "Created": 3, + "by": 3, + "librarian@cadsoft.de": 3, + "/author": 3, + "for": 5, + "Electrolyt": 2, + "see": 4, + "also": 2, + "www.bccomponents.com": 2, + "www.panasonic.com": 2, + "www.kemet.com": 2, + "http": 4, + "//www.secc.co.jp/pdf/os_e/2004/e_os_all.pdf": 2, + "(": 4, + "SANYO": 2, + ")": 4, + "trimmer": 2, + "refence": 2, + "u": 2, + "www.electrospec": 2, + "inc.com/cross_references/trimpotcrossref.asp": 2, + "/u": 2, + "table": 2, + "border": 2, + "cellspacing": 2, + "cellpadding": 2, + "width": 6, + "cellpaddding": 2, + "tr": 2, + "valign": 2, + "td": 4, + "amp": 66, + "nbsp": 66, + "/td": 4, + "font": 2, + "color": 20, + "size": 2, + "TRIM": 4, + "POT": 4, + "CROSS": 4, + "REFERENCE": 4, + "/font": 2, + "P": 128, + "TABLE": 4, + "BORDER": 4, + "CELLSPACING": 4, + "CELLPADDING": 4, + "TR": 36, + "TD": 170, + "COLSPAN": 16, + "FONT": 166, + "SIZE": 166, + "FACE": 166, + "ARIAL": 166, + "B": 106, + "RECTANGULAR": 2, + "MULTI": 6, + "TURN": 10, + "/B": 90, + "/FONT": 166, + "/TD": 170, + "/TR": 36, + "ALIGN": 124, + "CENTER": 124, + "BOURNS": 6, + "BI": 10, + "TECH": 10, + "DALE": 10, + "VISHAY": 10, + "PHILIPS/MEPCO": 10, + "MURATA": 6, + "PANASONIC": 10, + "SPECTROL": 6, + "MILSPEC": 6, + "BGCOLOR": 76, + "BR": 1478, + "W": 92, + "Y": 36, + "J": 12, + "L": 18, + "X": 82, + "PH": 2, + "XH": 2, + "SLT": 2, + "ALT": 42, + "T8S": 2, + "T18/784": 2, + "/1897": 2, + "/1880": 2, + "EKP/CT20/RJ": 2, + "RJ": 14, + "EKQ": 4, + "EKR": 4, + "EKJ": 2, + "EKL": 2, + "S": 18, + "EVMCOG": 2, + "T602": 2, + "RT/RTR12": 6, + "RJ/RJR12": 6, + "SQUARE": 2, + "BOURN": 4, + "H": 24, + "Z": 16, + "T63YB": 2, + "T63XB": 2, + "T93Z": 2, + "T93YA": 2, + "T93XA": 2, + "T93YB": 2, + "T93XB": 2, + "EKP": 8, + "EKW": 6, + "EKM": 4, + "EKB": 2, + "EKN": 2, + "P/CT9P": 2, + "P/3106P": 2, + "W/3106W": 2, + "X/3106X": 2, + "Y/3106Y": 2, + "Z/3105Z": 2, + "EVMCBG": 2, + "EVMCCG": 2, + "RT/RTR22": 8, + "RJ/RJR22": 6, + "RT/RTR26": 6, + "RJ/RJR26": 12, + "RT/RTR24": 6, + "RJ/RJR24": 12, + "SINGLE": 4, + "E": 6, + "K": 4, + "T": 10, + "V": 10, + "M": 10, + "R": 6, + "U": 4, + "C": 6, + "F": 4, + "RX": 6, + "PA": 2, + "A": 16, + "XW": 2, + "XL": 2, + "PM": 2, + "PX": 2, + "RXW": 2, + "RXL": 2, + "T7YB": 2, + "T7YA": 2, + "TXD": 2, + "TYA": 2, + "TYP": 2, + "TYD": 2, + "TX": 4, + "SX": 6, + "ET6P": 2, + "ET6S": 2, + "ET6X": 2, + "W/8014EMW": 2, + "P/8014EMP": 2, + "X/8014EMX": 2, + "TM7W": 2, + "TM7P": 2, + "TM7X": 2, + "SMS": 2, + "SMB": 2, + "SMA": 2, + "CT": 12, + "EKV": 2, + "EKX": 2, + "EKZ": 2, + "N": 2, + "RVA0911V304A": 2, + "RVA0911H413A": 2, + "RVG0707V100A": 2, + "RVA0607V": 2, + "RVA1214H213A": 2, + "EVMQ0G": 4, + "EVMQIG": 2, + "EVMQ3G": 2, + "EVMS0G": 2, + "EVMG0G": 2, + "EVMK4GA00B": 2, + "EVM30GA00B": 2, + "EVMK0GA00B": 2, + "EVM38GA00B": 2, + "EVMB6": 2, + "EVLQ0": 2, + "EVMMSG": 2, + "EVMMBG": 2, + "EVMMAG": 2, + "EVMMCS": 2, + "EVMM1": 2, + "EVMM0": 2, + "EVMM3": 2, + "RJ/RJR50": 6, + "/TABLE": 4, + "TOCOS": 4, + "AUX/KYOCERA": 4, + "G": 10, + "ST63Z": 2, + "ST63Y": 2, + "ST5P": 2, + "ST5W": 2, + "ST5X": 2, + "A/B": 2, + "C/D": 2, + "W/X": 2, + "ST5YL/ST53YL": 2, + "ST5YJ/5T53YJ": 2, + "ST": 14, + "EVM": 8, + "YS": 2, + "D": 2, + "G4B": 2, + "G4A": 2, + "TR04": 2, + "S1": 4, + "TRG04": 2, + "DVR": 2, + "CVR": 4, + "A/C": 2, + "ALTERNATE": 2, + "/tr": 2, + "/table": 2, + "": 60, + "": 4, + "": 53, + "RESISTOR": 52, + "": 64, + "x=": 240, + "y=": 242, + "dx=": 64, + "dy=": 64, + "": 108, + "size=": 114, + "NAME": 52, + "": 108, + "VALUE": 52, + "": 132, + "": 52, + "": 3, + "": 3, + "Pin": 1, + "Header": 1, + "Connectors": 1, + "PIN": 1, + "HEADER": 1, + "": 39, + "drill=": 41, + "shape=": 39, + "ratio=": 41, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "language=": 2, + "EAGLE": 2, + "Design": 5, + "Rules": 5, + "Die": 1, + "Standard": 1, + "sind": 1, + "so": 2, + "gew": 1, + "hlt": 1, + "dass": 1, + "sie": 1, + "f": 1, + "r": 1, + "die": 3, + "meisten": 1, + "Anwendungen": 1, + "passen.": 1, + "Sollte": 1, + "ihre": 1, + "Platine": 1, + "besondere": 1, + "Anforderungen": 1, + "haben": 1, + "treffen": 1, + "Sie": 1, + "erforderlichen": 1, + "Einstellungen": 1, + "hier": 1, + "und": 1, + "speichern": 1, + "unter": 1, + "einem": 1, + "neuen": 1, + "Namen": 1, + "ab.": 1, + "The": 1, + "default": 1, + "have": 2, + "been": 1, + "set": 1, + "cover": 1, + "a": 2, + "wide": 1, + "range": 1, + "of": 1, + "applications.": 1, + "Your": 1, + "particular": 1, + "design": 2, + "may": 1, + "different": 1, + "requirements": 1, + "please": 1, + "make": 1, + "necessary": 1, + "adjustments": 1, + "save": 1, + "your": 1, + "customized": 1, + "rules": 1, + "under": 1, + "new": 1, + "name.": 1, + "": 142, + "value=": 145, + "": 1, + "": 1, + "": 8, + "": 8, + "refer=": 7, + "": 1, + "": 1, + "": 3, + "library=": 3, + "package=": 3, + "smashed=": 3, + "": 6, + "": 3, + "1": 1, + "778": 1, + "16": 1, + "002": 1, + "": 1, + "": 1, + "": 3, + "": 4, + "element=": 4, + "pad=": 4, + "": 1, + "extent=": 1, + "": 3, + "": 2, + "": 8, + "": 2, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "xreflabel=": 1, + "xrefpart=": 1, + "Frames": 1, + "Sheet": 2, + "Layout": 1, + "": 1, + "": 1, + "font=": 4, + "DRAWING_NAME": 1, + "LAST_DATE_TIME": 1, + "SHEET": 1, + "": 1, + "columns=": 1, + "rows=": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "prefix=": 1, + "uservalue=": 1, + "FRAME": 1, + "DIN": 1, + "A4": 1, + "landscape": 1, + "with": 1, + "location": 1, + "doc.": 1, + "field": 1, + "": 1, + "": 1, + "symbol=": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "wave": 10, + "soldering": 10, + "Source": 2, + "//download.siliconexpert.com/pdfs/2005/02/24/Semi_Ap/2/VSH/Resistor/dcrcwfre.pdf": 2, + "MELF": 8, + "type": 20, + "grid": 20, + "mm": 20, + "curve=": 56, + "": 12, + "radius=": 12 + }, + "ECL": { "#option": 1, "(": 32, "true": 1, @@ -14095,6 +21569,3637 @@ "/cell": 2, "cell": 2 }, + "Frege": { + "module": 2, + "examples.CommandLineClock": 1, + "where": 39, + "data": 3, + "Date": 5, + "native": 4, + "java.util.Date": 1, + "new": 9, + "(": 339, + ")": 345, + "-": 730, + "IO": 13, + "MutableIO": 1, + "toString": 2, + "Mutable": 1, + "s": 21, + "ST": 1, + "String": 9, + "d.toString": 1, + "action": 2, + "to": 13, + "give": 2, + "us": 1, + "the": 20, + "current": 4, + "time": 1, + "as": 33, + "do": 38, + "d": 3, + "<->": 35, + "java": 5, + "lang": 2, + "Thread": 2, + "sleep": 4, + "takes": 1, + "a": 99, + "long": 4, + "and": 14, + "returns": 2, + "nothing": 2, + "but": 2, + "may": 1, + "throw": 1, + "an": 6, + "InterruptedException": 4, + "This": 2, + "is": 24, + "without": 1, + "doubt": 1, + "public": 1, + "static": 1, + "void": 2, + "millis": 1, + "throws": 4, + "Encoded": 1, + "in": 22, + "Frege": 1, + "argument": 1, + "type": 8, + "Long": 3, + "result": 11, + "does": 2, + "defined": 1, + "frege": 1, + "Lang": 1, + "main": 11, + "args": 2, + "forever": 1, + "print": 25, + "stdout.flush": 1, + "Thread.sleep": 4, + "examples.Concurrent": 1, + "import": 7, + "System.Random": 1, + "Java.Net": 1, + "URL": 2, + "Control.Concurrent": 1, + "C": 6, + "main2": 1, + "m": 2, + "<": 84, + "newEmptyMVar": 1, + "forkIO": 11, + "m.put": 3, + "replicateM_": 3, + "c": 33, + "m.take": 1, + "println": 25, + "example1": 1, + "putChar": 2, + "example2": 2, + "getLine": 2, + "case": 6, + "of": 32, + "Right": 6, + "n": 38, + "setReminder": 3, + "Left": 5, + "_": 60, + "+": 200, + "show": 24, + "L*n": 1, + "table": 1, + "mainPhil": 2, + "[": 120, + "fork1": 3, + "fork2": 3, + "fork3": 3, + "fork4": 3, + "fork5": 3, + "]": 116, + "mapM": 3, + "MVar": 3, + "1": 2, + "5": 1, + "philosopher": 7, + "Kant": 1, + "Locke": 1, + "Wittgenstein": 1, + "Nozick": 1, + "Mises": 1, + "return": 17, + "Int": 6, + "me": 13, + "left": 4, + "right": 4, + "g": 4, + "Random.newStdGen": 1, + "let": 8, + "phil": 4, + "tT": 2, + "g1": 2, + "Random.randomR": 2, + "L": 6, + "eT": 2, + "g2": 3, + "thinkTime": 3, + "*": 5, + "eatTime": 3, + "fl": 4, + "left.take": 1, + "rFork": 2, + "poll": 1, + "Just": 2, + "fr": 3, + "right.put": 1, + "left.put": 2, + "table.notifyAll": 2, + "Nothing": 2, + "table.wait": 1, + "inter": 3, + "catch": 2, + "getURL": 4, + "xx": 2, + "url": 1, + "URL.new": 1, + "con": 3, + "url.openConnection": 1, + "con.connect": 1, + "con.getInputStream": 1, + "typ": 5, + "con.getContentType": 1, + "stderr.println": 3, + "ir": 2, + "InputStreamReader.new": 2, + "fromMaybe": 1, + "charset": 2, + "unsupportedEncoding": 3, + "br": 4, + "BufferedReader": 1, + "getLines": 1, + "InputStream": 1, + "UnsupportedEncodingException": 1, + "InputStreamReader": 1, + "x": 45, + "x.catched": 1, + "ctyp": 2, + "charset=": 1, + "m.group": 1, + "SomeException": 2, + "Throwable": 1, + "m1": 1, + "MVar.newEmpty": 3, + "m2": 1, + "m3": 2, + "r": 7, + "catchAll": 3, + ".": 41, + "m1.put": 1, + "m2.put": 1, + "m3.put": 1, + "r1": 2, + "m1.take": 1, + "r2": 3, + "m2.take": 1, + "r3": 3, + "take": 13, + "ss": 8, + "mapM_": 5, + "putStrLn": 2, + "|": 62, + "x.getClass.getName": 1, + "y": 15, + "sum": 2, + "map": 49, + "length": 20, + "package": 2, + "examples.Sudoku": 1, + "Data.TreeMap": 1, + "Tree": 4, + "keys": 2, + "Data.List": 1, + "DL": 1, + "hiding": 1, + "find": 20, + "union": 10, + "Element": 6, + "Zelle": 8, + "set": 4, + "candidates": 18, + "Position": 22, + "Feld": 3, + "Brett": 13, + "for": 25, + "assumptions": 10, + "conclusions": 2, + "Assumption": 21, + "ISNOT": 14, + "IS": 16, + "derive": 2, + "Eq": 1, + "Ord": 1, + "instance": 1, + "Show": 1, + "p": 72, + "e": 15, + "pname": 10, + "e.show": 2, + "showcs": 5, + "cs": 27, + "joined": 4, + "Assumption.show": 1, + "elements": 12, + "all": 22, + "possible": 2, + "..": 1, + "positions": 16, + "rowstarts": 4, + "row": 20, + "starting": 3, + "colstarts": 3, + "column": 2, + "boxstarts": 3, + "box": 15, + "boxmuster": 3, + "pattern": 1, + "by": 3, + "adding": 1, + "upper": 2, + "position": 9, + "results": 1, + "real": 1, + "extract": 2, + "field": 9, + "getf": 16, + "f": 19, + "fs": 22, + "fst": 9, + "otherwise": 8, + "cell": 24, + "getc": 12, + "b": 113, + "snd": 20, + "compute": 5, + "list": 7, + "that": 18, + "belong": 3, + "same": 8, + "given": 3, + "z..": 1, + "z": 12, + "quot": 1, + "col": 17, + "mod": 3, + "ri": 2, + "div": 3, + "or": 15, + "depending": 1, + "on": 4, + "ci": 3, + "index": 3, + "middle": 2, + "check": 2, + "if": 5, + "candidate": 10, + "has": 2, + "exactly": 2, + "one": 2, + "member": 1, + "i.e.": 1, + "been": 1, + "solved": 1, + "single": 9, + "Bool": 2, + "true": 16, + "false": 13, + "unsolved": 10, + "rows": 4, + "cols": 6, + "boxes": 1, + "allrows": 8, + "allcols": 5, + "allboxs": 5, + "allrcb": 5, + "zip": 7, + "repeat": 3, + "containers": 6, + "PRINTING": 1, + "printable": 1, + "coordinate": 1, + "a1": 3, + "lower": 1, + "i9": 1, + "packed": 1, + "chr": 2, + "ord": 6, + "board": 41, + "printb": 4, + "p1line": 2, + "pfld": 4, + "line": 2, + "brief": 1, + "no": 4, + "some": 2, + "zs": 1, + "initial/final": 1, + "msg": 6, + "res012": 2, + "concatMap": 1, + "a*100": 1, + "b*10": 1, + "BOARD": 1, + "ALTERATION": 1, + "ACTIONS": 1, + "message": 1, + "about": 1, + "what": 1, + "done": 1, + "turnoff1": 3, + "i": 16, + "off": 11, + "nc": 7, + "head": 19, + "newb": 7, + "filter": 26, + "notElem": 7, + "turnoff": 11, + "turnoffh": 1, + "ps": 8, + "foldM": 2, + "toh": 2, + "setto": 3, + "cname": 4, + "nf": 2, + "SOLVING": 1, + "STRATEGIES": 1, + "reduce": 3, + "sets": 2, + "contains": 1, + "numbers": 1, + "already": 1, + "finds": 1, + "logs": 1, + "NAKED": 5, + "SINGLEs": 1, + "passing.": 1, + "sss": 3, + "each": 2, + "with": 15, + "more": 2, + "than": 2, + "fields": 6, + "are": 6, + "rcb": 16, + "elem": 16, + "collect": 1, + "remove": 3, + "from": 7, + "look": 10, + "number": 4, + "appears": 1, + "container": 9, + "this": 2, + "can": 9, + "go": 1, + "other": 2, + "place": 1, + "HIDDEN": 6, + "SINGLE": 1, + "hiddenSingle": 2, + "select": 1, + "containername": 1, + "FOR": 11, + "IN": 9, + "occurs": 5, + "PAIRS": 8, + "TRIPLES": 8, + "QUADS": 2, + "nakedPair": 4, + "t": 14, + "nm": 6, + "SELECT": 3, + "pos": 5, + "tuple": 2, + "name": 2, + "//": 8, + "u": 6, + "fold": 7, + "non": 2, + "outof": 6, + "tuples": 2, + "hit": 7, + "subset": 3, + "any": 3, + "hiddenPair": 4, + "minus": 2, + "uniq": 4, + "sort": 4, + "common": 4, + "bs": 7, + "undefined": 1, + "cannot": 1, + "happen": 1, + "because": 1, + "either": 1, + "empty": 4, + "not": 5, + "intersectionlist": 2, + "intersections": 2, + "reason": 8, + "reson": 1, + "cpos": 7, + "WHERE": 2, + "tail": 2, + "intersection": 1, + "we": 5, + "occurences": 1, + "XY": 2, + "Wing": 2, + "there": 6, + "exists": 6, + "A": 7, + "X": 5, + "Y": 4, + "B": 5, + "Z": 6, + "shares": 2, + "reasoning": 1, + "will": 4, + "be": 9, + "since": 1, + "indeed": 1, + "thus": 1, + "see": 1, + "xyWing": 2, + "rcba": 4, + "share": 1, + "b1": 11, + "b2": 10, + "&&": 9, + "||": 2, + "then": 1, + "else": 1, + "c1": 4, + "c2": 3, + "N": 5, + "Fish": 1, + "Swordfish": 1, + "Jellyfish": 1, + "When": 2, + "particular": 1, + "digit": 1, + "located": 2, + "only": 1, + "columns": 2, + "eliminate": 1, + "those": 2, + "which": 2, + "fish": 7, + "fishname": 5, + "rset": 4, + "certain": 1, + "rflds": 2, + "rowset": 1, + "colss": 3, + "must": 4, + "appear": 1, + "at": 3, + "least": 3, + "cstart": 2, + "immediate": 1, + "consequences": 6, + "assumption": 8, + "form": 1, + "conseq": 3, + "cp": 3, + "two": 1, + "contradict": 2, + "contradicts": 7, + "get": 3, + "aPos": 5, + "List": 1, + "turned": 1, + "when": 2, + "true/false": 1, + "toClear": 7, + "whose": 1, + "implications": 5, + "themself": 1, + "chain": 2, + "paths": 12, + "solution": 6, + "reverse": 4, + "css": 7, + "yields": 1, + "contradictory": 1, + "chainContra": 2, + "pro": 7, + "contra": 4, + "ALL": 2, + "conlusions": 1, + "uniqBy": 2, + "using": 2, + "sortBy": 2, + "comparing": 2, + "conslusion": 1, + "chains": 4, + "LET": 1, + "BE": 1, + "final": 2, + "conclusion": 4, + "THE": 1, + "FIRST": 1, + "implication": 2, + "ai": 2, + "so": 1, + "a0": 1, + "OR": 7, + "a2": 2, + "...": 2, + "IMPLIES": 1, + "For": 2, + "cells": 1, + "pi": 2, + "have": 1, + "construct": 2, + "p0": 1, + "p1": 1, + "c0": 1, + "cellRegionChain": 2, + "os": 3, + "cellas": 2, + "regionas": 2, + "iss": 3, + "ass": 2, + "first": 2, + "candidates@": 1, + "region": 2, + "oss": 2, + "Liste": 1, + "aller": 1, + "Annahmen": 1, + "ein": 1, + "bestimmtes": 1, + "acstree": 3, + "Tree.fromList": 1, + "bypass": 1, + "maybe": 1, + "tree": 1, + "lookup": 2, + "error": 1, + "performance": 1, + "resons": 1, + "confine": 1, + "ourselves": 1, + "20": 1, + "per": 1, + "mkPaths": 3, + "acst": 3, + "impl": 2, + "{": 1, + "a3": 1, + "ordered": 1, + "impls": 2, + "ns": 2, + "concat": 1, + "takeUntil": 1, + "null": 1, + "iterate": 1, + "expandchain": 3, + "avoid": 1, + "loops": 1, + "uni": 3, + "SOLVE": 1, + "SUDOKU": 1, + "Apply": 1, + "available": 1, + "strategies": 1, + "until": 1, + "changes": 1, + "anymore": 1, + "Strategy": 1, + "functions": 2, + "supposed": 1, + "applied": 1, + "changed": 1, + "board.": 1, + "strategy": 2, + "anything": 1, + "alter": 1, + "it": 2, + "next": 1, + "tried.": 1, + "solve": 19, + "res@": 16, + "apply": 17, + "res": 16, + "smallest": 1, + "comment": 16, + "SINGLES": 1, + "locked": 1, + "2": 3, + "QUADRUPELS": 6, + "3": 3, + "4": 3, + "WINGS": 1, + "FISH": 3, + "pcomment": 2, + "9": 5, + "forcing": 1, + "allow": 1, + "infer": 1, + "both": 1, + "brd": 2, + "com": 5, + "stderr": 3, + "<<": 4, + "log": 1, + "turn": 1, + "string": 3, + "into": 1, + "mkrow": 2, + "mkrow1": 2, + "xs": 4, + "make": 1, + "sure": 1, + "unpacked": 2, + "<=>": 1, + "0": 2, + "ignored": 1, + "h": 1, + "help": 1, + "usage": 1, + "Sudoku": 2, + "file": 4, + "81": 3, + "char": 1, + "consisting": 1, + "digits": 2, + "One": 1, + "such": 1, + "going": 1, + "http": 3, + "www": 1, + "sudokuoftheday": 1, + "pages": 1, + "o": 1, + "php": 1, + "click": 1, + "puzzle": 1, + "open": 1, + "tab": 1, + "Copy": 1, + "address": 1, + "your": 1, + "browser": 1, + "There": 1, + "also": 1, + "hard": 1, + "sudokus": 1, + "examples": 1, + "top95": 1, + "txt": 1, + "W": 1, + "felder": 2, + "decode": 4, + "files": 2, + "forM_": 1, + "sudoku": 2, + "openReader": 1, + "lines": 2, + "BufferedReader.getLines": 1, + "process": 5, + "candi": 2, + "consider": 3, + "acht": 4, + "neun": 2, + "examples.SwingExamples": 1, + "Java.Awt": 1, + "ActionListener": 2, + "Java.Swing": 1, + "rs": 2, + "Runnable.new": 1, + "helloWorldGUI": 2, + "buttonDemoGUI": 2, + "celsiusConverterGUI": 2, + "invokeLater": 1, + "tempTextField": 2, + "JTextField.new": 1, + "celsiusLabel": 1, + "JLabel.new": 3, + "convertButton": 1, + "JButton.new": 3, + "fahrenheitLabel": 1, + "frame": 3, + "JFrame.new": 3, + "frame.setDefaultCloseOperation": 3, + "JFrame.dispose_on_close": 3, + "frame.setTitle": 1, + "celsiusLabel.setText": 1, + "convertButton.setText": 1, + "convertButtonActionPerformed": 2, + "celsius": 3, + "getText": 1, + "double": 1, + "fahrenheitLabel.setText": 3, + "c*1.8": 1, + ".long": 1, + "ActionListener.new": 2, + "convertButton.addActionListener": 1, + "contentPane": 2, + "frame.getContentPane": 2, + "layout": 2, + "GroupLayout.new": 1, + "contentPane.setLayout": 1, + "TODO": 1, + "continue": 1, + "//docs.oracle.com/javase/tutorial/displayCode.html": 1, + "code": 1, + "//docs.oracle.com/javase/tutorial/uiswing/examples/learn/CelsiusConverterProject/src/learn/CelsiusConverterGUI.java": 1, + "frame.pack": 3, + "frame.setVisible": 3, + "label": 2, + "cp.add": 1, + "newContentPane": 2, + "JPanel.new": 1, + "JButton": 4, + "b1.setVerticalTextPosition": 1, + "SwingConstants.center": 2, + "b1.setHorizontalTextPosition": 1, + "SwingConstants.leading": 2, + "b2.setVerticalTextPosition": 1, + "b2.setHorizontalTextPosition": 1, + "b3": 7, + "Enable": 1, + "button": 1, + "setVerticalTextPosition": 1, + "SwingConstants": 2, + "center": 1, + "setHorizontalTextPosition": 1, + "leading": 1, + "setEnabled": 7, + "action1": 2, + "action3": 2, + "b1.addActionListener": 1, + "b3.addActionListener": 1, + "newContentPane.add": 3, + "newContentPane.setOpaque": 1, + "frame.setContentPane": 1 + }, + "Game Maker Language": { + "//draws": 1, + "the": 62, + "sprite": 12, + "draw": 3, + "true": 73, + ";": 1282, + "if": 397, + "(": 1501, + "facing": 17, + "RIGHT": 10, + ")": 1502, + "image_xscale": 17, + "-": 212, + "else": 151, + "blinkToggle": 1, + "{": 300, + "state": 50, + "CLIMBING": 5, + "or": 78, + "sprite_index": 14, + "sPExit": 1, + "sDamselExit": 1, + "sTunnelExit": 1, + "and": 155, + "global.hasJetpack": 4, + "not": 63, + "whipping": 5, + "draw_sprite_ext": 10, + "x": 76, + "y": 85, + "image_yscale": 14, + "image_angle": 14, + "image_blend": 2, + "image_alpha": 10, + "//draw_sprite": 1, + "draw_sprite": 9, + "sJetpackBack": 1, + "false": 85, + "}": 307, + "sJetpackRight": 1, + "sJetpackLeft": 1, + "+": 206, + "redColor": 2, + "make_color_rgb": 1, + "holdArrow": 4, + "ARROW_NORM": 2, + "sArrowRight": 1, + "ARROW_BOMB": 2, + "holdArrowToggle": 2, + "sBombArrowRight": 2, + "LEFT": 7, + "sArrowLeft": 1, + "sBombArrowLeft": 2, + "hangCountMax": 2, + "//////////////////////////////////////": 2, + "kLeft": 12, + "checkLeft": 1, + "kLeftPushedSteps": 3, + "kLeftPressed": 2, + "checkLeftPressed": 1, + "kLeftReleased": 3, + "checkLeftReleased": 1, + "kRight": 12, + "checkRight": 1, + "kRightPushedSteps": 3, + "kRightPressed": 2, + "checkRightPressed": 1, + "kRightReleased": 3, + "checkRightReleased": 1, + "kUp": 5, + "checkUp": 1, + "kDown": 5, + "checkDown": 1, + "//key": 1, + "canRun": 1, + "kRun": 2, + "kJump": 6, + "checkJump": 1, + "kJumpPressed": 11, + "checkJumpPressed": 1, + "kJumpReleased": 5, + "checkJumpReleased": 1, + "cantJump": 3, + "global.isTunnelMan": 1, + "sTunnelAttackL": 1, + "holdItem": 1, + "kAttack": 2, + "checkAttack": 2, + "kAttackPressed": 2, + "checkAttackPressed": 1, + "kAttackReleased": 2, + "checkAttackReleased": 1, + "kItemPressed": 2, + "checkItemPressed": 1, + "xPrev": 1, + "yPrev": 1, + "stunned": 3, + "dead": 3, + "//////////////////////////////////////////": 2, + "colSolidLeft": 4, + "colSolidRight": 3, + "colLeft": 6, + "colRight": 6, + "colTop": 4, + "colBot": 11, + "colLadder": 3, + "colPlatBot": 6, + "colPlat": 5, + "colWaterTop": 3, + "colIceBot": 2, + "runKey": 4, + "isCollisionMoveableSolidLeft": 1, + "isCollisionMoveableSolidRight": 1, + "isCollisionLeft": 2, + "isCollisionRight": 2, + "isCollisionTop": 1, + "isCollisionBottom": 1, + "isCollisionLadder": 1, + "isCollisionPlatformBottom": 1, + "isCollisionPlatform": 1, + "isCollisionWaterTop": 1, + "collision_point": 30, + "oIce": 1, + "checkRun": 1, + "runHeld": 3, + "HANGING": 10, + "approximatelyZero": 4, + "xVel": 24, + "xAcc": 12, + "platformCharacterIs": 23, + "ON_GROUND": 18, + "DUCKING": 4, + "pushTimer": 3, + "//if": 5, + "SS_IsSoundPlaying": 2, + "global.sndPush": 4, + "playSound": 3, + "runAcc": 2, + "abs": 9, + "alarm": 13, + "[": 99, + "]": 103, + "<": 39, + "floor": 11, + "/": 5, + "/xVel": 1, + "instance_exists": 8, + "oCape": 2, + "oCape.open": 6, + "kJumped": 7, + "ladderTimer": 4, + "ladder": 5, + "oLadder": 4, + "ladder.x": 3, + "oLadderTop": 2, + "yAcc": 26, + "climbAcc": 2, + "FALLING": 8, + "STANDING": 2, + "departLadderXVel": 2, + "departLadderYVel": 1, + "JUMPING": 6, + "jumpButtonReleased": 7, + "jumpTime": 8, + "IN_AIR": 5, + "gravityIntensity": 2, + "yVel": 20, + "RUNNING": 3, + "jumps": 3, + "//playSound": 1, + "global.sndLand": 1, + "grav": 22, + "global.hasGloves": 3, + "hangCount": 14, + "*": 18, + "yVel*0.3": 1, + "oWeb": 2, + "obj": 14, + "instance_place": 3, + "obj.life": 1, + "initialJumpAcc": 6, + "xVel/2": 3, + "gravNorm": 7, + "global.hasCape": 1, + "jetpackFuel": 2, + "fallTimer": 2, + "global.hasJordans": 1, + "yAccLimit": 2, + "global.hasSpringShoes": 1, + "global.sndJump": 1, + "jumpTimeTotal": 2, + "//let": 1, + "character": 20, + "continue": 4, + "to": 62, + "jump": 1, + "jumpTime/jumpTimeTotal": 1, + "looking": 2, + "UP": 1, + "LOOKING_UP": 4, + "oSolid": 14, + "move_snap": 6, + "oTree": 4, + "oArrow": 5, + "instance_nearest": 1, + "obj.stuck": 1, + "//the": 2, + "can": 1, + "t": 23, + "want": 1, + "use": 4, + "because": 2, + "is": 9, + "too": 2, + "high": 1, + "yPrevHigh": 1, + "//": 11, + "we": 5, + "ll": 1, + "move": 2, + "correct": 1, + "distance": 1, + "but": 2, + "need": 1, + "shorten": 1, + "out": 4, + "a": 55, + "little": 1, + "ratio": 1, + "xVelInteger": 2, + "/dist*0.9": 1, + "//can": 1, + "be": 4, + "changed": 1, + "moveTo": 2, + "round": 6, + "xVelInteger*ratio": 1, + "yVelInteger*ratio": 1, + "slopeChangeInY": 1, + "maxDownSlope": 1, + "floating": 1, + "just": 1, + "above": 1, + "slope": 1, + "so": 2, + "down": 1, + "upYPrev": 1, + "for": 26, + "<=upYPrev+maxDownSlope;y+=1)>": 1, + "hit": 1, + "solid": 1, + "below": 1, + "upYPrev=": 1, + "I": 1, + "know": 1, + "that": 2, + "this": 2, + "doesn": 1, + "seem": 1, + "make": 1, + "sense": 1, + "of": 25, + "name": 9, + "variable": 1, + "it": 6, + "all": 3, + "works": 1, + "correctly": 1, + "after": 1, + "break": 58, + "loop": 1, + "y=": 1, + "figures": 1, + "what": 1, + "index": 11, + "should": 25, + "characterSprite": 1, + "sets": 1, + "previous": 2, + "previously": 1, + "statePrevPrev": 1, + "statePrev": 2, + "calculates": 1, + "image_speed": 9, + "based": 1, + "on": 4, + "s": 6, + "velocity": 1, + "runAnimSpeed": 1, + "0": 21, + "1": 32, + "sqrt": 1, + "sqr": 2, + "climbAnimSpeed": 1, + "<=>": 3, + "4": 2, + "setCollisionBounds": 3, + "8": 9, + "5": 5, + "DUCKTOHANG": 1, + "image_index": 1, + "limit": 5, + "at": 23, + "animation": 1, + "always": 1, + "looks": 1, + "good": 1, + "var": 79, + "i": 95, + "playerObject": 1, + "playerID": 1, + "player": 36, + "otherPlayerID": 1, + "otherPlayer": 1, + "sameVersion": 1, + "buffer": 1, + "plugins": 4, + "pluginsRequired": 2, + "usePlugins": 1, + "tcp_eof": 3, + "global.serverSocket": 10, + "gotServerHello": 2, + "show_message": 7, + "instance_destroy": 7, + "exit": 10, + "room": 1, + "DownloadRoom": 1, + "keyboard_check": 1, + "vk_escape": 1, + "downloadingMap": 2, + "while": 15, + "tcp_receive": 3, + "min": 4, + "downloadMapBytes": 2, + "buffer_size": 2, + "downloadMapBuffer": 6, + "write_buffer": 2, + "write_buffer_to_file": 1, + "downloadMapName": 3, + "buffer_destroy": 8, + "roomchange": 2, + "do": 1, + "switch": 9, + "read_ubyte": 10, + "case": 50, + "HELLO": 1, + "global.joinedServerName": 2, + "receivestring": 4, + "advertisedMapMd5": 1, + "receiveCompleteMessage": 1, + "global.tempBuffer": 3, + "string_pos": 20, + "Server": 3, + "sent": 7, + "illegal": 2, + "map": 47, + "This": 2, + "server": 10, + "requires": 1, + "following": 2, + "play": 2, + "#": 3, + "suggests": 1, + "optional": 1, + "Error": 2, + "ocurred": 1, + "loading": 1, + "plugins.": 1, + "Maps/": 2, + ".png": 2, + "The": 6, + "version": 4, + "Enter": 1, + "Password": 1, + "Incorrect": 1, + "Password.": 1, + "Incompatible": 1, + "protocol": 3, + "version.": 1, + "Name": 1, + "Exploit": 1, + "Invalid": 2, + "plugin": 6, + "packet": 3, + "ID": 2, + "There": 1, + "are": 1, + "many": 1, + "connections": 1, + "from": 5, + "your": 1, + "IP": 1, + "You": 1, + "have": 2, + "been": 1, + "kicked": 1, + "server.": 1, + ".": 12, + "#Server": 1, + "went": 1, + "invalid": 1, + "internal": 1, + "#Exiting.": 1, + "full.": 1, + "noone": 7, + "ERROR": 1, + "when": 1, + "reading": 1, + "no": 1, + "such": 1, + "unexpected": 1, + "data.": 1, + "until": 1, + "downloadHandle": 3, + "url": 62, + "tmpfile": 3, + "window_oldshowborder": 2, + "window_oldfullscreen": 2, + "timeLeft": 1, + "counter": 1, + "AudioControlPlaySong": 1, + "window_get_showborder": 1, + "window_get_fullscreen": 1, + "window_set_fullscreen": 2, + "window_set_showborder": 1, + "global.updaterBetaChannel": 3, + "UPDATE_SOURCE_BETA": 1, + "UPDATE_SOURCE": 1, + "temp_directory": 1, + "httpGet": 1, + "httpRequestStatus": 1, + "download": 1, + "isn": 1, + "extract": 1, + "downloaded": 1, + "file": 2, + "now.": 1, + "extractzip": 1, + "working_directory": 6, + "execute_program": 1, + "game_end": 1, + "victim": 10, + "killer": 11, + "assistant": 16, + "damageSource": 18, + "argument0": 28, + "argument1": 10, + "argument2": 3, + "argument3": 1, + "//*************************************": 6, + "//*": 3, + "Scoring": 1, + "Kill": 1, + "log": 1, + "recordKillInLog": 1, + "victim.stats": 1, + "DEATHS": 1, + "WEAPON_KNIFE": 1, + "||": 16, + "WEAPON_BACKSTAB": 1, + "killer.stats": 8, + "STABS": 2, + "killer.roundStats": 8, + "POINTS": 10, + "victim.object.currentWeapon.object_index": 1, + "Medigun": 2, + "victim.object.currentWeapon.uberReady": 1, + "BONUS": 2, + "KILLS": 2, + "victim.object.intel": 1, + "DEFENSES": 2, + "recordEventInLog": 1, + "killer.team": 1, + "killer.name": 2, + "global.myself": 4, + "assistant.stats": 2, + "ASSISTS": 2, + "assistant.roundStats": 2, + ".5": 2, + "//SPEC": 1, + "instance_create": 20, + "victim.object.x": 3, + "victim.object.y": 3, + "Spectator": 1, + "Gibbing": 2, + "xoffset": 5, + "yoffset": 5, + "xsize": 3, + "ysize": 3, + "view_xview": 3, + "view_yview": 3, + "view_wview": 2, + "view_hview": 2, + "randomize": 1, + "with": 47, + "victim.object": 2, + "WEAPON_ROCKETLAUNCHER": 1, + "WEAPON_MINEGUN": 1, + "FRAG_BOX": 2, + "WEAPON_REFLECTED_STICKY": 1, + "WEAPON_REFLECTED_ROCKET": 1, + "FINISHED_OFF_GIB": 2, + "GENERATOR_EXPLOSION": 2, + "player.class": 15, + "CLASS_QUOTE": 3, + "global.gibLevel": 14, + "distance_to_point": 3, + "xsize/2": 2, + "ysize/2": 2, + "hasReward": 4, + "repeat": 7, + "createGib": 14, + "PumpkinGib": 1, + "hspeed": 14, + "vspeed": 13, + "random": 21, + "choose": 8, + "Gib": 1, + "player.team": 8, + "TEAM_BLUE": 6, + "BlueClump": 1, + "TEAM_RED": 8, + "RedClump": 1, + "blood": 2, + "BloodDrop": 1, + "blood.hspeed": 1, + "blood.vspeed": 1, + "blood.sprite_index": 1, + "PumpkinJuiceS": 1, + "//All": 1, + "Classes": 1, + "gib": 1, + "head": 1, + "hands": 2, + "feet": 1, + "Headgib": 1, + "//Medic": 1, + "has": 2, + "specially": 1, + "colored": 1, + "CLASS_MEDIC": 2, + "Hand": 3, + "Feet": 1, + "//Class": 1, + "specific": 1, + "gibs": 1, + "CLASS_PYRO": 2, + "Accesory": 5, + "CLASS_SOLDIER": 2, + "CLASS_ENGINEER": 3, + "CLASS_SNIPER": 3, + "playsound": 2, + "deadbody": 2, + "DeathSnd1": 1, + "DeathSnd2": 1, + "DeadGuy": 1, + "deadbody.sprite_index": 2, + "haxxyStatue": 1, + "deadbody.image_index": 2, + "CHARACTER_ANIMATION_DEAD": 1, + "deadbody.hspeed": 1, + "deadbody.vspeed": 1, + "deadbody.image_xscale": 1, + "global.gg_birthday": 1, + "myHat": 2, + "PartyHat": 1, + "myHat.image_index": 2, + "victim.team": 2, + "global.xmas": 1, + "XmasHat": 1, + "Deathcam": 1, + "global.killCam": 3, + "KILL_BOX": 1, + "FINISHED_OFF": 5, + "DeathCam": 1, + "DeathCam.killedby": 1, + "DeathCam.name": 1, + "DeathCam.oldxview": 1, + "DeathCam.oldyview": 1, + "DeathCam.lastDamageSource": 1, + "DeathCam.team": 1, + "global.myself.team": 3, + "xr": 19, + "yr": 19, + "cloakAlpha": 1, + "team": 13, + "canCloak": 1, + "cloakAlpha/2": 1, + "invisible": 1, + "stabbing": 2, + "power": 1, + "currentWeapon.stab.alpha": 1, + "&&": 6, + "global.showHealthBar": 3, + "draw_set_alpha": 3, + "draw_healthbar": 1, + "hp*100/maxHp": 1, + "c_black": 1, + "c_red": 3, + "c_green": 1, + "mouse_x": 1, + "mouse_y": 1, + "<25)>": 1, + "cloak": 2, + "global": 8, + "myself": 2, + "draw_set_halign": 1, + "fa_center": 1, + "draw_set_valign": 1, + "fa_bottom": 1, + "team=": 1, + "draw_set_color": 2, + "c_blue": 2, + "draw_text": 4, + "35": 1, + "showTeammateStats": 1, + "weapons": 3, + "50": 3, + "Superburst": 1, + "string": 13, + "currentWeapon": 2, + "uberCharge": 1, + "20": 1, + "Shotgun": 1, + "Nuts": 1, + "N": 1, + "Bolts": 1, + "nutsNBolts": 1, + "Minegun": 1, + "Lobbed": 1, + "Mines": 1, + "lobbed": 1, + "ubercolour": 6, + "overlaySprite": 6, + "zoomed": 1, + "SniperCrouchRedS": 1, + "SniperCrouchBlueS": 1, + "sniperCrouchOverlay": 1, + "overlay": 1, + "omnomnomnom": 2, + "draw_sprite_ext_overlay": 7, + "omnomnomnomSprite": 2, + "omnomnomnomOverlay": 2, + "omnomnomnomindex": 4, + "c_white": 13, + "ubered": 7, + "7": 4, + "taunting": 2, + "tauntsprite": 2, + "tauntOverlay": 2, + "tauntindex": 2, + "humiliated": 1, + "humiliationPoses": 1, + "animationImage": 9, + "humiliationOffset": 1, + "animationOffset": 6, + "burnDuration": 2, + "burnIntensity": 2, + "numFlames": 1, + "maxIntensity": 1, + "FlameS": 1, + "flameArray_x": 1, + "flameArray_y": 1, + "maxDuration": 1, + "demon": 4, + "demonX": 5, + "median": 2, + "demonY": 4, + "demonOffset": 4, + "demonDir": 2, + "dir": 3, + "demonFrame": 5, + "sprite_get_number": 1, + "*player.team": 2, + "dir*1": 2, + "#define": 26, + "__http_init": 3, + "global.__HttpClient": 4, + "object_add": 1, + "object_set_persistent": 1, + "__http_split": 3, + "text": 19, + "delimeter": 7, + "list": 36, + "count": 4, + "ds_list_create": 5, + "ds_list_add": 23, + "string_copy": 32, + "string_length": 25, + "return": 56, + "__http_parse_url": 4, + "ds_map_create": 4, + "ds_map_add": 15, + "colonPos": 22, + "string_char_at": 13, + "slashPos": 13, + "real": 14, + "queryPos": 12, + "ds_map_destroy": 6, + "__http_resolve_url": 2, + "baseUrl": 3, + "refUrl": 18, + "urlParts": 15, + "refUrlParts": 5, + "canParseRefUrl": 3, + "result": 11, + "ds_map_find_value": 22, + "__http_resolve_path": 3, + "ds_map_replace": 3, + "ds_map_exists": 11, + "ds_map_delete": 1, + "path": 10, + "query": 4, + "relUrl": 1, + "__http_construct_url": 2, + "basePath": 4, + "refPath": 7, + "parts": 29, + "refParts": 5, + "lastPart": 3, + "ds_list_find_value": 9, + "ds_list_size": 11, + "ds_list_delete": 5, + "ds_list_destroy": 4, + "part": 6, + "ds_list_replace": 3, + "__http_parse_hex": 2, + "hexString": 4, + "hexValues": 3, + "digit": 4, + "__http_prepare_request": 4, + "client": 33, + "headers": 11, + "parsed": 18, + "show_error": 2, + "destroyed": 3, + "CR": 10, + "chr": 3, + "LF": 5, + "CRLF": 17, + "socket": 40, + "tcp_connect": 1, + "errored": 19, + "error": 18, + "linebuf": 33, + "line": 19, + "statusCode": 6, + "reasonPhrase": 2, + "responseBody": 19, + "buffer_create": 7, + "responseBodySize": 5, + "responseBodyProgress": 5, + "responseHeaders": 9, + "requestUrl": 2, + "requestHeaders": 2, + "write_string": 9, + "key": 17, + "ds_map_find_first": 1, + "is_string": 2, + "ds_map_find_next": 1, + "socket_send": 1, + "__http_parse_header": 3, + "ord": 16, + "headerValue": 9, + "string_lower": 3, + "headerName": 4, + "__http_client_step": 2, + "socket_has_error": 1, + "socket_error": 1, + "__http_client_destroy": 20, + "available": 7, + "tcp_receive_available": 1, + "bytesRead": 6, + "c": 20, + "read_string": 9, + "Reached": 2, + "end": 11, + "HTTP": 1, + "defines": 1, + "sequence": 2, + "as": 1, + "marker": 1, + "elements": 1, + "except": 2, + "entity": 1, + "body": 2, + "see": 1, + "appendix": 1, + "19": 1, + "3": 1, + "tolerant": 1, + "applications": 1, + "Strip": 1, + "trailing": 1, + "First": 1, + "status": 2, + "code": 2, + "first": 3, + "Response": 1, + "message": 1, + "Status": 1, + "Line": 1, + "consisting": 1, + "followed": 1, + "by": 5, + "numeric": 1, + "its": 1, + "associated": 1, + "textual": 1, + "phrase": 1, + "each": 18, + "element": 8, + "separated": 1, + "SP": 1, + "characters": 3, + "No": 3, + "allowed": 1, + "in": 21, + "final": 1, + "httpVer": 2, + "spacePos": 11, + "space": 4, + "response": 5, + "second": 2, + "Other": 1, + "Blank": 1, + "write": 1, + "remainder": 1, + "write_buffer_part": 3, + "Header": 1, + "Receiving": 1, + "transfer": 6, + "encoding": 2, + "chunked": 4, + "Chunked": 1, + "let": 1, + "decode": 36, + "actualResponseBody": 8, + "actualResponseSize": 1, + "actualResponseBodySize": 3, + "Parse": 1, + "chunks": 1, + "chunk": 12, + "size": 7, + "extension": 3, + "data": 4, + "HEX": 1, + "buffer_bytes_left": 6, + "chunkSize": 11, + "Read": 1, + "byte": 2, + "We": 1, + "found": 21, + "semicolon": 1, + "beginning": 1, + "skip": 1, + "stuff": 2, + "header": 2, + "Doesn": 1, + "did": 1, + "empty": 13, + "something": 1, + "up": 6, + "Parsing": 1, + "failed": 56, + "hex": 2, + "was": 1, + "hexadecimal": 1, + "Is": 1, + "bigger": 2, + "than": 1, + "remaining": 1, + "2": 2, + "responseHaders": 1, + "location": 4, + "resolved": 5, + "socket_destroy": 4, + "http_new_get": 1, + "variable_global_exists": 2, + "http_new_get_ex": 1, + "http_step": 1, + "client.errored": 3, + "client.state": 3, + "http_status_code": 1, + "client.statusCode": 1, + "http_reason_phrase": 1, + "client.error": 1, + "client.reasonPhrase": 1, + "http_response_body": 1, + "client.responseBody": 1, + "http_response_body_size": 1, + "client.responseBodySize": 1, + "http_response_body_progress": 1, + "client.responseBodyProgress": 1, + "http_response_headers": 1, + "client.responseHeaders": 1, + "http_destroy": 1, + "RoomChangeObserver": 1, + "set_little_endian_global": 1, + "file_exists": 5, + "file_delete": 3, + "backupFilename": 5, + "file_find_first": 1, + "file_find_next": 1, + "file_find_close": 1, + "customMapRotationFile": 7, + "restart": 4, + "//import": 1, + "wav": 1, + "files": 1, + "music": 1, + "global.MenuMusic": 3, + "sound_add": 3, + "global.IngameMusic": 3, + "global.FaucetMusic": 3, + "sound_volume": 3, + "global.sendBuffer": 19, + "global.HudCheck": 1, + "global.map_rotation": 19, + "global.CustomMapCollisionSprite": 1, + "window_set_region_scale": 1, + "ini_open": 2, + "global.playerName": 7, + "ini_read_string": 12, + "string_count": 2, + "MAX_PLAYERNAME_LENGTH": 2, + "global.fullscreen": 3, + "ini_read_real": 65, + "global.useLobbyServer": 2, + "global.hostingPort": 2, + "global.music": 2, + "MUSIC_BOTH": 1, + "global.playerLimit": 4, + "//thy": 1, + "playerlimit": 1, + "shalt": 1, + "exceed": 1, + "global.dedicatedMode": 7, + "ini_write_real": 60, + "global.multiClientLimit": 2, + "global.particles": 2, + "PARTICLES_NORMAL": 1, + "global.monitorSync": 3, + "set_synchronization": 2, + "global.medicRadar": 2, + "global.showHealer": 2, + "global.showHealing": 2, + "global.showTeammateStats": 2, + "global.serverPluginsPrompt": 2, + "global.restartPrompt": 2, + "//user": 1, + "HUD": 1, + "settings": 1, + "global.timerPos": 2, + "global.killLogPos": 2, + "global.kothHudPos": 2, + "global.clientPassword": 1, + "global.shuffleRotation": 2, + "global.timeLimitMins": 2, + "max": 2, + "global.serverPassword": 2, + "global.mapRotationFile": 1, + "global.serverName": 2, + "global.welcomeMessage": 2, + "global.caplimit": 3, + "global.caplimitBkup": 1, + "global.autobalance": 2, + "global.Server_RespawntimeSec": 4, + "global.rewardKey": 1, + "unhex": 1, + "global.rewardId": 1, + "global.mapdownloadLimitBps": 2, + "isBetaVersion": 1, + "global.attemptPortForward": 2, + "global.serverPluginList": 3, + "global.serverPluginsRequired": 2, + "CrosshairFilename": 5, + "CrosshairRemoveBG": 4, + "global.queueJumping": 2, + "global.backgroundHash": 2, + "global.backgroundTitle": 2, + "global.backgroundURL": 2, + "global.backgroundShowVersion": 2, + "readClasslimitsFromIni": 1, + "global.currentMapArea": 1, + "global.totalMapAreas": 1, + "global.setupTimer": 1, + "global.serverPluginsInUse": 1, + "global.pluginPacketBuffers": 1, + "global.pluginPacketPlayers": 1, + "ini_write_string": 10, + "ini_key_delete": 1, + "global.classlimits": 10, + "CLASS_SCOUT": 1, + "CLASS_HEAVY": 2, + "CLASS_DEMOMAN": 1, + "CLASS_SPY": 1, + "//screw": 1, + "will": 1, + "start": 1, + "//map_truefort": 1, + "maps": 37, + "//map_2dfort": 1, + "//map_conflict": 1, + "//map_classicwell": 1, + "//map_waterway": 1, + "//map_orange": 1, + "//map_dirtbowl": 1, + "//map_egypt": 1, + "//arena_montane": 1, + "//arena_lumberyard": 1, + "//gen_destroy": 1, + "//koth_valley": 1, + "//koth_corinth": 1, + "//koth_harvest": 1, + "//dkoth_atalia": 1, + "//dkoth_sixties": 1, + "//Server": 1, + "respawn": 1, + "time": 1, + "calculator.": 1, + "Converts": 1, + "frame.": 1, + "read": 1, + "multiply": 1, + "hehe": 1, + "global.Server_Respawntime": 3, + "global.mapchanging": 1, + "ini_close": 2, + "global.protocolUuid": 2, + "parseUuid": 2, + "PROTOCOL_UUID": 1, + "global.gg2lobbyId": 2, + "GG2_LOBBY_UUID": 1, + "initRewards": 1, + "IPRaw": 3, + "portRaw": 3, + "doubleCheck": 8, + "global.launchMap": 5, + "parameter_count": 1, + "parameter_string": 8, + "global.serverPort": 1, + "global.serverIP": 1, + "global.isHost": 1, + "Client": 1, + "global.customMapdesginated": 2, + "fileHandle": 6, + "mapname": 9, + "file_text_open_read": 1, + "file_text_eof": 1, + "file_text_read_string": 1, + "starts": 1, + "tab": 2, + "string_delete": 1, + "delete": 1, + "comment": 1, + "starting": 1, + "file_text_readln": 1, + "file_text_close": 1, + "load": 1, + "ini": 1, + "Maps": 9, + "section": 1, + "//Set": 1, + "rotation": 1, + "sort_list": 7, + "*maps": 1, + "ds_list_sort": 1, + "mod": 1, + "global.gg2Font": 2, + "font_add_sprite": 2, + "gg2FontS": 1, + "global.countFont": 1, + "countFontS": 1, + "draw_set_font": 1, + "cursor_sprite": 1, + "CrosshairS": 5, + "directory_exists": 2, + "directory_create": 2, + "AudioControl": 1, + "SSControl": 1, + "message_background": 1, + "popupBackgroundB": 1, + "message_button": 1, + "popupButtonS": 1, + "message_text_font": 1, + "message_button_font": 1, + "message_input_font": 1, + "//Key": 1, + "Mapping": 1, + "global.jump": 1, + "global.down": 1, + "global.left": 1, + "global.right": 1, + "global.attack": 1, + "MOUSE_LEFT": 1, + "global.special": 1, + "MOUSE_RIGHT": 1, + "global.taunt": 1, + "global.chat1": 1, + "global.chat2": 1, + "global.chat3": 1, + "global.medic": 1, + "global.drop": 1, + "global.changeTeam": 1, + "global.changeClass": 1, + "global.showScores": 1, + "vk_shift": 1, + "calculateMonthAndDay": 1, + "loadplugins": 1, + "registry_set_root": 1, + "HKLM": 1, + "global.NTKernelVersion": 1, + "registry_read_string_ext": 1, + "CurrentVersion": 1, + "SIC": 1, + "sprite_replace": 1, + "sprite_set_offset": 1, + "sprite_get_width": 1, + "/2": 2, + "sprite_get_height": 1, + "AudioControlToggleMute": 1, + "room_goto_fix": 2, + "Menu": 2, + "__jso_gmt_tuple": 1, + "//Position": 1, + "address": 1, + "table": 1, + "pos": 2, + "addr_table": 2, + "*argument_count": 1, + "//Build": 1, + "tuple": 1, + "ca": 1, + "isstr": 1, + "datastr": 1, + "argument_count": 1, + "//Check": 1, + "argument": 10, + "Unexpected": 18, + "position": 16, + "f": 5, + "JSON": 5, + "string.": 5, + "Cannot": 5, + "parse": 3, + "boolean": 3, + "value": 13, + "expecting": 9, + "digit.": 9, + "e": 4, + "E": 4, + "dot": 1, + "an": 24, + "integer": 6, + "Expected": 6, + "least": 6, + "arguments": 26, + "got": 6, + "find": 10, + "lookup.": 4, + "indices": 1, + "nested": 27, + "lists": 6, + "Index": 1, + "overflow": 4, + "Recursive": 1, + "abcdef": 1, + "number": 7, + "num": 1, + "assert_true": 1, + "_assert_error_popup": 2, + "string_repeat": 2, + "_assert_newline": 2, + "assert_false": 1, + "assert_equal": 1, + "//Safe": 1, + "equality": 1, + "check": 1, + "won": 1, + "support": 1, + "instead": 1, + "_assert_debug_value": 1, + "//String": 1, + "os_browser": 1, + "browser_not_a_browser": 1, + "string_replace_all": 1, + "//Numeric": 1, + "GMTuple": 1, + "jso_encode_string": 1, + "encode": 8, + "escape": 2, + "jso_encode_map": 4, + "one": 42, + "key1": 3, + "key2": 3, + "multi": 7, + "jso_encode_list": 3, + "three": 36, + "_jso_decode_string": 5, + "small": 1, + "quick": 2, + "brown": 2, + "fox": 2, + "over": 2, + "lazy": 2, + "dog.": 2, + "simple": 1, + "Waahoo": 1, + "negg": 1, + "mixed": 1, + "_jso_decode_boolean": 2, + "_jso_decode_real": 11, + "standard": 1, + "zero": 4, + "signed": 2, + "decimal": 1, + "digits": 1, + "positive": 7, + "negative": 7, + "exponent": 4, + "_jso_decode_integer": 3, + "_jso_decode_map": 14, + "didn": 14, + "include": 14, + "right": 14, + "prefix": 14, + "#1": 14, + "#2": 14, + "entry": 29, + "pi": 2, + "bool": 2, + "waahoo": 10, + "woohah": 8, + "mix": 4, + "_jso_decode_list": 14, + "woo": 2, + "Empty": 4, + "equal": 20, + "other.": 12, + "junk": 2, + "info": 1, + "taxi": 1, + "An": 4, + "filled": 4, + "map.": 2, + "A": 24, + "B": 18, + "C": 8, + "same": 6, + "content": 4, + "entered": 4, + "different": 12, + "orders": 4, + "D": 1, + "keys": 2, + "values": 4, + "six": 1, + "corresponding": 4, + "types": 4, + "other": 4, + "crash.": 4, + "list.": 2, + "Lists": 4, + "two": 16, + "entries": 2, + "also": 2, + "jso_map_check": 9, + "existing": 9, + "single": 11, + "jso_map_lookup": 3, + "wrong": 10, + "trap": 2, + "jso_map_lookup_type": 3, + "type": 8, + "four": 21, + "inexistent": 11, + "multiple": 20, + "jso_list_check": 8, + "jso_list_lookup": 3, + "jso_list_lookup_type": 3, + "inner": 1, + "indexing": 1, + "bad": 1, + "jso_cleanup_map": 1, + "one_map": 1, + "hashList": 5, + "pluginname": 9, + "pluginhash": 4, + "realhash": 1, + "handle": 1, + "filesize": 1, + "progress": 1, + "tempfile": 1, + "tempdir": 1, + "lastContact": 2, + "isCached": 2, + "isDebug": 2, + "split": 1, + "checkpluginname": 1, + "ds_list_find_index": 1, + ".zip": 3, + "ServerPluginsCache": 6, + "@": 5, + ".zip.tmp": 1, + ".tmp": 2, + "ServerPluginsDebug": 1, + "Warning": 2, + "being": 2, + "loaded": 2, + "ServerPluginsDebug.": 2, + "Make": 2, + "sure": 2, + "clients": 1, + "they": 1, + "may": 2, + "unable": 2, + "connect.": 2, + "you": 1, + "Downloading": 1, + "last_plugin.log": 2, + "plugin.gml": 1, + "playerId": 11, + "commandLimitRemaining": 4, + "variable_local_exists": 4, + "commandReceiveState": 1, + "commandReceiveExpectedBytes": 1, + "commandReceiveCommand": 1, + "player.socket": 12, + "player.commandReceiveExpectedBytes": 7, + "player.commandReceiveState": 7, + "player.commandReceiveCommand": 4, + "commandBytes": 2, + "commandBytesInvalidCommand": 1, + "commandBytesPrefixLength1": 1, + "commandBytesPrefixLength2": 1, + "default": 1, + "read_ushort": 2, + "PLAYER_LEAVE": 1, + "PLAYER_CHANGECLASS": 1, + "class": 8, + "getCharacterObject": 2, + "player.object": 12, + "SpawnRoom": 2, + "lastDamageDealer": 8, + "sendEventPlayerDeath": 4, + "BID_FAREWELL": 4, + "doEventPlayerDeath": 4, + "secondToLastDamageDealer": 2, + "lastDamageDealer.object": 2, + "lastDamageDealer.object.healer": 4, + "player.alarm": 4, + "<=0)>": 1, + "checkClasslimits": 2, + "ServerPlayerChangeclass": 2, + "sendBuffer": 1, + "PLAYER_CHANGETEAM": 1, + "newTeam": 7, + "balance": 5, + "redSuperiority": 6, + "calculate": 1, + "which": 1, + "Player": 1, + "TEAM_SPECTATOR": 1, + "newClass": 4, + "ServerPlayerChangeteam": 1, + "ServerBalanceTeams": 1, + "CHAT_BUBBLE": 2, + "bubbleImage": 5, + "global.aFirst": 1, + "write_ubyte": 20, + "setChatBubble": 1, + "BUILD_SENTRY": 2, + "collision_circle": 1, + "player.object.x": 3, + "player.object.y": 3, + "Sentry": 1, + "player.object.nutsNBolts": 1, + "player.sentry": 2, + "player.object.onCabinet": 1, + "write_ushort": 2, + "global.serializeBuffer": 3, + "player.object.x*5": 1, + "player.object.y*5": 1, + "write_byte": 1, + "player.object.image_xscale": 2, + "buildSentry": 1, + "DESTROY_SENTRY": 1, + "DROP_INTEL": 1, + "player.object.intel": 1, + "sendEventDropIntel": 1, + "doEventDropIntel": 1, + "OMNOMNOMNOM": 2, + "player.humiliated": 1, + "player.object.taunting": 1, + "player.object.omnomnomnom": 1, + "player.object.canEat": 1, + "omnomnomnomend": 2, + "xscale": 1, + "TOGGLE_ZOOM": 2, + "toggleZoom": 1, + "PLAYER_CHANGENAME": 2, + "nameLength": 4, + "socket_receivebuffer_size": 3, + "KICK": 2, + "KICK_NAME": 1, + "current_time": 2, + "lastNamechange": 2, + "INPUTSTATE": 1, + "keyState": 1, + "netAimDirection": 1, + "aimDirection": 1, + "netAimDirection*360/65536": 1, + "event_user": 1, + "REWARD_REQUEST": 1, + "player.rewardId": 1, + "player.challenge": 2, + "rewardCreateChallenge": 1, + "REWARD_CHALLENGE_CODE": 1, + "write_binstring": 1, + "REWARD_CHALLENGE_RESPONSE": 1, + "answer": 3, + "authbuffer": 1, + "read_binstring": 1, + "rewardAuthStart": 1, + "challenge": 1, + "rewardId": 1, + "PLUGIN_PACKET": 1, + "packetID": 3, + "buf": 5, + "success": 3, + "_PluginPacketPush": 1, + "KICK_BAD_PLUGIN_PACKET": 1, + "CLIENT_SETTINGS": 2, + "mirror": 4, + "player.queueJump": 1, + "global.levelType": 22, + "//global.currLevel": 1, + "global.currLevel": 22, + "global.hadDarkLevel": 4, + "global.startRoomX": 1, + "global.startRoomY": 1, + "global.endRoomX": 1, + "global.endRoomY": 1, + "oGame.levelGen": 2, + "j": 14, + "global.roomPath": 1, + "k": 5, + "global.lake": 3, + "isLevel": 1, + "999": 2, + "levelType": 2, + "16": 14, + "656": 3, + "oDark": 2, + "invincible": 2, + "sDark": 1, + "oTemple": 2, + "cityOfGold": 1, + "sTemple": 2, + "lake": 1, + "i*16": 8, + "j*16": 6, + "oLush": 2, + "obj.sprite_index": 4, + "sLush": 2, + "obj.invincible": 3, + "oBrick": 1, + "sBrick": 1, + "global.cityOfGold": 2, + "*16": 2, + "//instance_create": 2, + "oSpikes": 1, + "background_index": 1, + "bgTemple": 1, + "global.temp1": 1, + "global.gameStart": 3, + "scrLevelGen": 1, + "global.cemetary": 3, + "rand": 10, + "global.probCemetary": 1, + "oRoom": 1, + "scrRoomGen": 1, + "global.blackMarket": 3, + "scrRoomGenMarket": 1, + "scrRoomGen2": 1, + "global.yetiLair": 2, + "scrRoomGenYeti": 1, + "scrRoomGen3": 1, + "scrRoomGen4": 1, + "scrRoomGen5": 1, + "global.darkLevel": 4, + "global.noDarkLevel": 1, + "global.probDarkLevel": 1, + "oPlayer1.x": 2, + "oPlayer1.y": 2, + "oFlare": 1, + "global.genUdjatEye": 4, + "global.madeUdjatEye": 1, + "global.genMarketEntrance": 4, + "global.madeMarketEntrance": 1, + "////////////////////////////": 2, + "global.temp2": 1, + "isRoom": 3, + "scrEntityGen": 1, + "oEntrance": 1, + "global.customLevel": 1, + "oEntrance.x": 1, + "oEntrance.y": 1, + "global.snakePit": 1, + "global.alienCraft": 1, + "global.sacrificePit": 1, + "oPlayer1": 1, + "scrSetupWalls": 3, + "global.graphicsHigh": 1, + "tile_add": 4, + "bgExtrasLush": 1, + "*rand": 12, + "bgExtrasIce": 1, + "bgExtrasTemple": 1, + "bgExtras": 1, + "global.murderer": 1, + "global.thiefLevel": 1, + "isRealLevel": 1, + "oExit": 1, + "oShopkeeper": 1, + "obj.status": 1, + "oTreasure": 1, + "oWater": 1, + "sWaterTop": 1, + "sLavaTop": 1, + "scrCheckWaterTop": 1, + "global.temp3": 1 + }, + "GAMS": { + "*Basic": 1, + "example": 2, + "of": 7, + "transport": 5, + "model": 6, + "from": 2, + "GAMS": 5, + "library": 3, + "Title": 1, + "A": 3, + "Transportation": 1, + "Problem": 1, + "(": 22, + "TRNSPORT": 1, + "SEQ": 1, + ")": 22, + "Ontext": 1, + "This": 2, + "problem": 1, + "finds": 1, + "a": 3, + "least": 1, + "cost": 4, + "shipping": 1, + "schedule": 1, + "that": 1, + "meets": 1, + "requirements": 1, + "at": 5, + "markets": 2, + "and": 2, + "supplies": 1, + "factories.": 1, + "Dantzig": 1, + "G": 1, + "B": 1, + "Chapter": 2, + "In": 2, + "Linear": 1, + "Programming": 1, + "Extensions.": 1, + "Princeton": 2, + "University": 1, + "Press": 2, + "New": 1, + "Jersey": 1, + "formulation": 1, + "is": 1, + "described": 1, + "in": 10, + "detail": 1, + "Rosenthal": 1, + "R": 1, + "E": 1, + "Tutorial.": 1, + "User": 1, + "s": 1, + "Guide.": 1, + "The": 2, + "Scientific": 1, + "Redwood": 1, + "City": 1, + "California": 1, + "line": 1, + "numbers": 1, + "will": 1, + "not": 1, + "match": 1, + "those": 1, + "the": 1, + "book": 1, + "because": 1, + "these": 1, + "comments.": 1, + "Offtext": 1, + "Sets": 1, + "i": 18, + "canning": 1, + "plants": 1, + "/": 9, + "seattle": 3, + "san": 3, + "-": 6, + "diego": 3, + "j": 18, + "new": 3, + "york": 3, + "chicago": 3, + "topeka": 3, + ";": 15, + "Parameters": 1, + "capacity": 1, + "plant": 2, + "cases": 3, + "b": 2, + "demand": 4, + "market": 2, + "Table": 1, + "d": 2, + "distance": 1, + "thousands": 3, + "miles": 2, + "Scalar": 1, + "f": 2, + "freight": 1, + "dollars": 3, + "per": 3, + "case": 2, + "thousand": 1, + "/90/": 1, + "Parameter": 1, + "c": 3, + "*": 1, + "Variables": 1, + "x": 4, + "shipment": 1, + "quantities": 1, + "z": 3, + "total": 1, + "transportation": 1, + "costs": 1, + "Positive": 1, + "Variable": 1, + "Equations": 1, + "define": 1, + "objective": 1, + "function": 1, + "supply": 3, + "observe": 1, + "limit": 1, + "satisfy": 1, + "..": 3, + "e": 1, + "sum": 3, + "*x": 1, + "l": 1, + "g": 1, + "Model": 1, + "/all/": 1, + "Solve": 1, + "using": 1, + "lp": 1, + "minimizing": 1, + "Display": 1, + "x.l": 1, + "x.m": 1, + "ontext": 1, + "#user": 1, + "stuff": 1, + "Main": 1, + "topic": 1, + "Basic": 2, + "Featured": 4, + "item": 4, + "Trnsport": 1, + "Description": 1, + "offtext": 1 + }, + "GAP": { + "#############################################################################": 63, + "##": 766, + "#W": 4, + "example.gd": 2, + "This": 10, + "file": 7, + "contains": 7, + "a": 113, + "sample": 2, + "of": 114, + "GAP": 15, + "declaration": 1, + "file.": 3, + "DeclareProperty": 2, + "(": 721, + "IsLeftModule": 6, + ")": 722, + ";": 569, + "DeclareGlobalFunction": 5, + "#C": 7, + "IsQuuxFrobnicator": 1, + "": 3, + "": 28, + "": 7, + "Name=": 33, + "Arg=": 33, + "Type=": 7, + "": 28, + "Tests": 1, + "whether": 5, + "R": 5, + "is": 72, + "quux": 1, + "frobnicator.": 1, + "": 28, + "": 28, + "DeclareSynonym": 17, + "IsField": 1, + "and": 102, + "IsGroup": 1, + "implementation": 1, + "#M": 20, + "SomeOperation": 1, + "": 2, + "performs": 1, + "some": 2, + "operation": 1, + "on": 5, + "InstallMethod": 18, + "SomeProperty": 1, + "[": 145, + "]": 169, + "function": 37, + "M": 7, + "if": 103, + "IsFreeLeftModule": 3, + "not": 49, + "IsTrivial": 1, + "then": 128, + "return": 41, + "true": 21, + "fi": 91, + "TryNextMethod": 7, + "end": 34, + "#F": 17, + "SomeGlobalFunction": 2, + "A": 9, + "global": 1, + "variadic": 1, + "funfion.": 1, + "InstallGlobalFunction": 5, + "arg": 16, + "Length": 14, + "+": 9, + "*": 12, + "elif": 21, + "-": 67, + "else": 25, + "Error": 7, + "#": 73, + "SomeFunc": 1, + "x": 14, + "y": 8, + "local": 16, + "z": 3, + "func": 3, + "tmp": 20, + "j": 3, + "mod": 2, + "List": 6, + "while": 5, + "do": 18, + "for": 53, + "in": 64, + "Print": 24, + "od": 15, + "repeat": 1, + "until": 1, + "<": 17, + "Magic.gd": 1, + "AutoDoc": 4, + "package": 10, + "Copyright": 6, + "Max": 2, + "Horn": 2, + "JLU": 2, + "Giessen": 2, + "Sebastian": 2, + "Gutsche": 2, + "University": 4, + "Kaiserslautern": 2, + "SHEBANG#!#! @Description": 1, + "SHEBANG#!#! This": 1, + "SHEBANG#!#! any": 1, + "SHEBANG#!#! ": 1, + "SHEBANG#!#! ": 5, + "SHEBANG#!#! It": 3, + "SHEBANG#!#! That": 1, + "SHEBANG#!#! of": 1, + "SHEBANG#!#! (with": 1, + "SHEBANG#!#! main": 1, + "SHEBANG#!#! XML": 1, + "SHEBANG#!#! other": 1, + "SHEBANG#!#! as": 1, + "SHEBANG#!#! to": 2, + "SHEBANG#!#! Secondly,": 1, + "SHEBANG#!#! page": 1, + "SHEBANG#!#! (name,": 1, + "SHEBANG#!#! on": 1, + "SHEBANG#!Item>": 25, + "SHEBANG#!#! tags": 1, + "SHEBANG#!#! This": 1, + "SHEBANG#!#! produce": 1, + "SHEBANG#!#! MathJaX": 1, + "SHEBANG#!#! generated": 1, + "SHEBANG#!#! this,": 1, + "SHEBANG#!#! supplementary": 1, + "SHEBANG#!#! (see": 1, + "SHEBANG#!Enum>": 1, + "SHEBANG#!#! For": 1, + "SHEBANG#!>": 11, + "SHEBANG#!#! The": 1, + "SHEBANG#!#! ": 1, + "SHEBANG#!Mark>": 22, + "SHEBANG#!#! The": 2, + "SHEBANG#!A>": 1, + "SHEBANG#!#! ": 1, + "SHEBANG#!#! ": 4, + "SHEBANG#!#! This": 4, + "SHEBANG#!#! Directory()": 1, + "SHEBANG#!#! (i.e.": 1, + "SHEBANG#!#! Default": 1, + "SHEBANG#!#! for": 1, + "SHEBANG#!#! The": 3, + "SHEBANG#!#! record.": 3, + "SHEBANG#!#! equivalent": 3, + "SHEBANG#!#! enabled.": 3, + "SHEBANG#!#! package's": 1, + "SHEBANG#!#! In": 3, + "SHEBANG#!K>),": 3, + "SHEBANG#!#! If": 3, + "####": 34, + "TODO": 3, + "mention": 1, + "merging": 1, + "with": 24, + "PackageInfo.AutoDoc": 1, + "SHEBANG#!#! ": 3, + "SHEBANG#!#! ": 13, + "SHEBANG#!#! A": 6, + "SHEBANG#!#! If": 2, + "SHEBANG#!#! your": 1, + "SHEBANG#!#! you": 1, + "SHEBANG#!#! to": 4, + "SHEBANG#!#! is": 1, + "SHEBANG#!#! of": 2, + "SHEBANG#!#! This": 3, + "SHEBANG#!#! i.e.": 1, + "SHEBANG#!#! The": 2, + "SHEBANG#!#! then": 1, + "The": 21, + "param": 1, + "bit": 2, + "strange.": 1, + "We": 4, + "should": 2, + "probably": 2, + "change": 1, + "it": 8, + "to": 37, + "be": 24, + "more": 3, + "general": 1, + "as": 23, + "one": 11, + "might": 1, + "want": 1, + "define": 2, + "other": 4, + "entities...": 1, + "For": 10, + "now": 1, + "we": 3, + "document": 1, + "leave": 1, + "us": 1, + "the": 136, + "choice": 1, + "revising": 1, + "how": 1, + "works.": 1, + "": 2, + "": 117, + "entities": 2, + "": 117, + "": 2, + "": 2, + "list": 16, + "names": 1, + "or": 13, + "which": 8, + "are": 14, + "used": 10, + "corresponding": 1, + "XML": 4, + "entities.": 1, + "example": 3, + "set": 6, + "containing": 1, + "string": 6, + "": 2, + "SomePackage": 3, + "": 2, + "following": 4, + "added": 1, + "preamble": 1, + "": 2, + "CDATA": 2, + "ENTITY": 2, + "": 2, + "allows": 1, + "you": 3, + "write": 3, + "&": 37, + "amp": 1, + "your": 1, + "documentation": 2, + "reference": 1, + "that": 39, + "package.": 2, + "If": 11, + "another": 1, + "type": 2, + "entity": 1, + "desired": 1, + "can": 12, + "simply": 2, + "add": 2, + "instead": 1, + "two": 13, + "entry": 2, + "list.": 2, + "It": 1, + "will": 5, + "handled": 3, + "so": 3, + "please": 1, + "careful.": 1, + "": 2, + "SHEBANG#!#! for": 1, + "SHEBANG#!#! statement": 1, + "SHEBANG#!#! components": 2, + "SHEBANG#!#! example,": 1, + "SHEBANG#!#! acknowledgements": 1, + "SHEBANG#!#! ": 6, + "SHEBANG#!#! by": 1, + "SHEBANG#!#! package": 1, + "SHEBANG#!#! Usually": 2, + "SHEBANG#!#! are": 2, + "SHEBANG#!#! Default": 3, + "SHEBANG#!#! When": 1, + "SHEBANG#!#! they": 1, + "Document": 1, + "section_intros": 2, + "later": 1, + "on.": 1, + "However": 2, + "note": 2, + "thanks": 1, + "new": 2, + "comment": 1, + "syntax": 1, + "only": 5, + "remaining": 1, + "use": 5, + "this": 15, + "seems": 1, + "ability": 1, + "specify": 3, + "order": 1, + "chapters": 1, + "sections.": 1, + "TODO.": 1, + "SHEBANG#!#! files": 1, + "Note": 3, + "strictly": 1, + "speaking": 1, + "also": 3, + "scaffold.": 1, + "uses": 2, + "scaffolding": 2, + "mechanism": 4, + "really": 4, + "necessary": 2, + "custom": 1, + "name": 2, + "main": 1, + "Thus": 3, + "purpose": 1, + "parameter": 1, + "cater": 1, + "packages": 5, + "have": 3, + "existing": 1, + "using": 2, + "different": 2, + "wish": 1, + "scaffolding.": 1, + "explain": 1, + "why": 2, + "allow": 1, + "specifying": 1, + "gapdoc.main.": 1, + "code": 1, + "still": 1, + "honor": 1, + "though": 1, + "just": 1, + "case.": 1, + "SHEBANG#!#! In": 1, + "maketest": 12, + "part.": 1, + "Still": 1, + "under": 1, + "construction.": 1, + "SHEBANG#!#! ": 1, + "SHEBANG#!#! The": 1, + "SHEBANG#!#! a": 1, + "SHEBANG#!#! which": 1, + "SHEBANG#!#! the": 1, + "SHEBANG#!#! ": 1, + "SHEBANG#!#! ": 2, + "SHEBANG#!#! Sets": 1, + "SHEBANG#!#! A": 1, + "SHEBANG#!#! will": 1, + "SHEBANG#!#! @Returns": 1, + "SHEBANG#!#! @Arguments": 1, + "SHEBANG#!#! @ChapterInfo": 1, + "Magic.gi": 1, + "BindGlobal": 7, + "str": 8, + "suffix": 3, + "n": 31, + "m": 8, + "{": 21, + "}": 21, + "i": 25, + "d": 16, + "IsDirectoryPath": 1, + "CreateDir": 2, + "currently": 1, + "undocumented": 1, + "fail": 18, + "LastSystemError": 1, + ".message": 1, + "false": 7, + "pkg": 32, + "subdirs": 2, + "extensions": 1, + "d_rel": 6, + "files": 4, + "result": 9, + "DirectoriesPackageLibrary": 2, + "IsEmpty": 6, + "continue": 3, + "Directory": 5, + "DirectoryContents": 1, + "Sort": 1, + "AUTODOC_GetSuffix": 2, + "IsReadableFile": 2, + "Filename": 8, + "Add": 4, + "Make": 1, + "callable": 1, + "package_name": 1, + "AutoDocWorksheet.": 1, + "Which": 1, + "create": 1, + "worksheet": 1, + "package_info": 3, + "opt": 3, + "scaffold": 12, + "gapdoc": 7, + "autodoc": 8, + "pkg_dir": 5, + "doc_dir": 18, + "doc_dir_rel": 3, + "title_page": 7, + "tree": 8, + "is_worksheet": 13, + "position_document_class": 7, + "gapdoc_latex_option_record": 4, + "LowercaseString": 3, + "rec": 20, + "DirectoryCurrent": 1, + "PackageInfo": 1, + "key": 3, + "val": 4, + "ValueOption": 1, + "opt.": 1, + "IsBound": 39, + "opt.dir": 4, + "IsString": 7, + "IsDirectory": 1, + "AUTODOC_CreateDirIfMissing": 1, + "opt.scaffold": 5, + "package_info.AutoDoc": 3, + "IsRecord": 7, + "IsBool": 4, + "AUTODOC_APPEND_RECORD_WRITEONCE": 3, + "AUTODOC_WriteOnce": 10, + "opt.autodoc": 5, + "Concatenation": 15, + "package_info.Dependencies.NeededOtherPackages": 1, + "package_info.Dependencies.SuggestedOtherPackages": 1, + "ForAny": 1, + "autodoc.files": 7, + "autodoc.scan_dirs": 5, + "autodoc.level": 3, + "PushOptions": 1, + "level_value": 1, + "Append": 2, + "AUTODOC_FindMatchingFiles": 2, + "opt.gapdoc": 5, + "opt.maketest": 4, + "gapdoc.main": 8, + "package_info.PackageDoc": 3, + ".BookName": 2, + "gapdoc.bookname": 4, + "#Print": 1, + "gapdoc.files": 9, + "gapdoc.scan_dirs": 3, + "Set": 1, + "Number": 1, + "ListWithIdenticalEntries": 1, + "f": 11, + "DocumentationTree": 1, + "autodoc.section_intros": 2, + "AUTODOC_PROCESS_INTRO_STRINGS": 1, + "Tree": 2, + "AutoDocScanFiles": 1, + "PackageName": 2, + "scaffold.TitlePage": 4, + "scaffold.TitlePage.Title": 2, + ".TitlePage.Title": 2, + "Position": 2, + "Remove": 2, + "JoinStringsWithSeparator": 1, + "ReplacedString": 2, + "Syntax": 1, + "scaffold.document_class": 7, + "PositionSublist": 5, + "GAPDoc2LaTeXProcs.Head": 14, + "..": 6, + "scaffold.latex_header_file": 2, + "StringFile": 2, + "scaffold.gapdoc_latex_options": 4, + "RecNames": 1, + "scaffold.gapdoc_latex_options.": 5, + "IsList": 1, + "scaffold.includes": 4, + "scaffold.bib": 7, + "Unbind": 1, + "scaffold.main_xml_file": 2, + ".TitlePage": 1, + "ExtractTitleInfoFromPackageInfo": 1, + "CreateTitlePage": 1, + "scaffold.MainPage": 2, + "scaffold.dir": 1, + "scaffold.book_name": 1, + "CreateMainPage": 1, + "WriteDocumentation": 1, + "SetGapDocLaTeXOptions": 1, + "MakeGAPDocDoc": 1, + "CopyHTMLStyleFiles": 1, + "GAPDocManualLab": 1, + "maketest.folder": 3, + "maketest.scan_dir": 3, + "CreateMakeTest": 1, + "PackageInfo.g": 2, + "cvec": 1, + "s": 4, + "template": 1, + "SetPackageInfo": 1, + "Subtitle": 1, + "Version": 1, + "Date": 1, + "dd/mm/yyyy": 1, + "format": 2, + "Information": 1, + "about": 3, + "authors": 1, + "maintainers.": 1, + "Persons": 1, + "LastName": 1, + "FirstNames": 1, + "IsAuthor": 1, + "IsMaintainer": 1, + "Email": 1, + "WWWHome": 1, + "PostalAddress": 1, + "Place": 1, + "Institution": 1, + "Status": 2, + "information.": 1, + "Currently": 1, + "cases": 2, + "recognized": 1, + "successfully": 2, + "refereed": 2, + "developers": 1, + "agreed": 1, + "distribute": 1, + "them": 1, + "core": 1, + "system": 1, + "development": 1, + "versions": 1, + "all": 18, + "You": 1, + "must": 6, + "provide": 2, + "next": 6, + "entries": 8, + "status": 1, + "because": 2, + "was": 1, + "#CommunicatedBy": 1, + "#AcceptDate": 1, + "PackageWWWHome": 1, + "README_URL": 1, + ".PackageWWWHome": 2, + "PackageInfoURL": 1, + "ArchiveURL": 1, + ".Version": 2, + "ArchiveFormats": 1, + "Here": 2, + "short": 1, + "abstract": 1, + "explaining": 1, + "content": 1, + "HTML": 1, + "overview": 1, + "Web": 1, + "page": 1, + "an": 17, + "URL": 1, + "Webpage": 1, + "detailed": 1, + "information": 1, + "than": 1, + "few": 1, + "lines": 1, + "less": 1, + "ok": 1, + "Please": 1, + "specifing": 1, + "names.": 1, + "AbstractHTML": 1, + "PackageDoc": 1, + "BookName": 1, + "ArchiveURLSubset": 1, + "HTMLStart": 1, + "PDFFile": 1, + "SixFile": 1, + "LongTitle": 1, + "Dependencies": 1, + "NeededOtherPackages": 1, + "SuggestedOtherPackages": 1, + "ExternalConditions": 1, + "AvailabilityTest": 1, + "SHOW_STAT": 1, + "DirectoriesPackagePrograms": 1, + "#Info": 1, + "InfoWarning": 1, + "*Optional*": 2, + "but": 1, + "recommended": 1, + "path": 1, + "relative": 1, + "root": 1, + "many": 1, + "tests": 1, + "functionality": 1, + "sensible.": 1, + "#TestFile": 1, + "keyword": 1, + "related": 1, + "topic": 1, + "Keywords": 1, + "vspc.gd": 1, + "library": 2, + "Thomas": 2, + "Breuer": 2, + "#Y": 6, + "C": 11, + "Lehrstuhl": 2, + "D": 36, + "r": 2, + "Mathematik": 2, + "RWTH": 2, + "Aachen": 2, + "Germany": 2, + "School": 2, + "Math": 2, + "Comp.": 2, + "Sci.": 2, + "St": 2, + "Andrews": 2, + "Scotland": 2, + "Group": 3, + "declares": 1, + "operations": 2, + "vector": 67, + "spaces.": 4, + "bases": 5, + "free": 3, + "left": 15, + "modules": 1, + "found": 1, + "": 10, + "lib/basis.gd": 1, + ".": 257, + "IsLeftOperatorRing": 1, + "IsLeftOperatorAdditiveGroup": 2, + "IsRing": 1, + "IsAssociativeLOpDProd": 2, + "#T": 6, + "IsLeftOperatorRingWithOne": 2, + "IsRingWithOne": 1, + "IsLeftVectorSpace": 3, + "": 38, + "IsVectorSpace": 26, + "<#GAPDoc>": 17, + "Label=": 19, + "": 12, + "space": 74, + "": 12, + "module": 2, + "see": 30, + "nbsp": 30, + "": 71, + "Func=": 40, + "over": 24, + "division": 15, + "ring": 14, + "Chapter": 3, + "Chap=": 3, + "

": 23, + "Whenever": 1, + "talk": 1, + "": 42, + "F": 61, + "": 41, + "V": 152, + "additive": 1, + "group": 2, + "acts": 1, + "via": 6, + "multiplication": 1, + "from": 5, + "such": 4, + "action": 4, + "addition": 1, + "right": 2, + "distributive.": 1, + "accessed": 1, + "value": 9, + "attribute": 2, + "Vector": 1, + "spaces": 15, + "always": 1, + "Filt=": 4, + "synonyms.": 1, + "<#/GAPDoc>": 17, + "IsLeftActedOnByDivisionRing": 4, + "InstallTrueMethod": 4, + "IsGaussianSpace": 10, + "": 14, + "filter": 3, + "Sect=": 6, + "row": 17, + "matrix": 5, + "field": 12, + "say": 1, + "indicates": 3, + "vectors": 16, + "matrices": 5, + "respectively": 1, + "contained": 4, + "In": 3, + "case": 2, + "called": 1, + "Gaussian": 19, + "space.": 5, + "Bases": 1, + "computed": 2, + "elimination": 5, + "given": 4, + "generators.": 1, + "": 12, + "": 12, + "gap": 41, + "mats": 5, + "VectorSpace": 13, + "Rationals": 13, + "E": 2, + "element": 2, + "extension": 3, + "Field": 1, + "": 12, + "DeclareFilter": 1, + "IsFullMatrixModule": 1, + "IsFullRowModule": 1, + "IsDivisionRing": 5, + "": 12, + "nontrivial": 1, + "associative": 1, + "algebra": 2, + "multiplicative": 1, + "inverse": 1, + "each": 2, + "nonzero": 3, + "element.": 1, + "every": 1, + "possibly": 1, + "itself": 1, + "being": 2, + "thus": 1, + "property": 2, + "get": 1, + "usually": 1, + "represented": 1, + "coefficients": 3, + "stored": 1, + "DeclareSynonymAttr": 4, + "IsMagmaWithInversesIfNonzero": 1, + "IsNonTrivial": 1, + "IsAssociative": 1, + "IsEuclideanRing": 1, + "#A": 7, + "GeneratorsOfLeftVectorSpace": 1, + "GeneratorsOfVectorSpace": 2, + "": 7, + "Attr=": 10, + "returns": 14, + "generate": 1, + "FullRowSpace": 5, + "GeneratorsOfLeftOperatorAdditiveGroup": 2, + "CanonicalBasis": 3, + "supports": 1, + "canonical": 6, + "basis": 14, + "otherwise": 2, + "": 3, + "": 3, + "returned.": 4, + "defining": 1, + "its": 2, + "uniquely": 1, + "determined": 1, + "by": 14, + "exist": 1, + "same": 6, + "acting": 8, + "domain": 17, + "equality": 1, + "these": 5, + "decided": 1, + "comparing": 1, + "bases.": 1, + "exact": 1, + "meaning": 1, + "depends": 1, + "Canonical": 1, + "defined": 3, + "designs": 1, + "kind": 1, + "defines": 1, + "method": 4, + "installs": 1, + "call": 1, + "On": 1, + "hand": 1, + "install": 1, + "calls": 1, + "": 10, + "CANONICAL_BASIS_FLAGS": 1, + "": 9, + "vecs": 4, + "B": 16, + "": 8, + "3": 5, + "generators": 16, + "BasisVectors": 4, + "DeclareAttribute": 4, + "IsRowSpace": 2, + "consists": 7, + "IsRowModule": 1, + "IsGaussianRowSpace": 1, + "scalars": 2, + "occur": 2, + "vectors.": 2, + "calculations.": 2, + "Otherwise": 3, + "non": 4, + "Gaussian.": 2, + "need": 3, + "flag": 2, + "down": 2, + "methods": 4, + "delegate": 2, + "ones.": 2, + "IsNonGaussianRowSpace": 1, + "expresses": 2, + "cannot": 2, + "compute": 3, + "nice": 4, + "way.": 2, + "Let": 4, + "K": 4, + "spanned": 4, + "Then": 1, + "/": 12, + "cap": 1, + "v": 5, + "replacing": 1, + "forming": 1, + "concatenation.": 1, + "So": 2, + "associated": 3, + "DeclareHandlingByNiceBasis": 2, + "IsMatrixSpace": 2, + "IsMatrixModule": 1, + "IsGaussianMatrixSpace": 1, + "IsNonGaussianMatrixSpace": 1, + "irrelevant": 1, + "concatenation": 1, + "rows": 1, + "necessarily": 1, + "NormedRowVectors": 2, + "normed": 1, + "finite": 5, + "those": 1, + "first": 1, + "component.": 1, + "yields": 1, + "natural": 1, + "dimensional": 5, + "subspaces": 17, + "GF": 22, + "*Z": 5, + "Z": 6, + "Action": 1, + "GL": 1, + "OnLines": 1, + "TrivialSubspace": 2, + "subspace": 7, + "zero": 4, + "triv": 2, + "0": 2, + "AsSet": 1, + "TrivialSubmodule": 1, + "": 5, + "": 2, + "collection": 3, + "gens": 16, + "elements": 7, + "optional": 3, + "argument": 1, + "empty.": 1, + "known": 5, + "linearly": 3, + "independent": 3, + "particular": 1, + "dimension": 9, + "immediately": 2, + "formed": 1, + "argument.": 1, + "2": 1, + "Subspace": 4, + "generated": 1, + "SubspaceNC": 2, + "subset": 4, + "empty": 1, + "trivial": 1, + "parent": 3, + "returned": 3, + "does": 1, + "except": 1, + "omits": 1, + "check": 5, + "both": 2, + "W": 32, + "1": 3, + "Submodule": 1, + "SubmoduleNC": 1, + "#O": 2, + "AsVectorSpace": 4, + "view": 4, + "": 2, + "domain.": 1, + "form": 2, + "Oper=": 6, + "smaller": 1, + "larger": 1, + "ring.": 3, + "Dimension": 6, + "LeftActingDomain": 29, + "9": 1, + "AsLeftModule": 6, + "AsSubspace": 5, + "": 6, + "U": 12, + "collection.": 1, + "/2": 4, + "Parent": 4, + "DeclareOperation": 2, + "IsCollection": 3, + "Intersection2Spaces": 4, + "": 2, + "": 2, + "": 2, + "takes": 1, + "arguments": 1, + "intersection": 5, + "domains": 3, + "let": 1, + "their": 1, + "intersection.": 1, + "AsStruct": 2, + "equal": 1, + "either": 2, + "Substruct": 1, + "common": 1, + "Struct": 1, + "basis.": 1, + "handle": 1, + "intersections": 1, + "algebras": 2, + "ideals": 2, + "sided": 1, + "ideals.": 1, + "": 2, + "": 2, + "nonnegative": 2, + "integer": 2, + "length": 1, + "An": 2, + "alternative": 2, + "construct": 2, + "above": 2, + "FullRowModule": 2, + "FullMatrixSpace": 2, + "": 1, + "positive": 1, + "integers": 1, + "fact": 1, + "FullMatrixModule": 3, + "IsSubspacesVectorSpace": 9, + "fixed": 1, + "lies": 1, + "category": 1, + "Subspaces": 8, + "Size": 5, + "iter": 17, + "Iterator": 5, + "NextIterator": 5, + "DeclareCategory": 1, + "IsDomain": 1, + "IsFinite": 4, + "Returns": 1, + "": 1, + "Called": 2, + "k": 17, + "Special": 1, + "provided": 1, + "domains.": 1, + "IsInt": 3, + "IsSubspace": 3, + "OrthogonalSpaceInFullRowSpace": 1, + "complement": 1, + "full": 2, + "#P": 1, + "IsVectorSpaceHomomorphism": 3, + "": 2, + "": 1, + "mapping": 2, + "homomorphism": 1, + "linear": 1, + "source": 2, + "range": 1, + "b": 8, + "hold": 1, + "IsGeneralMapping": 2, + "#E": 2, + "vspc.gi": 1, + "generic": 1, + "SetLeftActingDomain": 2, + "": 2, + "external": 1, + "knows": 1, + "e.g.": 1, + "tell": 1, + "InstallOtherMethod": 3, + "IsAttributeStoringRep": 2, + "IsLeftActedOnByRing": 2, + "IsObject": 1, + "extL": 2, + "HasIsDivisionRing": 1, + "SetIsLeftActedOnByDivisionRing": 1, + "IsExtLSet": 1, + "IsIdenticalObj": 5, + "difference": 1, + "between": 1, + "shall": 1, + "CallFuncList": 1, + "FreeLeftModule": 1, + "newC": 7, + "IsSubset": 4, + "SetParent": 1, + "UseIsomorphismRelation": 2, + "UseSubsetRelation": 4, + "View": 1, + "base": 5, + "gen": 5, + "loop": 2, + "newgens": 4, + "extended": 1, + "Characteristic": 2, + "Basis": 5, + "AsField": 2, + "GeneratorsOfLeftModule": 9, + "LeftModuleByGenerators": 5, + "Zero": 5, + "Intersection": 1, + "ViewObj": 4, + "print": 1, + "no.": 1, + "HasGeneratorsOfLeftModule": 2, + "HasDimension": 1, + "override": 1, + "PrintObj": 5, + "HasZero": 1, + "": 2, + "factor": 2, + "": 1, + "ImagesSource": 1, + "NaturalHomomorphismBySubspace": 1, + "AsStructure": 3, + "Substructure": 3, + "Structure": 2, + "inters": 17, + "gensV": 7, + "gensW": 7, + "VW": 3, + "sum": 1, + "Intersection2": 4, + "IsFiniteDimensional": 2, + "Coefficients": 3, + "SumIntersectionMat": 1, + "LinearCombination": 2, + "HasParent": 2, + "SetIsTrivial": 1, + "ClosureLeftModule": 2, + "": 1, + "closure": 1, + "IsCollsElms": 1, + "HasBasis": 1, + "IsVector": 1, + "w": 3, + "easily": 1, + "UseBasis": 1, + "Methods": 1, + "collections": 1, + "#R": 1, + "IsSubspacesVectorSpaceDefaultRep": 7, + "representation": 1, + "components": 1, + "means": 1, + "DeclareRepresentation": 1, + "IsComponentObjectRep": 1, + ".dimension": 9, + ".structure": 9, + "number": 2, + "q": 20, + "prod_": 2, + "frac": 3, + "recursion": 1, + "sum_": 1, + "size": 12, + "qn": 10, + "qd": 10, + "ank": 6, + "Int": 1, + "Enumerator": 2, + "Use": 1, + "iterator": 3, + "allowed": 1, + "elms": 4, + "IsDoneIterator": 3, + ".associatedIterator": 3, + ".basis": 2, + "structure": 4, + "associatedIterator": 2, + "ShallowCopy": 2, + "IteratorByFunctions": 1, + "IsDoneIterator_Subspaces": 1, + "NextIterator_Subspaces": 1, + "ShallowCopy_Subspaces": 1, + "": 1, + "dim": 2, + "Objectify": 2, + "NewType": 2, + "CollectionsFamily": 2, + "FamilyObj": 2, + "map": 4, + "S": 4, + "Source": 1, + "Range": 1, + "IsLinearMapping": 1 + }, "GAS": { ".cstring": 1, "LC0": 2, @@ -14151,10 +25256,700 @@ "xd": 1, ".subsections_via_symbols": 1 }, + "GLSL": { + "////": 4, + "High": 1, + "quality": 2, + "(": 435, + "Some": 1, + "browsers": 1, + "may": 1, + "freeze": 1, + "or": 1, + "crash": 1, + ")": 435, + "//#define": 10, + "HIGHQUALITY": 2, + "Medium": 1, + "Should": 1, + "be": 1, + "fine": 1, + "on": 3, + "all": 1, + "systems": 1, + "works": 1, + "Intel": 1, + "HD2000": 1, + "Win7": 1, + "but": 1, + "quite": 1, + "slow": 1, + "MEDIUMQUALITY": 2, + "Defaults": 1, + "REFLECTIONS": 3, + "#define": 13, + "SHADOWS": 5, + "GRASS": 3, + "SMALL_WAVES": 4, + "RAGGED_LEAVES": 5, + "DETAILED_NOISE": 3, + "LIGHT_AA": 3, + "//": 38, + "sample": 2, + "SSAA": 2, + "HEAVY_AA": 2, + "x2": 5, + "RG": 1, + "TONEMAP": 5, + "Configurations": 1, + "#ifdef": 14, + "#endif": 14, + "const": 19, + "float": 105, + "eps": 5, + "e": 4, + "-": 108, + ";": 383, + "PI": 3, + "vec3": 165, + "sunDir": 5, + "skyCol": 4, + "sandCol": 2, + "treeCol": 2, + "grassCol": 2, + "leavesCol": 4, + "leavesPos": 4, + "sunCol": 5, + "#else": 5, + "exposure": 1, + "Only": 1, + "used": 1, + "when": 1, + "tonemapping": 1, + "mod289": 4, + "x": 11, + "{": 82, + "return": 47, + "floor": 8, + "*": 115, + "/": 24, + "}": 82, + "vec4": 73, + "permute": 4, + "x*34.0": 1, + "+": 108, + "*x": 3, + "taylorInvSqrt": 2, + "r": 14, + "snoise": 7, + "v": 8, + "vec2": 26, + "C": 1, + "/6.0": 1, + "/3.0": 1, + "D": 1, + "i": 38, + "dot": 30, + "C.yyy": 2, + "x0": 7, + "C.xxx": 2, + "g": 2, + "step": 2, + "x0.yzx": 1, + "x0.xyz": 1, + "l": 1, + "i1": 2, + "min": 11, + "g.xyz": 2, + "l.zxy": 2, + "i2": 2, + "max": 9, + "x1": 4, + "*C.x": 2, + "/3": 1, + "C.y": 1, + "x3": 4, + "D.yyy": 1, + "D.y": 1, + "p": 26, + "i.z": 1, + "i1.z": 1, + "i2.z": 1, + "i.y": 1, + "i1.y": 1, + "i2.y": 1, + "i.x": 1, + "i1.x": 1, + "i2.x": 1, + "n_": 2, + "/7.0": 1, + "ns": 4, + "D.wyz": 1, + "D.xzx": 1, + "j": 4, + "ns.z": 3, + "mod": 2, + "*7": 1, + "x_": 3, + "y_": 2, + "N": 1, + "*ns.x": 2, + "ns.yyyy": 2, + "y": 2, + "h": 21, + "abs": 2, + "b0": 3, + "x.xy": 1, + "y.xy": 1, + "b1": 3, + "x.zw": 1, + "y.zw": 1, + "//vec4": 3, + "s0": 2, + "lessThan": 2, + "*2.0": 4, + "s1": 2, + "sh": 1, + "a0": 1, + "b0.xzyw": 1, + "s0.xzyw*sh.xxyy": 1, + "a1": 1, + "b1.xzyw": 1, + "s1.xzyw*sh.zzww": 1, + "p0": 5, + "a0.xy": 1, + "h.x": 1, + "p1": 5, + "a0.zw": 1, + "h.y": 1, + "p2": 5, + "a1.xy": 1, + "h.z": 1, + "p3": 5, + "a1.zw": 1, + "h.w": 1, + "//Normalise": 1, + "gradients": 1, + "norm": 1, + "norm.x": 1, + "norm.y": 1, + "norm.z": 1, + "norm.w": 1, + "m": 8, + "m*m": 1, + "fbm": 2, + "final": 5, + "waterHeight": 4, + "d": 10, + "length": 7, + "p.xz": 2, + "sin": 8, + "iGlobalTime": 7, + "Island": 1, + "waves": 3, + "p*0.5": 1, + "Other": 1, + "bump": 2, + "pos": 42, + "rayDir": 43, + "s": 23, + "Fade": 1, + "out": 1, + "to": 1, + "reduce": 1, + "aliasing": 1, + "dist": 7, + "<": 23, + "sqrt": 6, + "Calculate": 1, + "normal": 7, + "from": 2, + "heightmap": 1, + "pos.x": 1, + "iGlobalTime*0.5": 1, + "pos.z": 2, + "*0.7": 1, + "*s": 4, + "normalize": 14, + "e.xyy": 1, + "e.yxy": 1, + "intersectSphere": 2, + "rpos": 5, + "rdir": 3, + "rad": 2, + "op": 5, + "b": 5, + "det": 11, + "b*b": 2, + "rad*rad": 2, + "if": 29, + "t": 44, + "rdir*t": 1, + "intersectCylinder": 1, + "rdir2": 2, + "rdir.yz": 1, + "op.yz": 3, + "rpos.yz": 2, + "rdir2*t": 2, + "pos.yz": 2, + "intersectPlane": 3, + "rayPos": 38, + "n": 18, + "sign": 1, + "rotate": 5, + "theta": 6, + "c": 6, + "cos": 4, + "p.x": 2, + "p.z": 2, + "p.y": 1, + "impulse": 2, + "k": 8, + "by": 1, + "iq": 2, + "k*x": 1, + "exp": 2, + "grass": 2, + "Optimization": 1, + "Avoid": 1, + "noise": 1, + "too": 1, + "far": 1, + "away": 1, + "pos.y": 8, + "tree": 2, + "pos.y*0.03": 2, + "mat2": 2, + "m*pos.xy": 1, + "width": 2, + "clamp": 4, + "scene": 7, + "vtree": 4, + "vgrass": 2, + ".x": 4, + "eps.xyy": 1, + "eps.yxy": 1, + "eps.yyx": 1, + "plantsShadow": 2, + "Soft": 1, + "shadow": 4, + "taken": 1, + "for": 7, + "int": 8, + "rayDir*t": 2, + "res": 6, + "res.x": 3, + "k*res.x/t": 1, + "s*s*": 1, + "intersectWater": 2, + "rayPos.y": 1, + "rayDir.y": 1, + "intersectSand": 3, + "intersectTreasure": 2, + "intersectLeaf": 2, + "openAmount": 4, + "dir": 2, + "offset": 5, + "rayDir*res.w": 1, + "pos*0.8": 2, + "||": 3, + "res.w": 6, + "res2": 2, + "dir.xy": 1, + "dir.z": 1, + "rayDir*res2.w": 1, + "res2.w": 3, + "&&": 10, + "leaves": 7, + "e20": 3, + "sway": 5, + "fract": 1, + "upDownSway": 2, + "angleOffset": 3, + "Left": 1, + "right": 1, + "alpha": 3, + "Up": 1, + "down": 1, + "k*10.0": 1, + "p.xzy": 1, + ".xzy": 2, + "d.xzy": 1, + "Shift": 1, + "Intersect": 11, + "individual": 1, + "leaf": 1, + "res.xyz": 1, + "sand": 2, + "resSand": 2, + "//if": 1, + "resSand.w": 4, + "plants": 6, + "resLeaves": 3, + "resLeaves.w": 10, + "e7": 3, + "light": 5, + "sunDir*0.01": 2, + "col": 32, + "n.y": 3, + "lightLeaves": 3, + "ao": 5, + "sky": 5, + "res.y": 2, + "uvFact": 2, + "uv": 12, + "n.x": 1, + "tex": 6, + "texture2D": 6, + "iChannel0": 3, + ".rgb": 2, + "e8": 1, + "traceReflection": 2, + "resPlants": 2, + "resPlants.w": 6, + "resPlants.xyz": 2, + "pos.xz": 2, + "leavesPos.xz": 2, + ".r": 3, + "resLeaves.xyz": 2, + "trace": 2, + "resSand.xyz": 1, + "treasure": 1, + "chest": 1, + "resTreasure": 1, + "resTreasure.w": 4, + "resTreasure.xyz": 1, + "water": 1, + "resWater": 1, + "resWater.w": 4, + "ct": 2, + "fresnel": 2, + "pow": 3, + "trans": 2, + "reflDir": 3, + "reflect": 1, + "refl": 3, + "resWater.t": 1, + "mix": 2, + "camera": 8, + "px": 4, + "rd": 1, + "iResolution.yy": 1, + "iResolution.x/iResolution.y*0.5": 1, + "rd.x": 1, + "rd.y": 1, + "void": 31, + "main": 5, + "gl_FragCoord.xy": 7, + "*0.25": 4, + "*0.5": 1, + "Optimized": 1, + "Haarm": 1, + "Peter": 1, + "Duiker": 1, + "curve": 1, + "col*exposure": 1, + "x*": 2, + ".5": 1, + "gl_FragColor": 3, + "#version": 2, + "core": 1, + "cbar": 2, + "cfoo": 1, + "CB": 2, + "CD": 2, + "CA": 1, + "CC": 1, + "CBT": 5, + "CDT": 3, + "CAT": 1, + "CCT": 1, + "norA": 4, + "norB": 3, + "norC": 1, + "norD": 1, + "norE": 4, + "norF": 1, + "norG": 1, + "norH": 1, + "norI": 1, + "norcA": 2, + "norcB": 3, + "norcC": 2, + "norcD": 2, + "head": 1, + "of": 1, + "cycle": 2, + "norcE": 1, + "lead": 1, + "into": 1, + "NUM_LIGHTS": 4, + "AMBIENT": 2, + "MAX_DIST": 3, + "MAX_DIST_SQUARED": 3, + "uniform": 7, + "lightColor": 3, + "[": 29, + "]": 29, + "varying": 4, + "fragmentNormal": 2, + "cameraVector": 2, + "lightVector": 4, + "initialize": 1, + "diffuse/specular": 1, + "lighting": 1, + "diffuse": 4, + "specular": 4, + "the": 1, + "fragment": 1, + "and": 2, + "direction": 1, + "cameraDir": 2, + "loop": 1, + "through": 1, + "each": 1, + "calculate": 1, + "distance": 1, + "between": 1, + "distFactor": 3, + "lightDir": 3, + "diffuseDot": 2, + "halfAngle": 2, + "specularColor": 2, + "specularDot": 2, + "sample.rgb": 1, + "sample.a": 1, + "static": 1, + "char*": 1, + "SimpleFragmentShader": 1, + "STRINGIFY": 1, + "FrontColor": 2, + "kCoeff": 2, + "kCube": 2, + "uShift": 3, + "vShift": 3, + "chroma_red": 2, + "chroma_green": 2, + "chroma_blue": 2, + "bool": 1, + "apply_disto": 4, + "sampler2D": 1, + "input1": 4, + "adsk_input1_w": 4, + "adsk_input1_h": 3, + "adsk_input1_aspect": 1, + "adsk_input1_frameratio": 5, + "adsk_result_w": 3, + "adsk_result_h": 2, + "distortion_f": 3, + "f": 17, + "r*r": 1, + "inverse_f": 2, + "lut": 9, + "max_r": 2, + "incr": 2, + "lut_r": 5, + ".z": 5, + ".y": 2, + "aberrate": 4, + "chroma": 2, + "chromaticize_and_invert": 2, + "rgb_f": 5, + "px.x": 2, + "px.y": 2, + "uv.x": 11, + "uv.y": 7, + "*2": 2, + "uv.x*uv.x": 1, + "uv.y*uv.y": 1, + "else": 1, + "rgb_uvs": 12, + "rgb_f.rr": 1, + "rgb_f.gg": 1, + "rgb_f.bb": 1, + "sampled": 1, + "sampled.r": 1, + "sampled.g": 1, + ".g": 1, + "sampled.b": 1, + ".b": 1, + "gl_FragColor.rgba": 1, + "sampled.rgb": 1 + }, + "Gnuplot": { + "set": 98, + "label": 14, + "at": 14, + "-": 102, + "left": 15, + "norotate": 18, + "back": 23, + "textcolor": 13, + "rgb": 8, + "nopoint": 14, + "offset": 25, + "character": 22, + "lt": 15, + "style": 7, + "line": 4, + "linetype": 11, + "linecolor": 4, + "linewidth": 11, + "pointtype": 4, + "pointsize": 4, + "default": 4, + "pointinterval": 4, + "noxtics": 2, + "noytics": 2, + "title": 13, + "xlabel": 6, + "xrange": 3, + "[": 18, + "]": 18, + "noreverse": 13, + "nowriteback": 12, + "yrange": 4, + "bmargin": 1, + "unset": 2, + "colorbox": 3, + "plot": 3, + "cos": 9, + "(": 52, + "x": 7, + ")": 52, + "ls": 4, + ".2": 1, + ".4": 1, + ".6": 1, + ".8": 1, + "lc": 3, + "boxwidth": 1, + "absolute": 1, + "fill": 1, + "solid": 1, + "border": 3, + "key": 1, + "inside": 1, + "right": 1, + "top": 1, + "vertical": 2, + "Right": 1, + "noenhanced": 1, + "autotitles": 1, + "nobox": 1, + "histogram": 1, + "clustered": 1, + "gap": 1, + "datafile": 1, + "missing": 1, + "data": 1, + "histograms": 1, + "xtics": 3, + "in": 1, + "scale": 1, + "nomirror": 1, + "rotate": 3, + "by": 3, + "autojustify": 1, + "norangelimit": 3, + "font": 8, + "i": 1, + "using": 2, + "xtic": 1, + "ti": 4, + "col": 4, + "u": 25, + "SHEBANG#!gnuplot": 1, + "reset": 1, + "terminal": 1, + "png": 1, + "output": 1, + "ylabel": 5, + "#set": 2, + "xr": 1, + "yr": 1, + "pt": 2, + "notitle": 15, + "dummy": 3, + "v": 31, + "arrow": 7, + "from": 7, + "to": 7, + "head": 7, + "nofilled": 7, + "parametric": 3, + "view": 3, + "samples": 3, + "isosamples": 3, + "hidden3d": 2, + "trianglepattern": 2, + "undefined": 2, + "altdiagonal": 2, + "bentover": 2, + "ztics": 2, + "zlabel": 4, + "zrange": 2, + "sinc": 13, + "sin": 3, + "sqrt": 4, + "u**2": 4, + "+": 6, + "v**2": 4, + "/": 2, + "GPFUN_sinc": 2, + "xx": 2, + "dx": 2, + "x0": 4, + "x1": 4, + "x2": 4, + "x3": 4, + "x4": 4, + "x5": 4, + "x6": 4, + "x7": 4, + "x8": 4, + "x9": 4, + "splot": 3, + "<": 10, + "xmin": 3, + "xmax": 1, + "n": 1, + "zbase": 2, + ".5": 2, + "*n": 1, + "floor": 3, + "u/3": 1, + "*dx": 1, + "%": 2, + "u/3.*dx": 1, + "/0": 1, + "angles": 1, + "degrees": 1, + "mapping": 1, + "spherical": 1, + "noztics": 1, + "urange": 1, + "vrange": 1, + "cblabel": 1, + "cbrange": 1, + "user": 1, + "origin": 1, + "screen": 2, + "size": 1, + "front": 1, + "bdefault": 1, + "*cos": 1, + "*sin": 1, + "with": 3, + "lines": 2, + "labels": 1, + "point": 1, + "lw": 1, + ".1": 1, + "tc": 1, + "pal": 1 + }, "Gosu": { - "print": 4, - "(": 54, - ")": 55, "<%!-->": 1, "defined": 1, "in": 3, @@ -14164,9 +25959,11 @@ "%": 2, "@": 1, "params": 1, + "(": 53, "users": 2, "Collection": 1, "": 1, + ")": 54, "<%>": 2, "for": 2, "user": 1, @@ -14193,6 +25990,7 @@ "int": 2, "Relationship.valueOf": 2, "hello": 1, + "print": 3, "uses": 2, "java.util.*": 1, "java.io.File": 1, @@ -14286,12 +26084,682 @@ "PersonCSVTemplate.renderToString": 1, "PersonCSVTemplate.render": 1 }, + "Grammatical Framework": { + "-": 594, + "(": 256, + "c": 73, + ")": 256, + "Aarne": 13, + "Ranta": 13, + "under": 33, + "LGPL": 33, + "abstract": 1, + "Foods": 34, + "{": 579, + "flags": 32, + "startcat": 1, + "Comment": 31, + ";": 1399, + "cat": 1, + "Item": 31, + "Kind": 33, + "Quality": 34, + "fun": 1, + "Pred": 30, + "This": 29, + "That": 29, + "These": 28, + "Those": 28, + "Mod": 29, + "Wine": 29, + "Cheese": 29, + "Fish": 29, + "Pizza": 28, + "Very": 29, + "Fresh": 29, + "Warm": 29, + "Italian": 29, + "Expensive": 29, + "Delicious": 29, + "Boring": 29, + "}": 580, + "Laurette": 2, + "Pretorius": 2, + "Sr": 2, + "&": 2, + "Jr": 2, + "and": 4, + "Ansu": 2, + "Berg": 2, + "concrete": 33, + "FoodsAfr": 1, + "of": 89, + "open": 23, + "Prelude": 11, + "Predef": 3, + "in": 32, + "coding": 29, + "utf8": 29, + "lincat": 28, + "s": 365, + "Str": 394, + "Number": 207, + "n": 206, + "AdjAP": 10, + "lin": 28, + "item": 36, + "quality": 90, + "item.s": 24, + "+": 480, + "quality.s": 50, + "Predic": 3, + "kind": 115, + "kind.s": 46, + "Sg": 184, + "Pl": 182, + "table": 148, + "Attr": 9, + "declNoun_e": 2, + "declNoun_aa": 2, + "declNoun_ss": 2, + "declNoun_s": 2, + "veryAdj": 2, + "regAdj": 61, + "smartAdj_e": 4, + "param": 22, + "|": 122, + "oper": 29, + "Noun": 9, + "operations": 2, + "wyn": 1, + "kaas": 1, + "vis": 1, + "pizza": 1, + "x": 74, + "let": 8, + "v": 6, + "tk": 1, + "last": 3, + "Adjective": 9, + "mkAdj": 27, + "y": 3, + "declAdj_e": 2, + "declAdj_g": 2, + "w": 15, + "init": 4, + "declAdj_oog": 2, + "i": 2, + "a": 57, + "x.s": 8, + "case": 44, + "_": 68, + "FoodsAmh": 1, + "Krasimir": 1, + "Angelov": 1, + "FoodsBul": 1, + "Gender": 94, + "Masc": 67, + "Fem": 65, + "Neutr": 21, + "Agr": 3, + "ASg": 23, + "APl": 11, + "g": 132, + "qual": 8, + "item.a": 2, + "qual.s": 8, + "kind.g": 38, + "#": 14, + "path": 14, + ".": 13, + "present": 7, + "Jordi": 2, + "Saludes": 2, + "FoodsCat": 1, + "FoodsI": 6, + "with": 5, + "Syntax": 7, + "SyntaxCat": 2, + "LexFoods": 12, + "LexFoodsCat": 2, + "FoodsChi": 1, + "p": 11, + "quality.p": 2, + "kind.c": 11, + "geKind": 5, + "longQuality": 8, + "mkKind": 2, + "Katerina": 2, + "Bohmova": 2, + "FoodsCze": 1, + "ResCze": 2, + "NounPhrase": 3, + "copula": 33, + "item.n": 29, + "item.g": 12, + "det": 86, + "noun": 51, + "regnfAdj": 2, + "Femke": 1, + "Johansson": 1, + "FoodsDut": 1, + "AForm": 4, + "APred": 8, + "AAttr": 3, + "regNoun": 38, + "f": 16, + "a.s": 8, + "regadj": 6, + "adj": 38, + "noun.s": 7, + "man": 10, + "men": 10, + "wijn": 3, + "koud": 3, + "duur": 2, + "dure": 2, + "FoodsEng": 1, + "language": 2, + "en_US": 1, + "car": 6, + "cold": 4, + "Julia": 1, + "Hammar": 1, + "FoodsEpo": 1, + "SS": 6, + "ss": 13, + "d": 6, + "cn": 11, + "cn.s": 8, + "vino": 3, + "nova": 3, + "FoodsFin": 1, + "SyntaxFin": 2, + "LexFoodsFin": 2, + "../foods": 1, + "FoodsFre": 1, + "SyntaxFre": 1, + "ParadigmsFre": 1, + "Utt": 4, + "NP": 4, + "CN": 4, + "AP": 4, + "mkUtt": 4, + "mkCl": 4, + "mkNP": 16, + "this_QuantSg": 2, + "that_QuantSg": 2, + "these_QuantPl": 2, + "those_QuantPl": 2, + "mkCN": 20, + "mkAP": 28, + "very_AdA": 4, + "mkN": 46, + "masculine": 4, + "feminine": 2, + "mkA": 47, + "FoodsGer": 1, + "SyntaxGer": 2, + "LexFoodsGer": 2, + "alltenses": 3, + "Dana": 1, + "Dannells": 1, + "Licensed": 1, + "FoodsHeb": 2, + "Species": 8, + "mod": 7, + "Modified": 5, + "sp": 11, + "Indef": 6, + "Def": 21, + "T": 2, + "regAdj2": 3, + "F": 2, + "Type": 9, + "Adj": 4, + "m": 9, + "cn.mod": 2, + "cn.g": 10, + "gvina": 6, + "hagvina": 3, + "gvinot": 6, + "hagvinot": 3, + "defH": 7, + "replaceLastLetter": 7, + "adjective": 22, + "tov": 6, + "tova": 3, + "tovim": 3, + "tovot": 3, + "to": 6, + "c@": 3, + "italki": 3, + "italk": 4, + "Vikash": 1, + "Rauniyar": 1, + "FoodsHin": 2, + "regN": 15, + "lark": 8, + "ms": 4, + "mp": 4, + "acch": 6, + "incomplete": 1, + "this_Det": 2, + "that_Det": 2, + "these_Det": 2, + "those_Det": 2, + "wine_N": 7, + "pizza_N": 7, + "cheese_N": 7, + "fish_N": 8, + "fresh_A": 7, + "warm_A": 8, + "italian_A": 7, + "expensive_A": 7, + "delicious_A": 7, + "boring_A": 7, + "prelude": 2, + "Martha": 1, + "Dis": 1, + "Brandt": 1, + "FoodsIce": 1, + "Defin": 9, + "Ind": 14, + "the": 7, + "word": 3, + "is": 6, + "more": 1, + "commonly": 1, + "used": 2, + "Iceland": 1, + "but": 1, + "Icelandic": 1, + "for": 6, + "it": 2, + "defOrInd": 2, + "order": 1, + "given": 1, + "forms": 2, + "mSg": 1, + "fSg": 1, + "nSg": 1, + "mPl": 1, + "fPl": 1, + "nPl": 1, + "mSgDef": 1, + "f/nSgDef": 1, + "_PlDef": 1, + "masc": 3, + "fem": 2, + "neutr": 2, + "x1": 3, + "x9": 1, + "ferskur": 5, + "fersk": 11, + "ferskt": 2, + "ferskir": 2, + "ferskar": 2, + "fersk_pl": 2, + "ferski": 2, + "ferska": 2, + "fersku": 2, + "t": 28, + "": 1, + "<": 10, + "Predef.tk": 2, + "FoodsIta": 1, + "SyntaxIta": 2, + "LexFoodsIta": 2, + "../lib/src/prelude": 1, + "Zofia": 1, + "Stankiewicz": 1, + "FoodsJpn": 1, + "Style": 3, + "AdjUse": 4, + "AdjType": 4, + "quality.t": 3, + "IAdj": 4, + "Plain": 3, + "Polite": 4, + "NaAdj": 4, + "na": 1, + "adjectives": 2, + "have": 2, + "different": 1, + "as": 2, + "attributes": 1, + "predicates": 2, + "phrase": 1, + "types": 1, + "can": 1, + "form": 4, + "without": 1, + "cannot": 1, + "sakana": 6, + "chosenna": 2, + "chosen": 2, + "akai": 2, + "Inese": 1, + "Bernsone": 1, + "FoodsLav": 1, + "Q": 5, + "Q1": 5, + "q": 10, + "spec": 2, + "Q2": 3, + "specAdj": 2, + "skaists": 5, + "skaista": 2, + "skaisti": 2, + "skaistas": 2, + "skaistais": 2, + "skaistaa": 2, + "skaistie": 2, + "skaistaas": 2, + "skaist": 8, + "John": 1, + "J.": 1, + "Camilleri": 1, + "FoodsMlt": 1, + "uniAdj": 2, + "Create": 6, + "an": 2, + "full": 1, + "function": 1, + "Params": 4, + "Sing": 4, + "Plural": 2, + "iswed": 2, + "sewda": 2, + "suwed": 3, + "regular": 2, + "Param": 2, + "frisk": 4, + "eg": 1, + "tal": 1, + "buzz": 1, + "uni": 4, + "Singular": 1, + "inherent": 1, + "ktieb": 2, + "kotba": 2, + "Copula": 1, + "linking": 1, + "verb": 1, + "article": 3, + "taking": 1, + "into": 1, + "account": 1, + "first": 1, + "letter": 1, + "next": 1, + "pre": 1, + "cons@": 1, + "cons": 1, + "determinant": 1, + "Sg/Pl": 1, + "string": 1, + "default": 1, + "gender": 2, + "number": 2, + "/GF/lib/src/prelude": 1, + "Nyamsuren": 1, + "Erdenebadrakh": 1, + "FoodsMon": 1, + "prefixSS": 1, + "Dinesh": 1, + "Simkhada": 1, + "FoodsNep": 1, + "adjPl": 2, + "bor": 2, + "FoodsOri": 1, + "FoodsPes": 1, + "optimize": 1, + "noexpand": 1, + "Add": 8, + "prep": 11, + "Indep": 4, + "kind.prep": 1, + "quality.prep": 1, + "at": 3, + "a.prep": 1, + "must": 1, + "be": 1, + "written": 1, + "x4": 2, + "pytzA": 3, + "pytzAy": 1, + "pytzAhA": 3, + "pr": 4, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "mrd": 8, + "tAzh": 8, + "tAzhy": 2, + "Rami": 1, + "Shashati": 1, + "FoodsPor": 1, + "mkAdjReg": 7, + "QualityT": 5, + "bonito": 2, + "bonita": 2, + "bonitos": 2, + "bonitas": 2, + "pattern": 1, + "adjSozinho": 2, + "sozinho": 3, + "sozinh": 4, + "independent": 1, + "adjUtil": 2, + "util": 3, + "uteis": 3, + "smart": 1, + "paradigm": 1, + "adjcetives": 1, + "ItemT": 2, + "KindT": 4, + "num": 6, + "noun.g": 3, + "animal": 2, + "animais": 2, + "gen": 4, + "carro": 3, + "Ramona": 1, + "Enache": 1, + "FoodsRon": 1, + "NGender": 6, + "NMasc": 2, + "NFem": 3, + "NNeut": 2, + "mkTab": 5, + "mkNoun": 5, + "getAgrGender": 3, + "acesta": 2, + "aceasta": 2, + "gg": 3, + "det.s": 1, + "peste": 2, + "pesti": 2, + "scump": 2, + "scumpa": 2, + "scumpi": 2, + "scumpe": 2, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "ng": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "FoodsSpa": 1, + "SyntaxSpa": 1, + "StructuralSpa": 1, + "ParadigmsSpa": 1, + "FoodsSwe": 1, + "SyntaxSwe": 2, + "LexFoodsSwe": 2, + "**": 1, + "sv_SE": 1, + "FoodsTha": 1, + "SyntaxTha": 1, + "LexiconTha": 1, + "ParadigmsTha": 1, + "R": 4, + "ResTha": 1, + "R.thword": 4, + "FoodsTsn": 1, + "NounClass": 28, + "r": 9, + "b": 9, + "Bool": 5, + "p_form": 18, + "TType": 16, + "mkPredDescrCop": 2, + "item.c": 1, + "quality.p_form": 1, + "kind.w": 4, + "mkDemPron1": 3, + "kind.q": 4, + "mkDemPron2": 3, + "mkMod": 2, + "Lexicon": 1, + "mkNounNC14_6": 2, + "mkNounNC9_10": 4, + "smartVery": 2, + "mkVarAdj": 2, + "mkOrdAdj": 4, + "mkPerAdj": 2, + "mkVerbRel": 2, + "NC9_10": 14, + "NC14_6": 14, + "P": 4, + "V": 4, + "ModV": 4, + "y.b": 1, + "True": 3, + "y.w": 2, + "y.r": 2, + "y.c": 14, + "y.q": 4, + "smartQualRelPart": 5, + "x.t": 10, + "smartDescrCop": 5, + "False": 3, + "mkVeryAdj": 2, + "x.p_form": 2, + "mkVeryVerb": 3, + "mkQualRelPart_PName": 2, + "mkQualRelPart": 2, + "mkDescrCop_PName": 2, + "mkDescrCop": 2, + "FoodsTur": 1, + "Case": 10, + "softness": 4, + "Softness": 5, + "h": 4, + "Harmony": 5, + "Reason": 1, + "excluding": 1, + "plural": 3, + "In": 1, + "Turkish": 1, + "if": 1, + "subject": 1, + "not": 2, + "human": 2, + "being": 1, + "then": 1, + "singular": 1, + "regardless": 1, + "subject.": 1, + "Since": 1, + "all": 1, + "possible": 1, + "subjects": 1, + "are": 1, + "non": 1, + "do": 1, + "need": 1, + "form.": 1, + "quality.softness": 1, + "quality.h": 1, + "quality.c": 1, + "Nom": 9, + "Gen": 5, + "a.c": 1, + "a.softness": 1, + "a.h": 1, + "I_Har": 4, + "Ih_Har": 4, + "U_Har": 4, + "Uh_Har": 4, + "Ih": 1, + "Uh": 1, + "Soft": 3, + "Hard": 3, + "overload": 1, + "mkn": 1, + "peynir": 2, + "peynirler": 2, + "[": 2, + "]": 2, + "sarap": 2, + "saraplar": 2, + "sarabi": 2, + "saraplari": 2, + "italyan": 4, + "ca": 2, + "getSoftness": 2, + "getHarmony": 2, + "See": 1, + "comment": 1, + "lines": 1, + "excluded": 1, + "copula.": 1, + "base": 4, + "*": 1, + "Shafqat": 1, + "Virk": 1, + "FoodsUrd": 1, + "coupla": 2, + "interface": 1, + "N": 4, + "A": 6, + "instance": 5, + "ParadigmsCat": 1, + "M": 1, + "MorphoCat": 1, + "M.Masc": 2, + "ParadigmsFin": 1, + "ParadigmsGer": 1, + "ParadigmsIta": 1, + "ParadigmsSwe": 1, + "resource": 1, + "ne": 2, + "muz": 2, + "muzi": 2, + "msg": 3, + "fsg": 3, + "nsg": 3, + "mpl": 3, + "fpl": 3, + "npl": 3, + "mlad": 7, + "vynikajici": 7 + }, "Groovy": { "task": 1, "echoDirListViaAntBuilder": 1, "(": 7, ")": 7, - "{": 3, + "{": 9, "description": 1, "//Docs": 1, "http": 1, @@ -14319,7 +26787,7 @@ "ant.fileScanner": 1, "fileset": 1, "dir": 1, - "}": 3, + "}": 9, ".each": 1, "//Print": 1, "each": 1, @@ -14330,10 +26798,16 @@ "CWD": 1, "projectDir": 1, "removed.": 1, - "println": 2, + "println": 3, "it.toString": 1, "-": 1, - "SHEBANG#!groovy": 1 + "SHEBANG#!groovy": 2, + "html": 3, + "head": 2, + "component": 1, + "title": 2, + "body": 1, + "p": 1 }, "Groovy Server Pages": { "": 4, @@ -14402,6 +26876,568 @@ "": 1, "/each": 1 }, + "Haskell": { + "import": 6, + "Data.Char": 1, + "main": 4, + "IO": 2, + "(": 8, + ")": 8, + "do": 3, + "let": 2, + "hello": 2, + "putStrLn": 3, + "map": 13, + "toUpper": 1, + "module": 2, + "Main": 1, + "where": 4, + "Sudoku": 9, + "Data.Maybe": 2, + "sudoku": 36, + "[": 4, + "]": 3, + "pPrint": 5, + "+": 2, + "fromMaybe": 1, + "solve": 5, + "isSolved": 4, + "Data.List": 1, + "Data.List.Split": 1, + "type": 1, + "Int": 1, + "-": 3, + "Maybe": 1, + "|": 8, + "Just": 1, + "otherwise": 2, + "index": 27, + "<": 1, + "elemIndex": 1, + "sudokus": 2, + "nextTest": 5, + "i": 7, + "<->": 1, + "1": 2, + "9": 7, + "checkRow": 2, + "checkColumn": 2, + "checkBox": 2, + "listToMaybe": 1, + "mapMaybe": 1, + "take": 1, + "drop": 1, + "length": 12, + "getRow": 3, + "nub": 6, + "getColumn": 3, + "getBox": 3, + "filter": 3, + "0": 3, + "chunksOf": 10, + "quot": 3, + "transpose": 4, + "mod": 2, + "concat": 2, + "concatMap": 2, + "3": 4, + "27": 1, + "Bool": 1, + "product": 1, + "False": 4, + ".": 4, + "sudokuRows": 4, + "/": 3, + "sudokuColumns": 3, + "sudokuBoxes": 3, + "True": 1, + "String": 1, + "intercalate": 2, + "show": 1 + }, + "HTML": { + "": 2, + "HTML": 2, + "PUBLIC": 2, + "W3C": 2, + "DTD": 3, + "4": 1, + "0": 2, + "Frameset": 1, + "EN": 2, + "http": 3, + "www": 2, + "w3": 2, + "org": 2, + "TR": 2, + "REC": 1, + "html40": 1, + "frameset": 1, + "dtd": 2, + "": 2, + "": 2, + "Common_meta": 1, + "(": 14, + ")": 14, + "": 2, + "Android": 5, + "API": 7, + "Differences": 2, + "Report": 2, + "": 2, + "": 2, + "

": 10, + "class=": 22, + "Header": 1, + "

": 1, + "

": 1, + "

": 3, + "This": 1, + "document": 1, + "details": 1, + "the": 11, + "changes": 2, + "in": 4, + "framework": 2, + "API.": 3, + "It": 2, + "shows": 1, + "additions": 1, + "modifications": 1, + "and": 5, + "removals": 2, + "for": 2, + "packages": 1, + "classes": 1, + "methods": 1, + "fields.": 1, + "Each": 1, + "reference": 1, + "to": 3, + "an": 3, + "change": 2, + "includes": 1, + "a": 4, + "brief": 1, + "description": 1, + "of": 5, + "explanation": 1, + "suggested": 1, + "workaround": 1, + "where": 1, + "available.": 1, + "

": 3, + "The": 2, + "differences": 2, + "described": 1, + "this": 2, + "report": 1, + "are": 3, + "based": 1, + "comparison": 1, + "APIs": 1, + "whose": 1, + "versions": 1, + "specified": 1, + "upper": 1, + "-": 1, + "right": 1, + "corner": 1, + "page.": 1, + "compares": 1, + "newer": 1, + "older": 2, + "version": 1, + "noting": 1, + "any": 1, + "relative": 1, + "So": 1, + "example": 1, + "indicated": 1, + "no": 1, + "longer": 1, + "present": 1, + "For": 1, + "more": 1, + "information": 1, + "about": 1, + "SDK": 1, + "see": 1, + "
": 8, + "href=": 9, + "target=": 3, + "product": 1, + "site": 1, + "": 8, + ".": 1, + "if": 4, + "no_delta": 1, + "

": 1, + "Congratulation": 1, + "

": 1, + "No": 1, + "were": 1, + "detected": 1, + "between": 1, + "two": 1, + "provided": 1, + "APIs.": 1, + "endif": 4, + "removed_packages": 2, + "Table": 3, + "name": 3, + "rows": 3, + "{": 3, + "it.from": 1, + "ModelElementRow": 1, + "}": 3, + "
": 3, + "added_packages": 2, + "it.to": 2, + "PackageAddedLink": 1, + "SimpleTableRow": 2, + "changed_packages": 2, + "PackageChangedLink": 1, + "
": 11, + "": 2, + "": 2, + "html": 1, + "XHTML": 1, + "1": 1, + "Transitional": 1, + "xhtml1": 2, + "transitional": 1, + "xmlns=": 1, + "": 1, + "equiv=": 1, + "content=": 1, + "Related": 2, + "Pages": 2, + "": 1, + "rel=": 1, + "type=": 1, + "": 1, + "Main": 1, + "Page": 1, + "&": 3, + "middot": 3, + ";": 3, + "Class": 2, + "Overview": 2, + "Hierarchy": 1, + "All": 1, + "Classes": 1, + "Here": 1, + "is": 1, + "list": 1, + "all": 1, + "related": 1, + "documentation": 1, + "pages": 1, + "": 1, + "": 2, + "id=": 2, + "": 4, + "": 2, + "16": 1, + "Layout": 1, + "System": 1, + "
": 4, + "": 2, + "src=": 2, + "alt=": 2, + "width=": 1, + "height=": 2, + "
": 1, + "Generated": 1, + "with": 1, + "Doxygen": 1 + }, + "Hy": { + ";": 4, + "Fibonacci": 1, + "example": 2, + "in": 2, + "Hy.": 2, + "(": 28, + "defn": 2, + "fib": 4, + "[": 10, + "n": 5, + "]": 10, + "if": 2, + "<": 1, + ")": 28, + "+": 1, + "-": 10, + "__name__": 1, + "for": 2, + "x": 3, + "print": 1, + "The": 1, + "concurrent.futures": 2, + "import": 1, + "ThreadPoolExecutor": 2, + "as": 3, + "completed": 2, + "random": 1, + "randint": 2, + "sh": 1, + "sleep": 2, + "task": 2, + "to": 2, + "do": 2, + "with": 1, + "executor": 2, + "setv": 1, + "jobs": 2, + "list": 1, + "comp": 1, + ".submit": 1, + "range": 1, + "future": 2, + ".result": 1 + }, + "IDL": { + ";": 59, + "docformat": 3, + "+": 8, + "Inverse": 1, + "hyperbolic": 2, + "cosine.": 1, + "Uses": 1, + "the": 7, + "formula": 1, + "text": 1, + "{": 3, + "acosh": 1, + "}": 3, + "(": 26, + "z": 9, + ")": 26, + "ln": 1, + "sqrt": 4, + "-": 14, + "Examples": 2, + "The": 1, + "arc": 1, + "sine": 1, + "function": 4, + "looks": 1, + "like": 2, + "IDL": 5, + "x": 8, + "*": 2, + "findgen": 1, + "/": 1, + "plot": 1, + "mg_acosh": 2, + "xstyle": 1, + "This": 1, + "should": 1, + "look": 1, + "..": 1, + "image": 1, + "acosh.png": 1, + "Returns": 3, + "float": 1, + "double": 2, + "complex": 2, + "or": 1, + "depending": 1, + "on": 1, + "input": 2, + "Params": 3, + "in": 4, + "required": 4, + "type": 5, + "numeric": 1, + "compile_opt": 3, + "strictarr": 3, + "return": 5, + "alog": 1, + "end": 5, + "MODULE": 1, + "mg_analysis": 1, + "DESCRIPTION": 1, + "Tools": 1, + "for": 2, + "analysis": 1, + "VERSION": 1, + "SOURCE": 1, + "mgalloy": 1, + "BUILD_DATE": 1, + "January": 1, + "FUNCTION": 2, + "MG_ARRAY_EQUAL": 1, + "KEYWORDS": 1, + "MG_TOTAL": 1, + "Find": 1, + "greatest": 1, + "common": 1, + "denominator": 1, + "GCD": 1, + "two": 1, + "positive": 2, + "integers.": 1, + "integer": 5, + "a": 4, + "first": 1, + "b": 4, + "second": 1, + "mg_gcd": 2, + "on_error": 1, + "if": 5, + "n_params": 1, + "ne": 1, + "then": 5, + "message": 2, + "mg_isinteger": 2, + "||": 1, + "begin": 2, + "endif": 2, + "_a": 3, + "abs": 2, + "_b": 3, + "minArg": 5, + "<": 1, + "maxArg": 3, + "eq": 2, + "remainder": 3, + "mod": 1, + "Truncate": 1, + "argument": 2, + "towards": 1, + "i.e.": 1, + "takes": 1, + "FLOOR": 1, + "of": 4, + "values": 2, + "and": 1, + "CEIL": 1, + "negative": 1, + "values.": 1, + "Try": 1, + "main": 2, + "level": 2, + "program": 2, + "at": 1, + "this": 1, + "file.": 1, + "It": 1, + "does": 1, + "print": 4, + "mg_trunc": 3, + "[": 6, + "]": 6, + "floor": 2, + "ceil": 2, + "array": 2, + "same": 1, + "as": 1, + "float/double": 1, + "containing": 1, + "to": 1, + "truncate": 1, + "result": 3, + "posInd": 3, + "where": 1, + "gt": 2, + "nposInd": 2, + "L": 1, + "example": 1 + }, + "Idris": { + "module": 1, + "Prelude.Char": 1, + "import": 1, + "Builtins": 1, + "isUpper": 4, + "Char": 13, + "-": 8, + "Bool": 8, + "x": 36, + "&&": 3, + "<=>": 3, + "Z": 1, + "isLower": 4, + "z": 1, + "isAlpha": 3, + "||": 9, + "isDigit": 3, + "(": 8, + "9": 1, + "isAlphaNum": 2, + "isSpace": 2, + "isNL": 2, + "toUpper": 3, + "if": 2, + ")": 7, + "then": 2, + "prim__intToChar": 2, + "prim__charToInt": 2, + "else": 2, + "toLower": 2, + "+": 1, + "isHexDigit": 2, + "elem": 1, + "hexChars": 3, + "where": 1, + "List": 1, + "[": 1, + "]": 1 + }, + "Inform 7": { + "by": 3, + "Andrew": 3, + "Plotkin.": 2, + "Include": 1, + "Trivial": 3, + "Extension": 3, + "The": 1, + "Kitchen": 1, + "is": 4, + "a": 2, + "room.": 1, + "[": 1, + "This": 1, + "kitchen": 1, + "modelled": 1, + "after": 1, + "the": 4, + "one": 1, + "in": 2, + "Zork": 1, + "although": 1, + "it": 1, + "lacks": 1, + "detail": 1, + "to": 2, + "establish": 1, + "this": 1, + "player.": 1, + "]": 1, + "A": 3, + "purple": 1, + "cow": 3, + "called": 1, + "Gelett": 2, + "Kitchen.": 1, + "Instead": 1, + "of": 3, + "examining": 1, + "say": 1, + "Version": 1, + "Plotkin": 1, + "begins": 1, + "here.": 2, + "kind": 1, + "animal.": 1, + "can": 1, + "be": 1, + "purple.": 1, + "ends": 1 + }, "INI": { ";": 1, "editorconfig.org": 1, @@ -14431,6 +27467,92 @@ "SHEBANG#!ioke": 1, "println": 1 }, + "Isabelle": { + "theory": 1, + "HelloWorld": 3, + "imports": 1, + "Main": 1, + "begin": 1, + "section": 1, + "{": 5, + "*Playing": 1, + "around": 1, + "with": 2, + "Isabelle*": 1, + "}": 5, + "text": 4, + "*": 4, + "creating": 1, + "a": 2, + "lemma": 2, + "the": 2, + "name": 1, + "hello_world*": 1, + "hello_world": 2, + "by": 9, + "simp": 8, + "thm": 1, + "defining": 1, + "string": 1, + "constant": 1, + "definition": 1, + "where": 1, + "theorem": 2, + "(": 5, + "fact": 1, + "List.rev_rev_ident": 4, + ")": 5, + "*now": 1, + "we": 1, + "delete": 1, + "already": 1, + "proven": 1, + "lema": 1, + "and": 1, + "show": 2, + "it": 2, + "hand*": 1, + "declare": 1, + "[": 1, + "del": 1, + "]": 1, + "hide_fact": 1, + "corollary": 2, + "apply": 1, + "add": 1, + "HelloWorld_def": 1, + "done": 1, + "*does": 1, + "hold": 1, + "in": 1, + "general": 1, + "rev_rev_ident": 2, + "proof": 1, + "induction": 1, + "l": 2, + "case": 3, + "Nil": 1, + "thus": 1, + "next": 1, + "Cons": 1, + "ls": 1, + "assume": 1, + "IH": 2, + "have": 2, + "hence": 1, + "also": 1, + "finally": 1, + "using": 1, + "qed": 1, + "fastforce": 1, + "intro": 1, + "end": 1 + }, + "Jade": { + "p.": 1, + "Hello": 1, + "World": 1 + }, "Java": { "package": 6, "clojure.asm": 1, @@ -15369,15 +28491,15 @@ ".internalBuildGeneratedFileFrom": 1 }, "JavaScript": { - "function": 1210, - "(": 8513, - ")": 8521, - "{": 2736, - ";": 4052, + "function": 1212, + "(": 8518, + ")": 8526, + "{": 2738, + ";": 4056, "//": 410, "jshint": 1, "_": 9, - "var": 910, + "var": 911, "Modal": 2, "content": 5, "options": 56, @@ -15387,15 +28509,15 @@ ".delegate": 2, ".proxy": 1, "this.hide": 1, - "this": 577, - "}": 2712, + "this": 578, + "}": 2714, "Modal.prototype": 1, "constructor": 8, "toggle": 10, - "return": 944, - "[": 1459, + "return": 945, + "[": 1461, "this.isShown": 3, - "]": 1456, + "]": 1458, "show": 10, "that": 33, "e": 663, @@ -15423,7 +28545,7 @@ "hide": 8, "body": 22, "modal": 4, - "-": 705, + "-": 706, "open": 2, "fade": 4, "hidden": 12, @@ -16083,6 +29205,12 @@ "_results.push": 2, "math.cube": 2, ".slice": 6, + "window": 18, + "angular": 1, + "Array.prototype.last": 1, + "this.length": 41, + "app": 3, + "angular.module": 1, "A": 24, "w": 110, "ma": 3, @@ -16221,7 +29349,6 @@ "c.prototype": 1, "init": 7, "this.context": 17, - "this.length": 40, "s.body": 2, "this.selector": 16, "Ta.exec": 1, @@ -16782,7 +29909,6 @@ "scrollTo": 1, "CSS1Compat": 1, "client": 3, - "window": 16, "document": 26, "window.document": 2, "navigator": 3, @@ -18436,7 +31562,6 @@ "week": 1, "bK": 1, "about": 1, - "app": 2, "storage": 1, "extension": 1, "widget": 1, @@ -19615,6 +32740,7 @@ "js": 1, "classes.join": 1, "this.document": 1, + "window.angular": 1, "PEG.parser": 1, "quote": 3, "result0": 264, @@ -21382,12 +34508,114 @@ "logger": 2 }, "JSON": { - "{": 143, - "}": 143, - "[": 165, - "]": 165, + "{": 73, + "[": 17, + "]": 17, + "}": 73, "true": 3 }, + "JSON5": { + "{": 6, + "foo": 1, + "while": 1, + "true": 1, + "this": 1, + "here": 1, + "//": 2, + "inline": 1, + "comment": 1, + "hex": 1, + "xDEADbeef": 1, + "half": 1, + ".5": 1, + "delta": 1, + "+": 1, + "to": 1, + "Infinity": 1, + "and": 1, + "beyond": 1, + "finally": 1, + "oh": 1, + "[": 3, + "]": 3, + "}": 6, + "name": 1, + "version": 1, + "description": 1, + "keywords": 1, + "author": 1, + "contributors": 1, + "main": 1, + "bin": 1, + "dependencies": 1, + "devDependencies": 1, + "mocha": 1, + "scripts": 1, + "build": 1, + "test": 1, + "homepage": 1, + "repository": 1, + "type": 1, + "url": 1 + }, + "JSONiq": { + "(": 14, + "Query": 2, + "for": 4, + "returning": 1, + "one": 1, + "database": 2, + "entry": 1, + ")": 14, + "import": 5, + "module": 5, + "namespace": 5, + "req": 6, + ";": 9, + "catalog": 4, + "variable": 4, + "id": 3, + "param": 4, + "-": 11, + "values": 4, + "[": 5, + "]": 5, + "part": 2, + "get": 2, + "data": 4, + "by": 2, + "key": 1, + "searching": 1, + "the": 1, + "keywords": 1, + "index": 3, + "phrase": 2, + "limit": 2, + "integer": 1, + "result": 1, + "at": 1, + "idx": 2, + "in": 1, + "search": 1, + "where": 1, + "le": 1, + "let": 1, + "result.s": 1, + "result.p": 1, + "return": 1, + "{": 2, + "|": 2, + "score": 1, + "result.r": 1, + "}": 2 + }, + "JSONLD": { + "{": 7, + "}": 7, + "[": 1, + "null": 2, + "]": 1 + }, "Julia": { "##": 5, "Test": 1, @@ -21487,6 +34715,14 @@ "end": 3, "return": 1 }, + "Kit": { + "
": 1, + "

": 1, + "

": 1, + "

": 1, + "

": 1, + "
": 1 + }, "Kotlin": { "package": 1, "addressbook": 1, @@ -21550,6 +34786,29 @@ "true": 1, "return": 1 }, + "KRL": { + "ruleset": 1, + "sample": 1, + "{": 3, + "meta": 1, + "name": 1, + "description": 1, + "<<": 1, + "Hello": 1, + "world": 1, + "author": 1, + "}": 3, + "rule": 1, + "hello": 1, + "select": 1, + "when": 1, + "web": 1, + "pageview": 1, + "notify": 1, + "(": 1, + ")": 1, + ";": 1 + }, "Lasso": { "<": 7, "LassoScript": 1, @@ -22414,6 +35673,257 @@ "separate": 2, "COUNT": 2 }, + "Latte": { + "{": 54, + "**": 1, + "*": 4, + "@param": 3, + "string": 2, + "basePath": 1, + "web": 1, + "base": 1, + "path": 1, + "robots": 2, + "tell": 1, + "how": 1, + "to": 2, + "index": 1, + "the": 1, + "content": 1, + "of": 3, + "a": 4, + "page": 1, + "(": 18, + "optional": 1, + ")": 18, + "array": 1, + "flashes": 1, + "flash": 3, + "messages": 1, + "}": 54, + "": 1, + "html": 1, + "": 1, + "": 1, + "": 6, + "charset=": 1, + "name=": 4, + "content=": 5, + "n": 8, + "ifset=": 1, + "http": 1, + "equiv=": 1, + "": 1, + "ifset": 1, + "title": 4, + "/ifset": 1, + "Translation": 1, + "report": 1, + "": 1, + "": 2, + "rel=": 2, + "media=": 1, + "href=": 4, + "": 3, + "block": 3, + "#head": 1, + "/block": 3, + "": 1, + "": 1, + "class=": 12, + "document.documentElement.className": 1, + "+": 3, + "#navbar": 1, + "include": 3, + "_navbar.latte": 1, + "
": 6, + "inner": 1, + "foreach=": 3, + "_flash.latte": 1, + "
": 7, + "#content": 1, + "
": 1, + "
": 1, + "src=": 1, + "#scripts": 1, + "": 1, + "": 1, + "var": 3, + "define": 1, + "author": 7, + "": 2, + "Author": 2, + "authorId": 2, + "-": 71, + "id": 3, + "black": 2, + "avatar": 2, + "img": 2, + "rounded": 2, + "class": 2, + "tooltip": 4, + "Total": 1, + "time": 4, + "shortName": 1, + "translated": 4, + "on": 5, + "all": 1, + "videos.": 1, + "amaraCallbackLink": 1, + "row": 2, + "col": 3, + "md": 2, + "outOf": 5, + "done": 7, + "threshold": 4, + "alert": 2, + "warning": 2, + "<=>": 2, + "Seems": 1, + "complete": 1, + "|": 6, + "out": 1, + "

": 2, + "elseif": 2, + "<": 1, + "p": 1, + "if": 7, + "Although": 1, + "is": 1, + "there": 1, + "are": 1, + "no": 1, + "English": 1, + "subtitles": 1, + "for": 1, + "comparison.": 1, + "/if": 8, + "/cache": 1, + "editor": 1, + "ksid": 2, + "new": 5, + "video": 2, + "siteId": 1, + "Video": 1, + "khanovaskola.cz": 1, + "revision": 18, + "rev": 4, + "this": 3, + "older": 1, + "#": 2, + "else": 2, + "newer": 1, + "
": 1, + "

": 1, + "diffs": 3, + "noescape": 2, + "

": 1, + "description": 1, + "text": 4, + "as": 2, + "line": 3, + "context": 1, + "splitter": 1, + "template": 1, + "bottom": 1, + "Expand": 1, + "fa": 16, + "sort": 1, + "ellipsis": 1, + "h": 1, + "success": 1, + "amaraEdit": 1, + "amaraId": 2, + "editButton": 1, + "btn": 17, + "default": 6, + "edit": 1, + "khanAcademy": 1, + "kaButton": 1, + "link": 1, + "info": 1, + "group": 4, + "approve": 1, + "thumbs": 3, + "up": 1, + "markIncomplete": 2, + "down": 2, + "redirectToAdd": 1, + "plus": 1, + "square": 1, + "table": 2, + "condensed": 1, + "revisions": 1, + "revId": 1, + "secondary": 2, + "Percent": 1, + "lines": 1, + "&": 1, + "thinsp": 1, + "%": 1, + "": 3, + "": 3, + "": 2, + "incomplete": 3, + "approved": 2, + "": 1, + "user": 1, + "loggedIn": 1, + "&&": 1, + "comments": 2, + "count": 1, + "": 2, + "": 2, + "colspan=": 1, + "": 1, + "comment": 4, + "left": 1, + "createdAt": 1, + "timeAgo": 1, + "noborder": 1, + "input": 3, + "form": 1, + "control": 1, + "Comment": 1, + "only": 1, + "visible": 1, + "other": 1, + "editors": 1, + "save": 1, + "share": 1, + "": 1, + "": 1, + "/form": 1, + "/foreach": 1, + "
": 1 + }, "Less": { "@blue": 4, "#3bbfce": 1, @@ -22436,6 +35946,597 @@ "/": 2, "margin": 1 }, + "LFE": { + ";": 213, + "Copyright": 4, + "(": 217, + "c": 4, + ")": 231, + "Duncan": 4, + "McGreggor": 4, + "": 2, + "Licensed": 3, + "under": 9, + "the": 36, + "Apache": 3, + "License": 12, + "Version": 3, + "you": 3, + "may": 6, + "not": 5, + "use": 6, + "this": 3, + "file": 6, + "except": 3, + "in": 10, + "compliance": 3, + "with": 8, + "License.": 6, + "You": 3, + "obtain": 3, + "a": 8, + "copy": 3, + "of": 10, + "at": 4, + "http": 4, + "//www.apache.org/licenses/LICENSE": 3, + "-": 98, + "Unless": 3, + "required": 3, + "by": 4, + "applicable": 3, + "law": 3, + "or": 6, + "agreed": 3, + "to": 10, + "writing": 3, + "software": 3, + "distributed": 6, + "is": 5, + "on": 4, + "an": 5, + "BASIS": 3, + "WITHOUT": 3, + "WARRANTIES": 3, + "OR": 3, + "CONDITIONS": 3, + "OF": 3, + "ANY": 3, + "KIND": 3, + "either": 3, + "express": 3, + "implied.": 3, + "See": 3, + "for": 5, + "specific": 3, + "language": 3, + "governing": 3, + "permissions": 3, + "and": 7, + "limitations": 3, + "File": 4, + "church.lfe": 1, + "Author": 3, + "Purpose": 3, + "Demonstrating": 2, + "church": 20, + "numerals": 1, + "from": 2, + "lambda": 18, + "calculus": 1, + "The": 4, + "code": 2, + "below": 3, + "was": 1, + "used": 1, + "create": 4, + "section": 1, + "user": 1, + "guide": 1, + "here": 1, + "//lfe.github.io/user": 1, + "guide/recursion/5.html": 1, + "Here": 1, + "some": 2, + "example": 2, + "usage": 1, + "slurp": 2, + "five/0": 2, + "int2": 1, + "get": 21, + "defmodule": 2, + "export": 2, + "all": 1, + "defun": 20, + "zero": 2, + "s": 19, + "x": 12, + "one": 1, + "funcall": 23, + "two": 1, + "three": 1, + "four": 1, + "five": 1, + "int": 2, + "successor": 3, + "n": 4, + "+": 2, + "int1": 1, + "numeral": 8, + "#": 3, + "successor/1": 1, + "count": 7, + "limit": 4, + "cond": 1, + "/": 1, + "integer": 2, + "*": 6, + "Mode": 1, + "LFE": 4, + "Code": 1, + "Paradigms": 1, + "Artificial": 1, + "Intelligence": 1, + "Programming": 1, + "Peter": 1, + "Norvig": 1, + "gps1.lisp": 1, + "First": 1, + "version": 1, + "GPS": 1, + "General": 1, + "Problem": 1, + "Solver": 1, + "Converted": 1, + "Robert": 3, + "Virding": 3, + "Define": 1, + "macros": 1, + "global": 2, + "variable": 2, + "access.": 1, + "This": 2, + "hack": 1, + "very": 1, + "naughty": 1, + "defsyntax": 2, + "defvar": 2, + "[": 3, + "name": 8, + "val": 2, + "]": 3, + "let": 6, + "v": 3, + "put": 1, + "getvar": 3, + "solved": 1, + "gps": 1, + "state": 4, + "goals": 2, + "Set": 1, + "variables": 1, + "but": 1, + "existing": 1, + "*ops*": 1, + "*state*": 5, + "current": 1, + "list": 13, + "conditions.": 1, + "if": 1, + "every": 1, + "fun": 1, + "achieve": 1, + "op": 8, + "action": 3, + "setvar": 2, + "set": 1, + "difference": 1, + "del": 5, + "union": 1, + "add": 3, + "drive": 1, + "son": 2, + "school": 2, + "preconds": 4, + "shop": 6, + "installs": 1, + "battery": 1, + "car": 1, + "works": 1, + "make": 2, + "communication": 2, + "telephone": 1, + "have": 3, + "phone": 1, + "book": 1, + "give": 1, + "money": 3, + "has": 1, + "mnesia_demo.lfe": 1, + "A": 1, + "simple": 4, + "Mnesia": 2, + "demo": 2, + "LFE.": 1, + "contains": 1, + "using": 1, + "access": 1, + "tables.": 1, + "It": 1, + "shows": 2, + "how": 2, + "emp": 1, + "XXXX": 1, + "macro": 1, + "ETS": 1, + "match": 5, + "pattern": 1, + "together": 1, + "mnesia": 8, + "match_object": 1, + "specifications": 1, + "select": 1, + "Query": 2, + "List": 2, + "Comprehensions.": 1, + "mnesia_demo": 1, + "new": 2, + "by_place": 1, + "by_place_ms": 1, + "by_place_qlc": 2, + "defrecord": 1, + "person": 8, + "place": 7, + "job": 3, + "Start": 1, + "table": 2, + "we": 1, + "will": 1, + "memory": 1, + "only": 1, + "schema.": 1, + "start": 1, + "create_table": 1, + "attributes": 1, + "Initialise": 1, + "table.": 1, + "people": 1, + "spec": 1, + "p": 2, + "j": 2, + "when": 1, + "tuple": 1, + "transaction": 2, + "f": 3, + "Use": 1, + "Comprehensions": 1, + "records": 1, + "q": 2, + "qlc": 2, + "lc": 1, + "<": 1, + "e": 1, + "object.lfe": 1, + "OOP": 1, + "closures": 1, + "object": 16, + "system": 1, + "demonstrated": 1, + "do": 2, + "following": 2, + "objects": 2, + "call": 2, + "methods": 5, + "those": 1, + "which": 1, + "can": 1, + "other": 1, + "update": 1, + "instance": 2, + "Note": 1, + "however": 1, + "that": 1, + "his": 1, + "does": 1, + "demonstrate": 1, + "inheritance.": 1, + "To": 1, + "cd": 1, + "examples": 1, + "../bin/lfe": 1, + "pa": 1, + "../ebin": 1, + "Load": 1, + "fish": 6, + "class": 3, + "#Fun": 1, + "": 1, + "Execute": 1, + "basic": 1, + "species": 7, + "mommy": 3, + "move": 4, + "Carp": 1, + "swam": 1, + "feet": 1, + "ok": 1, + "id": 9, + "Now": 1, + "strictly": 1, + "necessary.": 1, + "When": 1, + "isn": 1, + "children": 10, + "formatted": 1, + "verb": 2, + "self": 6, + "distance": 2, + "erlang": 1, + "length": 1, + "method": 7, + "define": 1, + "info": 1, + "reproduce": 1 + }, + "Liquid": { + "": 1, + "html": 1, + "PUBLIC": 1, + "W3C": 1, + "DTD": 2, + "XHTML": 1, + "1": 1, + "0": 1, + "Transitional": 1, + "EN": 1, + "http": 2, + "www": 1, + "w3": 1, + "org": 1, + "TR": 1, + "xhtml1": 2, + "transitional": 1, + "dtd": 1, + "": 1, + "xmlns=": 1, + "xml": 1, + "lang=": 2, + "": 1, + "": 1, + "equiv=": 1, + "content=": 1, + "": 1, + "{": 89, + "shop.name": 2, + "}": 89, + "-": 4, + "page_title": 1, + "": 1, + "|": 31, + "global_asset_url": 5, + "stylesheet_tag": 3, + "script_tag": 5, + "shopify_asset_url": 1, + "asset_url": 2, + "content_for_header": 1, + "": 1, + "": 1, + "id=": 28, + "

": 1, + "class=": 14, + "": 9, + "href=": 9, + "Skip": 1, + "to": 1, + "navigation.": 1, + "": 9, + "

": 1, + "%": 46, + "if": 5, + "cart.item_count": 7, + "
": 23, + "style=": 5, + "

": 3, + "There": 1, + "pluralize": 3, + "in": 8, + "title=": 3, + "your": 1, + "cart": 1, + "

": 3, + "

": 1, + "Your": 1, + "subtotal": 1, + "is": 1, + "cart.total_price": 2, + "money": 5, + ".": 3, + "

": 1, + "for": 6, + "item": 1, + "cart.items": 1, + "onMouseover=": 2, + "onMouseout=": 2, + "": 4, + "src=": 5, + "
": 23, + "endfor": 6, + "
": 2, + "endif": 5, + "

": 1, + "

": 1, + "onclick=": 1, + "View": 1, + "Mini": 1, + "Cart": 1, + "(": 1, + ")": 1, + "
": 3, + "content_for_layout": 1, + "
    ": 5, + "link": 2, + "linklists.main": 1, + "menu.links": 1, + "
  • ": 5, + "link.title": 2, + "link_to": 2, + "link.url": 2, + "
  • ": 5, + "
": 5, + "tags": 1, + "tag": 4, + "collection.tags": 1, + "": 1, + "link_to_add_tag": 1, + "": 1, + "highlight_active_tag": 1, + "link_to_tag": 1, + "linklists.footer.links": 1, + "All": 1, + "prices": 1, + "are": 1, + "shop.currency": 1, + "Powered": 1, + "by": 1, + "Shopify": 1, + "": 1, + "": 1, + "

": 1, + "We": 1, + "have": 1, + "wonderful": 1, + "products": 1, + "

": 1, + "image": 1, + "product.images": 1, + "forloop.first": 1, + "rel=": 2, + "alt=": 2, + "else": 1, + "product.title": 1, + "Vendor": 1, + "product.vendor": 1, + "link_to_vendor": 1, + "Type": 1, + "product.type": 1, + "link_to_type": 1, + "": 1, + "product.price_min": 1, + "product.price_varies": 1, + "product.price_max": 1, + "": 1, + "
": 1, + "action=": 1, + "method=": 1, + "": 1, + "": 1, + "type=": 2, + "
": 1, + "product.description": 1, + "": 1 + }, + "Literate Agda": { + "documentclass": 1, + "{": 35, + "article": 1, + "}": 35, + "usepackage": 7, + "amssymb": 1, + "bbm": 1, + "[": 2, + "greek": 1, + "english": 1, + "]": 2, + "babel": 1, + "ucs": 1, + "utf8x": 1, + "inputenc": 1, + "autofe": 1, + "DeclareUnicodeCharacter": 3, + "ensuremath": 3, + "ulcorner": 1, + "urcorner": 1, + "overline": 1, + "equiv": 1, + "fancyvrb": 1, + "DefineVerbatimEnvironment": 1, + "code": 3, + "Verbatim": 1, + "%": 1, + "Add": 1, + "fancy": 1, + "options": 1, + "here": 1, + "if": 1, + "you": 3, + "like.": 1, + "begin": 2, + "document": 2, + "module": 3, + "NatCat": 1, + "where": 2, + "open": 2, + "import": 2, + "Relation.Binary.PropositionalEquality": 1, + "-": 21, + "If": 1, + "can": 1, + "show": 1, + "that": 1, + "a": 1, + "relation": 1, + "only": 1, + "ever": 1, + "has": 1, + "one": 1, + "inhabitant": 5, + "get": 1, + "the": 1, + "category": 1, + "laws": 1, + "for": 1, + "free": 1, + "EasyCategory": 3, + "(": 36, + "obj": 4, + "Set": 2, + ")": 36, + "_": 6, + "x": 34, + "y": 28, + "z": 18, + "id": 9, + "single": 4, + "r": 26, + "s": 29, + "assoc": 2, + "w": 4, + "t": 6, + "Data.Nat": 1, + "same": 5, + ".0": 2, + "n": 14, + "refl": 6, + ".": 5, + "suc": 6, + "m": 6, + "cong": 1, + "trans": 5, + ".n": 1, + "zero": 1, + "Nat": 1, + "end": 2 + }, "Literate CoffeeScript": { "The": 2, "**Scope**": 2, @@ -22878,27 +36979,27 @@ "in_8_list": 1 }, "M": { - "%": 203, + "%": 207, "zewdAPI": 52, - ";": 1275, + ";": 1309, "Enterprise": 5, "Web": 5, "Developer": 5, "run": 2, - "-": 1604, + "-": 1605, "time": 9, "functions": 4, - "and": 56, + "and": 59, "user": 27, "APIs": 1, "Product": 2, - "(": 2142, + "(": 2144, "Build": 6, - ")": 2150, + ")": 2152, "Date": 2, "Fri": 1, "Nov": 1, - "|": 170, + "|": 171, "for": 77, "GT.M": 30, "m_apache": 3, @@ -22919,52 +37020,52 @@ "rtweed@mgateway.com": 4, "This": 26, "program": 19, - "is": 81, + "is": 88, "free": 15, "software": 12, - "you": 16, - "can": 15, + "you": 17, + "can": 20, "redistribute": 11, - "it": 44, + "it": 45, "and/or": 11, "modify": 11, "under": 14, - "the": 217, + "the": 223, "terms": 11, - "of": 80, + "of": 84, "GNU": 33, "Affero": 33, "General": 33, "Public": 33, "License": 48, - "as": 22, + "as": 23, "published": 11, - "by": 33, + "by": 35, "Free": 11, "Software": 11, "Foundation": 11, "either": 13, "version": 16, - "or": 46, + "or": 50, "at": 21, "your": 16, "option": 12, - "any": 15, + "any": 16, "later": 11, "version.": 11, "distributed": 13, - "in": 78, + "in": 80, "hope": 11, - "that": 17, + "that": 19, "will": 23, - "be": 32, + "be": 35, "useful": 11, - "but": 17, + "but": 19, "WITHOUT": 12, "ANY": 12, "WARRANTY": 11, "without": 11, - "even": 11, + "even": 12, "implied": 11, "warranty": 11, "MERCHANTABILITY": 11, @@ -22978,21 +37079,21 @@ "details.": 12, "You": 13, "should": 16, - "have": 17, + "have": 21, "received": 11, - "a": 112, + "a": 130, "copy": 13, "along": 11, - "with": 43, - "this": 38, + "with": 45, + "this": 39, "program.": 9, "If": 14, - "not": 37, - "see": 25, + "not": 39, + "see": 26, "": 11, - ".": 814, - "QUIT": 249, - "_": 126, + ".": 815, + "QUIT": 251, + "_": 127, "getVersion": 1, "zewdCompiler": 6, "date": 1, @@ -23066,7 +37167,7 @@ "text": 6, "replaceAll": 11, "writeLine": 2, - "line": 9, + "line": 14, "CacheTempBuffer": 2, "j": 67, "increment": 11, @@ -23084,7 +37185,7 @@ "value": 72, "getSessionValue": 3, "tr": 13, - "+": 188, + "+": 189, "f": 93, "o": 51, "q": 244, @@ -23100,7 +37201,7 @@ "type": 2, "avoid": 1, "Cache": 3, - "bug": 1, + "bug": 2, "getPhraseIndex": 1, "zewdCompiler5": 1, "licensed": 1, @@ -23115,7 +37216,7 @@ "wldSessid": 1, "zzname": 1, "zv": 6, - "[": 53, + "[": 54, "extcErr": 1, "mess": 3, "namespace": 1, @@ -23223,7 +37324,7 @@ "char": 9, "len": 8, "create": 6, - "characters": 4, + "characters": 8, "str": 15, "convertDateToSeconds": 1, "hdate": 7, @@ -23268,12 +37369,12 @@ "format": 2, "Offset": 1, "relative": 1, - "to": 73, + "to": 74, "GMT": 1, "eg": 3, "hh": 4, "ss": 4, - "<": 19, + "<": 20, "_hh": 1, "time#3600": 1, "_mm": 1, @@ -23284,7 +37385,7 @@ "openNewFile": 2, "openFile": 2, "openDOM": 2, - "&": 27, + "&": 28, "#39": 1, "<\",\"<\")>": 1, "string=": 1, @@ -23293,7 +37394,7 @@ "HTML": 1, "quot": 2, "stop": 20, - "no": 53, + "no": 54, "no2": 1, "p1_c_p2": 1, "getIP": 2, @@ -23322,7 +37423,7 @@ "linkToParentSession": 2, "zewdCompiler20": 1, "exportToGTM": 1, - "routine": 4, + "routine": 6, "zewdDemo": 1, "Tutorial": 1, "Wed": 1, @@ -23371,10 +37472,10 @@ ".value": 1, "testField2": 1, "field3": 1, - "must": 7, + "must": 8, "null": 6, "dateTime": 1, - "start": 24, + "start": 26, "student": 14, "zwrite": 1, "write": 59, @@ -23400,12 +37501,91 @@ "todrop": 2, "Populate": 1, "values": 4, - "on": 15, + "on": 17, "first": 10, "use": 5, "only.": 1, "zextract": 3, "zlength": 3, + "Comment": 1, + "comment": 4, + "block": 1, + "comments": 5, + "always": 2, + "semicolon": 1, + "next": 1, + "while": 4, + "legal": 1, + "blank": 1, + "whitespace": 2, + "alone": 1, + "valid": 2, + "**": 4, + "Comments": 1, + "graphic": 3, + "character": 5, + "such": 1, + "@#": 1, + "*": 6, + "{": 5, + "}": 5, + "]": 15, + "/": 3, + "space": 1, + "considered": 1, + "though": 1, + "t": 12, + "it.": 2, + "ASCII": 2, + "whose": 1, + "numeric": 8, + "code": 29, + "above": 3, + "below": 1, + "are": 14, + "NOT": 2, + "allowed": 18, + "routine.": 1, + "multiple": 1, + "semicolons": 1, + "okay": 1, + "has": 7, + "tag": 2, + "after": 3, + "does": 1, + "command": 11, + "Tag1": 1, + "Tags": 2, + "an": 14, + "uppercase": 2, + "lowercase": 1, + "alphabetic": 2, + "series": 2, + "HELO": 1, + "most": 1, + "common": 1, + "label": 5, + "LABEL": 1, + "followed": 1, + "directly": 1, + "open": 1, + "parenthesis": 2, + "formal": 1, + "list": 1, + "variables": 3, + "close": 1, + "ANOTHER": 1, + "X": 19, + "Normally": 1, + "subroutine": 1, + "would": 2, + "ended": 1, + "we": 1, + "taking": 1, + "advantage": 1, + "rule": 1, + "END": 1, + "implicit": 1, "Digest": 2, "Extension": 9, "Piotr": 7, @@ -23436,7 +37616,6 @@ "digest.init": 3, "usually": 1, "when": 11, - "an": 11, "invalid": 4, "algorithm": 1, "was": 5, @@ -23451,9 +37630,7 @@ "contact": 2, "me": 2, "questions": 2, - "comments": 4, "returns": 7, - "ASCII": 1, "HEX": 1, "all": 8, "one": 5, @@ -23505,7 +37682,6 @@ "illustrate": 1, "dynamic": 1, "scope": 1, - "variables": 2, "triangle1": 1, "sum": 15, "main2": 1, @@ -23513,12 +37689,10 @@ "triangle2": 1, "compute": 2, "Fibonacci": 1, - "series": 1, "b": 64, "term": 10, "start1": 2, "entry": 5, - "label": 4, "start2": 1, "function": 6, "computes": 1, @@ -23630,7 +37804,6 @@ "modulo": 1, "division.": 1, "//en.wikipedia.org/wiki/MD5": 1, - "t": 11, "#64": 1, "msg_": 1, "_m_": 1, @@ -23672,9 +37845,7 @@ "keyId": 108, "been": 4, "tested": 1, - "valid": 1, "these": 1, - "are": 11, "called": 8, "To": 2, "Initialise": 2, @@ -23736,7 +37907,6 @@ "getAttributeId": 2, "domain": 1, "Not": 1, - "allowed": 17, "same": 2, "remove": 6, "existing": 2, @@ -23827,7 +37997,6 @@ "runSelect": 3, "count": 18, "select": 3, - "*": 5, "where": 6, "limit": 14, "asc": 1, @@ -23875,7 +38044,6 @@ ".itemStack": 1, "***": 2, "listCopy": 3, - "numeric": 6, "N.N": 12, "N.N1": 4, "externalSelect": 2, @@ -24086,7 +38254,6 @@ "protect": 11, "erropt": 6, "isstring": 5, - "code": 28, "pcre.config": 1, ".name": 1, ".erropt": 3, @@ -24110,7 +38277,6 @@ "LANG": 4, "LC_*": 1, "output": 49, - "command": 9, "Debian": 2, "tip": 1, "dpkg": 1, @@ -24184,7 +38350,6 @@ "begin_": 1, "_end": 1, "store": 6, - "above": 2, "stores": 1, "captured": 6, "key=": 2, @@ -24260,8 +38425,6 @@ "matched": 1, "back": 4, "th": 3, - "{": 4, - "}": 4, "replaced": 1, "substitution": 2, "begins": 1, @@ -24294,7 +38457,6 @@ "@ref": 2, "E": 12, "COMPILE": 2, - "has": 6, "meaning": 1, "zs": 2, "re": 2, @@ -24374,7 +38536,6 @@ "Run": 1, ".offset": 1, "used.": 2, - "always": 1, "strings": 1, "submitted": 1, "exact": 1, @@ -24383,8 +38544,6 @@ "way": 1, "i*2": 3, "what": 2, - "while": 3, - "/": 2, "/mg": 2, "aaa": 1, "nbb": 1, @@ -24407,7 +38566,6 @@ "listing": 1, "CHAR": 1, "different": 3, - "character": 2, "modes": 1, "In": 1, "probably": 1, @@ -24483,7 +38641,6 @@ "runs": 2, "especially": 1, "there": 2, - "would": 1, "paths": 2, "tree": 1, "checked.": 1, @@ -24588,7 +38745,6 @@ "false": 5, "post2": 1, "special": 2, - "after": 2, "post": 1, "condition": 1, "PRCAAPR": 1, @@ -24605,7 +38761,6 @@ "Accounts": 1, "Receivable": 1, "**198": 1, - "**": 2, "Mar": 1, "Per": 1, "VHA": 1, @@ -24615,7 +38770,6 @@ "PRCATY": 2, "NEW": 3, "DIC": 6, - "X": 18, "Y": 26, "DEBT": 10, "PRCADB": 5, @@ -24658,7 +38812,6 @@ "_PRCATY_": 1, "COMP1": 2, "RCY": 5, - "]": 14, "COMP2": 2, "_STAT_": 1, "_STAT": 1, @@ -24892,7 +39045,6 @@ "WVBEGDT1": 1, "NOTIFICATION": 1, "IS": 3, - "NOT": 1, "QUEUED.": 1, "WVB": 4, "OR": 2, @@ -25006,7 +39158,6 @@ "TODO": 1, "Caller": 1, "indentation": 1, - "comment": 1, "tab": 1, "space.": 1, "M/Wire": 4, @@ -25052,7 +39203,6 @@ "simply": 1, "Stop": 1, "RESJOB": 1, - "it.": 1, "mwireVersion": 4, "mwireDate": 2, "July": 1, @@ -25212,31 +39362,285 @@ "Markdown": { "Tender": 1 }, + "Mask": { + "header": 1, + "{": 10, + "img": 1, + ".logo": 1, + "src": 1, + "alt": 1, + "logo": 1, + ";": 3, + "h4": 1, + "if": 1, + "(": 3, + "currentUser": 1, + ")": 3, + ".account": 1, + "a": 1, + "href": 1, + "}": 10, + ".view": 1, + "ul": 1, + "for": 1, + "user": 1, + "index": 1, + "of": 1, + "users": 1, + "li.user": 1, + "data": 1, + "-": 3, + "id": 1, + ".name": 1, + ".count": 1, + ".date": 1, + "countdownComponent": 1, + "input": 1, + "type": 1, + "text": 1, + "dualbind": 1, + "value": 1, + "button": 1, + "x": 2, + "signal": 1, + "h5": 1, + "animation": 1, + "slot": 1, + "@model": 1, + "@next": 1, + "footer": 1, + "bazCompo": 1 + }, + "Mathematica": { + "Get": 1, + "[": 307, + "]": 286, + "Notebook": 2, + "{": 227, + "Cell": 28, + "CellGroupData": 8, + "BoxData": 19, + "RowBox": 34, + "}": 222, + "CellChangeTimes": 13, + "-": 134, + "*": 19, + "SuperscriptBox": 1, + "MultilineFunction": 1, + "None": 8, + "Open": 7, + "NumberMarks": 3, + "False": 19, + "GraphicsBox": 2, + "Hue": 5, + "LineBox": 5, + "CompressedData": 9, + "AspectRatio": 1, + "NCache": 1, + "GoldenRatio": 1, + "(": 2, + ")": 1, + "Axes": 1, + "True": 7, + "AxesLabel": 1, + "AxesOrigin": 1, + "Method": 2, + "PlotRange": 1, + "PlotRangeClipping": 1, + "PlotRangePadding": 1, + "Scaled": 10, + "WindowSize": 1, + "WindowMargins": 1, + "Automatic": 9, + "FrontEndVersion": 1, + "StyleDefinitions": 1, + "NamespaceBox": 1, + "DynamicModuleBox": 1, + "Typeset": 7, + "q": 1, + "opts": 1, + "AppearanceElements": 1, + "Asynchronous": 1, + "All": 1, + "TimeConstraint": 1, + "elements": 1, + "pod1": 1, + "XMLElement": 13, + "FormBox": 4, + "TagBox": 9, + "GridBox": 2, + "PaneBox": 1, + "StyleBox": 4, + "CellContext": 5, + "TagBoxWrapper": 4, + "AstronomicalData": 1, + "Identity": 2, + "LineIndent": 4, + "LineSpacing": 2, + "GridBoxBackground": 1, + "GrayLevel": 17, + "GridBoxItemSize": 2, + "ColumnsEqual": 2, + "RowsEqual": 2, + "GridBoxDividers": 1, + "GridBoxSpacings": 2, + "GridBoxAlignment": 1, + "Left": 1, + "Baseline": 1, + "AllowScriptLevelChange": 2, + "BaselinePosition": 2, + "Center": 1, + "AbsoluteThickness": 3, + "TraditionalForm": 3, + "PolynomialForm": 1, + "#": 2, + "TraditionalOrder": 1, + "&": 2, + "pod2": 1, + "LinebreakAdjustments": 2, + "FontFamily": 1, + "UnitFontFamily": 1, + "FontSize": 1, + "Smaller": 1, + "StripOnInput": 1, + "SyntaxForm": 2, + "Dot": 2, + "ZeroWidthTimes": 1, + "pod3": 1, + "TemplateBox": 1, + "GraphicsComplexBox": 1, + "EdgeForm": 2, + "Directive": 5, + "Opacity": 2, + "GraphicsGroupBox": 2, + "PolygonBox": 3, + "RGBColor": 3, + "Dashing": 1, + "Small": 1, + "GridLines": 1, + "Dynamic": 1, + "Join": 1, + "Replace": 1, + "MousePosition": 1, + "Graphics": 1, + "Pattern": 2, + "CalculateUtilities": 5, + "GraphicsUtilities": 5, + "Private": 5, + "x": 2, + "Blank": 2, + "y": 2, + "Epilog": 1, + "CapForm": 1, + "Offset": 8, + "DynamicBox": 1, + "ToBoxes": 1, + "DynamicModule": 1, + "pt": 1, + "NearestFunction": 1, + "Paclet": 1, + "Name": 1, + "Version": 1, + "MathematicaVersion": 1, + "Description": 1, + "Creator": 1, + "Extensions": 1, + "Language": 1, + "MainPage": 1, + "BeginPackage": 1, + ";": 42, + "PossiblyTrueQ": 3, + "usage": 22, + "PossiblyFalseQ": 2, + "PossiblyNonzeroQ": 3, + "Begin": 2, + "expr_": 4, + "Not": 6, + "TrueQ": 4, + "expr": 4, + "End": 2, + "AnyQ": 3, + "AnyElementQ": 4, + "AllQ": 2, + "AllElementQ": 2, + "AnyNonzeroQ": 2, + "AnyPossiblyNonzeroQ": 2, + "RealQ": 3, + "PositiveQ": 3, + "NonnegativeQ": 3, + "PositiveIntegerQ": 3, + "NonnegativeIntegerQ": 4, + "IntegerListQ": 5, + "PositiveIntegerListQ": 3, + "NonnegativeIntegerListQ": 3, + "IntegerOrListQ": 2, + "PositiveIntegerOrListQ": 2, + "NonnegativeIntegerOrListQ": 2, + "SymbolQ": 2, + "SymbolOrNumberQ": 2, + "cond_": 4, + "L_": 5, + "Fold": 3, + "Or": 1, + "cond": 4, + "/@": 3, + "L": 4, + "Flatten": 1, + "And": 4, + "SHEBANG#!#!=": 1, + "n_": 5, + "Im": 1, + "n": 8, + "Positive": 2, + "IntegerQ": 3, + "&&": 4, + "input_": 6, + "ListQ": 1, + "input": 11, + "MemberQ": 3, + "IntegerQ/@input": 1, + "||": 4, + "a_": 2, + "Head": 2, + "a": 3, + "Symbol": 2, + "NumericQ": 1, + "EndPackage": 1, + "Do": 1, + "If": 1, + "Length": 1, + "Divisors": 1, + "Binomial": 2, + "i": 3, + "+": 2, + "Print": 1, + "Break": 1 + }, "Matlab": { - "function": 32, - "[": 309, + "function": 34, + "[": 311, "dx": 6, - "y": 22, - "]": 309, + "y": 25, + "]": 311, "adapting_structural_model": 2, - "(": 1357, + "(": 1379, "t": 32, - "x": 42, + "x": 46, "u": 3, "varargin": 25, - ")": 1358, - "%": 552, - "size": 8, + ")": 1380, + "%": 554, + "size": 11, "aux": 3, "{": 157, - "end": 147, + "end": 150, "}": 157, - ";": 891, + ";": 909, "m": 44, - "zeros": 60, + "zeros": 61, "b": 12, - "for": 77, - "i": 334, + "for": 78, + "i": 338, "if": 52, "+": 169, "elseif": 14, @@ -25252,7 +39656,7 @@ "*": 46, "aux.b": 3, "e": 14, - "-": 672, + "-": 673, "c2": 5, "Yc": 5, "parallel": 2, @@ -25272,7 +39676,7 @@ "n": 102, "|": 2, "&": 4, - "error": 14, + "error": 16, "sum": 2, "/length": 1, "bicycle": 7, @@ -25450,7 +39854,7 @@ "num2str": 10, "bikeData.handlingMetric.num": 1, "bikeData.handlingMetric.den": 1, - "w": 3, + "w": 6, "mag": 4, "phase": 2, "bode": 5, @@ -25530,7 +39934,7 @@ "Lateral": 1, "Deviation": 1, "paths.eps": 1, - "d": 3, + "d": 12, "like": 1, "plot.": 1, "names": 6, @@ -25626,6 +40030,23 @@ "minLine": 4, "min": 1, "speedInd": 12, + "cross_validation": 1, + "hyper_parameter": 3, + "num_data": 2, + "K": 4, + "indices": 2, + "crossvalind": 1, + "errors": 4, + "test_idx": 4, + "train_idx": 3, + "x_train": 2, + "y_train": 2, + "train": 1, + "x_test": 3, + "y_test": 3, + "calc_cost": 1, + "calc_error": 2, + "mean": 2, "value": 2, "isterminal": 2, "direction": 2, @@ -26136,6 +40557,12 @@ "command": 2, "line.": 2, "value2": 4, + "d_mean": 3, + "d_std": 3, + "normalize": 1, + "repmat": 2, + "std": 1, + "d./": 1, "overrideSettings": 3, "overrideNames": 2, "defaultNames": 2, @@ -26247,6 +40674,10 @@ "contents.colheaders": 1 }, "Max": { + "{": 126, + "}": 126, + "[": 163, + "]": 163, "max": 1, "v2": 1, ";": 39, @@ -26283,6 +40714,3165 @@ "fasten": 1, "pop": 1 }, + "MediaWiki": { + "Overview": 1, + "The": 17, + "GDB": 15, + "Tracepoint": 4, + "Analysis": 1, + "feature": 3, + "is": 9, + "an": 3, + "extension": 1, + "to": 12, + "the": 72, + "Tracing": 3, + "and": 20, + "Monitoring": 1, + "Framework": 1, + "that": 4, + "allows": 2, + "visualization": 1, + "analysis": 1, + "of": 8, + "C/C": 10, + "+": 20, + "tracepoint": 5, + "data": 5, + "collected": 2, + "by": 10, + "stored": 1, + "a": 12, + "log": 1, + "file.": 1, + "Getting": 1, + "Started": 1, + "can": 9, + "be": 18, + "installed": 2, + "from": 8, + "Eclipse": 1, + "update": 2, + "site": 1, + "selecting": 1, + ".": 8, + "requires": 1, + "version": 1, + "or": 8, + "later": 1, + "on": 3, + "local": 1, + "host.": 1, + "executable": 3, + "program": 1, + "must": 3, + "found": 1, + "in": 15, + "path.": 1, + "Trace": 9, + "Perspective": 1, + "To": 1, + "open": 1, + "perspective": 2, + "select": 5, + "includes": 1, + "following": 1, + "views": 2, + "default": 2, + "*": 6, + "This": 7, + "view": 7, + "shows": 7, + "projects": 1, + "workspace": 2, + "used": 1, + "create": 1, + "manage": 1, + "projects.": 1, + "running": 1, + "Postmortem": 5, + "Debugger": 4, + "instances": 1, + "displays": 2, + "thread": 1, + "stack": 2, + "trace": 17, + "associated": 1, + "with": 4, + "tracepoint.": 3, + "status": 1, + "debugger": 1, + "navigation": 1, + "records.": 1, + "console": 1, + "output": 1, + "Debugger.": 1, + "editor": 7, + "area": 2, + "contains": 1, + "editors": 1, + "when": 1, + "opened.": 1, + "[": 11, + "Image": 2, + "images/GDBTracePerspective.png": 1, + "]": 11, + "Collecting": 2, + "Data": 4, + "outside": 2, + "scope": 1, + "this": 5, + "feature.": 1, + "It": 1, + "done": 2, + "command": 1, + "line": 2, + "using": 3, + "CDT": 3, + "debug": 1, + "component": 1, + "within": 1, + "Eclipse.": 1, + "See": 1, + "FAQ": 2, + "entry": 2, + "#References": 2, + "|": 2, + "References": 3, + "section.": 2, + "Importing": 2, + "Some": 1, + "information": 1, + "section": 1, + "redundant": 1, + "LTTng": 3, + "User": 3, + "Guide.": 1, + "For": 1, + "further": 1, + "details": 1, + "see": 1, + "Guide": 2, + "Creating": 1, + "Project": 1, + "In": 5, + "right": 3, + "-": 8, + "click": 8, + "context": 4, + "menu.": 4, + "dialog": 1, + "name": 2, + "your": 2, + "project": 2, + "tracing": 1, + "folder": 5, + "Browse": 2, + "enter": 2, + "source": 2, + "directory.": 1, + "Select": 1, + "file": 6, + "tree.": 1, + "Optionally": 1, + "set": 1, + "type": 2, + "Click": 1, + "Alternatively": 1, + "drag": 1, + "&": 1, + "dropped": 1, + "any": 2, + "external": 1, + "manager.": 1, + "Selecting": 2, + "Type": 1, + "Right": 2, + "imported": 1, + "choose": 2, + "step": 1, + "omitted": 1, + "if": 1, + "was": 2, + "selected": 3, + "at": 3, + "import.": 1, + "will": 6, + "updated": 2, + "icon": 1, + "images/gdb_icon16.png": 1, + "Executable": 1, + "created": 1, + "identified": 1, + "so": 2, + "launched": 1, + "properly.": 1, + "path": 1, + "press": 1, + "recognized": 1, + "as": 1, + "executable.": 1, + "Visualizing": 1, + "Opening": 1, + "double": 1, + "it": 3, + "opened": 2, + "Events": 5, + "instance": 1, + "launched.": 1, + "If": 2, + "available": 1, + "code": 1, + "corresponding": 1, + "first": 1, + "record": 2, + "also": 2, + "editor.": 2, + "At": 1, + "point": 1, + "recommended": 1, + "relocate": 1, + "not": 1, + "hidden": 1, + "Viewing": 1, + "table": 1, + "shown": 1, + "one": 1, + "row": 1, + "for": 2, + "each": 1, + "record.": 2, + "column": 6, + "sequential": 1, + "number.": 1, + "number": 2, + "assigned": 1, + "collection": 1, + "time": 2, + "method": 1, + "where": 1, + "set.": 1, + "run": 1, + "Searching": 1, + "filtering": 1, + "entering": 1, + "regular": 1, + "expression": 1, + "header.": 1, + "Navigating": 1, + "records": 1, + "keyboard": 1, + "mouse.": 1, + "show": 1, + "current": 1, + "navigated": 1, + "clicking": 1, + "buttons.": 1, + "updated.": 1, + "http": 4, + "//wiki.eclipse.org/index.php/Linux_Tools_Project/LTTng2/User_Guide": 1, + "//wiki.eclipse.org/CDT/User/FAQ#How_can_I_trace_my_application_using_C.2FC.2B.2B_Tracepoints.3F": 1, + "How": 1, + "I": 1, + "my": 1, + "application": 1, + "Tracepoints": 1, + "Updating": 1, + "Document": 1, + "document": 2, + "maintained": 1, + "collaborative": 1, + "wiki.": 1, + "you": 1, + "wish": 1, + "modify": 1, + "please": 1, + "visit": 1, + "//wiki.eclipse.org/index.php/Linux_Tools_Project/GDB_Tracepoint_Analysis/User_Guide": 1, + "//wiki.eclipse.org/Linux_Tools_Project/GDB_Tracepoint_Analysis/User_Guide": 1 + }, + "Mercury": { + "%": 416, + "-": 6967, + "module": 46, + "ll_backend.code_info.": 1, + "interface.": 13, + "import_module": 126, + "check_hlds.type_util.": 2, + "hlds.code_model.": 1, + "hlds.hlds_data.": 2, + "hlds.hlds_goal.": 2, + "hlds.hlds_llds.": 1, + "hlds.hlds_module.": 2, + "hlds.hlds_pred.": 2, + "hlds.instmap.": 2, + "libs.globals.": 2, + "ll_backend.continuation_info.": 1, + "ll_backend.global_data.": 1, + "ll_backend.layout.": 1, + "ll_backend.llds.": 1, + "ll_backend.trace_gen.": 1, + "mdbcomp.prim_data.": 3, + "mdbcomp.goal_path.": 2, + "parse_tree.prog_data.": 2, + "parse_tree.set_of_var.": 2, + "assoc_list.": 3, + "bool.": 4, + "counter.": 1, + "io.": 8, + "list.": 4, + "map.": 3, + "maybe.": 3, + "set.": 4, + "set_tree234.": 1, + "term.": 3, + "implementation.": 12, + "backend_libs.builtin_ops.": 1, + "backend_libs.proc_label.": 1, + "hlds.arg_info.": 1, + "hlds.hlds_desc.": 1, + "hlds.hlds_rtti.": 2, + "libs.options.": 3, + "libs.trace_params.": 1, + "ll_backend.code_util.": 1, + "ll_backend.opt_debug.": 1, + "ll_backend.var_locn.": 1, + "parse_tree.builtin_lib_types.": 2, + "parse_tree.prog_type.": 2, + "parse_tree.mercury_to_mercury.": 1, + "cord.": 1, + "int.": 4, + "pair.": 3, + "require.": 6, + "stack.": 1, + "string.": 7, + "varset.": 2, + "type": 57, + "code_info.": 1, + "pred": 255, + "code_info_init": 2, + "(": 3351, + "bool": 406, + "in": 510, + "globals": 5, + "pred_id": 15, + "proc_id": 12, + "pred_info": 20, + "proc_info": 11, + "abs_follow_vars": 3, + "module_info": 26, + "static_cell_info": 4, + "const_struct_map": 3, + "resume_point_info": 11, + "out": 337, + "trace_slot_info": 3, + "maybe": 20, + "containing_goal_map": 4, + ")": 3351, + "list": 82, + "string": 115, + "int": 129, + "code_info": 208, + "is": 246, + "det.": 184, + "get_globals": 5, + "get_exprn_opts": 2, + "exprn_opts": 3, + "get_module_info": 7, + "get_pred_id": 6, + "get_proc_id": 5, + "get_pred_info": 2, + "get_proc_info": 4, + "get_varset": 3, + "prog_varset": 14, + "func": 24, + "get_var_types": 3, + "vartypes.": 1, + "get_maybe_trace_info": 2, + "trace_info": 3, + "get_emit_trail_ops": 2, + "add_trail_ops": 5, + "get_emit_region_ops": 2, + "add_region_ops": 6, + "get_forward_live_vars": 2, + "set_of_progvar": 10, + "set_forward_live_vars": 2, + "get_instmap": 4, + "instmap": 3, + "set_instmap": 3, + "get_par_conj_depth": 2, + "set_par_conj_depth": 2, + "get_label_counter": 3, + "counter": 6, + "get_succip_used": 2, + "get_layout_info": 4, + "proc_label_layout_info": 3, + "get_proc_trace_events": 2, + "set_proc_trace_events": 2, + "get_closure_layouts": 3, + "closure_proc_id_data": 4, + "get_max_reg_in_use_at_trace": 2, + "set_max_reg_in_use_at_trace": 2, + "get_created_temp_frame": 2, + "get_static_cell_info": 5, + "set_static_cell_info": 5, + "get_alloc_sites": 3, + "set_tree234": 3, + "alloc_site_info": 4, + "set_alloc_sites": 3, + "get_used_env_vars": 2, + "set": 16, + "set_used_env_vars": 2, + "get_opt_trail_ops": 2, + "get_opt_region_ops": 2, + "get_auto_comments": 2, + "get_lcmc_null": 2, + "get_containing_goal_map": 3, + "get_containing_goal_map_det": 2, + "get_const_struct_map": 2, + "add_out_of_line_code": 2, + "llds_code": 21, + "get_out_of_line_code": 2, + "get_var_slot_count": 2, + "set_maybe_trace_info": 3, + "get_opt_no_return_calls": 2, + "get_zombies": 2, + "set_zombies": 2, + "get_var_locn_info": 7, + "var_locn_info": 3, + "set_var_locn_info": 4, + "get_temps_in_use": 6, + "lval": 114, + "set_temps_in_use": 4, + "get_fail_info": 13, + "fail_info": 24, + "set_fail_info": 9, + "set_label_counter": 3, + "set_succip_used": 3, + "set_layout_info": 4, + "get_max_temp_slot_count": 2, + "set_max_temp_slot_count": 2, + "get_temp_content_map": 3, + "map": 7, + "slot_contents": 4, + "set_temp_content_map": 2, + "get_persistent_temps": 3, + "set_persistent_temps": 2, + "set_closure_layouts": 3, + "get_closure_seq_counter": 3, + "set_closure_seq_counter": 3, + "set_created_temp_frame": 2, + "code_info_static": 26, + "code_info_loc_dep": 22, + "code_info_persistent": 44, + ".": 610, + "cis_globals": 2, + "cis_exprn_opts": 2, + "cis_module_info": 2, + "cis_pred_id": 2, + "cis_proc_id": 2, + "cis_pred_info": 2, + "cis_proc_info": 2, + "cis_proc_label": 1, + "proc_label": 2, + "cis_varset": 2, + "cis_var_slot_count": 2, + "cis_maybe_trace_info": 3, + "cis_opt_no_resume_calls": 2, + "cis_emit_trail_ops": 2, + "cis_opt_trail_ops": 2, + "cis_emit_region_ops": 2, + "cis_opt_region_ops": 2, + "cis_auto_comments": 2, + "cis_lcmc_null": 2, + "cis_containing_goal_map": 2, + "cis_const_struct_map": 2, + "cild_forward_live_vars": 3, + "cild_instmap": 3, + "cild_zombies": 3, + "cild_var_locn_info": 3, + "cild_temps_in_use": 3, + "cild_fail_info": 3, + "cild_par_conj_depth": 3, + "cip_label_num_src": 3, + "cip_store_succip": 3, + "cip_label_info": 3, + "cip_proc_trace_events": 3, + "cip_stackslot_max": 3, + "cip_temp_contents": 3, + "cip_persistent_temps": 3, + "cip_closure_layout_seq": 3, + "cip_closure_layouts": 3, + "cip_max_reg_r_used": 3, + "cip_max_reg_f_used": 2, + "cip_created_temp_frame": 3, + "cip_static_cell_info": 3, + "cip_alloc_sites": 3, + "cip_used_env_vars": 3, + "cip_ts_string_table_size": 3, + "cip_ts_rev_string_table": 4, + "cip_out_of_line_code": 4, + "SaveSuccip": 2, + "Globals": 32, + "PredId": 50, + "ProcId": 31, + "PredInfo": 64, + "ProcInfo": 43, + "FollowVars": 6, + "ModuleInfo": 49, + "StaticCellInfo": 8, + "ConstStructMap": 2, + "ResumePoint": 13, + "TraceSlotInfo": 5, + "MaybeContainingGoalMap": 5, + "TSRevStringTable": 2, + "TSStringTableSize": 2, + "CodeInfo": 2, + "ProcLabel": 8, + "make_proc_label": 1, + "proc_info_get_initial_instmap": 1, + "InstMap": 6, + "proc_info_get_liveness_info": 1, + "Liveness": 4, + "CodeModel": 8, + "proc_info_interface_code_model": 2, + "build_input_arg_list": 1, + "ArgList": 2, + "proc_info_get_varset": 1, + "VarSet": 15, + "proc_info_get_vartypes": 2, + "VarTypes": 22, + "proc_info_get_stack_slots": 1, + "StackSlots": 5, + "ExprnOpts": 4, + "init_exprn_opts": 3, + "globals.lookup_bool_option": 18, + "use_float_registers": 5, + "UseFloatRegs": 6, + "yes": 144, + "FloatRegType": 3, + "reg_f": 1, + ";": 913, + "no": 365, + "reg_r": 2, + "globals.get_trace_level": 1, + "TraceLevel": 5, + "eff_trace_level_is_none": 2, + "trace_fail_vars": 1, + "FailVars": 3, + "MaybeFailVars": 3, + "set_of_var.union": 3, + "EffLiveness": 3, + "init_var_locn_state": 1, + "VarLocnInfo": 12, + "stack.init": 1, + "ResumePoints": 14, + "allow_hijacks": 3, + "AllowHijack": 3, + "Hijack": 6, + "allowed": 6, + "not_allowed": 5, + "DummyFailInfo": 2, + "resume_point_unknown": 9, + "may_be_different": 7, + "not_inside_non_condition": 2, + "map.init": 7, + "TempContentMap": 4, + "set.init": 7, + "PersistentTemps": 4, + "TempsInUse": 8, + "Zombies": 2, + "set_of_var.init": 1, + "LayoutMap": 2, + "max_var_slot": 1, + "VarSlotMax": 2, + "trace_reserved_slots": 1, + "FixedSlots": 2, + "_": 149, + "int.max": 1, + "SlotMax": 2, + "opt_no_return_calls": 3, + "OptNoReturnCalls": 2, + "use_trail": 3, + "UseTrail": 2, + "disable_trail_ops": 3, + "DisableTrailOps": 2, + "EmitTrailOps": 3, + "do_not_add_trail_ops": 1, + "optimize_trail_usage": 3, + "OptTrailOps": 2, + "optimize_region_ops": 3, + "OptRegionOps": 2, + "region_analysis": 3, + "UseRegions": 3, + "EmitRegionOps": 3, + "do_not_add_region_ops": 1, + "auto_comments": 4, + "AutoComments": 2, + "optimize_constructor_last_call_null": 3, + "LCMCNull": 2, + "CodeInfo0": 2, + "init_fail_info": 2, + "will": 1, + "override": 1, + "this": 4, + "dummy": 2, + "value": 16, + "nested": 1, + "parallel": 3, + "conjunction": 1, + "depth": 1, + "counter.init": 2, + "[": 203, + "]": 203, + "set_tree234.init": 1, + "cord.empty": 1, + "init_maybe_trace_info": 3, + "CodeInfo1": 2, + "exprn_opts.": 1, + "gcc_non_local_gotos": 3, + "OptNLG": 3, + "NLG": 3, + "have_non_local_gotos": 1, + "do_not_have_non_local_gotos": 1, + "asm_labels": 3, + "OptASM": 3, + "ASM": 3, + "have_asm_labels": 1, + "do_not_have_asm_labels": 1, + "static_ground_cells": 3, + "OptSGCell": 3, + "SGCell": 3, + "have_static_ground_cells": 1, + "do_not_have_static_ground_cells": 1, + "unboxed_float": 3, + "OptUBF": 3, + "UBF": 3, + "have_unboxed_floats": 1, + "do_not_have_unboxed_floats": 1, + "OptFloatRegs": 3, + "do_not_use_float_registers": 1, + "static_ground_floats": 3, + "OptSGFloat": 3, + "SGFloat": 3, + "have_static_ground_floats": 1, + "do_not_have_static_ground_floats": 1, + "static_code_addresses": 3, + "OptStaticCodeAddr": 3, + "StaticCodeAddrs": 3, + "have_static_code_addresses": 1, + "do_not_have_static_code_addresses": 1, + "trace_level": 4, + "CI": 294, + "proc_info_get_has_tail_call_events": 1, + "HasTailCallEvents": 3, + "tail_call_events": 1, + "get_next_label": 5, + "TailRecLabel": 2, + "MaybeTailRecLabel": 3, + "no_tail_call_events": 1, + "trace_setup": 1, + "TraceInfo": 2, + "MaxRegR": 4, + "MaxRegF": 4, + "cip_max_reg_f_used.": 1, + "TI": 4, + "LV": 2, + "IM": 2, + "Zs": 2, + "EI": 2, + "FI": 2, + "N": 6, + "LC": 2, + "SU": 2, + "LI": 2, + "PTE": 2, + "TM": 2, + "CM": 2, + "PT": 2, + "CLS": 2, + "CG": 2, + "MR": 4, + "MF": 1, + "MF.": 1, + "SCI": 2, + "ASI": 2, + "UEV": 2, + "ContainingGoalMap": 2, + "unexpected": 21, + "NewCode": 2, + "Code0": 2, + ".CI": 29, + "Code": 36, + "+": 127, + "Code.": 1, + "get_stack_slots": 2, + "stack_slots": 1, + "get_follow_var_map": 2, + "abs_follow_vars_map": 1, + "get_next_non_reserved": 2, + "reg_type": 1, + "set_follow_vars": 4, + "pre_goal_update": 3, + "hlds_goal_info": 22, + "has_subgoals": 2, + "post_goal_update": 3, + "body_typeinfo_liveness": 4, + "variable_type": 3, + "prog_var": 58, + "mer_type.": 1, + "variable_is_of_dummy_type": 2, + "is_dummy_type.": 1, + "search_type_defn": 4, + "mer_type": 21, + "hlds_type_defn": 1, + "semidet.": 10, + "lookup_type_defn": 2, + "hlds_type_defn.": 1, + "lookup_cheaper_tag_test": 2, + "maybe_cheaper_tag_test.": 1, + "filter_region_vars": 2, + "set_of_progvar.": 2, + "get_proc_model": 2, + "code_model.": 1, + "get_headvars": 2, + "get_arginfo": 2, + "arg_info": 2, + "get_pred_proc_arginfo": 3, + "current_resume_point_vars": 2, + "variable_name": 2, + "make_proc_entry_label": 2, + "code_addr.": 1, + "label": 5, + "succip_is_used": 2, + "add_trace_layout_for_label": 2, + "term.context": 3, + "trace_port": 1, + "forward_goal_path": 1, + "user_event_info": 1, + "layout_label_info": 2, + "get_cur_proc_label": 4, + "get_next_closure_seq_no": 2, + "add_closure_layout": 2, + "add_threadscope_string": 2, + "get_threadscope_rev_string_table": 2, + "add_scalar_static_cell": 2, + "typed_rval": 1, + "data_id": 3, + "add_scalar_static_cell_natural_types": 2, + "rval": 3, + "add_vector_static_cell": 2, + "llds_type": 1, + "add_alloc_site_info": 2, + "prog_context": 1, + "alloc_site_id": 2, + "add_resume_layout_for_label": 2, + "var_locn_get_stack_slots": 1, + "FollowVarMap": 2, + "var_locn_get_follow_var_map": 1, + "RegType": 2, + "NextNonReserved": 2, + "var_locn_get_next_non_reserved": 1, + "VarLocnInfo0": 4, + "var_locn_set_follow_vars": 1, + "GoalInfo": 44, + "HasSubGoals": 3, + "goal_info_get_resume_point": 1, + "no_resume_point": 1, + "resume_point": 1, + "goal_info_get_follow_vars": 1, + "MaybeFollowVars": 3, + "goal_info_get_pre_deaths": 1, + "PreDeaths": 3, + "rem_forward_live_vars": 3, + "maybe_make_vars_forward_dead": 2, + "goal_info_get_pre_births": 1, + "PreBirths": 2, + "add_forward_live_vars": 2, + "does_not_have_subgoals": 2, + "goal_info_get_post_deaths": 2, + "PostDeaths": 5, + "goal_info_get_post_births": 1, + "PostBirths": 3, + "make_vars_forward_live": 1, + "InstMapDelta": 2, + "goal_info_get_instmap_delta": 1, + "InstMap0": 2, + "instmap.apply_instmap_delta": 1, + "TypeInfoLiveness": 2, + "module_info_pred_info": 6, + "body_should_use_typeinfo_liveness": 1, + "Var": 13, + "Type": 18, + "lookup_var_type": 3, + "IsDummy": 2, + "VarType": 2, + "check_dummy_type": 1, + "TypeDefn": 6, + "type_to_ctor_det": 1, + "TypeCtor": 2, + "module_info_get_type_table": 1, + "TypeTable": 2, + "search_type_ctor_defn": 1, + "TypeDefnPrime": 2, + "CheaperTagTest": 3, + "get_type_defn_body": 1, + "TypeBody": 2, + "hlds_du_type": 1, + "CheaperTagTestPrime": 2, + "no_cheaper_tag_test": 1, + "ForwardLiveVarsBeforeGoal": 6, + "RegionVars": 2, + "code_info.get_var_types": 1, + "set_of_var.filter": 1, + "is_region_var": 1, + "HeadVars": 20, + "module_info_pred_proc_info": 4, + "proc_info_get_headvars": 2, + "ArgInfo": 4, + "proc_info_arg_info": 1, + "ResumeVars": 4, + "FailInfo": 19, + "ResumePointStack": 2, + "stack.det_top": 5, + "ResumePointInfo": 2, + "pick_first_resume_point": 1, + "ResumeMap": 8, + "map.keys": 3, + "ResumeMapVarList": 2, + "set_of_var.list_to_set": 3, + "Name": 4, + "Varset": 2, + "varset.lookup_name": 2, + "Immed0": 3, + "CodeAddr": 2, + "Immed": 3, + "globals.lookup_int_option": 1, + "procs_per_c_function": 3, + "ProcsPerFunc": 2, + "CurPredId": 2, + "CurProcId": 2, + "proc": 2, + "make_entry_label": 1, + "Label": 8, + "C0": 4, + "counter.allocate": 2, + "C": 34, + "internal_label": 3, + "Context": 20, + "Port": 2, + "IsHidden": 2, + "GoalPath": 2, + "MaybeSolverEventInfo": 2, + "Layout": 2, + "Internals0": 8, + "Exec": 5, + "trace_port_layout_info": 1, + "LabelNum": 8, + "entry_label": 2, + "map.search": 2, + "Internal0": 4, + "internal_layout_info": 6, + "Exec0": 3, + "Resume": 5, + "Return": 6, + "Internal": 8, + "map.det_update": 4, + "Internals": 6, + "map.det_insert": 3, + "LayoutInfo": 2, + "Resume0": 3, + "get_active_temps_data": 2, + "assoc_list": 1, + "Temps": 2, + "map.select": 1, + "TempsInUseContentMap": 2, + "map.to_assoc_list": 3, + "cis_proc_label.": 1, + "SeqNo": 2, + "ClosureLayout": 2, + "ClosureLayouts": 2, + "|": 38, + "String": 2, + "SlotNum": 2, + "Size0": 3, + "RevTable0": 2, + "Size": 4, + "RevTable": 3, + "RevTable.": 1, + "TableSize": 2, + "cip_ts_string_table_size.": 1, + "RvalsTypes": 2, + "DataAddr": 6, + "StaticCellInfo0": 6, + "global_data.add_scalar_static_cell": 1, + "Rvals": 2, + "global_data.add_scalar_static_cell_natural_types": 1, + "Types": 6, + "Vector": 2, + "global_data.add_vector_static_cell": 1, + "AllocId": 2, + "AllocSite": 3, + "AllocSites0": 2, + "set_tree234.insert": 1, + "AllocSites": 2, + "position_info.": 1, + "branch_end_info.": 1, + "branch_end": 4, + "branch_end_info": 7, + "remember_position": 3, + "position_info": 14, + "reset_to_position": 4, + "reset_resume_known": 2, + "generate_branch_end": 2, + "abs_store_map": 3, + "after_all_branches": 2, + "save_hp_in_branch": 2, + "pos_get_fail_info": 3, + "fail_info.": 2, + "LocDep": 6, + "cild_fail_info.": 1, + "CurCI": 2, + "NextCI": 2, + "Static": 2, + "Persistent": 2, + "NextCI0": 4, + "TempsInUse0": 4, + "set.union": 2, + "BranchStart": 2, + "BranchStartFailInfo": 2, + "BSResumeKnown": 2, + "CurFailInfo": 2, + "CurFailStack": 2, + "CurCurfMaxfr": 2, + "CurCondEnv": 2, + "CurHijack": 2, + "NewFailInfo": 2, + "StoreMap": 8, + "MaybeEnd0": 3, + "MaybeEnd": 6, + "AbsVarLocs": 3, + "assoc_list.values": 1, + "AbsLocs": 2, + "code_util.max_mentioned_abs_regs": 1, + "instmap_is_reachable": 1, + "VarLocs": 2, + "assoc_list.map_values_only": 2, + "abs_locn_to_lval": 2, + "place_vars": 1, + "remake_with_store_map": 4, + "empty": 9, + "EndCodeInfo1": 5, + "EndCodeInfo0": 3, + "FailInfo0": 13, + "FailInfo1": 2, + "ResumeKnown0": 5, + "CurfrMaxfr0": 2, + "CondEnv0": 3, + "Hijack0": 2, + "R": 2, + "ResumeKnown1": 2, + "CurfrMaxfr1": 2, + "CondEnv1": 2, + "Hijack1": 2, + "resume_point_known": 15, + "Redoip0": 3, + "Redoip1": 2, + "ResumeKnown": 21, + "expect": 15, + "unify": 21, + "must_be_equal": 11, + "CurfrMaxfr": 24, + "EndCodeInfoA": 2, + "TempsInUse1": 2, + "EndCodeInfo": 2, + "BranchEnd": 2, + "BranchEndCodeInfo": 2, + "BranchEndLocDep": 2, + "VarLocns": 2, + "VarLvals": 2, + "reinit_var_locn_state": 1, + "Slot": 2, + "Pos0": 2, + "Pos": 2, + "CI0": 2, + "CIStatic0": 2, + "CILocDep0": 2, + "CIPersistent0": 2, + "LocDep0": 2, + "CI1": 2, + "save_hp": 1, + "CI2": 2, + "CIStatic": 2, + "CIPersistent": 2, + "resume_map.": 1, + "resume_point_info.": 1, + "disj_hijack_info.": 1, + "prepare_for_disj_hijack": 2, + "code_model": 3, + "disj_hijack_info": 3, + "undo_disj_hijack": 2, + "ite_hijack_info.": 1, + "prepare_for_ite_hijack": 2, + "embedded_stack_frame_id": 3, + "ite_hijack_info": 3, + "ite_enter_then": 2, + "simple_neg_info.": 1, + "enter_simple_neg": 2, + "simple_neg_info": 3, + "leave_simple_neg": 2, + "det_commit_info.": 1, + "prepare_for_det_commit": 2, + "det_commit_info": 6, + "generate_det_commit": 2, + "semi_commit_info.": 1, + "prepare_for_semi_commit": 2, + "semi_commit_info": 6, + "generate_semi_commit": 2, + "effect_resume_point": 2, + "pop_resume_point": 1, + "top_resume_point": 1, + "set_resume_point_to_unknown": 1, + "set_resume_point_and_frame_to_unknown": 1, + "generate_failure": 2, + "fail_if_rval_is_false": 1, + "failure_is_direct_branch": 1, + "code_addr": 8, + "may_use_nondet_tailcall": 1, + "nondet_tail_call": 1, + "produce_vars": 1, + "resume_map": 9, + "flush_resume_vars_to_stack": 1, + "make_resume_point": 1, + "resume_locs": 1, + "generate_resume_point": 2, + "resume_point_vars": 1, + "resume_point_stack_addr": 2, + "stack": 1, + "curfr_vs_maxfr": 2, + "condition_env": 3, + "hijack_allowed": 2, + "orig_only": 2, + "stack_only": 2, + "orig_and_stack": 1, + "stack_and_orig": 1, + "redoip_update": 2, + "has_been_done": 5, + "wont_be_done.": 1, + "resume_point_unknown.": 1, + "may_be_different.": 1, + "inside_non_condition": 6, + "not_inside_non_condition.": 1, + "not_allowed.": 1, + "disj_no_hijack": 4, + "disj_temp_frame": 4, + "disj_quarter_hijack": 4, + "disj_half_hijack": 3, + "disj_full_hijack": 3, + "HijackInfo": 29, + "CondEnv": 12, + "Allow": 12, + "model_det": 2, + "model_semi": 3, + "singleton": 28, + "llds_instr": 64, + "comment": 5, + "model_non": 2, + "create_temp_frame": 4, + "do_fail": 6, + "stack.pop": 1, + "TopResumePoint": 6, + "RestResumePoints": 2, + "stack.is_empty": 1, + "wont_be_done": 2, + "acquire_temp_slot": 15, + "slot_lval": 14, + "redoip_slot": 30, + "curfr": 18, + "non_persistent_temp_slot": 15, + "RedoipSlot": 33, + "assign": 46, + "maxfr": 42, + "redofr_slot": 14, + "RedofrSlot": 17, + "from_list": 13, + "prevfr_slot": 3, + "pick_stack_resume_point": 3, + "StackLabel": 9, + "LabelConst": 4, + "const": 10, + "llconst_code_addr": 6, + "true": 3, + "ite_region_info": 5, + "ite_info": 3, + "ite_hijack_type": 2, + "ite_no_hijack": 3, + "ite_temp_frame": 3, + "ite_quarter_hijack": 3, + "ite_half_hijack": 3, + "ite_full_hijack": 3, + "CondCodeModel": 4, + "MaybeEmbeddedFrameId": 5, + "HijackType": 12, + "MaybeRegionInfo": 12, + "MaxfrSlot": 30, + "TempFrameCode": 4, + "MaxfrCode": 7, + "EmbeddedFrameId": 2, + "slot_success_record": 1, + "persistent_temp_slot": 1, + "SuccessRecordSlot": 6, + "InitSuccessCode": 3, + "llconst_false": 1, + "ITEResumePoint": 2, + "ThenCode": 10, + "ElseCode": 7, + "ResumePoints0": 5, + "stack.det_pop": 1, + "HijackResumeKnown": 2, + "OldCondEnv": 2, + "RegionInfo": 2, + "EmbeddedStackFrameId": 2, + "ITEStackResumeCodeAddr": 2, + "llconst_true": 1, + "AfterRegionOp": 3, + "if_val": 1, + "unop": 1, + "logical_not": 1, + "code_label": 2, + "use_and_maybe_pop_region_frame": 1, + "region_ite_nondet_cond_fail": 1, + "goto": 2, + "maybe_pick_stack_resume_point": 1, + "ResumeMap0": 2, + "make_fake_resume_map": 5, + "do_redo": 1, + "is_empty": 1, + "Vars": 10, + "Locns": 2, + "set.make_singleton_set": 1, + "reg": 1, + "pair": 7, + "region_commit_stack_frame": 5, + "AddTrailOps": 4, + "AddRegionOps": 5, + "CommitGoalInfo": 4, + "DetCommitInfo": 4, + "SaveMaxfrCode": 3, + "save_maxfr": 3, + "MaybeMaxfrSlot": 6, + "maybe_save_trail_info": 2, + "MaybeTrailSlots": 8, + "SaveTrailCode": 4, + "maybe_save_region_commit_frame": 4, + "MaybeRegionCommitFrameInfo": 8, + "SaveRegionCommitFrameCode": 2, + "SaveRegionCommitFrameCode.": 2, + "RestoreMaxfrCode": 3, + "restore_maxfr": 3, + "release_temp_slot": 1, + "maybe_restore_trail_info": 2, + "CommitTrailCode": 4, + "maybe_restore_region_commit_frame": 2, + "SuccessRegionCode": 3, + "_FailureRegionCode": 1, + "SuccessRegionCode.": 1, + "commit_hijack_info": 2, + "commit_temp_frame": 3, + "commit_quarter_hijack": 3, + "commit_half_hijack": 3, + "commit_full_hijack": 3, + "SemiCommitInfo": 4, + "clone_resume_point": 1, + "NewResumePoint": 4, + "stack.push": 1, + "StackLabelConst": 7, + "use_minimal_model_stack_copy_cut": 3, + "UseMinimalModelStackCopyCut": 4, + "Components": 4, + "foreign_proc_raw_code": 4, + "cannot_branch_away": 4, + "proc_affects_liveness": 2, + "live_lvals_info": 4, + "proc_does_not_affect_liveness": 2, + "MD": 4, + "proc_may_duplicate": 2, + "MarkCode": 3, + "foreign_proc_code": 2, + "proc_will_not_call_mercury": 2, + "HijackCode": 5, + "UseMinimalModel": 3, + "CutCode": 4, + "SuccessUndoCode": 5, + "FailureUndoCode": 5, + "AfterCommit": 2, + "ResumePointCode": 2, + "FailCode": 2, + "RestoreTrailCode": 2, + "FailureRegionCode": 2, + "SuccLabel": 3, + "GotoSuccLabel": 2, + "SuccLabelCode": 1, + "SuccessCode": 2, + "FailureCode": 2, + "SuccLabelCode.": 1, + "_ForwardLiveVarsBeforeGoal": 1, + "expr.": 1, + "char": 10, + "token": 5, + "num": 11, + "eof": 6, + "parse": 1, + "exprn/1": 1, + "xx": 1, + "scan": 16, + "mode": 8, + "rule": 3, + "exprn": 7, + "Num": 18, + "A": 14, + "term": 10, + "B": 8, + "{": 27, + "}": 28, + "*": 20, + "factor": 6, + "/": 1, + "//": 2, + "Chars": 2, + "Toks": 13, + "Toks0": 11, + "list__reverse": 1, + "Cs": 9, + "char__is_whitespace": 1, + "char__is_digit": 2, + "takewhile": 1, + "Digits": 2, + "Rest": 2, + "string__from_char_list": 1, + "NumStr": 2, + "string__det_to_int": 1, + "error": 7, + "hello.": 1, + "main": 15, + "io": 6, + "di": 54, + "uo": 58, + "IO": 4, + "io.write_string": 1, + "char.": 1, + "getopt_io.": 1, + "short_option": 36, + "option": 9, + "long_option": 241, + "option_defaults": 2, + "option_data": 2, + "nondet.": 1, + "special_handler": 1, + "special_data": 1, + "option_table": 5, + "maybe_option_table": 3, + "inconsequential_options": 1, + "options_help": 1, + "option_table_add_mercury_library_directory": 1, + "option_table.": 2, + "option_table_add_search_library_files_directory": 1, + "quote_arg": 1, + "inhibit_warnings": 4, + "inhibit_accumulator_warnings": 3, + "halt_at_warn": 3, + "halt_at_syntax_errors": 3, + "halt_at_auto_parallel_failure": 3, + "warn_singleton_vars": 3, + "warn_overlapping_scopes": 3, + "warn_det_decls_too_lax": 3, + "warn_inferred_erroneous": 3, + "warn_nothing_exported": 3, + "warn_unused_args": 3, + "warn_interface_imports": 3, + "warn_missing_opt_files": 3, + "warn_missing_trans_opt_files": 3, + "warn_missing_trans_opt_deps": 3, + "warn_non_contiguous_clauses": 3, + "warn_non_contiguous_foreign_procs": 3, + "warn_non_stratification": 3, + "warn_unification_cannot_succeed": 3, + "warn_simple_code": 3, + "warn_duplicate_calls": 3, + "warn_missing_module_name": 3, + "warn_wrong_module_name": 3, + "warn_smart_recompilation": 3, + "warn_undefined_options_variables": 3, + "warn_non_tail_recursion": 3, + "warn_target_code": 3, + "warn_up_to_date": 3, + "warn_stubs": 3, + "warn_dead_procs": 3, + "warn_table_with_inline": 3, + "warn_non_term_special_preds": 3, + "warn_known_bad_format_calls": 3, + "warn_unknown_format_calls": 3, + "warn_obsolete": 3, + "warn_insts_without_matching_type": 3, + "warn_unused_imports": 3, + "inform_ite_instead_of_switch": 3, + "warn_unresolved_polymorphism": 3, + "warn_suspicious_foreign_procs": 3, + "warn_state_var_shadowing": 3, + "inform_inferred": 3, + "inform_inferred_types": 3, + "inform_inferred_modes": 3, + "verbose": 4, + "very_verbose": 4, + "verbose_errors": 4, + "verbose_recompilation": 3, + "find_all_recompilation_reasons": 3, + "verbose_make": 3, + "verbose_commands": 3, + "output_compile_error_lines": 3, + "report_cmd_line_args": 3, + "report_cmd_line_args_in_doterr": 3, + "statistics": 4, + "detailed_statistics": 3, + "proc_size_statistics": 3, + "debug_types": 4, + "debug_modes": 4, + "debug_modes_statistics": 3, + "debug_modes_minimal": 3, + "debug_modes_verbose": 3, + "debug_modes_pred_id": 3, + "debug_dep_par_conj": 3, + "debug_det": 4, + "debug_code_gen_pred_id": 3, + "debug_opt": 3, + "debug_term": 4, + "constraint": 2, + "termination": 3, + "analysis": 1, + "debug_opt_pred_id": 3, + "debug_opt_pred_name": 3, + "debug_pd": 3, + "pd": 1, + "partial": 1, + "deduction/deforestation": 1, + "debug_il_asm": 3, + "il_asm": 1, + "IL": 2, + "generation": 1, + "via": 1, + "asm": 1, + "debug_liveness": 3, + "debug_stack_opt": 3, + "debug_make": 3, + "debug_closure": 3, + "debug_trail_usage": 3, + "debug_mode_constraints": 3, + "debug_intermodule_analysis": 3, + "debug_mm_tabling_analysis": 3, + "debug_indirect_reuse": 3, + "debug_type_rep": 3, + "make_short_interface": 4, + "make_interface": 5, + "make_private_interface": 4, + "make_optimization_interface": 5, + "make_transitive_opt_interface": 5, + "make_analysis_registry": 3, + "make_xml_documentation": 5, + "generate_source_file_mapping": 4, + "generate_dependency_file": 3, + "generate_dependencies": 4, + "generate_module_order": 3, + "generate_standalone_interface": 3, + "convert_to_mercury": 6, + "typecheck_only": 4, + "errorcheck_only": 4, + "target_code_only": 10, + "compile_only": 4, + "compile_to_shared_lib": 3, + "output_grade_string": 3, + "output_link_command": 3, + "output_shared_lib_link_command": 3, + "output_libgrades": 3, + "output_cc": 3, + "output_c_compiler_type": 4, + "output_csharp_compiler_type": 3, + "output_cflags": 3, + "output_library_link_flags": 3, + "output_grade_defines": 3, + "output_c_include_directory_flags": 4, + "smart_recompilation": 3, + "generate_item_version_numbers": 2, + "generate_mmc_make_module_dependencies": 4, + "assume_gmake": 3, + "trace_optimized": 4, + "trace_prof": 3, + "trace_table_io": 3, + "trace_table_io_only_retry": 3, + "trace_table_io_states": 3, + "trace_table_io_require": 3, + "trace_table_io_all": 3, + "trace_goal_flags": 3, + "prof_optimized": 4, + "exec_trace_tail_rec": 3, + "suppress_trace": 3, + "force_disable_tracing": 3, + "delay_death": 3, + "delay_death_max_vars": 3, + "stack_trace_higher_order": 3, + "force_disable_ssdebug": 3, + "generate_bytecode": 3, + "line_numbers": 4, + "frameopt_comments": 3, + "max_error_line_width": 3, + "show_dependency_graph": 3, + "imports_graph": 3, + "dump_trace_counts": 3, + "dump_hlds": 5, + "dump_hlds_pred_id": 3, + "dump_hlds_pred_name": 3, + "dump_hlds_alias": 4, + "dump_hlds_options": 3, + "dump_hlds_inst_limit": 3, + "dump_hlds_file_suffix": 3, + "dump_same_hlds": 3, + "dump_mlds": 4, + "verbose_dump_mlds": 4, + "mode_constraints": 3, + "simple_mode_constraints": 3, + "prop_mode_constraints": 4, + "benchmark_modes": 3, + "benchmark_modes_repeat": 3, + "sign_assembly": 3, + "separate_assemblies": 3, + "reorder_conj": 3, + "reorder_disj": 3, + "fully_strict": 3, + "strict_sequential": 3, + "allow_stubs": 3, + "infer_types": 3, + "infer_modes": 3, + "infer_det": 4, + "infer_all": 3, + "type_inference_iteration_limit": 3, + "mode_inference_iteration_limit": 3, + "event_set_file_name": 3, + "grade": 4, + "target": 14, + "il": 5, + "il_only": 4, + "compile_to_c": 4, + "c": 1, + "java": 35, + "java_only": 4, + "csharp": 6, + "csharp_only": 4, + "x86_64": 6, + "x86_64_only": 4, + "erlang": 6, + "erlang_only": 4, + "exec_trace": 3, + "decl_debug": 3, + "profiling": 5, + "profile_time": 5, + "profile_calls": 6, + "time_profiling": 3, + "memory_profiling": 3, + "profile_mem": 1, + "deep_profiling": 3, + "profile_deep": 4, + "profile_memory": 3, + "use_activation_counts": 3, + "pre_prof_transforms_simplify": 3, + "pre_implicit_parallelism_simplify": 3, + "coverage_profiling": 3, + "coverage_profiling_via_calls": 3, + "coverage_profiling_static": 3, + "profile_deep_coverage_after_goal": 3, + "profile_deep_coverage_branch_ite": 3, + "profile_deep_coverage_branch_switch": 3, + "profile_deep_coverage_branch_disj": 3, + "profile_deep_coverage_use_portcounts": 3, + "profile_deep_coverage_use_trivial": 2, + "profile_for_feedback": 2, + "use_zeroing_for_ho_cycles": 2, + "use_lots_of_ho_specialization": 2, + "deep_profile_tail_recursion": 2, + "record_term_sizes_as_words": 2, + "record_term_sizes_as_cells": 2, + "experimental_complexity": 2, + "gc": 2, + "threadscope": 2, + "trail_segments": 2, + "use_minimal_model_stack_copy": 2, + "use_minimal_model_own_stacks": 2, + "minimal_model_debug": 2, + "single_prec_float": 2, + "type_layout": 2, + "maybe_thread_safe_opt": 2, + "extend_stacks_when_needed": 2, + "stack_segments": 2, + "use_regions": 2, + "use_alloc_regions": 2, + "use_regions_debug": 2, + "use_regions_profiling": 2, + "source_to_source_debug": 5, + "ssdb_trace_level": 3, + "link_ssdb_libs": 4, + "tags": 2, + "num_tag_bits": 2, + "num_reserved_addresses": 2, + "num_reserved_objects": 2, + "bits_per_word": 2, + "bytes_per_word": 2, + "conf_low_tag_bits": 2, + "unboxed_enums": 2, + "unboxed_no_tag_types": 2, + "sync_term_size": 2, + "words": 1, + "gcc_global_registers": 2, + "pic_reg": 2, + "highlevel_code": 3, + "highlevel_data": 2, + "gcc_nested_functions": 2, + "det_copy_out": 2, + "nondet_copy_out": 2, + "put_commit_in_own_func": 2, + "put_nondet_env_on_heap": 2, + "verifiable_code": 2, + "il_refany_fields": 2, + "il_funcptr_types": 2, + "il_byref_tailcalls": 2, + "backend_foreign_languages": 2, + "stack_trace": 2, + "basic_stack_layout": 2, + "agc_stack_layout": 2, + "procid_stack_layout": 2, + "trace_stack_layout": 2, + "can_compare_constants_as_ints": 2, + "pretest_equality_cast_pointers": 2, + "can_compare_compound_values": 2, + "lexically_order_constructors": 2, + "mutable_always_boxed": 2, + "delay_partial_instantiations": 2, + "allow_defn_of_builtins": 2, + "special_preds": 2, + "type_ctor_info": 2, + "type_ctor_layout": 2, + "type_ctor_functors": 2, + "new_type_class_rtti": 2, + "rtti_line_numbers": 2, + "disable_minimal_model_stack_copy_pneg": 2, + "disable_minimal_model_stack_copy_cut": 2, + "use_minimal_model_stack_copy_pneg": 2, + "size_region_ite_fixed": 2, + "size_region_disj_fixed": 2, + "size_region_semi_disj_fixed": 1, + "size_region_commit_fixed": 2, + "size_region_ite_protect": 2, + "size_region_ite_snapshot": 2, + "size_region_semi_disj_protect": 2, + "size_region_disj_snapshot": 2, + "size_region_commit_entry": 2, + "solver_type_auto_init": 2, + "allow_multi_arm_switches": 2, + "type_check_constraints": 2, + "allow_argument_packing": 2, + "low_level_debug": 2, + "table_debug": 2, + "trad_passes": 2, + "parallel_liveness": 2, + "parallel_code_gen": 2, + "polymorphism": 2, + "reclaim_heap_on_failure": 2, + "reclaim_heap_on_semidet_failure": 2, + "reclaim_heap_on_nondet_failure": 2, + "have_delay_slot": 2, + "num_real_r_regs": 2, + "num_real_f_regs": 2, + "num_real_r_temps": 2, + "num_real_f_temps": 2, + "max_jump_table_size": 2, + "max_specialized_do_call_closure": 2, + "max_specialized_do_call_class_method": 2, + "compare_specialization": 2, + "should_pretest_equality": 2, + "fact_table_max_array_size": 2, + "fact_table_hash_percent_full": 2, + "gcc_local_labels": 2, + "prefer_switch": 2, + "opt_level": 3, + "opt_level_number": 2, + "opt_space": 2, + "Default": 3, + "to": 16, + "optimize": 3, + "time.": 1, + "intermodule_optimization": 2, + "read_opt_files_transitively": 2, + "use_opt_files": 2, + "use_trans_opt_files": 2, + "transitive_optimization": 2, + "intermodule_analysis": 2, + "analysis_repeat": 2, + "analysis_file_cache": 2, + "allow_inlining": 2, + "inlining": 2, + "inline_simple": 2, + "inline_builtins": 2, + "inline_single_use": 2, + "inline_call_cost": 2, + "inline_compound_threshold": 2, + "inline_simple_threshold": 2, + "inline_vars_threshold": 2, + "intermod_inline_simple_threshold": 2, + "from_ground_term_threshold": 2, + "enable_const_struct": 2, + "common_struct": 2, + "common_struct_preds": 2, + "common_goal": 2, + "constraint_propagation": 2, + "local_constraint_propagation": 2, + "optimize_unused_args": 2, + "intermod_unused_args": 2, + "optimize_higher_order": 2, + "higher_order_size_limit": 2, + "higher_order_arg_limit": 2, + "unneeded_code": 2, + "unneeded_code_copy_limit": 2, + "unneeded_code_debug": 2, + "unneeded_code_debug_pred_name": 2, + "type_specialization": 2, + "user_guided_type_specialization": 2, + "introduce_accumulators": 2, + "optimize_constructor_last_call_accumulator": 2, + "optimize_constructor_last_call": 2, + "optimize_duplicate_calls": 2, + "constant_propagation": 2, + "excess_assign": 2, + "optimize_format_calls": 2, + "optimize_saved_vars_const": 2, + "optimize_saved_vars_cell": 2, + "optimize_saved_vars_cell_loop": 2, + "optimize_saved_vars_cell_full_path": 2, + "optimize_saved_vars_cell_on_stack": 2, + "optimize_saved_vars_cell_candidate_headvars": 2, + "optimize_saved_vars_cell_cv_store_cost": 2, + "optimize_saved_vars_cell_cv_load_cost": 2, + "optimize_saved_vars_cell_fv_store_cost": 2, + "optimize_saved_vars_cell_fv_load_cost": 2, + "optimize_saved_vars_cell_op_ratio": 2, + "optimize_saved_vars_cell_node_ratio": 2, + "optimize_saved_vars_cell_all_path_node_ratio": 2, + "optimize_saved_vars_cell_include_all_candidates": 2, + "optimize_saved_vars": 2, + "loop_invariants": 2, + "delay_construct": 2, + "follow_code": 2, + "optimize_dead_procs": 2, + "deforestation": 2, + "deforestation_depth_limit": 2, + "deforestation_cost_factor": 2, + "deforestation_vars_threshold": 2, + "deforestation_size_threshold": 2, + "analyse_trail_usage": 2, + "analyse_mm_tabling": 2, + "untuple": 2, + "tuple": 2, + "tuple_trace_counts_file": 2, + "tuple_costs_ratio": 2, + "tuple_min_args": 2, + "inline_par_builtins": 2, + "always_specialize_in_dep_par_conjs": 2, + "allow_some_paths_only_waits": 2, + "structure_sharing_analysis": 2, + "structure_sharing_widening": 2, + "structure_reuse_analysis": 2, + "structure_reuse_constraint": 2, + "structure_reuse_constraint_arg": 2, + "structure_reuse_max_conditions": 2, + "structure_reuse_repeat": 2, + "structure_reuse_free_cells": 2, + "termination_check": 2, + "verbose_check_termination": 2, + "termination_single_args": 2, + "termination_norm": 2, + "termination_error_limit": 2, + "termination_path_limit": 2, + "termination2": 2, + "check_termination2": 2, + "verbose_check_termination2": 2, + "termination2_norm": 2, + "widening_limit": 2, + "arg_size_analysis_only": 2, + "propagate_failure_constrs": 2, + "term2_maximum_matrix_size": 2, + "analyse_exceptions": 2, + "analyse_closures": 2, + "smart_indexing": 2, + "dense_switch_req_density": 2, + "lookup_switch_req_density": 2, + "dense_switch_size": 2, + "lookup_switch_size": 2, + "string_hash_switch_size": 2, + "string_binary_switch_size": 2, + "tag_switch_size": 2, + "try_switch_size": 2, + "binary_switch_size": 2, + "switch_single_rec_base_first": 2, + "switch_multi_rec_base_first": 2, + "use_atomic_cells": 2, + "middle_rec": 2, + "simple_neg": 2, + "optimize_tailcalls": 2, + "optimize_initializations": 2, + "eliminate_local_vars": 2, + "generate_trail_ops_inline": 2, + "common_data": 2, + "common_layout_data": 2, + "Also": 1, + "used": 2, + "for": 8, + "MLDS": 2, + "optimizations.": 1, + "optimize_peep": 2, + "optimize_peep_mkword": 2, + "optimize_jumps": 2, + "optimize_fulljumps": 2, + "pessimize_tailcalls": 2, + "checked_nondet_tailcalls": 2, + "use_local_vars": 2, + "local_var_access_threshold": 2, + "standardize_labels": 2, + "optimize_labels": 2, + "optimize_dups": 2, + "optimize_proc_dups": 2, + "optimize_frames": 2, + "optimize_delay_slot": 2, + "optimize_reassign": 2, + "optimize_repeat": 2, + "layout_compression_limit": 2, + "use_macro_for_redo_fail": 2, + "emit_c_loops": 2, + "everything_in_one_c_function": 2, + "local_thread_engine_base": 2, + "erlang_switch_on_strings_as_atoms": 2, + "target_debug": 2, + "cc": 2, + "cflags": 2, + "quoted_cflag": 2, + "c_include_directory": 2, + "c_optimize": 2, + "ansi_c": 2, + "inline_alloc": 2, + "gcc_flags": 2, + "quoted_gcc_flag": 2, + "clang_flags": 2, + "quoted_clang_flag": 2, + "msvc_flags": 2, + "quoted_msvc_flag": 2, + "cflags_for_warnings": 2, + "cflags_for_optimization": 2, + "cflags_for_ansi": 2, + "cflags_for_regs": 2, + "cflags_for_gotos": 2, + "cflags_for_threads": 2, + "cflags_for_debug": 2, + "cflags_for_pic": 2, + "c_flag_to_name_object_file": 2, + "object_file_extension": 2, + "pic_object_file_extension": 2, + "link_with_pic_object_file_extension": 2, + "c_compiler_type": 2, + "csharp_compiler_type": 2, + "java_compiler": 2, + "java_interpreter": 2, + "java_flags": 2, + "quoted_java_flag": 2, + "java_classpath": 2, + "java_object_file_extension": 2, + "il_assembler": 2, + "ilasm_flags": 2, + "quoted_ilasm_flag": 2, + "dotnet_library_version": 2, + "support_ms_clr": 2, + "support_rotor_clr": 2, + "csharp_compiler": 2, + "csharp_flags": 2, + "quoted_csharp_flag": 2, + "cli_interpreter": 2, + "erlang_compiler": 2, + "erlang_interpreter": 2, + "erlang_flags": 2, + "quoted_erlang_flag": 2, + "erlang_include_directory": 2, + "erlang_object_file_extension": 2, + "erlang_native_code": 2, + "erlang_inhibit_trivial_warnings": 2, + "output_file_name": 3, + "ld_flags": 2, + "quoted_ld_flag": 2, + "ld_libflags": 2, + "quoted_ld_libflag": 2, + "link_library_directories": 3, + "runtime_link_library_directories": 3, + "link_libraries": 3, + "link_objects": 2, + "mercury_library_directories": 2, + "mercury_library_directory_special": 2, + "search_library_files_directories": 2, + "search_library_files_directory_special": 2, + "mercury_libraries": 2, + "mercury_library_special": 2, + "mercury_standard_library_directory": 2, + "mercury_standard_library_directory_special": 2, + "init_file_directories": 2, + "init_files": 2, + "trace_init_files": 2, + "linkage": 2, + "linkage_special": 2, + "mercury_linkage": 2, + "mercury_linkage_special": 2, + "strip": 2, + "demangle": 2, + "allow_undefined": 2, + "use_readline": 2, + "runtime_flags": 2, + "extra_initialization_functions": 2, + "frameworks": 2, + "framework_directories": 3, + "shared_library_extension": 2, + "library_extension": 2, + "executable_file_extension": 2, + "link_executable_command": 2, + "link_shared_lib_command": 2, + "create_archive_command": 2, + "create_archive_command_output_flag": 2, + "create_archive_command_flags": 2, + "ranlib_command": 2, + "ranlib_flags": 2, + "mkinit_command": 2, + "mkinit_erl_command": 2, + "demangle_command": 2, + "filtercc_command": 2, + "trace_libs": 2, + "thread_libs": 2, + "hwloc_libs": 2, + "hwloc_static_libs": 2, + "shared_libs": 2, + "math_lib": 2, + "readline_libs": 2, + "linker_opt_separator": 2, + "linker_thread_flags": 2, + "shlib_linker_thread_flags": 2, + "linker_static_flags": 2, + "linker_strip_flag": 2, + "linker_link_lib_flag": 2, + "linker_link_lib_suffix": 2, + "shlib_linker_link_lib_flag": 2, + "shlib_linker_link_lib_suffix": 2, + "linker_debug_flags": 2, + "shlib_linker_debug_flags": 2, + "linker_trace_flags": 2, + "shlib_linker_trace_flags": 2, + "linker_path_flag": 2, + "linker_rpath_flag": 2, + "linker_rpath_separator": 2, + "shlib_linker_rpath_flag": 2, + "shlib_linker_rpath_separator": 2, + "linker_allow_undefined_flag": 2, + "linker_error_undefined_flag": 2, + "shlib_linker_use_install_name": 2, + "shlib_linker_install_name_flag": 2, + "shlib_linker_install_name_path": 2, + "java_archive_command": 2, + "make": 3, + "keep_going": 3, + "rebuild": 3, + "jobs": 3, + "track_flags": 2, + "invoked_by_mmc_make": 2, + "extra_init_command": 2, + "pre_link_command": 2, + "install_prefix": 2, + "use_symlinks": 2, + "mercury_configuration_directory": 2, + "mercury_configuration_directory_special": 2, + "install_command": 2, + "install_command_dir_option": 2, + "libgrades": 2, + "libgrades_include_components": 2, + "libgrades_exclude_components": 2, + "lib_linkages": 2, + "flags_file": 2, + "options_files": 2, + "config_file": 2, + "options_search_directories": 2, + "use_subdirs": 2, + "use_grade_subdirs": 2, + "search_directories": 3, + "intermod_directories": 2, + "use_search_directories_for_intermod": 2, + "libgrade_install_check": 2, + "order_make_by_timestamp": 2, + "show_make_times": 2, + "extra_library_header": 2, + "restricted_command_line": 2, + "env_type": 2, + "host_env_type": 2, + "target_env_type": 2, + "filenames_from_stdin": 2, + "typecheck_ambiguity_warn_limit": 2, + "typecheck_ambiguity_error_limit": 2, + "help": 4, + "version": 3, + "fullarch": 2, + "cross_compiling": 2, + "local_module_id": 2, + "analysis_file_cache_dir": 2, + "compiler_sufficiently_recent": 2, + "experiment": 2, + "ignore_par_conjunctions": 2, + "control_granularity": 2, + "distance_granularity": 2, + "implicit_parallelism": 2, + "feedback_file": 2, + "par_loop_control": 2, + "par_loop_control_preserve_tail_recursion.": 1, + "libs.handle_options.": 1, + "dir.": 1, + "option_category": 2, + "warning_option": 2, + "verbosity_option": 2, + "output_option": 2, + "aux_output_option": 2, + "language_semantics_option": 2, + "compilation_model_option": 2, + "internal_use_option": 2, + "code_gen_option": 2, + "special_optimization_option": 2, + "optimization_option": 2, + "target_code_compilation_option": 2, + "link_option": 2, + "build_system_option": 2, + "miscellaneous_option.": 1, + "Option": 2, + "option_defaults_2": 18, + "_Category": 1, + "OptionsList": 2, + "list.member": 2, + "multi.": 1, + "bool_special": 7, + "XXX": 3, + "should": 1, + "be": 1, + "accumulating": 49, + "maybe_string": 6, + "special": 17, + "string_special": 18, + "int_special": 1, + "maybe_string_special": 1, + "file_special": 1, + "miscellaneous_option": 1, + "par_loop_control_preserve_tail_recursion": 1, + "check_hlds.polymorphism.": 1, + "hlds.": 1, + "mdbcomp.": 1, + "parse_tree.": 1, + "polymorphism_process_module": 2, + "polymorphism_process_generated_pred": 2, + "unification_typeinfos_rtti_varmaps": 2, + "rtti_varmaps": 9, + "unification": 8, + "polymorphism_process_new_call": 2, + "builtin_state": 1, + "call_unify_context": 2, + "sym_name": 3, + "hlds_goal": 45, + "poly_info": 45, + "polymorphism_make_type_info_vars": 1, + "polymorphism_make_type_info_var": 1, + "int_or_var": 2, + "iov_int": 1, + "iov_var": 1, + "gen_extract_type_info": 1, + "tvar": 10, + "kind": 1, + "vartypes": 12, + "poly_info.": 1, + "create_poly_info": 1, + "poly_info_extract": 1, + "build_typeclass_info_type": 3, + "prog_constraint": 4, + "type_is_typeclass_info": 1, + "type_is_type_info_or_ctor_type": 1, + "build_type_info_type": 1, + "get_special_proc": 1, + "special_pred_id": 2, + "get_special_proc_det": 1, + "convert_pred_to_lambda_goal": 3, + "purity": 1, + "lambda_eval_method": 1, + "unify_context": 3, + "context": 1, + "unify_rhs": 4, + "fix_undetermined_mode_lambda_goal": 2, + "rhs_lambda_goal": 7, + "init_type_info_var": 1, + "init_const_type_ctor_info_var": 1, + "type_ctor": 1, + "cons_id": 2, + "type_info_kind": 2, + "type_info": 8, + "type_ctor_info.": 1, + "new_type_info_var_raw": 1, + "check_hlds.clause_to_proc.": 1, + "check_hlds.mode_util.": 1, + "hlds.from_ground_term_util.": 1, + "hlds.const_struct.": 1, + "hlds.goal_util.": 1, + "hlds.hlds_args.": 1, + "hlds.hlds_clauses.": 1, + "hlds.hlds_code_util.": 1, + "hlds.passes_aux.": 1, + "hlds.pred_table.": 1, + "hlds.quantification.": 1, + "hlds.special_pred.": 1, + "libs.": 1, + "mdbcomp.program_representation.": 1, + "parse_tree.prog_mode.": 1, + "parse_tree.prog_type_subst.": 1, + "solutions.": 1, + "module_info_get_preds": 3, + ".ModuleInfo": 8, + "Preds0": 2, + "PredIds0": 2, + "list.foldl": 6, + "maybe_polymorphism_process_pred": 3, + "Preds1": 2, + "PredIds1": 2, + "fixup_pred_polymorphism": 4, + "expand_class_method_bodies": 1, + "PredModule": 8, + "pred_info_module": 4, + "PredName": 8, + "pred_info_name": 4, + "PredArity": 6, + "pred_info_orig_arity": 3, + "no_type_info_builtin": 3, + "copy_module_clauses_to_procs": 1, + "polymorphism_process_pred_msg": 3, + "PredTable0": 3, + "map.lookup": 2, + "PredInfo0": 16, + "pred_info_get_clauses_info": 2, + "ClausesInfo0": 5, + "clauses_info_get_vartypes": 2, + "VarTypes0": 12, + "clauses_info_get_headvars": 2, + "pred_info_get_arg_types": 7, + "TypeVarSet": 15, + "ExistQVars": 13, + "ArgTypes0": 3, + "proc_arg_vector_partition_poly_args": 1, + "ExtraHeadVarList": 2, + "OldHeadVarList": 2, + "lookup_var_types": 6, + "ExtraArgTypes": 2, + "ArgTypes": 6, + "pred_info_set_arg_types": 1, + "PredInfo1": 5, + "OldHeadVarTypes": 2, + "type_list_subsumes": 2, + "Subn": 3, + "map.is_empty": 1, + "pred_info_set_existq_tvar_binding": 1, + "PredInfo2": 7, + "polymorphism_introduce_exists_casts_pred": 3, + "PredTable": 2, + "module_info_set_preds": 1, + "pred_info_get_procedures": 2, + ".PredInfo": 2, + "Procs0": 4, + "map.map_values_only": 1, + ".ProcInfo": 2, + "det": 21, + "introduce_exists_casts_proc": 1, + "Procs": 4, + "pred_info_set_procedures": 2, + "trace": 4, + "compiletime": 4, + "flag": 4, + "write_pred_progress_message": 1, + "polymorphism_process_pred": 4, + "mutable": 3, + "selected_pred": 1, + "ground": 9, + "untrailed": 2, + "level": 1, + "promise_pure": 30, + "pred_id_to_int": 1, + "impure": 2, + "set_selected_pred": 2, + "polymorphism_process_clause_info": 3, + "ClausesInfo": 13, + "Info": 134, + "ExtraArgModes": 20, + "poly_info_get_module_info": 4, + "poly_info_get_const_struct_db": 1, + "ConstStructDb": 2, + "module_info_set_const_struct_db": 1, + "poly_info_get_typevarset": 4, + "pred_info_set_typevarset": 1, + "pred_info_set_clauses_info": 1, + "ProcIds": 5, + "pred_info_procids": 2, + "polymorphism_process_proc_in_table": 3, + "module_info_set_pred_info": 1, + "clauses_info": 6, + "poly_arg_vector": 9, + "mer_mode": 14, + "ModuleInfo0": 8, + "init_poly_info": 1, + ".ClausesInfo": 2, + "_VarSet": 1, + "ExplicitVarTypes": 2, + "_TVarNameMap": 1, + "_VarTypes": 1, + "HeadVars0": 5, + "ClausesRep0": 2, + "ItemNumbers": 2, + "_RttiVarMaps": 1, + "HaveForeignClauses": 2, + "setup_headvars": 3, + "UnconstrainedTVars": 15, + "ExtraTypeInfoHeadVars": 4, + "ExistTypeClassInfoHeadVars": 6, + "get_clause_list": 1, + "Clauses0": 2, + "list.map_foldl": 2, + "polymorphism_process_clause": 3, + "Clauses": 2, + "poly_info_get_varset": 4, + ".Info": 25, + "poly_info_get_var_types": 6, + "poly_info_get_rtti_varmaps": 4, + "RttiVarMaps": 16, + "set_clause_list": 1, + "ClausesRep": 2, + "TVarNameMap": 2, + "This": 2, + "only": 4, + "while": 1, + "adding": 1, + "the": 27, + "clauses.": 1, + "proc_arg_vector": 9, + "clause": 2, + "OldHeadVars": 2, + "NewHeadVars": 2, + "Clause": 2, + "pred_info_is_imported": 2, + "Goal0": 21, + ".Clause": 1, + "clause_body": 2, + "empty_cache_maps": 4, + "poly_info_set_num_reuses": 1, + "polymorphism_process_goal": 20, + "Goal1": 2, + "produce_existq_tvars": 3, + "Goal2": 2, + "pred_info_get_exist_quant_tvars": 1, + "fixup_quantification": 1, + "Goal": 40, + "proc_table": 2, + "ProcTable": 2, + ".ProcTable": 1, + "ProcInfo0": 2, + "polymorphism_process_proc": 3, + "pred_info_is_pseudo_imported": 1, + "hlds_pred.in_in_unification_proc_id": 1, + "HeadVarList": 4, + "proc_arg_vector_to_list": 2, + "clauses_info_get_rtti_varmaps": 1, + "clauses_info_get_varset": 1, + "proc_info_set_headvars": 1, + "proc_info_set_rtti_varmaps": 1, + "proc_info_set_varset": 1, + "proc_info_set_vartypes": 1, + "copy_clauses_to_proc": 1, + "proc_info_get_argmodes": 2, + "ArgModes1": 2, + "ExtraArgModesList": 2, + "poly_arg_vector_to_list": 1, + "ArgModes": 5, + "proc_info_set_argmodes": 1, + "ExtraHeadTypeInfoVars": 7, + "ExistHeadTypeClassInfoVars": 9, + "pred_info_get_origin": 1, + "Origin": 8, + "ExtraArgModes0": 3, + "poly_arg_vector_init": 1, + "origin_instance_method": 1, + "InstanceMethodConstraints": 4, + "setup_headvars_instance_method": 3, + "origin_special_pred": 1, + "origin_transformed": 1, + "origin_created": 1, + "origin_assertion": 1, + "origin_lambda": 1, + "origin_user": 1, + "pred_info_get_class_context": 4, + "ClassContext": 6, + "InstanceTVars": 7, + "InstanceUnconstrainedTVars": 2, + "InstanceUnconstrainedTypeInfoVars": 2, + "setup_headvars_2": 4, + "instance_method_constraints": 2, + "InstanceTypes": 2, + "InstanceConstraints": 3, + "type_vars_list": 5, + "get_unconstrained_tvars": 1, + "UnconstrainedInstanceTVars": 6, + "ArgTypeVarSet": 5, + "make_head_vars": 3, + "UnconstrainedInstanceTypeInfoVars": 7, + "make_typeclass_info_head_vars": 3, + "do_record_type_info_locns": 3, + "InstanceHeadTypeClassInfoVars": 4, + "proc_arg_vector_set_instance_type_infos": 1, + "proc_arg_vector_set_instance_typeclass_infos": 1, + "RttiVarMaps0": 4, + "rtti_reuse_typeclass_info_var": 3, + "poly_info_set_rtti_varmaps": 3, + "in_mode": 3, + "InMode": 3, + "list.duplicate": 6, + "list.length": 16, + "UnconstrainedInstanceTypeInfoModes": 2, + "InstanceHeadTypeClassInfoModes": 2, + "poly_arg_vector_set_instance_type_infos": 1, + "poly_arg_vector_set_instance_typeclass_infos": 1, + "prog_constraints": 1, + "AllUnconstrainedTVars": 2, + "AllExtraHeadTypeInfoVars": 2, + "constraints": 4, + "UnivConstraints": 3, + "ExistConstraints": 6, + "prog_type.constraint_list_get_tvars": 2, + "UnivConstrainedTVars": 2, + "ExistConstrainedTVars": 2, + "poly_info_get_constraint_map": 4, + "ConstraintMap": 12, + "get_improved_exists_head_constraints": 4, + "ActualExistConstraints": 9, + "pred_info_get_markers": 1, + "PredMarkers": 2, + "check_marker": 1, + "marker_class_method": 1, + "RecordExistQLocns": 3, + "do_not_record_type_info_locns": 1, + "UnivHeadTypeClassInfoVars": 4, + "HeadTypeVars": 2, + "list.delete_elems": 12, + "UnconstrainedTVars0": 2, + "UnconstrainedTVars1": 2, + "UnconstrainedTVars2": 2, + "list.remove_dups": 4, + "UnconstrainedUnivTVars": 7, + "UnconstrainedExistTVars": 6, + "ExistHeadTypeInfoVars": 5, + "UnivHeadTypeInfoVars": 4, + "list.condense": 4, + "proc_arg_vector_set_univ_type_infos": 1, + "HeadVars1": 2, + "proc_arg_vector_set_exist_type_infos": 1, + "HeadVars2": 2, + "proc_arg_vector_set_univ_typeclass_infos": 1, + "HeadVars3": 2, + "proc_arg_vector_set_exist_typeclass_infos": 1, + "In": 6, + "out_mode": 2, + "Out": 6, + "NumUnconstrainedUnivTVars": 2, + "NumUnconstrainedExistTVars": 2, + "NumUnivClassInfoVars": 2, + "NumExistClassInfoVars": 2, + "UnivTypeInfoModes": 2, + "ExistTypeInfoModes": 2, + "UnivTypeClassInfoModes": 2, + "ExistTypeClassInfoModes": 2, + "poly_arg_vector_set_univ_type_infos": 1, + "poly_arg_vector_set_exist_type_infos": 1, + "poly_arg_vector_set_univ_typeclass_infos": 1, + "poly_arg_vector_set_exist_typeclass_infos": 1, + "some": 4, + "ToLocn": 4, + "TheVar": 2, + "TheLocn": 2, + "list.map": 17, + "UnivTypeLocns": 2, + "list.foldl_corresponding": 3, + "rtti_det_insert_type_info_locn": 3, + "ExistTypeLocns": 2, + "UnconstrainedInstanceTypeLocns": 2, + ".RttiVarMaps": 1, + "TypeInfoHeadVars": 2, + "pred_info_get_tvar_kinds": 2, + "KindMap": 2, + "PredClassContext": 5, + "PredExistConstraints": 2, + "exist_constraints": 1, + "ExistQVarsForCall": 2, + "goal_info_get_context": 4, + "make_typeclass_info_vars": 3, + "ExistTypeClassVarsMCAs": 2, + "ExtraTypeClassGoals": 5, + "assoc_list.keys": 8, + "ExistTypeClassVars": 3, + "assign_var_list": 8, + "ExtraTypeClassUnifyGoals": 2, + "vartypes_is_empty": 1, + "PredToActualTypeSubst": 4, + "ActualArgTypes": 8, + "ArgTypeSubst": 2, + "apply_subst_to_tvar_list": 1, + "ActualTypes": 2, + "polymorphism_do_make_type_info_vars": 5, + "TypeInfoVarsMCAs": 2, + "ExtraTypeInfoGoals": 4, + "TypeInfoVars": 5, + "ExtraTypeInfoUnifyGoals": 2, + "GoalList": 8, + "conj_list_to_goal": 6, + "Var1": 5, + "Vars1": 2, + "Var2": 5, + "Vars2": 2, + "Goals": 13, + "assign_var": 3, + "true_goal": 1, + "term.context_init": 2, + "create_pure_atomic_complicated_unification": 1, + "rhs_var": 2, + "umc_explicit": 1, + "constraint_map": 1, + "NumExistConstraints": 4, + "search_hlds_constraint_list": 1, + "unproven": 3, + "goal_id": 1, + "ActualExistConstraints0": 2, + "GoalExpr0": 18, + "GoalInfo0": 41, + "generic_call": 1, + "plain_call": 5, + "ArgVars0": 23, + "polymorphism_process_call": 4, + "ExtraVars": 13, + "ExtraGoals": 13, + "ArgVars": 6, + "CallExpr": 4, + "call_args": 1, + "Call": 4, + "call_foreign_proc": 4, + "polymorphism_process_foreign_proc": 3, + "XVar": 11, + "Y": 9, + "Mode": 12, + "Unification": 16, + "UnifyContext": 15, + "polymorphism_process_unify": 4, + "conj": 5, + "ConjType": 4, + "Goals0": 13, + "plain_conj": 4, + "polymorphism_process_plain_conj": 5, + "parallel_conj": 1, + "get_cache_maps_snapshot": 11, + "InitialSnapshot": 36, + "polymorphism_process_par_conj": 5, + "GoalExpr": 19, + "disj": 2, + "polymorphism_process_disj": 6, + "set_cache_maps_snapshot": 15, + "if_then_else": 2, + "Cond0": 2, + "Then0": 2, + "Else0": 2, + "Cond": 2, + "Then": 2, + "Else": 2, + "negation": 2, + "SubGoal0": 14, + "SubGoal": 16, + "switch": 2, + "CanFail": 4, + "Cases0": 4, + "polymorphism_process_cases": 5, + "Cases": 4, + "scope": 7, + "Reason0": 16, + "from_ground_term": 2, + "TermVar": 4, + "Kind": 5, + "from_ground_term_initial": 2, + "polymorphism_process_from_ground_term_initial": 3, + "from_ground_term_construct": 1, + "from_ground_term_deconstruct": 1, + "from_ground_term_other": 1, + "promise_solutions": 1, + "promise_purity": 1, + "require_detism": 1, + "require_complete_switch": 1, + "commit": 1, + "barrier": 1, + "loop_control": 1, + "exist_quant": 1, + "trace_goal": 1, + "shorthand": 2, + "ShortHand0": 4, + "atomic_goal": 2, + "GoalType": 2, + "Outer": 2, + "Inner": 2, + "MainGoal0": 2, + "OrElseGoals0": 2, + "OrElseInners": 2, + "MainGoal": 2, + "OrElseGoals": 2, + "ShortHand": 3, + "try_goal": 2, + "MaybeIO": 2, + "ResultVar": 2, + "SubGoalExpr0": 4, + "SubGoalInfo": 2, + "Conjuncts0": 2, + "ConjunctA0": 2, + "ConjunctB0": 2, + "ConjunctA": 2, + "ConjunctB": 2, + "Conjuncts": 2, + "SubGoalExpr": 2, + "bi_implication": 1, + "hlds_goal_expr": 2, + "SubGoalInfo0": 2, + "SubGoals0Prime": 2, + "SubGoals0": 2, + "polymorphism_process_fgti_goals": 5, + "RevMarkedSubGoals": 2, + "fgt_invariants_kept": 2, + "InvariantsStatus": 7, + "Reason": 2, + "fgt_invariants_broken": 2, + "introduce_partial_fgt_scopes": 1, + "deconstruct_top_down": 1, + "fgt_marked_goal": 2, + "fgt_invariants_status": 2, + "RevMarkedGoals": 4, + "OldInfo": 3, + "XVarPrime": 2, + "ModePrime": 2, + "UnificationPrime": 2, + "UnifyContextPrime": 2, + "rhs_functor": 5, + "ConsIdPrime": 2, + "YVarsPrime": 2, + "ConsId": 10, + "YVars": 4, + "polymorphism_process_unify_functor": 4, + "Changed": 10, + "VarSetBefore": 2, + "MaxVarBefore": 2, + "varset.max_var": 2, + "poly_info_get_num_reuses": 2, + "NumReusesBefore": 2, + "VarSetAfter": 2, + "MaxVarAfter": 2, + "NumReusesAfter": 2, + "MarkedGoal": 3, + "fgt_kept_goal": 1, + "fgt_broken_goal": 1, + ".RevMarkedGoals": 1, + "unify_mode": 2, + "Unification0": 8, + "_YVar": 1, + "unification_typeinfos": 5, + "_Changed": 3, + "Args": 11, + "Purity": 9, + "Groundness": 6, + "PredOrFunc": 6, + "EvalMethod": 8, + "LambdaVars": 13, + "Modes": 4, + "Det": 4, + "LambdaGoal0": 5, + "LambdaGoal1": 2, + "fixup_lambda_quantification": 1, + "LambdaGoal": 6, + "NonLocalTypeInfos": 3, + "set_of_var.to_sorted_list": 1, + "NonLocalTypeInfosList": 2, + "Y1": 2, + "NonLocals0": 10, + "goal_info_get_nonlocals": 6, + "NonLocals": 12, + "goal_info_set_nonlocals": 6, + "type_vars": 2, + "TypeVars": 8, + "get_type_info_locn": 1, + "TypeInfoLocns": 6, + "add_unification_typeinfos": 4, + "rtti_lookup_type_info_locn": 1, + "type_info_locn": 1, + "type_info_locn_var": 1, + "TypeInfoVars0": 2, + ".GoalInfo": 1, + "set_of_var.insert_list": 4, + ".Unification": 5, + "complicated_unify": 2, + "construct": 1, + "deconstruct": 2, + "simple_test": 1, + "X0": 8, + "ConsId0": 5, + "Mode0": 4, + "TypeOfX": 6, + "Arity": 5, + "closure_cons": 1, + "ShroudedPredProcId": 2, + "ProcId0": 3, + "unshroud_pred_proc_id": 1, + "type_is_higher_order_details": 1, + "_PredOrFunc": 1, + "CalleeArgTypes": 2, + "invalid_proc_id": 1, + "goal_info_add_feature": 1, + "feature_lambda_undetermined_mode": 1, + "GoalInfo1": 6, + "VarSet0": 2, + "Functor0": 6, + "poly_info_set_varset_and_types": 1, + "cons": 3, + "ConsTypeCtor": 2, + "remove_new_prefix": 1, + "OrigFunctor": 2, + "IsConstruction": 7, + "type_util.get_existq_cons_defn": 1, + "ConsDefn": 2, + "polymorphism_process_existq_unify_functor": 3, + "UnifyExpr": 2, + "Unify": 2, + "PredArgTypes": 10, + "Functor": 6, + "create_fresh_vars": 5, + "QualifiedPName": 5, + "qualified": 1, + "cons_id_dummy_type_ctor": 1, + "RHS": 2, + "CallUnifyContext": 2, + "LambdaGoalExpr": 2, + "not_builtin": 3, + "OutsideVars": 2, + "InsideVars": 2, + "set_of_var.intersect": 1, + "LambdaNonLocals": 2, + "GoalId": 8, + "goal_info_get_goal_id": 3, + "goal_info_init": 1, + "LambdaGoalInfo0": 2, + "goal_info_set_context": 1, + "LambdaGoalInfo1": 2, + "LambdaGoalInfo2": 2, + "goal_info_set_purity": 1, + "LambdaGoalInfo3": 2, + "goal_info_set_goal_id": 1, + "LambdaGoalInfo": 4, + "lambda_modes_and_det": 4, + "LambdaModes": 6, + "LambdaDet": 6, + "pred_info_is_pred_or_func": 1, + "ho_ground": 1, + "_LambdaModes0": 1, + "_LambdaDet0": 1, + "goal_to_conj_list": 1, + "LambdaGoalList0": 2, + "list.split_last": 1, + "LambdaGoalButLast0": 2, + "LastGoal0": 2, + "LastGoalExpr0": 2, + "LastGoalInfo0": 2, + "PredId0": 2, + "_DummyProcId": 1, + "Args0": 5, + "MaybeCallUnifyContext0": 2, + "QualifiedPName0": 2, + "LambdaGoalButLast": 2, + "LastGoalInfo": 2, + "MaybeCallUnifyContext": 4, + "LastGoalExpr": 2, + "LastGoal": 2, + "prog_vars": 1, + "determinism": 1, + "NumArgModes": 2, + "NumLambdaVars": 2, + "list.drop": 2, + "LambdaModesPrime": 2, + "proc_info_get_declared_determinism": 1, + "MaybeDet": 3, + "sorry": 1, + "varset.new_var": 1, + "add_var_type": 1, + "ctor_defn": 2, + "CtorDefn": 2, + "ActualRetType": 2, + "CtorTypeVarSet": 2, + "CtorExistQVars": 2, + "CtorKindMap": 2, + "CtorExistentialConstraints": 2, + "CtorArgTypes": 2, + "CtorRetType": 2, + "TypeVarSet0": 5, + "tvarset_merge_renaming": 3, + "CtorToParentRenaming": 6, + "apply_variable_renaming_to_tvar_list": 2, + "ParentExistQVars": 6, + "apply_variable_renaming_to_tvar_kind_map": 2, + "ParentKindMap": 7, + "apply_variable_renaming_to_prog_constraint_list": 1, + "ParentExistentialConstraints": 3, + "apply_variable_renaming_to_type_list": 4, + "ParentArgTypes": 6, + "apply_variable_renaming_to_type": 1, + "ParentRetType": 2, + "poly_info_set_typevarset": 3, + "type_list_subsumes_det": 3, + "ParentToActualTypeSubst": 6, + "NumExistentialConstraints": 3, + "lookup_hlds_constraint_list": 4, + "ActualExistentialConstraints": 4, + "ExtraTypeClassVarsMCAs": 2, + "ExtraTypeClassVars": 2, + "assumed": 2, + "make_existq_typeclass_info_vars": 2, + "constraint_list_get_tvars": 3, + "ParentExistConstrainedTVars": 4, + "ParentUnconstrainedExistQVars": 2, + "apply_rec_subst_to_tvar_list": 4, + "ActualExistentialTypes": 2, + "ExtraTypeInfoVarsMCAs": 2, + "ExtraTypeInfoVars": 2, + "ExtraTypeClassVars.": 1, + "bound": 1, + "Attributes": 2, + "ProcExtraArgs": 2, + "MaybeTraceRuntimeCond": 2, + "Impl": 14, + "foreign_arg_var": 1, + "CanOptAwayUnnamed": 11, + "polymorphism_process_foreign_proc_args": 3, + "ExtraArgs": 5, + "pragma_foreign_code_impl": 4, + "foreign_arg": 1, + "PredTypeVarSet": 8, + "UnivCs": 4, + "ExistCs": 4, + "UnivVars0": 2, + "get_constrained_vars": 2, + "UnivConstrainedVars": 2, + "ExistVars0": 2, + "ExistConstrainedVars": 2, + "PredTypeVars0": 2, + "PredTypeVars1": 2, + "PredTypeVars2": 2, + "PredTypeVars": 3, + "foreign_proc_add_typeclass_info": 4, + "ExistTypeClassArgInfos": 2, + "UnivTypeClassArgInfos": 2, + "TypeClassArgInfos": 2, + "list.filter": 1, + "X": 9, + "semidet": 2, + "ExistUnconstrainedVars": 2, + "UnivUnconstrainedVars": 2, + "foreign_proc_add_typeinfo": 4, + "ExistTypeArgInfos": 2, + "UnivTypeArgInfos": 2, + "TypeInfoArgInfos": 2, + "ArgInfos": 2, + "TypeInfoTypes": 2, + "type_info_type": 1, + "UnivTypes": 2, + "ExistTypes": 2, + "OrigArgTypes": 2, + "make_foreign_args": 1, + "tvarset": 3, + "box_policy": 2, + "Constraint": 2, + "MaybeArgName": 7, + "native_if_possible": 2, + "SymName": 4, + "sym_name_to_string_sep": 1, + "TypeVarNames": 2, + "underscore_and_tvar_name": 3, + "string.append_list": 1, + "ConstraintVarName": 3, + "foreign_code_does_not_use_variable": 4, + "TVar": 4, + "varset.search_name": 1, + "TypeVarName": 2, + "C_VarName": 3, + "VarName": 2, + "foreign_code_uses_variable": 1, + "TVarName": 2, + "TVarName0": 1, + "TVarName0.": 1, + "cache_maps": 3, + "case": 4, + "Case0": 2, + "Case": 2, + "MainConsId": 2, + "OtherConsIds": 2, + "PredExistQVars": 2, + "PredKindMap": 3, + "varset.is_empty": 1, + "PredToParentTypeRenaming": 6, + "ParentTVars": 4, + "apply_variable_renaming_to_prog_constraints": 1, + "ParentClassContext": 2, + "ParentUnivConstraints": 3, + "ParentExistConstraints": 3, + "ParentUnivConstrainedTVars": 2, + "ParentUnconstrainedTVars0": 2, + "ParentUnconstrainedTVars1": 2, + "ParentUnconstrainedTVars": 3, + "ParentUnconstrainedUnivTVars": 3, + "ParentUnconstrainedExistTVars": 2, + "NumUnivConstraints": 2, + "ActualUnivConstraints": 2, + "ActualExistQVarTypes": 2, + "prog_type.type_list_to_var_list": 1, + "ActualExistQVars0": 2, + "ActualExistQVars": 2, + "ExtraUnivClassVarsMCAs": 2, + "ExtraUnivClassGoals": 2, + "ExtraUnivClassVars": 2, + "ExtraExistClassVars": 2, + "ExtraExistClassGoals": 2, + "ActualUnconstrainedUnivTypes": 2, + "ExtraUnivTypeInfoVarsMCAs": 2, + "ExtraUnivTypeInfoGoals": 2, + "ExtraUnivTypeInfoVars": 2, + "ActualUnconstrainedExistTypes": 2, + "ExtraExistTypeInfoVarsMCAs": 2, + "ExtraExistTypeInfoGoals": 2, + "ExtraExistTypeInfoVars": 2, + "CalleePredInfo": 2, + "CalleeProcInfo": 3, + "CallArgs0": 3, + "BuiltinState": 2, + "TVarSet0": 2, + "ActualArgTypes0": 3, + "PredTVarSet": 2, + "_PredExistQVars": 1, + "CalleeHeadVars": 2, + "proc_info_get_rtti_varmaps": 1, + "CalleeRttiVarMaps": 2, + "NCallArgs0": 2, + "NPredArgs": 2, + "NExtraArgs": 3, + "OrigPredArgTypes0": 2, + "list.take": 1, + "CalleeExtraHeadVars0": 2, + "OrigPredArgTypes": 2, + "CalleeExtraHeadVars": 2, + "TVarSet": 2, + "PredToParentRenaming": 3, + "OrigParentArgTypes": 2, + "ParentToActualTSubst": 2, + "GetTypeInfoTypes": 2, + "ProgVar": 2, + "TypeInfoType": 2, + "rtti_varmaps_var_info": 1, + "VarInfo": 4, + "type_info_var": 1, + "typeclass_info_var": 1, + "non_rtti_var": 1, + "PredTypeInfoTypes": 2, + "ParentTypeInfoTypes": 2, + "apply_rec_subst_to_type_list": 1, + "ActualTypeInfoTypes": 2, + "Ctxt": 2, + "ExtraArgsConstArgs": 2, + "CallArgs": 2, + "NonLocals1": 2, + "CallGoalExpr": 2, + "CallGoal": 2, + "rot13_concise.": 1, + "state": 3, + "alphabet": 3, + "cycle": 4, + "rot_n": 2, + "Char": 12, + "RotChar": 8, + "char_to_string": 1, + "CharString": 2, + "if": 15, + "sub_string_search": 1, + "Index": 3, + "then": 3, + "NewIndex": 2, + "mod": 1, + "index_det": 1, + "else": 8, + "rot13": 11, + "read_char": 1, + "Res": 8, + "ok": 3, + "print": 3, + "ErrorCode": 4, + "error_message": 1, + "ErrorMessage": 4, + "stderr_stream": 1, + "StdErr": 8, + "nl": 1, + "rot13_ralph.": 1, + "io__state": 4, + "io__read_byte": 1, + "Result": 4, + "io__write_byte": 1, + "ErrNo": 2, + "io__error_message": 2, + "z": 1, + "Rot13": 2, + "<": 14, + "rem": 1, + "rot13_verbose.": 1, + "rot13a/2": 1, + "table": 1, + "alphabetic": 2, + "characters": 1, + "their": 1, + "equivalents": 1, + "fails": 1, + "input": 1, + "not": 7, + "rot13a": 55, + "rot13/2": 1, + "Applies": 1, + "algorithm": 1, + "a": 10, + "character.": 1, + "TmpChar": 2, + "io__read_char": 1, + "io__write_char": 1, + "io__stderr_stream": 1, + "io__write_string": 2, + "io__nl": 1, + "store.": 1, + "typeclass": 1, + "store": 52, + "T": 52, + "where": 8, + "S": 133, + "instance": 4, + "io.state": 3, + "store.init": 2, + "generic_mutvar": 15, + "io_mutvar": 1, + "store_mutvar": 1, + "store.new_mutvar": 1, + "store.copy_mutvar": 1, + "store.get_mutvar": 1, + "store.set_mutvar": 1, + "<=>": 5, + "new_cyclic_mutvar": 2, + "Func": 4, + "Mutvar": 23, + "Create": 1, + "new": 25, + "variable": 1, + "whose": 2, + "initialized": 2, + "with": 5, + "returned": 1, + "from": 1, + "specified": 1, + "function": 3, + "The": 2, + "argument": 6, + "passed": 2, + "mutvar": 6, + "itself": 4, + "has": 4, + "yet": 1, + "been": 1, + "safe": 2, + "because": 1, + "does": 3, + "get": 2, + "so": 3, + "it": 1, + "can": 1, + "t": 5, + "examine": 1, + "uninitialized": 1, + "predicate": 1, + "useful": 1, + "creating": 1, + "self": 1, + "referential": 1, + "values": 1, + "such": 2, + "as": 5, + "circular": 1, + "linked": 1, + "lists": 1, + "For": 1, + "example": 1, + "clist": 2, + "node": 1, + "store.new_cyclic_mutvar": 1, + "generic_ref": 20, + "io_ref": 1, + "store_ref": 1, + "store.new_ref": 1, + "store.ref_functor": 1, + "store.arg_ref": 1, + "ArgT": 4, + "store.new_arg_ref": 3, + "store.set_ref": 1, + "store.set_ref_value": 1, + "store.copy_ref_value": 1, + "store.extract_ref_value": 1, + "Nasty": 1, + "performance": 2, + "hacks": 1, + "WARNING": 1, + "use": 1, + "of": 10, + "these": 1, + "procedures": 2, + "dangerous": 1, + "Use": 1, + "them": 1, + "last": 1, + "resort": 1, + "critical": 1, + "and": 6, + "shows": 1, + "that": 2, + "using": 1, + "versions": 1, + "bottleneck": 1, + "These": 1, + "may": 1, + "vanish": 1, + "future": 1, + "Mercury": 1, + "unsafe_arg_ref": 1, + "same": 2, + "arg_ref": 12, + "unsafe_new_arg_ref": 1, + "new_arg_ref": 1, + "except": 1, + "they": 4, + "doesn": 1, + "check": 1, + "errors": 1, + "don": 3, + "work": 3, + "no_tag": 1, + "types": 3, + "exactly": 2, + "one": 2, + "functor": 2, + "which": 2, + "arguments": 2, + "occupy": 1, + "word": 2, + "other": 1, + "functors.": 1, + "store.unsafe_arg_ref": 1, + "store.unsafe_new_arg_ref": 1, + "implementation": 1, + "require": 1, + "just": 1, + "real": 1, + "representation": 1, + "pragma": 41, + "foreign_type": 10, + "MR_Word": 24, + "can_pass_as_mercury_type": 5, + "equality": 5, + "store_equal": 7, + "comparison": 5, + "store_compare": 7, + "int32": 1, + "Java": 12, + "Erlang": 3, + "attempt": 2, + "two": 2, + "stores": 2, + "comparison_result": 1, + "compare": 1, + "Mutvars": 1, + "references": 1, + "are": 1, + "each": 1, + "represented": 1, + "pointer": 1, + "single": 1, + "on": 1, + "heap": 1, + "private_builtin.ref": 2, + "ref": 2, + "store.do_init": 6, + "foreign_proc": 28, + "_S0": 16, + "will_not_call_mercury": 28, + "will_not_modify_trail": 7, + "new_mutvar": 5, + "Val": 45, + "S0": 23, + "get_mutvar": 5, + "set_mutvar": 5, + "_S": 12, + "copy_mutvar": 1, + "Copy": 2, + "Value": 4, + "store.unsafe_new_uninitialized_mutvar": 1, + "unsafe_new_uninitialized_mutvar": 4, + "MR_offset_incr_hp_msg": 5, + "MR_SIZE_SLOT_SIZE": 10, + "1": 5, + "MR_ALLOC_ID": 5, + "2": 2, + "MR_define_size_slot": 5, + "0": 2, + "object": 21, + "MutVar": 4, + "Store": 5, + "apply": 1, + "Ref": 41, + "foreign_code": 2, + "public": 17, + "class": 4, + "Object": 9, + "referenced": 4, + "obj": 7, + "Specific": 2, + "field": 20, + "or": 2, + "null": 8, + "specify": 2, + "GetFields": 2, + "return": 6, + "fields": 3, + "any": 2, + "particular": 2, + "order": 2, + "really": 2, + "usable": 2, + "System": 1, + "Reflection": 1, + "FieldInfo": 1, + "Constructors": 2, + "init": 8, + "setField": 4, + "Set": 2, + "according": 2, + "given": 2, + "index": 2, + "void": 4, + "GetType": 1, + "reference": 4, + "getValue": 4, + "GetValue": 1, + "Update": 2, + "setValue": 2, + "SetValue": 1, + "static": 1, + "lang": 28, + "getDeclaredFields": 2, + "reflect": 1, + "Field": 5, + "try": 3, + "getClass": 1, + "catch": 11, + "SecurityException": 1, + "se": 1, + "throw": 11, + "RuntimeException": 11, + "Security": 1, + "manager": 1, + "denied": 1, + "access": 3, + "ArrayIndexOutOfBoundsException": 1, + "e": 13, + "No": 1, + "Exception": 3, + "Unable": 3, + "getMessage": 3, + "IllegalAccessException": 2, + "inaccessible": 2, + "IllegalArgumentException": 2, + "mismatch": 2, + "NullPointerException": 2, + "new_ref": 4, + "ets": 3, + "insert": 1, + "copy_ref_value": 1, + "unsafe_ref_value": 6, + "store.unsafe_ref_value": 1, + "lookup": 1, + "ref_functor": 1, + "canonicalize": 1, + "foreign_decl": 1, + "include": 4, + "mercury_type_info": 1, + "h": 4, + "mercury_heap": 1, + "mercury_misc": 1, + "MR_fatal_error": 5, + "mercury_deconstruct": 1, + "MR_arg": 3, + "ArgNum": 7, + "ArgRef": 22, + "may_not_duplicate": 1, + "MR_TypeInfo": 10, + "arg_type_info": 6, + "exp_arg_type_info": 6, + "MR_DuArgLocn": 2, + "arg_locn": 9, + "TypeInfo_for_T": 2, + "TypeInfo_for_ArgT": 2, + "MR_save_transient_registers": 2, + "MR_NONCANON_ABORT": 2, + "number": 2, + "range": 2, + "MR_compare_type_info": 2, + "MR_COMPARE_EQUAL": 2, + "wrong": 2, + "MR_restore_transient_registers": 2, + "NULL": 2, + "MR_arg_bits": 2, + "store.ref/2": 3, + "MR_arg_value": 2, + "C#": 6, + "store.Ref": 8, + "Ref.getValue": 6, + "*arg_ref": 1, + "*arg_locn": 1, + "&": 7, + "&&": 1, + "ValRef": 1, + "Ref.setValue": 3, + "ValRef.getValue": 2, + "*Ptr": 2, + "Ptr": 4, + "MR_strip_tag": 2, + "Arg": 6 + }, "Monkey": { "Strict": 1, "sample": 1, @@ -26397,6 +43987,509 @@ "&": 1, "c": 1 }, + "Moocode": { + "@program": 29, + "toy": 3, + "wind": 1, + "this.wound": 8, + "+": 39, + ";": 505, + "player": 2, + "tell": 1, + "(": 600, + "this.name": 4, + ")": 593, + "player.location": 1, + "announce": 1, + "player.name": 1, + ".": 30, + "while": 15, + "read": 1, + "endwhile": 14, + "I": 1, + "M": 1, + "P": 1, + "O": 1, + "R": 1, + "T": 2, + "A": 1, + "N": 1, + "The": 2, + "following": 2, + "code": 43, + "cannot": 1, + "be": 1, + "used": 1, + "as": 28, + "is.": 1, + "You": 1, + "will": 1, + "need": 1, + "to": 1, + "rewrite": 1, + "functionality": 1, + "that": 3, + "is": 6, + "not": 2, + "present": 1, + "in": 43, + "your": 1, + "server/core.": 1, + "most": 1, + "straight": 1, + "-": 98, + "forward": 1, + "target": 7, + "other": 1, + "than": 1, + "Stunt/Improvise": 1, + "a": 12, + "server/core": 1, + "provides": 1, + "map": 5, + "datatype": 1, + "and": 1, + "anonymous": 1, + "objects.": 1, + "Installation": 1, + "my": 1, + "server": 1, + "uses": 1, + "the": 4, + "object": 1, + "numbers": 1, + "#36819": 1, + "MOOcode": 4, + "Experimental": 2, + "Language": 2, + "Package": 2, + "#36820": 1, + "Changelog": 1, + "#36821": 1, + "Dictionary": 1, + "#36822": 1, + "Compiler": 2, + "#38128": 1, + "Syntax": 4, + "Tree": 1, + "Pretty": 1, + "Printer": 1, + "#37644": 1, + "Tokenizer": 2, + "Prototype": 25, + "#37645": 1, + "Parser": 2, + "#37648": 1, + "Symbol": 2, + "#37649": 1, + "Literal": 1, + "#37650": 1, + "Statement": 8, + "#37651": 1, + "Operator": 11, + "#37652": 1, + "Control": 1, + "Flow": 1, + "#37653": 1, + "Assignment": 2, + "#38140": 1, + "Compound": 1, + "#38123": 1, + "Prefix": 1, + "#37654": 1, + "Infix": 1, + "#37655": 1, + "Name": 1, + "#37656": 1, + "Bracket": 1, + "#37657": 1, + "Brace": 1, + "#37658": 1, + "If": 1, + "#38119": 1, + "For": 1, + "#38120": 1, + "Loop": 1, + "#38126": 1, + "Fork": 1, + "#38127": 1, + "Try": 1, + "#37659": 1, + "Invocation": 1, + "#37660": 1, + "Verb": 1, + "Selector": 2, + "#37661": 1, + "Property": 1, + "#38124": 1, + "Error": 1, + "Catching": 1, + "#38122": 1, + "Positional": 1, + "#38141": 1, + "From": 1, + "#37662": 1, + "Utilities": 1, + "#36823": 1, + "Tests": 4, + "#36824": 1, + "#37646": 1, + "#37647": 1, + "parent": 1, + "plastic.tokenizer_proto": 4, + "_": 4, + "_ensure_prototype": 4, + "application/x": 27, + "moocode": 27, + "typeof": 11, + "this": 114, + "OBJ": 3, + "||": 19, + "raise": 23, + "E_INVARG": 3, + "_ensure_instance": 7, + "ANON": 2, + "plastic.compiler": 3, + "_lookup": 2, + "private": 1, + "{": 112, + "name": 9, + "}": 112, + "args": 26, + "if": 90, + "value": 73, + "this.variable_map": 3, + "[": 99, + "]": 102, + "E_RANGE": 17, + "return": 61, + "else": 45, + "tostr": 51, + "random": 3, + "this.reserved_names": 1, + "endif": 93, + "compile": 1, + "source": 32, + "options": 3, + "tokenizer": 6, + "this.plastic.tokenizer_proto": 2, + "create": 16, + "parser": 89, + "this.plastic.parser_proto": 2, + "compiler": 2, + "try": 2, + "statements": 13, + "except": 2, + "ex": 4, + "ANY": 3, + ".tokenizer.row": 1, + "endtry": 2, + "for": 31, + "statement": 29, + "statement.type": 10, + "@source": 3, + "p": 82, + "@compiler": 1, + "endfor": 31, + "ticks_left": 4, + "<": 13, + "seconds_left": 4, + "&&": 39, + "suspend": 4, + "statement.value": 20, + "elseif": 41, + "_generate": 1, + "isa": 21, + "this.plastic.sign_operator_proto": 1, + "|": 9, + "statement.first": 18, + "statement.second": 13, + "this.plastic.control_flow_statement_proto": 1, + "first": 22, + "statement.id": 3, + "this.plastic.if_statement_proto": 1, + "s": 47, + "respond_to": 9, + "@code": 28, + "@this": 13, + "i": 29, + "length": 11, + "LIST": 6, + "this.plastic.for_statement_proto": 1, + "statement.subtype": 2, + "this.plastic.loop_statement_proto": 1, + "prefix": 4, + "this.plastic.fork_statement_proto": 1, + "this.plastic.try_statement_proto": 1, + "x": 9, + "@x": 3, + "join": 6, + "this.plastic.assignment_operator_proto": 1, + "statement.first.type": 1, + "res": 19, + "rest": 3, + "v": 17, + "statement.first.value": 1, + "v.type": 2, + "v.first": 2, + "v.second": 1, + "this.plastic.bracket_operator_proto": 1, + "statement.third": 4, + "this.plastic.brace_operator_proto": 1, + "this.plastic.invocation_operator_proto": 1, + "@a": 2, + "statement.second.type": 2, + "this.plastic.property_selector_operator_proto": 1, + "this.plastic.error_catching_operator_proto": 1, + "second": 18, + "this.plastic.literal_proto": 1, + "toliteral": 1, + "this.plastic.positional_symbol_proto": 1, + "this.plastic.prefix_operator_proto": 3, + "this.plastic.infix_operator_proto": 1, + "this.plastic.traditional_ternary_operator_proto": 1, + "this.plastic.name_proto": 1, + "plastic.printer": 2, + "_print": 4, + "indent": 4, + "result": 7, + "item": 2, + "@result": 2, + "E_PROPNF": 1, + "print": 1, + "instance": 59, + "instance.row": 1, + "instance.column": 1, + "instance.source": 1, + "advance": 16, + "this.token": 21, + "this.source": 3, + "row": 23, + "this.row": 2, + "column": 63, + "this.column": 2, + "eol": 5, + "block_comment": 6, + "inline_comment": 4, + "loop": 14, + "len": 3, + "continue": 16, + "next_two": 4, + "column..column": 1, + "c": 44, + "break": 6, + "re": 1, + "not.": 1, + "Worse": 1, + "*": 4, + "valid": 2, + "error": 6, + "like": 4, + "E_PERM": 4, + "treated": 2, + "literal": 2, + "an": 2, + "invalid": 2, + "E_FOO": 1, + "variable.": 1, + "Any": 1, + "starts": 1, + "with": 1, + "characters": 1, + "*now*": 1, + "but": 1, + "errors": 1, + "are": 1, + "errors.": 1, + "*/": 1, + "<=>": 8, + "z": 4, + "col1": 6, + "mark": 2, + "start": 2, + "1": 13, + "9": 4, + "col2": 4, + "chars": 21, + "index": 2, + "E_": 1, + "token": 24, + "type": 9, + "this.errors": 1, + "col1..col2": 2, + "toobj": 1, + "float": 4, + "0": 1, + "cc": 1, + "e": 1, + "tofloat": 1, + "toint": 1, + "esc": 1, + "q": 1, + "col1..column": 1, + "plastic.parser_proto": 3, + "@options": 1, + "instance.tokenizer": 1, + "instance.symbols": 1, + "plastic": 1, + "this.plastic": 1, + "symbol": 65, + "plastic.name_proto": 1, + "plastic.literal_proto": 1, + "plastic.operator_proto": 10, + "plastic.prefix_operator_proto": 1, + "plastic.error_catching_operator_proto": 3, + "plastic.assignment_operator_proto": 1, + "plastic.compound_assignment_operator_proto": 5, + "plastic.traditional_ternary_operator_proto": 2, + "plastic.infix_operator_proto": 13, + "plastic.sign_operator_proto": 2, + "plastic.bracket_operator_proto": 1, + "plastic.brace_operator_proto": 1, + "plastic.control_flow_statement_proto": 3, + "plastic.if_statement_proto": 1, + "plastic.for_statement_proto": 1, + "plastic.loop_statement_proto": 2, + "plastic.fork_statement_proto": 1, + "plastic.try_statement_proto": 1, + "plastic.from_statement_proto": 2, + "plastic.verb_selector_operator_proto": 2, + "plastic.property_selector_operator_proto": 2, + "plastic.invocation_operator_proto": 1, + "id": 14, + "bp": 3, + "proto": 4, + "nothing": 1, + "this.plastic.symbol_proto": 2, + "this.symbols": 4, + "clone": 2, + "this.token.type": 1, + "this.token.value": 1, + "this.token.eol": 1, + "operator": 1, + "variable": 1, + "identifier": 1, + "keyword": 1, + "Unexpected": 1, + "end": 2, + "Expected": 1, + "t": 1, + "call": 1, + "nud": 2, + "on": 1, + "@definition": 1, + "new": 4, + "pop": 4, + "delete": 1, + "plastic.utilities": 6, + "suspend_if_necessary": 4, + "parse_map_sequence": 1, + "separator": 6, + "infix": 3, + "terminator": 6, + "symbols": 7, + "ids": 6, + "@ids": 2, + "push": 3, + "@symbol": 2, + ".id": 13, + "key": 7, + "expression": 19, + "@map": 1, + "parse_list_sequence": 2, + "list": 3, + "@list": 1, + "validate_scattering_pattern": 1, + "pattern": 5, + "state": 8, + "element": 1, + "element.type": 3, + "element.id": 2, + "element.first.type": 2, + "children": 4, + "node": 3, + "node.value": 1, + "@children": 1, + "match": 1, + "root": 2, + "keys": 3, + "matches": 3, + "stack": 4, + "next": 2, + "top": 5, + "@stack": 2, + "top.": 1, + "@matches": 1, + "plastic.symbol_proto": 2, + "opts": 2, + "instance.id": 1, + "instance.value": 1, + "instance.bp": 1, + "k": 3, + "instance.": 1, + "parents": 3, + "ancestor": 2, + "ancestors": 1, + "property": 1, + "properties": 1, + "this.type": 8, + "this.first": 8, + "import": 8, + "this.second": 7, + "left": 2, + "this.third": 3, + "sequence": 2, + "led": 4, + "this.bp": 2, + "second.type": 2, + "make_identifier": 4, + "first.id": 1, + "parser.symbols": 2, + "reserve_keyword": 2, + "this.plastic.utilities": 1, + "third": 4, + "third.id": 2, + "second.id": 1, + "std": 1, + "reserve_statement": 1, + "types": 7, + ".type": 1, + "target.type": 3, + "target.value": 3, + "target.id": 4, + "temp": 4, + "temp.id": 1, + "temp.first.id": 1, + "temp.first.type": 2, + "temp.second.type": 1, + "temp.first": 2, + "imports": 5, + "import.type": 2, + "@imports": 2, + "parser.plastic.invocation_operator_proto": 1, + "temp.type": 1, + "parser.plastic.name_proto": 2, + "temp.first.value": 1, + "temp.second": 1, + "first.type": 1, + "parser.imports": 2, + "import.id": 2, + "parser.plastic.assignment_operator_proto": 1, + "result.type": 1, + "result.first": 1, + "result.second": 1, + "@verb": 1, + "do_the_work": 3, + "none": 1, + "object_utils": 1, + "this.location": 3, + "room": 1, + "announce_all": 2, + "continue_msg": 1, + "fork": 1, + "endfork": 1, + "wind_down_msg": 1 + }, "MoonScript": { "types": 2, "require": 5, @@ -26671,6 +44764,40 @@ "arg_list": 1, "Value": 1 }, + "MTML": { + "<$mt:Var>": 15, + "name=": 19, + "value=": 9, + "": 1, + "op=": 8, + "setvar=": 9, + "": 1, + "<": 2, + "a": 1, + "href": 1, + "<$mt:CategoryLabel>": 1, + "remove_html=": 1, + "": 1, + "": 1, + "": 1, + "function=": 1, + "": 1, + "gt=": 2, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 2, + "from=": 2, + "to=": 2, + "div": 1, + "class": 1, + "col_num": 1, + "": 2, + "": 1 + }, "Nemerle": { "using": 1, "System.Console": 1, @@ -26685,6 +44812,96 @@ "WriteLine": 1, "}": 2 }, + "NetLogo": { + "patches": 7, + "-": 28, + "own": 1, + "[": 17, + "living": 6, + ";": 12, + "indicates": 1, + "if": 2, + "the": 6, + "cell": 10, + "is": 1, + "live": 4, + "neighbors": 5, + "counts": 1, + "how": 1, + "many": 1, + "neighboring": 1, + "cells": 2, + "are": 1, + "alive": 1, + "]": 17, + "to": 6, + "setup": 2, + "blank": 1, + "clear": 2, + "all": 5, + "ask": 6, + "death": 5, + "reset": 2, + "ticks": 2, + "end": 6, + "random": 2, + "ifelse": 3, + "float": 1, + "<": 1, + "initial": 1, + "density": 1, + "birth": 4, + "set": 5, + "true": 1, + "pcolor": 2, + "fgcolor": 1, + "false": 1, + "bgcolor": 1, + "go": 1, + "count": 1, + "with": 2, + "Starting": 1, + "a": 1, + "new": 1, + "here": 1, + "ensures": 1, + "that": 1, + "finish": 1, + "executing": 2, + "first": 1, + "before": 1, + "any": 1, + "of": 2, + "them": 1, + "start": 1, + "second": 1, + "ask.": 1, + "This": 1, + "keeps": 1, + "in": 2, + "synch": 1, + "each": 2, + "other": 1, + "so": 1, + "births": 1, + "and": 1, + "deaths": 1, + "at": 1, + "generation": 1, + "happen": 1, + "lockstep.": 1, + "tick": 1, + "draw": 1, + "let": 1, + "erasing": 2, + "patch": 2, + "mouse": 5, + "xcor": 2, + "ycor": 2, + "while": 1, + "down": 1, + "display": 1 + }, "Nginx": { "user": 1, "www": 2, @@ -26775,6 +44992,72 @@ "Nimrod": { "echo": 1 }, + "Nix": { + "{": 8, + "stdenv": 1, + "fetchurl": 2, + "fetchgit": 5, + "openssl": 2, + "zlib": 2, + "pcre": 2, + "libxml2": 2, + "libxslt": 2, + "expat": 2, + "rtmp": 4, + "false": 4, + "fullWebDAV": 3, + "syslog": 4, + "moreheaders": 3, + "...": 1, + "}": 8, + "let": 1, + "version": 2, + ";": 32, + "mainSrc": 2, + "url": 5, + "sha256": 5, + "-": 12, + "ext": 5, + "git": 2, + "//github.com/arut/nginx": 2, + "module.git": 3, + "rev": 4, + "dav": 2, + "https": 2, + "//github.com/yaoweibin/nginx_syslog_patch.git": 1, + "//github.com/agentzh/headers": 1, + "more": 1, + "nginx": 1, + "in": 1, + "stdenv.mkDerivation": 1, + "rec": 1, + "name": 1, + "src": 1, + "buildInputs": 1, + "[": 5, + "]": 5, + "+": 10, + "stdenv.lib.optional": 5, + "patches": 1, + "if": 1, + "then": 1, + "else": 1, + "configureFlags": 1, + "preConfigure": 1, + "export": 1, + "NIX_CFLAGS_COMPILE": 1, + "postInstall": 1, + "mv": 1, + "out/sbin": 1, + "out/bin": 1, + "meta": 1, + "description": 1, + "maintainers": 1, + "stdenv.lib.maintainers.raskin": 1, + "platforms": 1, + "stdenv.lib.platforms.all": 1, + "inherit": 1 + }, "NSIS": { ";": 39, "bigtest.nsi": 1, @@ -29922,6 +48205,756 @@ "indexPathWithIndexes": 1, "indexAtPosition": 2 }, + "Objective-C++": { + "#include": 26, + "": 1, + "": 1, + "#if": 10, + "(": 612, + "defined": 1, + "OBJC_API_VERSION": 2, + ")": 610, + "&&": 12, + "static": 16, + "inline": 3, + "IMP": 4, + "method_setImplementation": 2, + "Method": 2, + "m": 3, + "i": 29, + "{": 151, + "oi": 2, + "-": 175, + "method_imp": 2, + ";": 494, + "return": 149, + "}": 148, + "#endif": 19, + "namespace": 1, + "WebCore": 1, + "ENABLE": 10, + "DRAG_SUPPORT": 7, + "const": 16, + "double": 1, + "EventHandler": 30, + "TextDragDelay": 1, + "RetainPtr": 4, + "": 4, + "&": 21, + "currentNSEventSlot": 6, + "DEFINE_STATIC_LOCAL": 1, + "event": 30, + "NSEvent": 21, + "*EventHandler": 2, + "currentNSEvent": 13, + ".get": 1, + "class": 14, + "CurrentEventScope": 14, + "WTF_MAKE_NONCOPYABLE": 1, + "public": 1, + "*": 34, + "private": 1, + "m_savedCurrentEvent": 3, + "#ifndef": 3, + "NDEBUG": 2, + "m_event": 3, + "*event": 11, + "ASSERT": 13, + "bool": 26, + "wheelEvent": 5, + "Page*": 7, + "page": 33, + "m_frame": 24, + "if": 104, + "false": 40, + "scope": 6, + "PlatformWheelEvent": 2, + "chrome": 8, + "platformPageClient": 4, + "handleWheelEvent": 2, + "wheelEvent.isAccepted": 1, + "PassRefPtr": 2, + "": 1, + "currentKeyboardEvent": 1, + "[": 268, + "NSApp": 5, + "currentEvent": 2, + "]": 266, + "switch": 4, + "type": 10, + "case": 25, + "NSKeyDown": 4, + "PlatformKeyboardEvent": 6, + "platformEvent": 2, + "platformEvent.disambiguateKeyDownEvent": 1, + "RawKeyDown": 1, + "KeyboardEvent": 2, + "create": 3, + "document": 6, + "defaultView": 2, + "NSKeyUp": 3, + "default": 3, + "keyEvent": 2, + "BEGIN_BLOCK_OBJC_EXCEPTIONS": 13, + "||": 18, + "END_BLOCK_OBJC_EXCEPTIONS": 13, + "void": 18, + "focusDocumentView": 1, + "FrameView*": 7, + "frameView": 4, + "view": 28, + "NSView": 14, + "*documentView": 1, + "documentView": 2, + "focusNSView": 1, + "focusController": 1, + "setFocusedFrame": 1, + "passWidgetMouseDownEventToWidget": 3, + "MouseEventWithHitTestResults": 7, + "RenderObject*": 2, + "target": 6, + "targetNode": 3, + "renderer": 7, + "isWidget": 2, + "passMouseDownEventToWidget": 3, + "toRenderWidget": 3, + "widget": 18, + "RenderWidget*": 1, + "renderWidget": 2, + "lastEventIsMouseUp": 2, + "*currentEventAfterHandlingMouseDown": 1, + "currentEventAfterHandlingMouseDown": 3, + "NSLeftMouseUp": 3, + "timestamp": 8, + "Widget*": 3, + "pWidget": 2, + "RefPtr": 1, + "": 1, + "LOG_ERROR": 1, + "true": 29, + "platformWidget": 6, + "*nodeView": 1, + "nodeView": 9, + "superview": 5, + "*view": 4, + "hitTest": 2, + "convertPoint": 2, + "locationInWindow": 4, + "fromView": 3, + "nil": 25, + "client": 3, + "firstResponder": 1, + "clickCount": 8, + "<=>": 1, + "1": 1, + "acceptsFirstResponder": 1, + "needsPanelToBecomeKey": 1, + "makeFirstResponder": 1, + "wasDeferringLoading": 3, + "defersLoading": 1, + "setDefersLoading": 2, + "m_sendingEventToSubview": 24, + "*outerView": 1, + "getOuterView": 1, + "beforeMouseDown": 1, + "outerView": 2, + "widget.get": 2, + "mouseDown": 2, + "afterMouseDown": 1, + "m_mouseDownView": 5, + "m_mouseDownWasInSubframe": 7, + "m_mousePressed": 2, + "findViewInSubviews": 3, + "*superview": 1, + "*target": 1, + "NSEnumerator": 1, + "*e": 1, + "subviews": 1, + "objectEnumerator": 1, + "*subview": 1, + "while": 4, + "subview": 3, + "e": 1, + "nextObject": 1, + "mouseDownViewIfStillGood": 3, + "*mouseDownView": 1, + "mouseDownView": 3, + "topFrameView": 3, + "*topView": 1, + "topView": 2, + "eventLoopHandleMouseDragged": 1, + "mouseDragged": 2, + "//": 7, + "eventLoopHandleMouseUp": 1, + "mouseUp": 2, + "passSubframeEventToSubframe": 4, + "Frame*": 5, + "subframe": 13, + "HitTestResult*": 2, + "hoveredNode": 5, + "NSLeftMouseDragged": 1, + "NSOtherMouseDragged": 1, + "NSRightMouseDragged": 1, + "dragController": 1, + "didInitiateDrag": 1, + "NSMouseMoved": 2, + "eventHandler": 6, + "handleMouseMoveEvent": 3, + "currentPlatformMouseEvent": 8, + "NSLeftMouseDown": 3, + "Node*": 1, + "node": 3, + "isFrameView": 2, + "handleMouseReleaseEvent": 3, + "originalNSScrollViewScrollWheel": 4, + "_nsScrollViewScrollWheelShouldRetainSelf": 3, + "selfRetainingNSScrollViewScrollWheel": 3, + "NSScrollView": 2, + "SEL": 2, + "nsScrollViewScrollWheelShouldRetainSelf": 2, + "isMainThread": 3, + "setNSScrollViewScrollWheelShouldRetainSelf": 3, + "shouldRetain": 2, + "method": 2, + "class_getInstanceMethod": 1, + "objc_getRequiredClass": 1, + "@selector": 4, + "scrollWheel": 2, + "reinterpret_cast": 1, + "": 1, + "*self": 1, + "selector": 2, + "shouldRetainSelf": 3, + "self": 70, + "retain": 1, + "release": 1, + "passWheelEventToWidget": 1, + "NSView*": 1, + "static_cast": 1, + "": 1, + "frame": 3, + "NSScrollWheel": 1, + "v": 6, + "loader": 1, + "resetMultipleFormSubmissionProtection": 1, + "handleMousePressEvent": 2, + "int": 36, + "%": 2, + "handleMouseDoubleClickEvent": 1, + "else": 11, + "sendFakeEventsAfterWidgetTracking": 1, + "*initiatingEvent": 1, + "eventType": 5, + "initiatingEvent": 22, + "*fakeEvent": 1, + "fakeEvent": 6, + "mouseEventWithType": 2, + "location": 3, + "modifierFlags": 6, + "windowNumber": 6, + "context": 6, + "eventNumber": 3, + "pressure": 3, + "postEvent": 3, + "atStart": 3, + "YES": 6, + "keyEventWithType": 1, + "characters": 3, + "charactersIgnoringModifiers": 2, + "isARepeat": 2, + "keyCode": 2, + "window": 1, + "convertScreenToBase": 1, + "mouseLocation": 1, + "mouseMoved": 2, + "frameHasPlatformWidget": 4, + "passMousePressEventToSubframe": 1, + "mev": 6, + "mev.event": 3, + "passMouseMoveEventToSubframe": 1, + "m_mouseDownMayStartDrag": 1, + "passMouseReleaseEventToSubframe": 1, + "PlatformMouseEvent": 5, + "*windowView": 1, + "windowView": 2, + "CONTEXT_MENUS": 2, + "sendContextMenuEvent": 2, + "eventMayStartDrag": 2, + "eventActivatedView": 1, + "m_activationEventNumber": 1, + "event.eventNumber": 1, + "": 1, + "createDraggingClipboard": 1, + "NSPasteboard": 2, + "*pasteboard": 1, + "pasteboardWithName": 1, + "NSDragPboard": 1, + "pasteboard": 2, + "declareTypes": 1, + "NSArray": 3, + "array": 2, + "owner": 15, + "ClipboardMac": 1, + "Clipboard": 1, + "DragAndDrop": 1, + "ClipboardWritable": 1, + "tabsToAllFormControls": 1, + "KeyboardEvent*": 1, + "KeyboardUIMode": 1, + "keyboardUIMode": 5, + "handlingOptionTab": 4, + "isKeyboardOptionTab": 1, + "KeyboardAccessTabsToLinks": 2, + "KeyboardAccessFull": 1, + "needsKeyboardEventDisambiguationQuirks": 2, + "Document*": 1, + "applicationIsSafari": 1, + "url": 2, + ".protocolIs": 2, + "Settings*": 1, + "settings": 5, + "DASHBOARD_SUPPORT": 1, + "usesDashboardBackwardCompatibilityMode": 1, + "unsigned": 2, + "accessKeyModifiers": 1, + "AXObjectCache": 1, + "accessibilityEnhancedUserInterfaceEnabled": 1, + "CtrlKey": 2, + "|": 3, + "AltKey": 1, + "#import": 3, + "": 1, + "": 1, + "#ifdef": 6, + "OODEBUG": 1, + "#define": 1, + "OODEBUG_SQL": 4, + "OOOODatabase": 1, + "OODB": 1, + "NSString": 25, + "*kOOObject": 1, + "@": 28, + "*kOOInsert": 1, + "*kOOUpdate": 1, + "*kOOExecSQL": 1, + "#pragma": 5, + "mark": 5, + "OORecord": 3, + "abstract": 1, + "superclass": 1, + "for": 14, + "records": 1, + "@implementation": 7, + "+": 55, + "id": 19, + "record": 18, + "OO_AUTORETURNS": 2, + "OO_AUTORELEASE": 3, + "alloc": 11, + "init": 4, + "insert": 7, + "*record": 4, + "insertWithParent": 1, + "parent": 10, + "OODatabase": 26, + "sharedInstance": 37, + "copyJoinKeysFrom": 1, + "to": 6, + "delete": 4, + "update": 4, + "indate": 4, + "upsert": 4, + "commit": 6, + "rollback": 5, + "setNilValueForKey": 1, + "key": 2, + "OOReference": 2, + "": 1, + "zeroForNull": 4, + "NSNumber": 4, + "numberWithInt": 1, + "setValue": 1, + "forKey": 1, + "OOArray": 16, + "": 14, + "select": 21, + "intoClass": 11, + "joinFrom": 10, + "cOOString": 15, + "sql": 21, + "selectRecordsRelatedTo": 1, + "importFrom": 1, + "OOFile": 4, + "file": 2, + "delimiter": 4, + "delim": 4, + "rows": 2, + "OOMetaData": 21, + "import": 1, + "file.string": 1, + "insertArray": 3, + "BOOL": 11, + "exportTo": 1, + "file.save": 1, + "export": 1, + "bindToView": 1, + "OOView": 2, + "delegate": 4, + "bindRecord": 1, + "toView": 1, + "updateFromView": 1, + "updateRecord": 1, + "description": 6, + "*metaData": 14, + "metaDataForClass": 3, + "hack": 1, + "required": 2, + "where": 1, + "contains": 1, + "a": 9, + "field": 1, + "avoid": 1, + "recursion": 1, + "OOStringArray": 6, + "ivars": 5, + "<<": 2, + "metaData": 26, + "encode": 3, + "dictionaryWithValuesForKeys": 3, + "@end": 14, + "OOAdaptor": 6, + "all": 3, + "methods": 1, + "by": 1, + "objsql": 1, + "access": 2, + "database": 12, + "@interface": 6, + "NSObject": 1, + "sqlite3": 1, + "*db": 1, + "sqlite3_stmt": 1, + "*stmt": 1, + "struct": 5, + "_str_link": 5, + "*next": 2, + "char": 9, + "str": 7, + "*strs": 1, + "OO_UNSAFE": 1, + "*owner": 3, + "initPath": 5, + "path": 9, + "prepare": 4, + "bindCols": 5, + "cOOStringArray": 3, + "columns": 7, + "values": 29, + "cOOValueDictionary": 2, + "startingAt": 5, + "pno": 13, + "bindNulls": 8, + "bindResultsIntoInstancesOfClass": 4, + "Class": 9, + "recordClass": 16, + "sqlite_int64": 2, + "lastInsertRowID": 2, + "NSData": 3, + "OOExtras": 9, + "initWithDescription": 1, + "is": 2, + "the": 5, + "low": 1, + "level": 1, + "interface": 1, + "particular": 2, + "": 1, + "sharedInstanceForPath": 2, + "OODocument": 1, + ".path": 1, + "OONil": 1, + "OO_RELEASE": 6, + "exec": 10, + "fmt": 9, + "...": 3, + "va_list": 3, + "argp": 12, + "va_start": 3, + "*sql": 5, + "initWithFormat": 3, + "arguments": 3, + "va_end": 3, + "objects": 4, + "deleteArray": 2, + "object": 13, + "commitTransaction": 3, + "super": 3, + "adaptor": 1, + "registerSubclassesOf": 1, + "recordSuperClass": 2, + "numClasses": 5, + "objc_getClassList": 2, + "NULL": 4, + "*classes": 2, + "malloc": 2, + "sizeof": 2, + "": 1, + "viewClasses": 4, + "classNames": 4, + "scan": 1, + "registered": 2, + "classes": 12, + "relevant": 1, + "subclasses": 1, + "c": 14, + "<": 5, + "superClass": 5, + "class_getName": 4, + "class_getSuperclass": 1, + "respondsToSelector": 2, + "ooTableSql": 1, + "tableMetaDataForClass": 8, + "break": 6, + "delay": 1, + "creation": 1, + "views": 1, + "until": 1, + "after": 1, + "tables": 1, + "": 1, + "in": 9, + "order": 1, + "free": 3, + "Register": 1, + "list": 1, + "of": 2, + "before": 1, + "using": 2, + "them": 2, + "so": 2, + "can": 1, + "determine": 1, + "relationships": 1, + "between": 1, + "registerTableClassesNamed": 1, + "tableClass": 2, + "NSBundle": 1, + "mainBundle": 1, + "classNamed": 1, + "Send": 1, + "any": 2, + "SQL": 1, + "Sql": 1, + "format": 1, + "string": 1, + "escape": 1, + "Any": 1, + "results": 3, + "returned": 1, + "are": 1, + "placed": 1, + "as": 1, + "an": 1, + "dictionary": 1, + "results.": 1, + "*/": 1, + "errcode": 12, + "OOString": 6, + "stringForSql": 2, + "*aColumnName": 1, + "**results": 1, + "allKeys": 1, + "objectAtIndex": 1, + "OOValueDictionary": 5, + "joinValues": 4, + "sharedColumns": 5, + "*parentMetaData": 1, + "parentMetaData": 2, + "naturalJoinTo": 1, + "joinableColumns": 1, + "whereClauseFor": 2, + "qualifyNulls": 2, + "NO": 3, + "ooOrderBy": 2, + "OOFormat": 5, + "NSLog": 4, + "*joinValues": 1, + "*adaptor": 7, + "": 1, + "tablesRelatedByNaturalJoinFrom": 1, + "tablesWithNaturalJoin": 5, + "**tablesWithNaturalJoin": 1, + "*childMetaData": 1, + "tableMetaDataByClassName": 3, + "prepareSql": 1, + "toTable": 1, + "childMetaData": 1, + "OODictionary": 2, + "": 1, + "tmpResults": 1, + "kOOExecSQL": 1, + "*exec": 2, + "OOWarn": 9, + "errmsg": 5, + "continue": 3, + "OORef": 2, + "": 1, + "*values": 3, + "kOOObject": 3, + "isInsert": 4, + "kOOInsert": 1, + "isUpdate": 5, + "kOOUpdate": 2, + "newValues": 3, + "changedCols": 4, + "*name": 4, + "*newValues": 1, + "name": 9, + "isEqual": 1, + "tableName": 4, + "columns/": 1, + "nchanged": 4, + "*object": 1, + "lastSQL": 4, + "**changedCols": 1, + "quote": 2, + "commaQuote": 2, + "": 1, + "commited": 2, + "updateCount": 2, + "transaction": 2, + "updated": 2, + "NSMutableDictionary": 1, + "*d": 1, + "*transaction": 1, + "d": 2, + "": 1, + "OO_ARC": 1, + "boxed": 1, + "valueForKey": 1, + "pointerValue": 1, + "setValuesForKeysWithDictionary": 2, + "decode": 2, + "count": 1, + "className": 3, + "createTableSQL": 2, + "*idx": 1, + "indexes": 1, + "idx": 2, + "implements": 1, + ".directory": 1, + ".mkdir": 1, + "sqlite3_open": 1, + "db": 8, + "SQLITE_OK": 6, + "*path": 1, + "sqlite3_prepare_v2": 1, + "stmt": 20, + "sqlite3_errmsg": 3, + "bindValue": 2, + "value": 26, + "asParameter": 2, + "OODEBUG_BIND": 1, + "OONull": 3, + "sqlite3_bind_null": 1, + "OOSQL_THREAD_SAFE_BUT_USES_MORE_MEMORY": 1, + "isKindOfClass": 3, + "sqlite3_bind_text": 2, + "UTF8String": 1, + "SQLITE_STATIC": 3, + "#else": 1, + "len": 4, + "lengthOfBytesUsingEncoding": 1, + "NSUTF8StringEncoding": 3, + "*str": 2, + "next": 3, + "strs": 6, + "getCString": 1, + "maxLength": 1, + "encoding": 2, + "sqlite3_bind_blob": 1, + "bytes": 5, + "length": 4, + "*type": 1, + "objCType": 1, + "sqlite3_bind_int": 1, + "intValue": 3, + "sqlite3_bind_int64": 1, + "longLongValue": 1, + "sqlite3_bind_double": 1, + "doubleValue": 1, + "*columns": 1, + "valuesForNextRow": 2, + "ncols": 2, + "sqlite3_column_count": 1, + "sqlite3_column_name": 1, + "sqlite3_column_type": 2, + "SQLITE_NULL": 1, + "SQLITE_INTEGER": 1, + "initWithLongLong": 1, + "sqlite3_column_int64": 1, + "SQLITE_FLOAT": 1, + "initWithDouble": 1, + "sqlite3_column_double": 1, + "SQLITE_TEXT": 1, + "*bytes": 2, + "sqlite3_column_text": 1, + "NSMutableString": 1, + "initWithBytes": 2, + "sqlite3_column_bytes": 2, + "SQLITE_BLOB": 1, + "sqlite3_column_blob": 1, + "out": 4, + "awakeFromDB": 4, + "instancesRespondToSelector": 1, + "sqlite3_step": 1, + "SQLITE_ROW": 1, + "SQLITE_DONE": 1, + "out.alloc": 1, + "sqlite3_changes": 1, + "sqlite3_finalize": 1, + "sqlite3_last_insert_rowid": 1, + "dealloc": 1, + "sqlite3_close": 1, + "OO_DEALLOC": 1, + "instances": 1, + "represent": 1, + "table": 1, + "and": 2, + "it": 2, + "s": 2, + "l": 1, + "C": 1, + "S": 1, + "I": 1, + "L": 1, + "q": 1, + "Q": 1, + "f": 1, + "_": 2, + "tag": 1, + "A": 2, + "<'>": 1, + "iptr": 4, + "*optr": 1, + "unhex": 2, + "*iptr": 1, + "*16": 1, + "hex": 1, + "initWithBytesNoCopy": 1, + "optr": 1, + "freeWhenDone": 1, + "stringValue": 4, + "charValue": 1, + "shortValue": 1, + "OOReplace": 2, + "reformat": 4, + "NSDictionary": 2, + "__IPHONE_OS_VERSION_MIN_REQUIRED": 1, + "UISwitch": 2, + "text": 1, + "self.on": 1 + }, "OCaml": { "{": 11, "shared": 1, @@ -30045,23 +49078,23 @@ "OpenCL": { "double": 3, "run_fftw": 1, - "(": 11, + "(": 18, "int": 3, - "n": 2, - "const": 2, - "float": 2, - "*": 4, - "x": 2, - "y": 2, - ")": 11, - "{": 2, + "n": 4, + "const": 4, + "float": 3, + "*": 5, + "x": 5, + "y": 4, + ")": 18, + "{": 4, "fftwf_plan": 1, "p1": 3, "fftwf_plan_dft_1d": 1, "fftwf_complex": 2, "FFTW_FORWARD": 1, "FFTW_ESTIMATE": 1, - ";": 9, + ";": 12, "nops": 3, "t": 4, "cl": 2, @@ -30069,13 +49102,30 @@ "for": 1, "op": 3, "<": 1, - "+": 2, + "+": 4, "fftwf_execute": 1, - "}": 2, + "}": 4, "-": 1, "/": 1, "fftwf_destroy_plan": 1, - "return": 1 + "return": 1, + "typedef": 1, + "foo_t": 3, + "#ifndef": 1, + "ZERO": 3, + "#define": 2, + "#endif": 1, + "FOO": 1, + "__kernel": 1, + "void": 1, + "foo": 1, + "__global": 1, + "__local": 1, + "uint": 1, + "barrier": 1, + "CLK_LOCAL_MEM_FENCE": 1, + "if": 1, + "*x": 1 }, "OpenEdge ABL": { "USING": 3, @@ -30296,6 +49346,633 @@ "CHR": 2, "lcPostBase64Data.": 1 }, + "Org": { + "#": 13, + "+": 13, + "OPTIONS": 1, + "H": 1, + "num": 1, + "nil": 4, + "toc": 2, + "n": 1, + "@": 1, + "t": 10, + "|": 4, + "-": 30, + "f": 2, + "*": 3, + "TeX": 1, + "LaTeX": 1, + "skip": 1, + "d": 2, + "(": 11, + "HIDE": 1, + ")": 11, + "tags": 2, + "not": 1, + "in": 2, + "STARTUP": 1, + "align": 1, + "fold": 1, + "nodlcheck": 1, + "hidestars": 1, + "oddeven": 1, + "lognotestate": 1, + "SEQ_TODO": 1, + "TODO": 1, + "INPROGRESS": 1, + "i": 1, + "WAITING": 1, + "w@": 1, + "DONE": 1, + "CANCELED": 1, + "c@": 1, + "TAGS": 1, + "Write": 1, + "w": 1, + "Update": 1, + "u": 1, + "Fix": 1, + "Check": 1, + "c": 1, + "TITLE": 1, + "org": 10, + "ruby": 6, + "AUTHOR": 1, + "Brian": 1, + "Dewey": 1, + "EMAIL": 1, + "bdewey@gmail.com": 1, + "LANGUAGE": 1, + "en": 1, + "PRIORITIES": 1, + "A": 1, + "C": 1, + "B": 1, + "CATEGORY": 1, + "worg": 1, + "{": 1, + "Back": 1, + "to": 8, + "Worg": 1, + "rubygems": 2, + "ve": 1, + "already": 1, + "created": 1, + "a": 4, + "site.": 1, + "Make": 1, + "sure": 1, + "you": 2, + "have": 1, + "installed": 1, + "sudo": 1, + "gem": 1, + "install": 1, + ".": 1, + "You": 1, + "need": 1, + "register": 1, + "new": 2, + "Webby": 3, + "filter": 3, + "handle": 1, + "mode": 2, + "content.": 2, + "makes": 1, + "this": 2, + "easy.": 1, + "In": 1, + "the": 6, + "lib/": 1, + "folder": 1, + "of": 2, + "your": 2, + "site": 1, + "create": 1, + "file": 1, + "orgmode.rb": 1, + "BEGIN_EXAMPLE": 2, + "require": 1, + "Filters.register": 1, + "do": 2, + "input": 3, + "Orgmode": 2, + "Parser.new": 1, + ".to_html": 1, + "end": 1, + "END_EXAMPLE": 1, + "This": 2, + "code": 1, + "creates": 1, + "that": 1, + "will": 1, + "use": 1, + "parser": 1, + "translate": 1, + "into": 1, + "HTML.": 1, + "Create": 1, + "For": 1, + "example": 1, + "title": 2, + "Parser": 1, + "created_at": 1, + "status": 2, + "Under": 1, + "development": 1, + "erb": 1, + "orgmode": 3, + "<%=>": 2, + "page": 2, + "Status": 1, + "Description": 1, + "Helpful": 1, + "Ruby": 1, + "routines": 1, + "for": 3, + "parsing": 1, + "files.": 1, + "The": 3, + "most": 1, + "significant": 1, + "thing": 2, + "library": 1, + "does": 1, + "today": 1, + "is": 5, + "convert": 1, + "files": 1, + "textile.": 1, + "Currently": 1, + "cannot": 1, + "much": 1, + "customize": 1, + "conversion.": 1, + "supplied": 1, + "textile": 1, + "conversion": 1, + "optimized": 1, + "extracting": 1, + "from": 1, + "orgfile": 1, + "as": 1, + "opposed": 1, + "History": 1, + "**": 1, + "Version": 1, + "first": 1, + "output": 2, + "HTML": 2, + "gets": 1, + "class": 1, + "now": 1, + "indented": 1, + "Proper": 1, + "support": 1, + "multi": 1, + "paragraph": 2, + "list": 1, + "items.": 1, + "See": 1, + "part": 1, + "last": 1, + "bullet.": 1, + "Fixed": 1, + "bugs": 1, + "wouldn": 1, + "s": 1, + "all": 1, + "there": 1, + "it": 1 + }, + "Ox": { + "#include": 2, + "Kapital": 4, + "(": 119, + "L": 2, + "const": 4, + "N": 5, + "entrant": 8, + "exit": 2, + "KP": 14, + ")": 119, + "{": 22, + "StateVariable": 1, + ";": 91, + "this.entrant": 1, + "this.exit": 1, + "this.KP": 1, + "actual": 2, + "Kbar*vals/": 1, + "-": 31, + "upper": 3, + "log": 2, + ".Inf": 2, + "}": 22, + "Transit": 1, + "FeasA": 2, + "decl": 3, + "ent": 5, + "CV": 7, + "stayout": 3, + "[": 25, + "]": 25, + "exit.pos": 1, + "tprob": 5, + "sigu": 2, + "SigU": 2, + "if": 5, + "v": 2, + "&&": 1, + "return": 10, + "<0>": 1, + "ones": 1, + "probn": 2, + "Kbe": 2, + "/sigu": 1, + "Kb0": 2, + "+": 14, + "Kb2": 2, + "*upper": 1, + "/": 1, + "vals": 1, + "tprob.*": 1, + "zeros": 4, + ".*stayout": 1, + "FirmEntry": 6, + "Run": 1, + "Initialize": 3, + "GenerateSample": 2, + "BDP": 2, + "BayesianDP": 1, + "Rust": 1, + "Reachable": 2, + "sige": 2, + "new": 19, + "StDeviations": 1, + "<0.3,0.3>": 1, + "LaggedAction": 1, + "d": 2, + "array": 1, + "Kparams": 1, + "Positive": 4, + "Free": 1, + "Kb1": 1, + "Determined": 1, + "EndogenousStates": 1, + "K": 3, + "KN": 1, + "SetDelta": 1, + "Probability": 1, + "kcoef": 3, + "ecost": 3, + "Negative": 1, + "CreateSpaces": 1, + "Volume": 3, + "LOUD": 1, + "EM": 4, + "ValueIteration": 1, + "//": 17, + "Solve": 1, + "data": 4, + "DataSet": 1, + "Simulate": 1, + "DataN": 1, + "DataT": 1, + "FALSE": 1, + "Print": 1, + "ImaiJainChing": 1, + "delta": 1, + "*CV": 2, + "Utility": 1, + "u": 2, + "ent*CV": 1, + "*AV": 1, + "|": 1, + "ParallelObjective": 1, + "obj": 18, + "DONOTUSECLIENT": 2, + "isclass": 1, + "obj.p2p": 2, + "oxwarning": 1, + "obj.L": 1, + "P2P": 2, + "ObjClient": 4, + "ObjServer": 7, + "this.obj": 2, + "Execute": 4, + "basetag": 2, + "STOP_TAG": 1, + "iml": 1, + "obj.NvfuncTerms": 2, + "Nparams": 6, + "obj.nstruct": 2, + "Loop": 2, + "nxtmsgsz": 2, + "//free": 1, + "param": 1, + "length": 1, + "is": 1, + "no": 2, + "greater": 1, + "than": 1, + "QUIET": 2, + "println": 2, + "ID": 2, + "Server": 1, + "Recv": 1, + "ANY_TAG": 1, + "//receive": 1, + "the": 1, + "ending": 1, + "parameter": 1, + "vector": 1, + "Encode": 3, + "Buffer": 8, + "//encode": 1, + "it.": 1, + "Decode": 1, + "obj.nfree": 1, + "obj.cur.V": 1, + "vfunc": 2, + "CstrServer": 3, + "SepServer": 3, + "Lagrangian": 1, + "rows": 1, + "obj.cur": 1, + "Vec": 1, + "obj.Kvar.v": 1, + "imod": 1, + "Tag": 1, + "obj.K": 1, + "TRUE": 1, + "obj.Kvar": 1, + "PDF": 1, + "*": 5, + "nldge": 1, + "ParticleLogLikeli": 1, + "it": 5, + "ip": 1, + "mss": 3, + "mbas": 1, + "ms": 8, + "my": 4, + "mx": 7, + "vw": 7, + "vwi": 4, + "dws": 3, + "mhi": 3, + "mhdet": 2, + "loglikeli": 4, + "mData": 4, + "vxm": 1, + "vxs": 1, + "mxm": 1, + "<": 4, + "mxsu": 1, + "mxsl": 1, + "time": 2, + "timeall": 1, + "timeran": 1, + "timelik": 1, + "timefun": 1, + "timeint": 1, + "timeres": 1, + "GetData": 1, + "m_asY": 1, + "sqrt": 1, + "*M_PI": 1, + "m_cY": 1, + "determinant": 2, + "m_mMSbE.": 2, + "covariance": 2, + "invert": 2, + "of": 2, + "measurement": 1, + "shocks": 1, + "m_vSss": 1, + "m_cPar": 4, + "m_cS": 1, + "start": 1, + "particles": 2, + "m_vXss": 1, + "m_cX": 1, + "steady": 1, + "state": 3, + "and": 1, + "policy": 2, + "init": 1, + "likelihood": 1, + "//timeall": 1, + "timer": 3, + "for": 2, + "sizer": 1, + "rann": 1, + "m_cSS": 1, + "m_mSSbE": 1, + "noise": 1, + "fg": 1, + "&": 2, + "transition": 1, + "prior": 1, + "as": 1, + "proposal": 1, + "m_oApprox.FastInterpolate": 1, + "interpolate": 1, + "fy": 1, + "m_cMS": 1, + "evaluate": 1, + "importance": 1, + "weights": 2, + "observation": 1, + "error": 1, + "exp": 2, + "outer": 1, + "/mhdet": 2, + "sumr": 1, + "my*mhi": 1, + ".*my": 1, + ".": 3, + ".NaN": 1, + "can": 1, + "happen": 1, + "extrem": 1, + "sumc": 1, + "or": 1, + "extremely": 1, + "wrong": 1, + "parameters": 1, + "dws/m_cPar": 1, + "loglikelihood": 1, + "contribution": 1, + "//timelik": 1, + "/100": 1, + "//time": 1, + "resample": 1, + "vw/dws": 1, + "selection": 1, + "step": 1, + "in": 1, + "c": 1, + "on": 1, + "normalized": 1 + }, + "Oxygene": { + "": 1, + "DefaultTargets=": 1, + "xmlns=": 1, + "": 3, + "": 1, + "Loops": 2, + "": 1, + "": 1, + "exe": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "False": 4, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "Properties": 1, + "App.ico": 1, + "": 1, + "": 1, + "Condition=": 3, + "Release": 2, + "": 1, + "": 1, + "{": 1, + "BD89C": 1, + "-": 4, + "B610": 1, + "CEE": 1, + "CAF": 1, + "C515D88E2C94": 1, + "}": 1, + "": 1, + "": 3, + "": 1, + "DEBUG": 1, + ";": 2, + "TRACE": 1, + "": 1, + "": 2, + ".": 2, + "bin": 2, + "Debug": 1, + "": 2, + "": 1, + "True": 3, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "Project=": 1, + "": 2, + "": 5, + "Include=": 12, + "": 5, + "(": 5, + "Framework": 5, + ")": 5, + "mscorlib.dll": 1, + "": 5, + "": 5, + "System.dll": 1, + "ProgramFiles": 1, + "Reference": 1, + "Assemblies": 1, + "Microsoft": 1, + "v3.5": 1, + "System.Core.dll": 1, + "": 1, + "": 1, + "System.Data.dll": 1, + "System.Xml.dll": 1, + "": 2, + "": 4, + "": 1, + "": 1, + "": 2, + "ResXFileCodeGenerator": 1, + "": 2, + "": 1, + "": 1, + "SettingsSingleFileGenerator": 1, + "": 1, + "": 1 + }, + "Pan": { + "object": 1, + "template": 1, + "pantest": 1, + ";": 32, + "xFF": 1, + "e": 2, + "-": 2, + "E10": 1, + "variable": 4, + "TEST": 2, + "to_string": 1, + "(": 8, + ")": 8, + "+": 2, + "value": 1, + "undef": 1, + "null": 1, + "error": 1, + "include": 1, + "{": 5, + "}": 5, + "pkg_repl": 2, + "PKG_ARCH_DEFAULT": 1, + "function": 1, + "show_things_view_for_stuff": 1, + "thing": 2, + "ARGV": 1, + "[": 2, + "]": 2, + "foreach": 1, + "i": 1, + "mything": 2, + "STUFF": 1, + "if": 1, + "return": 2, + "true": 2, + "else": 1, + "SELF": 1, + "false": 2, + "HERE": 1, + "<<": 1, + "EOF": 2, + "This": 1, + "example": 1, + "demonstrates": 1, + "an": 1, + "in": 1, + "line": 1, + "heredoc": 1, + "style": 1, + "config": 1, + "file": 1, + "main": 1, + "awesome": 1, + "small": 1, + "#This": 1, + "should": 1, + "be": 1, + "highlighted": 1, + "normally": 1, + "again.": 1 + }, "Parrot Assembly": { "SHEBANG#!parrot": 1, ".pcc_sub": 1, @@ -30310,33 +49987,216 @@ "say": 1, ".end": 1 }, + "Pascal": { + "program": 1, + "gmail": 1, + ";": 6, + "uses": 1, + "Forms": 1, + "Unit2": 1, + "in": 1, + "{": 2, + "Form2": 2, + "}": 2, + "R": 1, + "*.res": 1, + "begin": 1, + "Application.Initialize": 1, + "Application.MainFormOnTaskbar": 1, + "True": 1, + "Application.CreateForm": 1, + "(": 1, + "TForm2": 1, + ")": 1, + "Application.Run": 1, + "end.": 1 + }, + "PAWN": { + "//": 22, + "-": 1551, + "#include": 5, + "": 1, + "": 1, + "": 1, + "#pragma": 1, + "tabsize": 1, + "#define": 5, + "COLOR_WHITE": 2, + "xFFFFFFFF": 2, + "COLOR_NORMAL_PLAYER": 3, + "xFFBB7777": 1, + "CITY_LOS_SANTOS": 7, + "CITY_SAN_FIERRO": 4, + "CITY_LAS_VENTURAS": 6, + "new": 13, + "total_vehicles_from_files": 19, + ";": 257, + "gPlayerCitySelection": 21, + "[": 56, + "MAX_PLAYERS": 3, + "]": 56, + "gPlayerHasCitySelected": 6, + "gPlayerLastCitySelectionTick": 5, + "Text": 5, + "txtClassSelHelper": 14, + "txtLosSantos": 7, + "txtSanFierro": 7, + "txtLasVenturas": 7, + "thisanimid": 1, + "lastanimid": 1, + "main": 1, + "(": 273, + ")": 273, + "{": 39, + "print": 3, + "}": 39, + "public": 6, + "OnPlayerConnect": 1, + "playerid": 132, + "GameTextForPlayer": 1, + "SendClientMessage": 1, + "GetTickCount": 4, + "//SetPlayerColor": 2, + "//Kick": 1, + "return": 17, + "OnPlayerSpawn": 1, + "if": 28, + "IsPlayerNPC": 3, + "randSpawn": 16, + "SetPlayerInterior": 7, + "TogglePlayerClock": 2, + "ResetPlayerMoney": 3, + "GivePlayerMoney": 2, + "random": 3, + "sizeof": 3, + "gRandomSpawns_LosSantos": 5, + "SetPlayerPos": 6, + "SetPlayerFacingAngle": 6, + "else": 9, + "gRandomSpawns_SanFierro": 5, + "gRandomSpawns_LasVenturas": 5, + "SetPlayerSkillLevel": 11, + "WEAPONSKILL_PISTOL": 1, + "WEAPONSKILL_PISTOL_SILENCED": 1, + "WEAPONSKILL_DESERT_EAGLE": 1, + "WEAPONSKILL_SHOTGUN": 1, + "WEAPONSKILL_SAWNOFF_SHOTGUN": 1, + "WEAPONSKILL_SPAS12_SHOTGUN": 1, + "WEAPONSKILL_MICRO_UZI": 1, + "WEAPONSKILL_MP5": 1, + "WEAPONSKILL_AK47": 1, + "WEAPONSKILL_M4": 1, + "WEAPONSKILL_SNIPERRIFLE": 1, + "GivePlayerWeapon": 1, + "WEAPON_COLT45": 1, + "//GivePlayerWeapon": 1, + "WEAPON_MP5": 1, + "OnPlayerDeath": 1, + "killerid": 3, + "reason": 1, + "playercash": 4, + "INVALID_PLAYER_ID": 1, + "GetPlayerMoney": 1, + "ClassSel_SetupCharSelection": 2, + "SetPlayerCameraPos": 6, + "SetPlayerCameraLookAt": 6, + "ClassSel_InitCityNameText": 4, + "txtInit": 7, + "TextDrawUseBox": 2, + "TextDrawLetterSize": 2, + "TextDrawFont": 2, + "TextDrawSetShadow": 2, + "TextDrawSetOutline": 2, + "TextDrawColor": 2, + "xEEEEEEFF": 1, + "TextDrawBackgroundColor": 2, + "FF": 2, + "ClassSel_InitTextDraws": 2, + "TextDrawCreate": 4, + "TextDrawBoxColor": 1, + "BB": 1, + "TextDrawTextSize": 1, + "ClassSel_SetupSelectedCity": 3, + "TextDrawShowForPlayer": 4, + "TextDrawHideForPlayer": 10, + "ClassSel_SwitchToNextCity": 3, + "+": 19, + "PlayerPlaySound": 2, + "ClassSel_SwitchToPreviousCity": 2, + "<": 3, + "ClassSel_HandleCitySelection": 2, + "Keys": 3, + "ud": 2, + "lr": 4, + "GetPlayerKeys": 1, + "&": 1, + "KEY_FIRE": 1, + "TogglePlayerSpectating": 2, + "OnPlayerRequestClass": 1, + "classid": 1, + "GetPlayerState": 2, + "PLAYER_STATE_SPECTATING": 2, + "OnGameModeInit": 1, + "SetGameModeText": 1, + "ShowPlayerMarkers": 1, + "PLAYER_MARKERS_MODE_GLOBAL": 1, + "ShowNameTags": 1, + "SetNameTagDrawDistance": 1, + "EnableStuntBonusForAll": 1, + "DisableInteriorEnterExits": 1, + "SetWeather": 1, + "SetWorldTime": 1, + "//UsePlayerPedAnims": 1, + "//ManualVehicleEngineAndLights": 1, + "//LimitGlobalChatRadius": 1, + "AddPlayerClass": 69, + "//AddPlayerClass": 1, + "LoadStaticVehiclesFromFile": 17, + "printf": 1, + "OnPlayerUpdate": 1, + "IsPlayerConnected": 1, + "&&": 2, + "GetPlayerInterior": 1, + "GetPlayerWeapon": 2, + "SetPlayerArmedWeapon": 1, + "fists": 1, + "no": 1, + "syncing": 1, + "until": 1, + "they": 1, + "change": 1, + "their": 1, + "weapon": 1, + "WEAPON_MINIGUN": 1, + "Kick": 1 + }, "Perl": { "package": 14, "App": 131, "Ack": 136, - ";": 1185, - "use": 76, - "warnings": 16, - "strict": 16, + ";": 1193, + "use": 83, + "warnings": 18, + "strict": 18, "File": 54, "Next": 27, "Plugin": 2, "Basic": 10, - "head1": 31, - "NAME": 5, - "-": 860, + "head1": 36, + "NAME": 6, + "-": 868, "A": 2, "container": 1, - "for": 78, + "for": 83, "functions": 2, - "the": 131, + "the": 143, "ack": 38, "program": 6, "VERSION": 15, "Version": 1, - "cut": 27, + "cut": 28, "our": 34, - "COPYRIGHT": 6, + "COPYRIGHT": 7, "BEGIN": 7, "{": 1121, "}": 1134, @@ -30353,8 +50213,8 @@ "is_cygwin": 6, "is_windows": 12, "Spec": 13, - "(": 919, - ")": 917, + "(": 925, + ")": 923, "Glob": 4, "Getopt": 6, "Long": 6, @@ -30369,27 +50229,27 @@ "actionscript": 2, "[": 159, "qw": 35, - "as": 33, + "as": 37, "mxml": 2, "]": 155, "ada": 4, "adb": 2, "ads": 2, "asm": 4, - "s": 34, + "s": 35, "batch": 2, "bat": 2, "cmd": 2, "binary": 3, "q": 5, "Binary": 2, - "files": 41, + "files": 42, "defined": 54, - "by": 11, - "Perl": 6, + "by": 16, + "Perl": 9, "T": 2, "op": 2, - "default": 16, + "default": 19, "off": 4, "tt": 4, "tt2": 2, @@ -30415,11 +50275,11 @@ "xslt": 2, "ent": 2, "while": 31, - "my": 401, + "my": 404, "type": 69, "exts": 6, "each": 14, - "if": 272, + "if": 276, "ref": 33, "ext": 14, "@": 38, @@ -30427,7 +50287,7 @@ "_": 101, "mk": 2, "mak": 2, - "not": 53, + "not": 54, "t": 18, "p": 9, "STDIN": 2, @@ -30436,36 +50296,36 @@ "/MSWin32/": 2, "quotemeta": 5, "catfile": 4, - "SYNOPSIS": 5, - "If": 14, - "you": 33, - "want": 5, - "to": 86, + "SYNOPSIS": 6, + "If": 15, + "you": 44, + "want": 7, + "to": 95, "know": 4, - "about": 3, + "about": 4, "F": 24, "": 13, - "see": 4, - "file": 40, - "itself.": 2, + "see": 5, + "file": 49, + "itself.": 3, "No": 4, "user": 4, "serviceable": 1, "parts": 1, "inside.": 1, - "is": 62, - "all": 22, - "that": 27, + "is": 69, + "all": 23, + "that": 33, "should": 6, "this.": 1, "FUNCTIONS": 1, - "head2": 32, + "head2": 34, "read_ackrc": 4, "Reads": 1, "contents": 2, - "of": 55, + "of": 64, ".ackrc": 1, - "and": 76, + "and": 85, "returns": 4, "arguments.": 1, "sub": 225, @@ -30483,7 +50343,7 @@ "&&": 83, "e": 20, "open": 7, - "or": 47, + "or": 49, "die": 38, "@lines": 21, "/./": 2, @@ -30498,11 +50358,11 @@ "return": 157, "get_command_line_options": 4, "Gets": 3, - "command": 13, + "command": 14, "line": 20, "arguments": 2, "does": 10, - "specific": 1, + "specific": 2, "tweaking.": 1, "opt": 291, "pager": 19, @@ -30525,9 +50385,9 @@ "column": 4, "#": 99, "ignore": 7, - "this": 18, + "this": 22, "option": 7, - "it": 25, + "it": 28, "handled": 2, "beforehand": 2, "f": 25, @@ -30559,7 +50419,7 @@ "print_version_statement": 2, "exit": 16, "show_help": 3, - "@_": 41, + "@_": 43, "show_help_types": 2, "require": 12, "Pod": 4, @@ -30571,7 +50431,7 @@ "wanted": 4, "no//": 2, "must": 5, - "be": 30, + "be": 36, "later": 2, "exists": 19, "else": 53, @@ -30606,7 +50466,7 @@ "uniq": 4, "@uniq": 2, "sort": 8, - "a": 81, + "a": 85, "<=>": 2, "b": 6, "keys": 15, @@ -30617,24 +50477,24 @@ "Go": 1, "through": 6, "look": 2, - "I": 67, + "I": 68, "<--type-set>": 1, "foo=": 1, "bar": 3, "<--type-add>": 1, "xml=": 1, - ".": 121, + ".": 125, "Remove": 1, "them": 5, - "add": 8, + "add": 9, "supported": 1, "filetypes": 8, "i.e.": 2, "into": 6, - "etc.": 1, + "etc.": 3, "@typedef": 8, "td": 6, - "set": 11, + "set": 12, "Builtin": 4, "cannot": 4, "changed.": 4, @@ -30642,7 +50502,7 @@ "delete_type": 5, "Type": 2, "exist": 4, - "creating": 2, + "creating": 3, "with": 26, "...": 2, "unless": 39, @@ -30654,7 +50514,7 @@ "internal": 1, "structures": 1, "containing": 5, - "information": 1, + "information": 2, "type_wanted.": 1, "Internal": 2, "error": 4, @@ -30663,18 +50523,18 @@ "Standard": 1, "filter": 12, "pass": 1, - "L": 18, + "L": 34, "": 1, "descend_filter.": 1, - "It": 2, + "It": 3, "true": 3, "directory": 8, - "any": 3, + "any": 4, "ones": 1, "we": 7, "ignore.": 1, "path": 28, - "This": 24, + "This": 27, "removes": 1, "trailing": 1, "separator": 4, @@ -30690,18 +50550,18 @@ "For": 5, "example": 5, "": 1, - "The": 20, + "The": 22, "filetype": 1, - "will": 7, - "C": 48, + "will": 9, + "C": 56, "": 1, - "can": 26, + "can": 30, "skipped": 2, - "something": 2, + "something": 3, "avoid": 1, "searching": 6, "even": 4, - "under": 4, + "under": 5, "a.": 1, "constant": 2, "TEXT": 16, @@ -30711,7 +50571,7 @@ "lc_basename": 8, "lc": 5, "r": 14, - "B": 75, + "B": 76, "header": 17, "SHEBANG#!#!": 2, "ruby": 3, @@ -30745,7 +50605,7 @@ "_get_thpppt": 3, "print": 35, "_bar": 3, - "<<": 6, + "<<": 10, "&": 22, "*I": 2, "g": 7, @@ -30755,13 +50615,13 @@ "#I": 6, "#7": 4, "results.": 2, - "on": 24, - "when": 17, - "used": 11, + "on": 25, + "when": 18, + "used": 12, "interactively": 6, - "no": 21, + "no": 22, "Print": 6, - "between": 3, + "between": 4, "results": 8, "different": 2, "files.": 6, @@ -30790,7 +50650,7 @@ "pipe": 4, "finding": 2, "Only": 7, - "found": 9, + "found": 11, "without": 3, "searching.": 2, "PATTERN": 8, @@ -30802,13 +50662,13 @@ "lexically.": 3, "invert": 2, "Print/search": 2, - "handle": 2, - "do": 11, + "handle": 3, + "do": 12, "g/": 2, "G.": 2, "show": 3, "Show": 2, - "which": 6, + "which": 7, "has.": 2, "inclusion/exclusion": 2, "All": 4, @@ -30844,7 +50704,7 @@ "@before": 16, "before_starts_at_line": 10, "after": 18, - "number": 3, + "number": 4, "still": 4, "res": 59, "next_text": 8, @@ -30909,10 +50769,10 @@ "print_count0": 2, "filetypes_supported_set": 9, "True/False": 1, - "are": 24, + "are": 25, "print_files": 4, "iter": 23, - "returned": 2, + "returned": 3, "iterator": 3, "<$regex>": 1, "<$one>": 1, @@ -30920,7 +50780,7 @@ "first.": 1, "<$ors>": 1, "<\"\\n\">": 1, - "defines": 1, + "defines": 2, "what": 14, "filename.": 1, "print_files_with_matches": 4, @@ -30990,24 +50850,24 @@ "pipe.": 1, "exit_from_ack": 5, "Exit": 1, - "application": 10, + "application": 15, "correct": 1, "code.": 2, "otherwise": 2, "handed": 1, - "in": 29, + "in": 36, "argument.": 1, "rc": 11, "LICENSE": 3, "Copyright": 2, "Andy": 2, "Lester.": 2, - "free": 3, + "free": 4, "software": 3, - "redistribute": 3, - "and/or": 3, - "modify": 3, - "terms": 3, + "redistribute": 4, + "and/or": 4, + "modify": 4, + "terms": 4, "Artistic": 2, "License": 2, "v2.0.": 2, @@ -31023,8 +50883,8 @@ "unspecified": 1, "fib": 4, "N": 2, - "SEE": 3, - "ALSO": 3, + "SEE": 4, + "ALSO": 4, "": 1, "SHEBANG#!perl": 5, "MAIN": 1, @@ -31045,7 +50905,7 @@ "Resource": 5, "file_matching": 2, "check_regex": 2, - "like": 12, + "like": 13, "finder": 1, "options": 7, "FILE...": 1, @@ -31064,7 +50924,7 @@ "By": 2, "prints": 2, "also": 7, - "would": 3, + "would": 5, "actually": 1, "let": 1, "take": 5, @@ -31082,12 +50942,12 @@ "specified": 3, "line.": 4, "default.": 2, - "item": 42, + "item": 44, "": 11, "paths": 3, "included": 1, "search.": 1, - "entire": 2, + "entire": 3, "matched": 1, "against": 1, "shell": 4, @@ -31096,7 +50956,7 @@ "<-w>": 2, "<-v>": 3, "<-Q>": 4, - "apply": 2, + "apply": 3, "relative": 1, "convenience": 1, "shortcut": 2, @@ -31142,7 +51002,7 @@ "include": 1, "<--ignore-dir=data>": 1, "<--noignore-dir>": 1, - "allows": 2, + "allows": 4, "normally": 1, "perhaps": 1, "research": 1, @@ -31154,17 +51014,17 @@ "": 1, "NOT": 1, "supported.": 1, - "You": 3, - "need": 3, + "You": 4, + "need": 5, "specify": 1, "<--ignore-dir=foo>": 1, - "then": 3, + "then": 4, "foo": 6, "taken": 1, "account": 1, "explicitly": 1, "": 2, - "file.": 2, + "file.": 3, "Multiple": 1, "<--line>": 1, "comma": 1, @@ -31205,9 +51065,9 @@ "they": 1, "expression.": 1, "Highlighting": 1, - "work": 1, + "work": 3, "though": 1, - "so": 3, + "so": 4, "highlight": 1, "seeing": 1, "tail": 1, @@ -31220,9 +51080,9 @@ "usual": 1, "newline.": 1, "dealing": 1, - "contain": 2, + "contain": 3, "whitespace": 1, - "e.g.": 1, + "e.g.": 2, "html": 1, "xargs": 2, "rm": 1, @@ -31243,7 +51103,7 @@ "<--smart-case>": 1, "<--no-smart-case>": 1, "strings": 1, - "contains": 1, + "contains": 2, "uppercase": 1, "characters.": 1, "similar": 1, @@ -31254,7 +51114,7 @@ "<--sort-files>": 1, "Sorts": 1, "Use": 6, - "your": 13, + "your": 20, "listings": 1, "deterministic": 1, "runs": 1, @@ -31268,7 +51128,7 @@ "Bill": 1, "Cat": 1, "logo.": 1, - "Note": 4, + "Note": 5, "exact": 1, "spelling": 1, "<--thpppppt>": 1, @@ -31277,7 +51137,7 @@ "perl": 8, "php": 2, "python": 1, - "looks": 1, + "looks": 2, "location.": 1, "variable": 1, "specifies": 1, @@ -31321,7 +51181,7 @@ "See": 1, "": 1, "specifications.": 1, - "such": 5, + "such": 6, "": 1, "": 1, "": 1, @@ -31334,7 +51194,7 @@ "understands": 1, "sequences.": 1, "never": 1, - "back": 3, + "back": 4, "ACK": 2, "OTHER": 1, "TOOLS": 1, @@ -31357,8 +51217,8 @@ "Phil": 1, "Jackson": 1, "put": 1, - "together": 1, - "an": 11, + "together": 2, + "an": 16, "": 1, "extension": 1, "": 1, @@ -31371,13 +51231,13 @@ "Code": 1, "greater": 1, "normal": 1, - "code": 7, + "code": 8, "<$?=256>": 1, "": 1, "backticks.": 1, "errors": 1, "used.": 1, - "at": 3, + "at": 4, "least": 1, "returned.": 1, "DEBUGGING": 1, @@ -31399,7 +51259,7 @@ "big": 1, "codesets": 1, "more": 2, - "create": 2, + "create": 3, "tree": 2, "ideal": 1, "sending": 1, @@ -31446,7 +51306,7 @@ "tips": 1, "here.": 1, "FAQ": 1, - "Why": 2, + "Why": 3, "isn": 1, "doesn": 8, "behavior": 3, @@ -31468,17 +51328,17 @@ "those": 2, "well": 2, "returning": 1, - "things": 1, + "things": 2, "great": 1, "did": 1, "replace": 3, "read": 6, "only.": 1, - "has": 2, + "has": 3, "perfectly": 1, "good": 2, "way": 2, - "using": 2, + "using": 5, "<-p>": 1, "<-n>": 1, "switches.": 1, @@ -31493,7 +51353,7 @@ "<.xyz>": 1, "already": 2, "program/package": 1, - "called": 3, + "called": 4, "ack.": 2, "Yes": 1, "know.": 1, @@ -31548,7 +51408,7 @@ "hash": 11, "badkey": 1, "caller": 2, - "start": 6, + "start": 7, "dh": 4, "opendir": 1, "@newfiles": 5, @@ -31558,7 +51418,7 @@ "catdir": 3, "closedir": 1, "": 1, - "these": 1, + "these": 4, "updated": 1, "update": 1, "message": 1, @@ -31593,7 +51453,7 @@ "seek": 4, "readline": 1, "nexted": 3, - "CGI": 5, + "CGI": 6, "Fast": 3, "XML": 2, "Hash": 11, @@ -31642,6 +51502,113 @@ "Foo": 11, "Bar": 1, "@array": 1, + "pod": 1, + "Catalyst": 10, + "PSGI": 10, + "How": 1, + "": 3, + "specification": 3, + "interface": 1, + "web": 8, + "servers": 2, + "based": 2, + "applications": 2, + "frameworks.": 1, + "supports": 1, + "writing": 1, + "portable": 1, + "run": 1, + "various": 2, + "methods": 4, + "standalone": 1, + "server": 2, + "mod_perl": 3, + "FastCGI": 2, + "": 3, + "implementation": 1, + "running": 1, + "applications.": 1, + "Engine": 1, + "XXXX": 1, + "classes": 2, + "environments": 1, + "been": 1, + "changed": 1, + "done": 2, + "implementing": 1, + "possible": 2, + "manually": 2, + "": 1, + "root": 1, + "application.": 1, + "write": 2, + "own": 4, + ".psgi": 7, + "Writing": 2, + "alternate": 1, + "": 1, + "extensions": 1, + "implement": 2, + "": 1, + "": 1, + "": 1, + "simplest": 1, + "<.psgi>": 1, + "": 1, + "TestApp": 5, + "app": 2, + "psgi_app": 3, + "middleware": 2, + "components": 2, + "automatically": 2, + "": 1, + "applied": 1, + "psgi": 2, + "yourself.": 2, + "Details": 1, + "below.": 1, + "Additional": 1, + "": 1, + "What": 1, + "generates": 2, + "": 1, + "setting": 2, + "wrapped": 1, + "": 1, + "some": 1, + "engine": 1, + "fixes": 1, + "uniform": 1, + "behaviour": 2, + "contained": 1, + "over": 2, + "": 1, + "": 1, + "override": 1, + "providing": 2, + "none": 1, + "call": 2, + "MyApp": 1, + "Thus": 1, + "functionality": 1, + "ll": 1, + "An": 1, + "apply_default_middlewares": 2, + "method": 8, + "supplied": 1, + "wrap": 1, + "middlewares": 1, + "means": 3, + "auto": 1, + "generated": 1, + "": 1, + "": 1, + "AUTHORS": 2, + "Contributors": 1, + "Catalyst.pm": 1, + "library": 2, + "software.": 1, + "same": 2, "Plack": 25, "_001": 1, "HTTP": 16, @@ -31654,7 +51621,6 @@ "Escape": 6, "_deprecated": 8, "alt": 1, - "method": 7, "carp": 2, "croak": 3, "required": 2, @@ -31743,7 +51709,6 @@ "_make_upload": 2, "__END__": 2, "Portable": 2, - "PSGI": 6, "app_or_middleware": 1, "req": 28, "finalize": 5, @@ -31753,19 +51718,14 @@ "API": 2, "objects": 2, "across": 1, - "web": 5, - "server": 1, "environments.": 1, "CAVEAT": 1, "module": 2, "intended": 1, - "middleware": 1, "developers": 3, "framework": 2, "rather": 2, - "Writing": 1, "directly": 1, - "possible": 1, "recommended": 1, "yet": 1, "too": 1, @@ -31783,7 +51743,6 @@ "PSGI.": 1, "METHODS": 2, "Some": 1, - "methods": 3, "earlier": 1, "versions": 1, "deprecated": 1, @@ -31821,7 +51780,6 @@ "Unlike": 1, "": 1, "allow": 1, - "setting": 1, "modifying": 1, "@values": 1, "@params": 1, @@ -31846,7 +51804,6 @@ "": 1, "": 1, "store": 1, - "means": 2, "plain": 2, "": 1, "scalars": 1, @@ -31860,7 +51817,6 @@ "dispatch": 1, "route": 1, "actions": 1, - "based": 1, "sure": 1, "": 1, "virtual": 1, @@ -31868,7 +51824,6 @@ "how": 1, "mounted.": 1, "hosted": 1, - "mod_perl": 1, "scripts": 1, "multiplexed": 1, "tools": 1, @@ -31885,7 +51840,6 @@ "": 1, "empty.": 1, "older": 1, - "call": 1, "instead.": 1, "Cookie": 2, "handling": 1, @@ -31903,10 +51857,8 @@ "Simple": 1, "longer": 1, "have": 2, - "write": 1, "wacky": 1, "simply": 1, - "AUTHORS": 1, "Tatsuhiko": 2, "Miyagawa": 2, "Kazuhiro": 1, @@ -31915,8 +51867,6 @@ "Matsuno": 2, "": 1, "": 1, - "library": 1, - "same": 1, "Util": 3, "Accessor": 1, "status": 17, @@ -31982,7 +51932,6 @@ "response": 5, "psgi_handler": 1, "API.": 1, - "over": 1, "Sets": 2, "gets": 2, "": 1, @@ -32025,6 +51974,131 @@ "reference.": 1, "AUTHOR": 1 }, + "Perl6": { + "token": 6, + "pod_formatting_code": 1, + "{": 29, + "": 1, + "<[A..Z]>": 1, + "*POD_IN_FORMATTINGCODE": 1, + "}": 27, + "": 1, + "[": 1, + "": 1, + "#": 13, + "N*": 1, + "role": 10, + "q": 5, + "stopper": 2, + "MAIN": 1, + "quote": 1, + ")": 19, + "backslash": 3, + "sym": 3, + "<\\\\>": 1, + "": 1, + "": 1, + "": 1, + "": 1, + ".": 1, + "method": 2, + "tweak_q": 1, + "(": 16, + "v": 2, + "self.panic": 2, + "tweak_qq": 1, + "qq": 5, + "does": 7, + "b1": 1, + "c1": 1, + "s1": 1, + "a1": 1, + "h1": 1, + "f1": 1, + "Too": 2, + "late": 2, + "for": 2, + "SHEBANG#!perl": 1, + "use": 1, + "v6": 1, + ";": 19, + "my": 10, + "string": 7, + "if": 1, + "eq": 1, + "say": 10, + "regex": 2, + "http": 1, + "-": 3, + "verb": 1, + "|": 9, + "multi": 2, + "line": 5, + "comment": 2, + "I": 1, + "there": 1, + "m": 2, + "even": 1, + "specialer": 1, + "nesting": 1, + "work": 1, + "<": 3, + "trying": 1, + "mixed": 1, + "delimiters": 1, + "": 1, + "arbitrary": 2, + "delimiter": 2, + "Hooray": 1, + "": 1, + "with": 9, + "whitespace": 1, + "<<": 1, + "more": 1, + "strings": 1, + "%": 1, + "hash": 1, + "Hash.new": 1, + "begin": 1, + "pod": 1, + "Here": 1, + "t": 2, + "highlighted": 1, + "table": 1, + "Of": 1, + "things": 1, + "A": 3, + "single": 3, + "declarator": 7, + "a": 8, + "keyword": 7, + "like": 7, + "Another": 2, + "block": 2, + "brace": 1, + "More": 2, + "blocks": 2, + "don": 2, + "x": 2, + "foo": 3, + "Rob": 1, + "food": 1, + "match": 1, + "sub": 1, + "something": 1, + "Str": 1, + "D": 1, + "value": 1, + "...": 1, + "s": 1, + "some": 2, + "stuff": 1, + "chars": 1, + "/": 1, + "": 1, + "": 1, + "roleq": 1 + }, "PHP": { "<": 11, "php": 12, @@ -33073,6 +53147,505 @@ "config": 3, "application": 2 }, + "Pike": { + "#pike": 2, + "__REAL_VERSION__": 2, + "constant": 13, + "Generic": 1, + "__builtin.GenericError": 1, + ";": 149, + "Index": 1, + "__builtin.IndexError": 1, + "BadArgument": 1, + "__builtin.BadArgumentError": 1, + "Math": 1, + "__builtin.MathError": 1, + "Resource": 1, + "__builtin.ResourceError": 1, + "Permission": 1, + "__builtin.PermissionError": 1, + "Decode": 1, + "__builtin.DecodeError": 1, + "Cpp": 1, + "__builtin.CppError": 1, + "Compilation": 1, + "__builtin.CompilationError": 1, + "MasterLoad": 1, + "__builtin.MasterLoadError": 1, + "ModuleLoad": 1, + "__builtin.ModuleLoadError": 1, + "//": 85, + "Returns": 2, + "an": 2, + "Error": 2, + "object": 5, + "for": 1, + "any": 1, + "argument": 2, + "it": 2, + "receives.": 1, + "If": 1, + "the": 4, + "already": 1, + "is": 2, + "or": 1, + "empty": 1, + "does": 1, + "nothing.": 1, + "mkerror": 1, + "(": 218, + "mixed": 8, + "error": 14, + ")": 218, + "{": 51, + "if": 35, + "UNDEFINED": 1, + "return": 41, + "objectp": 1, + "&&": 2, + "-": 50, + "is_generic_error": 1, + "arrayp": 2, + "Error.Generic": 3, + "@error": 1, + "stringp": 1, + "sprintf": 3, + "}": 51, + "A": 2, + "string": 20, + "wrapper": 1, + "that": 1, + "pretends": 1, + "to": 7, + "be": 3, + "a": 6, + "@": 36, + "[": 45, + "Stdio.File": 32, + "]": 45, + "in": 1, + "addition": 1, + "some": 1, + "features": 1, + "of": 3, + "Stdio.FILE": 4, + "object.": 2, + "This": 1, + "can": 2, + "used": 1, + "distinguish": 1, + "FakeFile": 3, + "from": 1, + "real": 1, + "is_fake_file": 1, + "protected": 12, + "data": 34, + "int": 31, + "ptr": 27, + "r": 10, + "w": 6, + "mtime": 4, + "function": 21, + "read_cb": 5, + "read_oob_cb": 5, + "write_cb": 5, + "write_oob_cb": 5, + "close_cb": 5, + "@seealso": 33, + "close": 2, + "void": 25, + "|": 14, + "direction": 5, + "lower_case": 2, + "||": 2, + "cr": 2, + "has_value": 4, + "cw": 2, + "@decl": 1, + "create": 3, + "type": 11, + "pointer": 1, + "_data": 3, + "_ptr": 2, + "time": 3, + "else": 5, + "make_type_str": 3, + "+": 19, + "dup": 2, + "this_program": 3, + "Always": 3, + "returns": 4, + "errno": 2, + "size": 3, + "and": 1, + "creation": 1, + "string.": 2, + "Stdio.Stat": 3, + "stat": 1, + "st": 6, + "sizeof": 21, + "ctime": 1, + "atime": 1, + "line_iterator": 2, + "String.SplitIterator": 3, + "trim": 2, + "id": 3, + "query_id": 2, + "set_id": 2, + "_id": 2, + "read_function": 2, + "nbytes": 2, + "lambda": 1, + "read": 3, + "peek": 2, + "float": 1, + "timeout": 1, + "query_address": 2, + "is_local": 1, + "len": 4, + "not_all": 1, + "<": 3, + "start": 1, + "zero_type": 1, + "start..ptr": 1, + "gets": 2, + "ret": 7, + "sscanf": 1, + "getchar": 2, + "c": 4, + "catch": 1, + "unread": 2, + "s": 5, + "..ptr": 2, + "ptr..": 1, + "seek": 2, + "pos": 8, + "mult": 2, + "add": 2, + "pos*mult": 1, + "strlen": 2, + "sync": 2, + "tell": 2, + "truncate": 2, + "length": 2, + "..length": 1, + "write": 2, + "array": 1, + "str": 12, + "...": 2, + "extra": 2, + "str*": 1, + "@extra": 1, + "..": 1, + "set_blocking": 3, + "set_blocking_keep_callbacks": 3, + "set_nonblocking": 1, + "rcb": 2, + "wcb": 2, + "ccb": 2, + "rocb": 2, + "wocb": 2, + "set_nonblocking_keep_callbacks": 1, + "set_close_callback": 2, + "cb": 10, + "set_read_callback": 2, + "set_read_oob_callback": 2, + "set_write_callback": 2, + "set_write_oob_callback": 2, + "query_close_callback": 2, + "query_read_callback": 2, + "query_read_oob_callback": 2, + "query_write_callback": 2, + "query_write_oob_callback": 2, + "_sprintf": 1, + "t": 2, + "casted": 1, + "cast": 1, + "switch": 1, + "case": 2, + "this": 5, + "Sizeof": 1, + "on": 1, + "its": 1, + "contents.": 1, + "_sizeof": 1, + "@ignore": 1, + "#define": 1, + "NOPE": 20, + "X": 2, + "args": 1, + "#X": 1, + "assign": 1, + "async_connect": 1, + "connect": 1, + "connect_unix": 1, + "open": 1, + "open_socket": 1, + "pipe": 1, + "tcgetattr": 1, + "tcsetattr": 1, + "dup2": 1, + "lock": 1, + "We": 4, + "could": 4, + "implement": 4, + "mode": 1, + "proxy": 1, + "query_fd": 1, + "read_oob": 1, + "set_close_on_exec": 1, + "set_keepalive": 1, + "trylock": 1, + "write_oob": 1, + "@endignore": 1 + }, + "Pod": { + "Id": 1, + "contents.pod": 1, + "v": 1, + "/05/04": 1, + "tower": 1, + "Exp": 1, + "begin": 3, + "html": 7, + "": 1, + "end": 4, + "head1": 2, + "Net": 12, + "Z3950": 12, + "AsyncZ": 16, + "head2": 3, + "Intro": 1, + "adds": 1, + "an": 3, + "additional": 1, + "layer": 1, + "of": 19, + "asynchronous": 4, + "support": 1, + "for": 11, + "the": 29, + "module": 6, + "through": 1, + "use": 1, + "multiple": 1, + "forked": 1, + "processes.": 1, + "I": 8, + "hope": 1, + "that": 9, + "users": 1, + "will": 1, + "also": 2, + "find": 1, + "it": 3, + "provides": 1, + "a": 8, + "convenient": 2, + "front": 1, + "to": 9, + "C": 13, + "": 1, + ".": 5, + "My": 1, + "initial": 1, + "idea": 1, + "was": 1, + "write": 1, + "something": 2, + "would": 1, + "provide": 1, + "means": 1, + "processing": 1, + "and": 14, + "formatting": 2, + "Z39.50": 1, + "records": 4, + "which": 3, + "did": 1, + "using": 1, + "": 2, + "synchronous": 1, + "code.": 1, + "But": 3, + "wanted": 1, + "could": 1, + "handle": 1, + "queries": 1, + "large": 1, + "numbers": 1, + "servers": 1, + "at": 1, + "one": 1, + "session.": 1, + "Working": 1, + "on": 1, + "this": 3, + "part": 3, + "my": 1, + "project": 1, + "found": 1, + "had": 1, + "trouble": 1, + "with": 6, + "features": 1, + "so": 1, + "ended": 1, + "up": 1, + "what": 1, + "have": 3, + "here.": 1, + "give": 2, + "more": 4, + "detailed": 4, + "account": 2, + "in": 9, + "": 4, + "href=": 5, + "": 1, + "DESCRIPTION": 1, + "": 1, + "": 5, + "section": 2, + "": 5, + "AsyncZ.html": 2, + "": 6, + "pod": 3, + "B": 1, + "": 1, + "": 1, + "cut": 3, + "Documentation": 1, + "over": 2, + "item": 10, + "AsyncZ.pod": 1, + "This": 4, + "is": 8, + "starting": 2, + "point": 2, + "gives": 2, + "overview": 2, + "describes": 2, + "basic": 4, + "mechanics": 2, + "its": 2, + "workings": 2, + "details": 5, + "particulars": 2, + "objects": 2, + "methods.": 2, + "see": 2, + "L": 1, + "": 1, + "explanations": 2, + "sample": 2, + "scripts": 2, + "come": 2, + "": 2, + "distribution.": 2, + "Options.pod": 1, + "document": 2, + "various": 2, + "options": 2, + "can": 4, + "be": 2, + "set": 2, + "modify": 2, + "behavior": 2, + "Index": 1, + "Report.pod": 2, + "deals": 2, + "how": 4, + "are": 7, + "treated": 2, + "line": 4, + "by": 2, + "you": 4, + "affect": 2, + "apearance": 2, + "record": 2, + "s": 2, + "HOW": 2, + "TO.": 2, + "back": 2, + "": 1, + "The": 6, + "Modules": 1, + "There": 2, + "modules": 5, + "than": 2, + "there": 2, + "documentation.": 2, + "reason": 2, + "only": 2, + "full": 2, + "complete": 2, + "access": 9, + "other": 2, + "either": 2, + "internal": 2, + "": 1, + "or": 4, + "accessed": 2, + "indirectly": 2, + "indirectly.": 2, + "head3": 1, + "Here": 1, + "main": 1, + "direct": 2, + "documented": 7, + "": 4, + "": 2, + "documentation": 4, + "ErrMsg": 1, + "User": 1, + "error": 1, + "message": 1, + "handling": 2, + "indirect": 2, + "Errors": 1, + "Error": 1, + "debugging": 1, + "limited": 2, + "Report": 1, + "Module": 1, + "reponsible": 1, + "fetching": 1, + "ZLoop": 1, + "Event": 1, + "loop": 1, + "child": 3, + "processes": 3, + "no": 2, + "not": 2, + "ZSend": 1, + "Connection": 1, + "Options": 2, + "_params": 1, + "INDEX": 1 + }, "PogoScript": { "httpism": 1, "require": 3, @@ -33155,6 +53728,60 @@ "href": 1, "m.1": 1 }, + "PostScript": { + "%": 23, + "PS": 1, + "-": 4, + "Adobe": 1, + "Creator": 1, + "Aaron": 1, + "Puchert": 1, + "Title": 1, + "The": 1, + "Sierpinski": 1, + "triangle": 1, + "Pages": 1, + "PageOrder": 1, + "Ascend": 1, + "BeginProlog": 1, + "/pageset": 1, + "{": 4, + "scale": 1, + "set": 1, + "cm": 1, + "translate": 1, + "setlinewidth": 1, + "}": 4, + "def": 2, + "/sierpinski": 1, + "dup": 4, + "gt": 1, + "[": 6, + "]": 6, + "concat": 5, + "sub": 3, + "sierpinski": 4, + "newpath": 1, + "moveto": 1, + "lineto": 2, + "closepath": 1, + "fill": 1, + "ifelse": 1, + "pop": 1, + "EndProlog": 1, + "BeginSetup": 1, + "<<": 1, + "/PageSize": 1, + "setpagedevice": 1, + "A4": 1, + "EndSetup": 1, + "Page": 1, + "Test": 1, + "pageset": 1, + "sqrt": 1, + "showpage": 1, + "EOF": 1 + }, "PowerShell": { "Write": 2, "-": 2, @@ -33188,332 +53815,356 @@ "TWO_PI": 1 }, "Prolog": { - "action_module": 1, - "(": 585, - "calculator": 1, - ")": 584, - ".": 210, - "%": 334, - "[": 110, - "-": 276, - "d1": 1, - "]": 109, - "push": 20, - "D": 37, - "if": 2, - "mode": 22, - "init": 11, - "<": 11, - "deny": 10, - "displayed": 17, - "D1": 5, - "affirm": 10, - "cont": 3, - "*D1": 2, - "+": 32, - "New": 2, - "a": 31, - "op": 28, - "d": 27, - "m": 16, - "clear": 4, - "nop": 6, - "accumulator": 10, - "A": 40, - "O": 14, - "memory": 5, - "M": 14, - "X": 62, - "mem_rec": 2, - "plus": 6, - "eval": 7, - "V": 16, - ";": 9, - "use": 3, - "normal": 3, - "arithmetic": 3, - "i.e.": 3, - "minus": 5, - "lt": 1, - "times": 4, - "equal": 2, - "mem_plus": 2, - "v": 3, - "where": 3, - "V1": 2, - "plus_minus": 1, - "normalize": 2, - "Wff": 3, - "NormalClauses": 3, - "conVert": 1, - "S": 26, - "cnF": 1, - "T": 6, - "flatten_and": 5, - "U": 2, - "make_clauses": 5, - "make": 2, - "sequence": 2, - "out": 4, - "of": 5, - "conjunction": 1, - "/": 2, - "Y": 34, - "F": 31, - "B": 30, - "sequence_append": 5, - "disjunction": 1, - "flatten_or": 6, - "append": 2, - "two": 1, - "sequences": 1, - "R": 32, - "separate": 7, - "into": 1, - "positive": 1, - "and": 3, - "negative": 1, - "literals": 1, - "P": 37, - "N": 20, - "|": 36, - "N1": 2, - "P1": 2, - "tautology": 4, - "some_occurs": 3, - "occurs": 4, - "_": 21, - "C": 21, - "make_clause": 5, - "false": 1, - "make_sequence": 9, - "H": 11, - "write_list": 3, - "write": 13, - "nl": 8, - "A*": 1, - "Algorithm": 1, - "Nodes": 1, - "have": 2, - "form": 2, - "S#D#F#A": 1, - "describes": 1, - "the": 15, - "state": 1, - "or": 1, - "configuration": 1, - "is": 22, - "depth": 1, - "node": 2, - "evaluation": 1, - "function": 4, - "value": 1, - "ancestor": 1, - "list": 1, - "for": 1, - "yfx": 1, - "solve": 2, - "State": 7, - "Soln": 3, - "f_function": 3, - "search": 4, - "State#0#F#": 1, - "reverse": 2, - "h_function": 2, - "H.": 1, - "State#_#_#Soln": 1, - "goal": 2, - "expand": 2, - "Children": 2, - "insert_all": 4, - "Open": 7, - "Open1": 2, - "Open3": 2, - "insert": 6, - "Open2": 2, - "repeat_node": 2, - "cheaper": 2, - "B1": 2, - "P#_#_#_": 2, - "_#_#F1#_": 1, - "_#_#F2#_": 1, - "F1": 1, - "F2.": 1, - "State#D#_#S": 1, - "All_My_Children": 2, - "bagof": 1, - "Child#D1#F#": 1, - "Move": 3, - "move": 7, - "Child": 2, - "puzzle": 4, - "solver": 1, - "A/B/C/D/E/F/G/H/I": 3, - "{": 3, - "...": 3, - "I": 5, - "}": 3, - "represents": 1, - "empty": 2, - "tile": 5, - "/2/3/8/0/4/7/6/5": 1, - "The": 1, - "moves": 1, - "left": 26, - "A/0/C/D/E/F/H/I/J": 3, - "/A/C/D/E/F/H/I/J": 1, - "A/B/C/D/0/F/H/I/J": 4, - "A/B/C/0/D/F/H/I/J": 1, - "A/B/C/D/E/F/H/0/J": 3, - "A/B/C/D/E/F/0/H/J": 1, - "A/B/0/D/E/F/H/I/J": 2, - "A/0/B/D/E/F/H/I/J": 1, - "A/B/C/D/E/0/H/I/J": 3, - "A/B/C/D/0/E/H/I/J": 1, - "A/B/C/D/E/F/H/I/0": 2, - "A/B/C/D/E/F/H/0/I": 1, - "up": 17, - "A/B/C/0/E/F/H/I/J": 3, - "/B/C/A/E/F/H/I/J": 1, - "A/0/C/D/B/F/H/I/J": 1, - "A/B/0/D/E/C/H/I/J": 1, - "A/B/C/D/E/F/0/I/J": 2, - "A/B/C/0/E/F/D/I/J": 1, - "A/B/C/D/0/F/H/E/J": 1, - "A/B/C/D/E/0/H/I/F": 1, - "right": 22, - "A/C/0/D/E/F/H/I/J": 1, - "A/B/C/D/F/0/H/I/J": 1, - "A/B/C/D/E/F/H/J/0": 1, - "/B/C/D/E/F/H/I/J": 2, - "B/0/C/D/E/F/H/I/J": 1, - "A/B/C/E/0/F/H/I/J": 1, - "A/B/C/D/E/F/I/0/J": 1, - "down": 15, - "A/B/C/H/E/F/0/I/J": 1, - "A/B/C/D/I/F/H/0/J": 1, - "A/B/C/D/E/J/H/I/0": 1, - "D/B/C/0/E/F/H/I/J": 1, - "A/E/C/D/0/F/H/I/J": 1, - "A/B/F/D/E/0/H/I/J": 1, - "heuristic": 1, - "Puzz": 3, - "p_fcn": 2, - "s_fcn": 2, - "*S.": 1, - "Manhattan": 1, - "distance": 1, - "Pa": 2, - "b": 12, - "Pb": 2, - "c": 10, - "Pc": 2, - "Pd": 2, - "e": 10, - "E": 3, - "Pe": 2, - "f": 10, - "Pf": 2, - "g": 10, - "G": 7, - "Pg": 3, - "h": 10, - "Ph": 2, - "i": 10, - "Pi": 1, - "Pi.": 1, - "cycle": 1, - "s_aux": 14, - "S1": 2, - "S2": 2, - "S3": 2, - "S4": 2, - "S5": 2, - "S6": 2, - "S7": 2, - "S8": 2, - "S9": 1, - "S9.": 1, - "animation": 1, - "using": 2, - "VT100": 1, - "character": 3, - "graphics": 1, - "animate": 2, - "message.": 2, - "initialize": 2, - "cursor": 7, - "get0": 2, - "_X": 2, - "play_back": 5, - "dynamic": 1, - "location/3.": 1, - "A/B/C/D/E/F/H/I/J": 1, - "cls": 2, - "retractall": 1, - "location": 32, - "assert": 17, - "J": 1, - "draw_all.": 1, - "draw_all": 1, - "draw": 18, - "call": 1, - "Put": 1, - "way": 1, + "-": 161, + "module": 3, + "(": 327, + "format_spec": 12, + "[": 87, + "format_error/2": 1, + "format_spec/2": 1, + "format_spec//1": 1, + "spec_arity/2": 1, + "spec_types/2": 1, + "]": 87, + ")": 326, + ".": 107, + "use_module": 8, + "library": 8, + "dcg/basics": 1, + "eos//0": 1, + "integer//1": 1, + "string_without//2": 1, + "error": 6, + "when": 3, + "when/2": 1, + "%": 71, + "mavis": 1, + "format_error": 8, + "+": 14, + "Goal": 29, + "Error": 25, + "string": 8, + "is": 12, + "nondet.": 1, + "format": 8, + "Format": 23, + "Args": 19, + "format_error_": 5, + "_": 30, + "debug": 4, + "Spec": 10, + "is_list": 1, + "spec_types": 8, + "Types": 16, + "types_error": 3, + "length": 4, + "TypesLen": 3, + "ArgsLen": 3, + "types_error_": 4, + "Arg": 6, + "|": 25, + "Type": 3, + "ground": 5, + "is_of_type": 2, + "message_to_string": 1, + "type_error": 1, + "_Location": 1, + "multifile": 2, + "check": 3, + "checker/2.": 2, + "dynamic": 2, + "checker": 3, + "format_fail/3.": 1, + "prolog_walk_code": 1, + "module_class": 1, + "user": 5, + "infer_meta_predicates": 1, + "false": 2, + "autoload": 1, + "format/": 1, + "{": 7, + "}": 7, + "are": 3, + "always": 1, + "loaded": 1, + "undefined": 1, + "ignore": 1, + "trace_reference": 1, + "on_trace": 1, + "check_format": 3, + "retract": 1, + "format_fail": 2, + "Location": 6, + "print_message": 1, + "warning": 1, + "fail.": 3, + "iterate": 1, + "all": 1, + "errors": 2, + "checker.": 1, + "succeed": 2, + "even": 1, + "if": 1, + "no": 1, + "found": 1, + "Module": 4, + "_Caller": 1, + "predicate_property": 1, + "imported_from": 1, + "Source": 2, + "memberchk": 2, + "system": 1, + "prolog_debug": 1, + "can_check": 2, + "assert": 2, + "to": 5, + "avoid": 1, + "printing": 1, + "goals": 1, + "once": 3, + "clause": 1, + "prolog": 2, "message": 1, - "nl.": 1, - "put": 16, - "ESC": 1, - "screen": 1, - "quickly": 1, - "video": 1, - "attributes": 1, - "bold": 1, - "blink": 1, - "not": 1, - "working": 1, - "plain": 1, - "reverse_video": 2, - "Tile": 35, - "objects": 1, - "map": 2, - "s": 1, - "Each": 1, - "should": 1, - "be": 1, - "drawn": 2, - "at": 1, - "which": 1, - "asserted": 1, - "retracted": 1, - "by": 1, - "character_map": 3, - "spot": 1, - "to": 1, - "retract": 8, - "X0": 10, - "Y0": 10, - "Xnew": 6, - "Ynew": 6, - "Obj": 26, - "plain.": 1, - "hide": 10, - "hide_row": 4, - "Y1": 8, - "X1": 8, - "draw_row": 4, + "message_location": 1, + "//": 1, + "eos.": 1, + "escape": 2, + "Numeric": 4, + "Modifier": 2, + "Action": 15, + "Rest": 12, + "numeric_argument": 5, + "modifier_argument": 3, + "action": 6, + "text": 4, + "String": 6, + ";": 12, + "Codes": 21, + "string_codes": 4, + "string_without": 1, + "list": 4, + "semidet.": 3, + "text_codes": 6, + "phrase": 3, + "spec_arity": 2, + "FormatSpec": 2, + "Arity": 3, + "positive_integer": 1, + "det.": 4, + "type": 2, + "Item": 2, + "Items": 2, + "item_types": 3, + "numeric_types": 5, + "action_types": 18, + "number": 3, + "character": 2, + "star": 2, + "nothing": 2, + "atom_codes": 4, + "Code": 2, + "Text": 1, + "codes": 5, + "Var": 5, + "var": 4, + "Atom": 3, + "atom": 6, + "N": 5, + "integer": 7, + "C": 5, + "colon": 1, + "no_colon": 1, + "is_action": 4, + "multi.": 1, + "a": 4, + "d": 3, + "e": 1, + "float": 3, + "f": 1, + "G": 2, + "I": 1, + "n": 1, + "p": 1, + "any": 3, + "r": 1, + "s": 2, + "t": 1, + "W": 1, + "func": 13, + "op": 2, + "xfy": 2, + "of": 8, + "/2": 3, + "list_util": 1, + "xfy_list/3": 1, + "function_expansion": 5, + "arithmetic": 2, + "wants_func": 4, + "prolog_load_context": 1, + "we": 1, + "don": 1, + "used": 1, + "at": 3, + "compile": 3, + "time": 3, + "for": 1, + "macro": 1, + "expansion.": 1, + "compile_function/4.": 1, + "compile_function": 8, + "Expr": 5, + "In": 15, + "Out": 16, + "evaluable/1": 1, + "throws": 1, + "exception": 1, + "with": 2, + "strings": 1, + "evaluable": 1, + "term_variables": 1, + "F": 26, + "function_composition_term": 2, + "Functor": 8, + "true": 5, + "..": 6, + "format_template": 7, + "has_type": 2, + "fail": 1, + "be": 4, + "explicit": 1, + "Dict": 3, + "is_dict": 1, + "get_dict": 1, + "Function": 5, + "Argument": 1, + "Apply": 1, "an": 1, - "Object": 1, - "partition": 5, - "Xs": 5, - "Pivot": 4, - "Smalls": 3, - "Bigs": 3, - "@": 1, - "Rest": 4, - "quicksort": 4, - "Smaller": 2, - "Bigger": 2, + "Argument.": 1, + "A": 1, + "predicate": 4, + "whose": 2, + "final": 1, + "argument": 2, + "generates": 1, + "output": 1, + "and": 2, + "penultimate": 1, + "accepts": 1, + "input.": 1, + "This": 1, + "realized": 1, + "by": 2, + "expanding": 1, + "function": 2, + "application": 2, + "chained": 1, + "calls": 1, + "time.": 1, + "itself": 1, + "can": 3, + "chained.": 2, + "Reversed": 2, + "reverse": 4, + "sort": 2, + "c": 2, + "b": 4, + "meta_predicate": 2, + "throw": 1, + "permission_error": 1, + "call": 4, + "context": 1, + "X": 10, + "Y": 7, + "defer": 1, + "until": 1, + "run": 1, + "P": 2, + "Creates": 1, + "new": 2, + "composing": 1, + "G.": 1, + "The": 1, + "functions": 2, + "composed": 1, + "create": 1, + "compiled": 1, + "which": 1, + "behaves": 1, + "like": 1, + "function.": 1, + "composition": 1, + "Composed": 1, + "also": 1, + "applied": 1, + "/2.": 1, + "fix": 1, + "syntax": 1, + "highlighting": 1, + "functions_to_compose": 2, + "Term": 10, + "Funcs": 7, + "functor": 1, + "Op": 3, + "xfy_list": 2, + "thread_state": 4, + "Goals": 2, + "Tmp": 3, + "instantiation_error": 1, + "append": 2, + "NewArgs": 2, + "variant_sha1": 1, + "Sha": 2, + "current_predicate": 1, + "Functor/2": 2, + "RevFuncs": 2, + "Threaded": 2, + "Body": 2, + "Head": 2, + "compile_predicates": 1, + "Output": 2, + "compound": 1, + "setof": 1, + "arg": 1, + "Name": 2, + "Args0": 2, + "nth1": 2, + "lib": 1, + "ic": 1, + "vabs": 2, + "Val": 8, + "AbsVal": 10, + "#": 9, + "labeling": 2, + "vabsIC": 1, + "or": 1, + "faitListe": 3, + "First": 2, + "Taille": 2, + "Min": 2, + "Max": 2, + "Min..Max": 1, + "Taille1": 2, + "suite": 3, + "Xi": 5, + "Xi1": 7, + "Xi2": 7, + "checkRelation": 3, + "VabsXi1": 2, + "Xi.": 1, + "checkPeriode": 3, + "ListVar": 2, + "Length": 2, + "<": 1, + "X1": 2, + "X2": 2, + "X3": 2, + "X4": 2, + "X5": 2, + "X6": 2, + "X7": 2, + "X8": 2, + "X9": 2, + "X10": 3, "male": 3, "john": 2, "peter": 3, @@ -33522,6 +54173,7 @@ "christie": 3, "parents": 4, "brother": 1, + "M": 2, "turing": 1, "Tape0": 2, "Tape": 2, @@ -33537,44 +54189,2595 @@ "symbol": 3, "Sym": 6, "RsRest": 2, - "once": 1, "rule": 1, "Q1": 2, "NewSym": 2, - "Action": 2, - "action": 4, "Rs1": 2, + "left": 4, "stay": 1, + "right": 1, "L": 2 }, + "Propeller Spin": { + "{": 26, + "*****************************************": 4, + "*": 143, + "x4": 4, + "Keypad": 1, + "Reader": 1, + "v1.0": 4, + "Author": 8, + "Beau": 2, + "Schwabe": 2, + "Copyright": 10, + "(": 356, + "c": 33, + ")": 356, + "Parallax": 10, + "See": 10, + "end": 12, + "of": 108, + "file": 9, + "for": 70, + "terms": 9, + "use.": 9, + "}": 26, + "Operation": 2, + "This": 3, + "object": 7, + "uses": 2, + "a": 72, + "capacitive": 1, + "PIN": 1, + "approach": 1, + "to": 191, + "reading": 1, + "the": 136, + "keypad.": 1, + "To": 3, + "do": 26, + "so": 11, + "ALL": 2, + "pins": 26, + "are": 18, + "made": 2, + "LOW": 2, + "and": 95, + "an": 12, + "OUTPUT": 2, + "I/O": 3, + "pins.": 1, + "Then": 1, + "set": 42, + "INPUT": 2, + "state.": 1, + "At": 1, + "this": 26, + "point": 21, + "only": 63, + "one": 4, + "pin": 18, + "is": 51, + "HIGH": 3, + "at": 26, + "time.": 2, + "If": 2, + "closed": 1, + "then": 5, + "will": 12, + "be": 46, + "read": 29, + "on": 12, + "input": 2, + "otherwise": 1, + "returned.": 1, + "The": 17, + "keypad": 4, + "decoding": 1, + "routine": 1, + "requires": 3, + "two": 6, + "subroutines": 1, + "returns": 6, + "entire": 1, + "matrix": 1, + "into": 19, + "single": 2, + "WORD": 1, + "variable": 1, + "indicating": 1, + "which": 16, + "buttons": 2, + "pressed.": 1, + "Multiple": 1, + "button": 2, + "presses": 1, + "allowed": 1, + "with": 8, + "understanding": 1, + "that": 10, + "BOX": 2, + "entries": 1, + "can": 4, + "confused.": 1, + "An": 1, + "example": 3, + "entry...": 1, + "or": 43, + "#": 97, + "etc.": 1, + "where": 2, + "any": 15, + "pressed": 3, + "evaluate": 1, + "non": 3, + "as": 8, + "being": 2, + "even": 1, + "when": 3, + "they": 2, + "not.": 1, + "There": 1, + "no": 7, + "danger": 1, + "physical": 1, + "electrical": 1, + "damage": 1, + "s": 16, + "just": 2, + "way": 1, + "sensing": 1, + "method": 2, + "happens": 1, + "work.": 1, + "Schematic": 1, + "No": 2, + "resistors": 4, + "capacitors.": 1, + "connections": 1, + "directly": 1, + "from": 21, + "Clear": 2, + "value": 51, + "ReadRow": 4, + "Shift": 3, + "left": 12, + "by": 17, + "preset": 1, + "P0": 2, + "P7": 2, + "LOWs": 1, + "dira": 3, + "[": 35, + "]": 34, + "make": 16, + "INPUTSs": 1, + "...": 5, + "now": 3, + "act": 1, + "like": 4, + "tiny": 1, + "capacitors": 1, + "outa": 2, + "n": 4, + "Pin": 1, + "OUTPUT...": 1, + "Make": 1, + ";": 2, + "charge": 10, + "+": 759, + "ina": 3, + "Pn": 1, + "remain": 1, + "discharged": 1, + "DAT": 7, + "TERMS": 9, + "OF": 49, + "USE": 19, + "MIT": 9, + "License": 9, + "Permission": 9, + "hereby": 9, + "granted": 9, + "free": 10, + "person": 9, + "obtaining": 9, + "copy": 21, + "software": 9, + "associated": 11, + "documentation": 9, + "files": 9, + "deal": 9, + "in": 53, + "Software": 28, + "without": 19, + "restriction": 9, + "including": 9, + "limitation": 9, + "rights": 9, + "use": 19, + "modify": 9, + "merge": 9, + "publish": 9, + "distribute": 9, + "sublicense": 9, + "and/or": 9, + "sell": 9, + "copies": 18, + "permit": 9, + "persons": 9, + "whom": 9, + "furnished": 9, + "subject": 9, + "following": 9, + "conditions": 9, + "above": 11, + "copyright": 9, + "notice": 18, + "permission": 9, + "shall": 9, + "included": 9, + "all": 14, + "substantial": 9, + "portions": 9, + "Software.": 9, + "THE": 59, + "SOFTWARE": 19, + "IS": 10, + "PROVIDED": 9, + "WITHOUT": 10, + "WARRANTY": 10, + "ANY": 20, + "KIND": 10, + "EXPRESS": 10, + "OR": 70, + "IMPLIED": 10, + "INCLUDING": 10, + "BUT": 10, + "NOT": 11, + "LIMITED": 10, + "TO": 10, + "WARRANTIES": 10, + "MERCHANTABILITY": 10, + "FITNESS": 10, + "FOR": 20, + "A": 21, + "PARTICULAR": 10, + "PURPOSE": 10, + "AND": 10, + "NONINFRINGEMENT.": 10, + "IN": 40, + "NO": 10, + "EVENT": 10, + "SHALL": 10, + "AUTHORS": 10, + "COPYRIGHT": 10, + "HOLDERS": 10, + "BE": 10, + "LIABLE": 10, + "CLAIM": 10, + "DAMAGES": 10, + "OTHER": 20, + "LIABILITY": 10, + "WHETHER": 10, + "AN": 10, + "ACTION": 10, + "CONTRACT": 10, + "TORT": 10, + "OTHERWISE": 10, + "ARISING": 10, + "FROM": 10, + "OUT": 10, + "CONNECTION": 10, + "WITH": 10, + "DEALINGS": 10, + "SOFTWARE.": 10, + "****************************************": 4, + "Debug_Lcd": 1, + "v1.2": 2, + "Authors": 1, + "Jon": 2, + "Williams": 2, + "Jeff": 2, + "Martin": 2, + "Inc.": 8, + "Debugging": 1, + "wrapper": 1, + "Serial_Lcd": 1, + "-": 486, + "March": 1, + "Updated": 4, + "conform": 1, + "Propeller": 3, + "initialization": 2, + "standards.": 1, + "v1.1": 8, + "April": 1, + "consistency.": 1, + "OBJ": 2, + "lcd": 2, + "number": 27, + "string": 8, + "conversion": 1, + "PUB": 63, + "init": 2, + "baud": 2, + "lines": 24, + "okay": 11, + "Initializes": 1, + "serial": 1, + "LCD": 4, + "true": 6, + "if": 53, + "parameters": 19, + "lcd.init": 1, + "finalize": 1, + "Finalizes": 1, + "frees": 6, + "floats": 1, + "lcd.finalize": 1, + "putc": 1, + "txbyte": 2, + "Send": 1, + "byte": 27, + "terminal": 4, + "lcd.putc": 1, + "str": 3, + "strAddr": 2, + "Print": 15, + "zero": 10, + "terminated": 4, + "lcd.str": 8, + "dec": 3, + "signed": 4, + "decimal": 5, + "num.dec": 1, + "decf": 1, + "width": 9, + "Prints": 2, + "space": 1, + "padded": 2, + "fixed": 1, + "field": 4, + "num.decf": 1, + "decx": 1, + "digits": 23, + "negative": 2, + "num.decx": 1, + "hex": 3, + "hexadecimal": 4, + "num.hex": 1, + "ihex": 1, + "indicated": 2, + "num.ihex": 1, + "bin": 3, + "binary": 4, + "num.bin": 1, + "ibin": 1, + "%": 162, + "num.ibin": 1, + "cls": 1, + "Clears": 2, + "moves": 1, + "cursor": 9, + "home": 4, + "position": 9, + "lcd.cls": 1, + "Moves": 2, + "lcd.home": 1, + "gotoxy": 1, + "col": 9, + "line": 33, + "col/line": 1, + "lcd.gotoxy": 1, + "clrln": 1, + "lcd.clrln": 1, + "type": 4, + "Selects": 1, + "off": 8, + "blink": 4, + "lcd.cursor": 1, + "display": 23, + "status": 15, + "Controls": 1, + "visibility": 1, + "false": 7, + "hide": 1, + "contents": 3, + "clearing": 1, + "lcd.displayOn": 1, + "else": 3, + "lcd.displayOff": 1, + "custom": 2, + "char": 2, + "chrDataAddr": 3, + "Installs": 1, + "character": 6, + "map": 1, + "address": 16, + "definition": 9, + "array": 1, + "lcd.custom": 1, + "backLight": 1, + "Enable": 1, + "disable": 7, + "backlight": 1, + "affects": 1, + "backlit": 1, + "models": 1, + "lcd.backLight": 1, + "***************************************": 12, + "Graphics": 3, + "Driver": 4, + "Chip": 7, + "Gracey": 7, + "Theory": 1, + "cog": 39, + "launched": 1, + "processes": 1, + "commands": 1, + "via": 5, + "routines.": 1, + "Points": 1, + "arcs": 1, + "sprites": 1, + "text": 9, + "polygons": 1, + "rasterized": 1, + "specified": 1, + "stretch": 1, + "memory": 2, + "serves": 1, + "generic": 1, + "bitmap": 15, + "buffer.": 1, + "displayed": 1, + "TV.SRC": 1, + "VGA.SRC": 1, + "driver.": 3, + "GRAPHICS_DEMO.SRC": 1, + "usage": 1, + "example.": 1, + "CON": 4, + "#1": 47, + "_setup": 1, + "_color": 2, + "_width": 2, + "_plot": 2, + "_line": 2, + "_arc": 2, + "_vec": 2, + "_vecarc": 2, + "_pix": 1, + "_pixarc": 1, + "_text": 2, + "_textarc": 1, + "_textmode": 2, + "_fill": 1, + "_loop": 5, + "VAR": 10, + "long": 122, + "command": 7, + "bitmap_base": 7, + "pixel": 40, + "data": 47, + "slices": 3, + "text_xs": 1, + "text_ys": 1, + "text_sp": 1, + "text_just": 1, + "font": 3, + "pointer": 14, + "same": 7, + "instances": 1, + "stop": 9, + "cognew": 4, + "@loop": 1, + "@command": 1, + "Stop": 6, + "graphics": 4, + "driver": 17, + "cogstop": 3, + "setup": 3, + "x_tiles": 9, + "y_tiles": 9, + "x_origin": 2, + "y_origin": 2, + "base_ptr": 3, + "|": 22, + "bases_ptr": 3, + "slices_ptr": 1, + "Set": 5, + "x": 112, + "tiles": 19, + "x16": 7, + "pixels": 14, + "each": 11, + "y": 80, + "relative": 2, + "center": 10, + "base": 6, + "setcommand": 13, + "write": 36, + "bases": 2, + "<<": 70, + "retain": 2, + "high": 7, + "level": 5, + "bitmap_longs": 1, + "clear": 5, + "dest_ptr": 2, + "Copy": 1, + "double": 2, + "buffered": 1, + "flicker": 5, + "destination": 1, + "color": 39, + "bit": 35, + "pattern": 2, + "code": 3, + "bits": 29, + "@colors": 2, + "&": 21, + "determine": 2, + "shape/width": 2, + "w": 8, + "F": 18, + "pixel_width": 1, + "pixel_passes": 2, + "@w": 1, + "update": 7, + "new": 6, + "repeat": 18, + "i": 24, + "p": 8, + "E": 7, + "r": 4, + "<": 14, + "colorwidth": 1, + "plot": 17, + "Plot": 3, + "@x": 6, + "Draw": 7, + "endpoint": 1, + "arc": 21, + "xr": 7, + "yr": 7, + "angle": 23, + "anglestep": 2, + "steps": 9, + "arcmode": 2, + "radii": 3, + "initial": 6, + "FFF": 3, + "..359.956": 3, + "step": 9, + "leaves": 1, + "between": 4, + "points": 2, + "vec": 1, + "vecscale": 5, + "vecangle": 5, + "vecdef_ptr": 5, + "vector": 12, + "sprite": 14, + "scale": 7, + "rotation": 3, + "Vector": 2, + "word": 212, + "length": 4, + "vecarc": 2, + "pix": 3, + "pixrot": 3, + "pixdef_ptr": 3, + "mirror": 1, + "Pixel": 1, + "justify": 4, + "draw": 5, + "textarc": 1, + "string_ptr": 6, + "justx": 2, + "justy": 3, + "it": 8, + "may": 6, + "necessary": 1, + "call": 44, + ".finish": 1, + "immediately": 1, + "afterwards": 1, + "prevent": 1, + "subsequent": 1, + "clobbering": 1, + "drawn": 1, + "@justx": 1, + "@x_scale": 1, + "get": 30, + "half": 2, + "min": 4, + "max": 6, + "pmin": 1, + "round/square": 1, + "corners": 1, + "y2": 7, + "x2": 6, + "fill": 3, + "pmax": 2, + "triangle": 3, + "sides": 1, + "polygon": 1, + "tri": 2, + "x3": 4, + "y3": 5, + "y4": 1, + "x1": 5, + "y1": 7, + "xy": 1, + "solid": 1, + "/": 27, + "finish": 2, + "Wait": 2, + "current": 3, + "insure": 2, + "safe": 1, + "manually": 1, + "manipulate": 1, + "while": 5, + "primitives": 1, + "xa0": 53, + "start": 16, + "ya1": 3, + "ya2": 1, + "ya3": 2, + "ya4": 40, + "ya5": 3, + "ya6": 21, + "ya7": 9, + "ya8": 19, + "ya9": 5, + "yaA": 18, + "yaB": 4, + "yaC": 12, + "yaD": 4, + "yaE": 1, + "yaF": 1, + "xb0": 19, + "yb1": 2, + "yb2": 1, + "yb3": 4, + "yb4": 15, + "yb5": 2, + "yb6": 7, + "yb7": 3, + "yb8": 20, + "yb9": 5, + "ybA": 8, + "ybB": 1, + "ybC": 32, + "ybD": 1, + "ybE": 1, + "ybF": 1, + "ax1": 11, + "radius": 2, + "ay2": 23, + "ay3": 6, + "ay4": 4, + "a0": 8, + "a2": 1, + "farc": 41, + "another": 7, + "arc/line": 1, + "Round": 1, + "recipes": 1, + "C": 11, + "D": 18, + "fline": 88, + "xa2": 48, + "xb2": 26, + "xa1": 8, + "xb1": 2, + "more": 90, + "xa3": 8, + "xb3": 6, + "xb4": 35, + "a9": 3, + "ax2": 30, + "ay1": 10, + "a7": 2, + "aE": 1, + "aC": 2, + ".": 2, + "aF": 4, + "aD": 3, + "aB": 2, + "xa4": 13, + "a8": 8, + "@": 1, + "a4": 3, + "B": 15, + "H": 1, + "J": 1, + "L": 5, + "N": 1, + "P": 6, + "R": 3, + "T": 5, + "aA": 5, + "V": 7, + "X": 4, + "Z": 1, + "b": 1, + "d": 2, + "f": 2, + "h": 2, + "j": 2, + "l": 2, + "t": 10, + "v": 1, + "z": 4, + "delta": 10, + "bullet": 1, + "fx": 1, + "*************************************": 2, + "org": 2, + "loop": 14, + "rdlong": 16, + "t1": 139, + "par": 20, + "wz": 21, + "arguments": 1, + "mov": 154, + "t2": 90, + "t3": 10, + "#8": 14, + "arg": 3, + "arg0": 12, + "add": 92, + "d0": 11, + "#4": 8, + "djnz": 24, + "wrlong": 6, + "dx": 20, + "dy": 15, + "arg1": 3, + "ror": 4, + "#16": 6, + "jump": 1, + "jumps": 6, + "color_": 1, + "plot_": 2, + "arc_": 2, + "vecarc_": 1, + "pixarc_": 1, + "textarc_": 2, + "fill_": 1, + "setup_": 1, + "xlongs": 4, + "xorigin": 2, + "yorigin": 4, + "arg3": 12, + "basesptr": 4, + "arg5": 6, + "jmp": 24, + "#loop": 9, + "width_": 1, + "pwidth": 3, + "passes": 3, + "#plotd": 3, + "line_": 1, + "#linepd": 2, + "arg7": 6, + "#3": 7, + "cmp": 16, + "exit": 5, + "px": 14, + "py": 11, + "mode": 7, + "if_z": 11, + "#plotp": 3, + "test": 38, + "arg4": 5, + "iterations": 1, + "vecdef": 1, + "rdword": 10, + "t7": 8, + "add/sub": 1, + "to/from": 1, + "t6": 7, + "sumc": 4, + "#multiply": 2, + "round": 1, + "up": 4, + "/2": 1, + "lsb": 1, + "shr": 24, + "t4": 7, + "if_nc": 15, + "h8000": 5, + "wc": 57, + "if_c": 37, + "xwords": 1, + "ywords": 1, + "xxxxxxxx": 2, + "save": 1, + "actual": 4, + "sy": 5, + "rdbyte": 3, + "origin": 1, + "adjust": 4, + "neg": 2, + "sub": 12, + "arg2": 7, + "sumnc": 7, + "if_nz": 18, + "yline": 1, + "sx": 4, + "#0": 20, + "next": 16, + "#2": 15, + "shl": 21, + "t5": 4, + "xpixel": 2, + "rol": 1, + "muxc": 5, + "pcolor": 5, + "color1": 2, + "color2": 2, + "@string": 1, + "#arcmod": 1, + "text_": 1, + "chr": 4, + "done": 3, + "scan": 7, + "tjz": 8, + "def": 2, + "extract": 4, + "_0001_1": 1, + "#fontb": 3, + "textsy": 2, + "starting": 1, + "_0011_0": 1, + "#11": 1, + "#arcd": 1, + "#fontxy": 1, + "advance": 2, + "textsx": 3, + "_0111_0": 1, + "setd_ret": 1, + "fontxy_ret": 1, + "ret": 17, + "fontb": 1, + "multiply": 8, + "fontb_ret": 1, + "textmode_": 1, + "textsp": 2, + "da": 1, + "db": 1, + "db2": 1, + "linechange": 1, + "lines_minus_1": 1, + "right": 9, + "fractions": 1, + "pre": 1, + "increment": 1, + "counter": 1, + "yloop": 2, + "integers": 1, + "base0": 17, + "base1": 10, + "sar": 8, + "cmps": 3, + "out": 24, + "range": 2, + "ylongs": 6, + "skip": 5, + "mins": 1, + "mask": 3, + "mask0": 8, + "#5": 2, + "ready": 10, + "count": 4, + "mask1": 6, + "bits0": 6, + "bits1": 5, + "pass": 5, + "not": 6, + "full": 3, + "longs": 15, + "deltas": 1, + "linepd": 1, + "wr": 2, + "direction": 2, + "abs": 1, + "dominant": 2, + "axis": 1, + "last": 6, + "ratio": 1, + "xloop": 1, + "linepd_ret": 1, + "plotd": 1, + "wide": 3, + "bounds": 2, + "#plotp_ret": 2, + "#7": 2, + "store": 1, + "writes": 1, + "pair": 1, + "account": 1, + "special": 1, + "case": 5, + "andn": 7, + "slice": 7, + "shift0": 1, + "colorize": 1, + "upper": 2, + "subx": 1, + "#wslice": 1, + "offset": 14, + "Get": 2, + "args": 5, + "move": 2, + "using": 1, + "first": 9, + "arg6": 1, + "arcmod_ret": 1, + "arg2/t4": 1, + "arg4/t6": 1, + "arcd": 1, + "#setd": 1, + "#polarx": 1, + "Polar": 1, + "cartesian": 1, + "polarx": 1, + "sine_90": 2, + "sine": 7, + "quadrant": 3, + "nz": 3, + "negate": 2, + "table": 9, + "sine_table": 1, + "shift": 7, + "final": 3, + "sine/cosine": 1, + "integer": 2, + "negnz": 3, + "sine_180": 1, + "shifted": 1, + "multiplier": 3, + "product": 1, + "Defined": 1, + "constants": 2, + "hFFFFFFFF": 1, + "FFFFFFFF": 1, + "fontptr": 1, + "Undefined": 2, + "temps": 1, + "res": 89, + "pointers": 2, + "slicesptr": 1, + "line/plot": 1, + "coordinates": 1, + "Inductive": 1, + "Sensor": 1, + "Demo": 1, + "Test": 2, + "Circuit": 1, + "pF": 1, + "K": 4, + "M": 1, + "FPin": 2, + "SDF": 1, + "sigma": 3, + "feedback": 2, + "SDI": 1, + "GND": 4, + "Coils": 1, + "Wire": 1, + "used": 9, + "was": 2, + "GREEN": 2, + "about": 4, + "gauge": 1, + "Coke": 3, + "Can": 3, + "form": 7, + "MHz": 16, + "BIC": 1, + "pen": 1, + "How": 1, + "does": 2, + "work": 2, + "Note": 1, + "reported": 2, + "resonate": 5, + "frequency": 18, + "LC": 8, + "frequency.": 2, + "Instead": 1, + "voltage": 5, + "produced": 1, + "circuit": 5, + "clipped.": 1, + "In": 2, + "below": 4, + "When": 1, + "you": 5, + "apply": 1, + "small": 1, + "specific": 1, + "near": 1, + "uncommon": 1, + "measure": 1, + "times": 3, + "amount": 1, + "applying": 1, + "circuit.": 1, + "through": 1, + "diode": 2, + "basically": 1, + "feeds": 1, + "divide": 3, + "divider": 1, + "...So": 1, + "order": 1, + "see": 2, + "ADC": 2, + "sweep": 2, + "result": 6, + "output": 11, + "needs": 1, + "generate": 1, + "Volts": 1, + "ground.": 1, + "drop": 1, + "across": 1, + "since": 1, + "sensitive": 1, + "works": 1, + "after": 2, + "divider.": 1, + "typical": 1, + "magnitude": 1, + "applied": 2, + "might": 1, + "look": 2, + "something": 1, + "*****": 4, + "...With": 1, + "looks": 1, + "X****": 1, + "...The": 1, + "denotes": 1, + "location": 1, + "reason": 1, + "slightly": 1, + "reasons": 1, + "really.": 1, + "lazy": 1, + "I": 1, + "didn": 1, + "acts": 1, + "dead": 1, + "short.": 1, + "situation": 1, + "exactly": 1, + "great": 1, + "gr.start": 2, + "gr.setup": 2, + "FindResonateFrequency": 1, + "DisplayInductorValue": 2, + "Freq.Synth": 1, + "FValue": 1, + "ADC.SigmaDelta": 1, + "@FTemp": 1, + "gr.clear": 1, + "gr.copy": 2, + "display_base": 2, + "Option": 2, + "Start": 6, + "*********************************************": 2, + "Frequency": 1, + "LowerFrequency": 2, + "*100/": 1, + "UpperFrequency": 1, + "gr.colorwidth": 4, + "gr.plot": 3, + "gr.line": 3, + "FTemp/1024": 1, + "Finish": 1, + "PS/2": 1, + "Keyboard": 1, + "v1.0.1": 2, + "REVISION": 2, + "HISTORY": 2, + "/15/2006": 2, + "Tool": 1, + "par_tail": 1, + "key": 4, + "buffer": 4, + "head": 1, + "par_present": 1, + "states": 1, + "par_keys": 1, + "******************************************": 2, + "entry": 1, + "movd": 10, + "#_dpin": 1, + "masks": 1, + "dmask": 4, + "_dpin": 3, + "cmask": 2, + "_cpin": 2, + "reset": 14, + "parameter": 14, + "_head": 6, + "_present/_states": 1, + "dlsb": 2, + "stat": 6, + "Update": 1, + "_head/_present/_states": 1, + "#1*4": 1, + "scancode": 2, + "state": 2, + "#receive": 1, + "AA": 1, + "extended": 1, + "if_nc_and_z": 2, + "F0": 3, + "unknown": 2, + "ignore": 2, + "#newcode": 1, + "_states": 2, + "set/clear": 1, + "#_states": 1, + "reg": 5, + "muxnc": 5, + "cmpsub": 4, + "shift/ctrl/alt/win": 1, + "pairs": 1, + "E0": 1, + "handle": 1, + "scrlock/capslock/numlock": 1, + "_000": 5, + "_locks": 5, + "#29": 1, + "change": 3, + "configure": 3, + "flag": 5, + "leds": 3, + "check": 5, + "shift1": 1, + "if_nz_and_c": 4, + "#@shift1": 1, + "@table": 1, + "#look": 1, + "alpha": 1, + "considering": 1, + "capslock": 1, + "if_nz_and_nc": 1, + "xor": 8, + "flags": 1, + "alt": 1, + "room": 1, + "valid": 2, + "enter": 1, + "FF": 3, + "#11*4": 1, + "wrword": 1, + "F3": 1, + "keyboard": 3, + "lock": 1, + "#transmit": 2, + "rev": 1, + "rcl": 2, + "_present": 2, + "#update": 1, + "Lookup": 2, + "perform": 2, + "lookup": 1, + "movs": 9, + "#table": 1, + "#27": 1, + "#rand": 1, + "Transmit": 1, + "pull": 2, + "clock": 4, + "low": 5, + "napshr": 3, + "#13": 3, + "#18": 2, + "release": 1, + "transmit_bit": 1, + "#wait_c0": 2, + "_d2": 1, + "wcond": 3, + "c1": 2, + "c0d0": 2, + "wait": 6, + "until": 3, + "#wait": 2, + "#receive_ack": 1, + "ack": 1, + "error": 1, + "#reset": 2, + "transmit_ret": 1, + "receive": 1, + "receive_bit": 1, + "pause": 1, + "us": 1, + "#nap": 1, + "_d3": 1, + "#receive_bit": 1, + "align": 1, + "isolate": 1, + "look_ret": 1, + "receive_ack_ret": 1, + "receive_ret": 1, + "wait_c0": 1, + "c0": 1, + "timeout": 1, + "ms": 4, + "wloop": 1, + "required": 4, + "_d4": 1, + "replaced": 1, + "c0/c1/c0d0/c1d1": 1, + "if_never": 1, + "replacements": 1, + "#wloop": 3, + "if_c_or_nz": 1, + "c1d1": 1, + "if_nc_or_z": 1, + "nap": 5, + "scales": 1, + "time": 7, + "snag": 1, + "cnt": 2, + "elapses": 1, + "nap_ret": 1, + "F9": 1, + "F5": 1, + "D2": 1, + "F1": 2, + "D1": 1, + "F12": 1, + "F10": 1, + "D7": 1, + "F6": 1, + "D3": 1, + "Tab": 2, + "Alt": 2, + "F3F2": 1, + "q": 1, + "Win": 2, + "Space": 2, + "Apps": 1, + "Power": 1, + "Sleep": 1, + "EF2F": 1, + "CapsLock": 1, + "Enter": 3, + "WakeUp": 1, + "BackSpace": 1, + "C5E1": 1, + "C0E4": 1, + "Home": 1, + "Insert": 1, + "C9EA": 1, + "Down": 1, + "E5": 1, + "Right": 1, + "C2E8": 1, + "Esc": 1, + "DF": 2, + "F11": 1, + "EC": 1, + "PageDn": 1, + "ED": 1, + "PrScr": 1, + "C6E9": 1, + "ScrLock": 1, + "D6": 1, + "Uninitialized": 3, + "_________": 5, + "Key": 1, + "Codes": 1, + "keypress": 1, + "keystate": 2, + "E0..FF": 1, + "AS": 1, + "TV": 9, + "May": 2, + "tile": 41, + "size": 5, + "enable": 5, + "efficient": 2, + "tv_mode": 2, + "NTSC": 11, + "lntsc": 3, + "cycles": 4, + "per": 4, + "sync": 10, + "fpal": 2, + "_433_618": 2, + "PAL": 10, + "spal": 3, + "colortable": 7, + "inside": 2, + "tvptr": 3, + "starts": 4, + "available": 4, + "@entry": 3, + "Assembly": 2, + "language": 2, + "Entry": 2, + "tasks": 6, + "#10": 2, + "Superfield": 2, + "_mode": 7, + "interlace": 20, + "vinv": 2, + "hsync": 5, + "waitvid": 3, + "burst": 2, + "sync_high2": 2, + "task": 2, + "section": 4, + "undisturbed": 2, + "black": 2, + "visible": 7, + "vb": 2, + "leftmost": 1, + "_vt": 3, + "vertical": 29, + "expand": 3, + "vert": 1, + "vscl": 12, + "hb": 2, + "horizontal": 21, + "hx": 5, + "colors": 18, + "screen": 13, + "video": 7, + "repoint": 2, + "hf": 2, + "linerot": 5, + "field1": 4, + "unless": 2, + "invisible": 8, + "if_z_eq_c": 1, + "#hsync": 1, + "vsync": 4, + "pulses": 2, + "vsync1": 2, + "#sync_low1": 1, + "hhalf": 2, + "field2": 1, + "#superfield": 1, + "Blank": 1, + "Horizontal": 1, + "pal": 2, + "toggle": 1, + "phaseflip": 4, + "phasemask": 2, + "sync_scale1": 1, + "blank": 2, + "hsync_ret": 1, + "vsync_high": 1, + "#sync_high1": 1, + "Tasks": 1, + "performed": 1, + "sections": 1, + "during": 2, + "back": 8, + "porch": 9, + "load": 3, + "#_enable": 1, + "_pins": 4, + "_enable": 2, + "#disabled": 2, + "break": 6, + "return": 15, + "later": 6, + "rd": 1, + "#wtab": 1, + "ltab": 1, + "#ltab": 1, + "CLKFREQ": 10, + "cancel": 1, + "_broadcast": 4, + "m8": 3, + "jmpret": 5, + "taskptr": 3, + "taskret": 4, + "ctra": 5, + "pll": 5, + "fcolor": 4, + "#divide": 2, + "vco": 3, + "movi": 3, + "_111": 1, + "ctrb": 4, + "limit": 4, + "m128": 2, + "_100": 1, + "within": 5, + "_001": 1, + "frqb": 2, + "swap": 2, + "broadcast/baseband": 1, + "strip": 3, + "chroma": 19, + "baseband": 18, + "_auralcog": 1, + "_hx": 4, + "consider": 2, + "lineadd": 4, + "lineinc": 3, + "/160": 2, + "loaded": 3, + "#9": 2, + "FC": 2, + "_colors": 2, + "colorreg": 3, + "d6": 3, + "colorloop": 1, + "keep": 2, + "loading": 2, + "m1": 4, + "multiply_ret": 2, + "Disabled": 2, + "try": 2, + "again": 2, + "reload": 1, + "_000_000": 6, + "d0s1": 1, + "F0F0F0F0": 1, + "pins0": 1, + "_01110000_00001111_00000111": 1, + "pins1": 1, + "_11110111_01111111_01110111": 1, + "sync_high1": 1, + "_101010_0101": 1, + "NTSC/PAL": 2, + "metrics": 1, + "tables": 1, + "wtab": 1, + "sntsc": 3, + "lpal": 3, + "hrest": 2, + "vvis": 2, + "vrep": 2, + "_8A": 1, + "_AA": 1, + "sync_scale2": 1, + "_00000000_01_10101010101010_0101": 1, + "m2": 1, + "Parameter": 4, + "/non": 4, + "tccip": 3, + "_screen": 3, + "@long": 2, + "_ht": 2, + "_ho": 2, + "fit": 2, + "contiguous": 1, + "tv_status": 4, + "off/on": 3, + "tv_pins": 5, + "ntsc/pal": 3, + "tv_screen": 5, + "tv_ht": 5, + "tv_hx": 5, + "expansion": 8, + "tv_ho": 5, + "tv_broadcast": 4, + "aural": 13, + "fm": 6, + "preceding": 2, + "copied": 2, + "your": 2, + "code.": 2, + "After": 2, + "setting": 2, + "variables": 3, + "@tv_status": 3, + "All": 2, + "reloaded": 2, + "superframe": 2, + "allowing": 2, + "live": 2, + "changes.": 2, + "minimize": 2, + "correlate": 2, + "changes": 3, + "tv_status.": 1, + "Experimentation": 2, + "optimize": 2, + "some": 3, + "parameters.": 2, + "descriptions": 2, + "sets": 3, + "indicate": 2, + "disabled": 3, + "tv_enable": 2, + "requirement": 2, + "currently": 4, + "outputting": 4, + "driven": 2, + "reduces": 2, + "power": 3, + "_______": 2, + "select": 9, + "group": 7, + "_0111": 6, + "broadcast": 19, + "_1111": 6, + "_0000": 4, + "active": 3, + "top": 10, + "nibble": 4, + "bottom": 5, + "signal": 8, + "arranged": 3, + "attach": 1, + "ohm": 10, + "resistor": 4, + "sum": 7, + "/560/1100": 2, + "subcarrier": 3, + "network": 1, + "visual": 1, + "carrier": 1, + "selects": 4, + "x32": 6, + "tileheight": 4, + "controls": 4, + "mixing": 2, + "mix": 2, + "black/white": 2, + "composite": 1, + "progressive": 2, + "less": 5, + "good": 5, + "motion": 2, + "interlaced": 5, + "doubles": 1, + "format": 1, + "ticks": 11, + "must": 18, + "least": 14, + "_318_180": 1, + "_579_545": 1, + "Hz": 5, + "_734_472": 1, + "itself": 1, + "words": 5, + "define": 10, + "tv_vt": 3, + "has": 4, + "bitfields": 2, + "colorset": 2, + "ptr": 5, + "pixelgroup": 2, + "colorset*": 2, + "pixelgroup**": 2, + "ppppppppppcccc00": 2, + "colorsets": 4, + "four": 8, + "**": 2, + "pixelgroups": 2, + "": 5, + "tv_colors": 2, + "fields": 2, + "values": 2, + "luminance": 2, + "modulation": 4, + "adds/subtracts": 1, + "beware": 1, + "modulated": 1, + "produce": 1, + "saturated": 1, + "toggling": 1, + "levels": 1, + "because": 1, + "abruptly": 1, + "rather": 1, + "against": 1, + "white": 2, + "background": 1, + "best": 1, + "appearance": 1, + "_____": 6, + "practical": 2, + "/30": 1, + "factor": 4, + "sure": 4, + "||": 5, + "than": 5, + "tv_vx": 2, + "tv_vo": 2, + "pos/neg": 4, + "centered": 2, + "image": 2, + "shifts": 4, + "right/left": 2, + "up/down": 2, + "____________": 1, + "expressed": 1, + "ie": 1, + "channel": 1, + "_250_000": 2, + "modulator": 2, + "turned": 2, + "saves": 2, + "broadcasting": 1, + "___________": 1, + "tv_auralcog": 1, + "supply": 1, + "selected": 1, + "bandwidth": 2, + "KHz": 3, + "vary": 1, + "Terminal": 1, + "instead": 1, + "minimum": 2, + "x_scale": 4, + "x_spacing": 4, + "normal": 1, + "x_chr": 2, + "y_chr": 5, + "y_scale": 3, + "y_spacing": 3, + "y_offset": 2, + "x_limit": 2, + "x_screen": 1, + "y_limit": 3, + "y_screen": 4, + "y_max": 3, + "y_screen_bytes": 2, + "y_scroll": 2, + "y_scroll_longs": 4, + "y_clear": 2, + "y_clear_longs": 2, + "paramcount": 1, + "ccinp": 1, + "tv_hc": 1, + "cells": 1, + "cell": 1, + "@bitmap": 1, + "FC0": 1, + "gr.textmode": 1, + "gr.width": 1, + "tv.stop": 2, + "gr.stop": 1, + "schemes": 1, + "tab": 3, + "gr.color": 1, + "gr.text": 1, + "@c": 1, + "gr.finish": 2, + "newline": 3, + "strsize": 2, + "_000_000_000": 2, + "//": 4, + "elseif": 2, + "lookupz": 2, + "..": 4, + "PRI": 1, + "longmove": 2, + "longfill": 2, + "tvparams": 1, + "tvparams_pins": 1, + "_0101": 1, + "vc": 1, + "vx": 2, + "vo": 1, + "auralcog": 1, + "color_schemes": 1, + "BC_6C_05_02": 1, + "E_0D_0C_0A": 1, + "E_6D_6C_6A": 1, + "BE_BD_BC_BA": 1, + "Text": 1, + "x13": 2, + "cols": 5, + "rows": 4, + "screensize": 4, + "lastrow": 2, + "tv_count": 2, + "row": 4, + "tv": 2, + "basepin": 3, + "setcolors": 2, + "@palette": 1, + "@tv_params": 1, + "@screen": 3, + "tv.start": 1, + "stringptr": 3, + "k": 1, + "Output": 1, + "backspace": 1, + "spaces": 1, + "follows": 4, + "Y": 2, + "others": 1, + "printable": 1, + "characters": 1, + "wordfill": 2, + "print": 2, + "A..": 1, + "other": 1, + "colorptr": 2, + "fore": 3, + "Override": 1, + "default": 1, + "palette": 2, + "list": 1, + "scroll": 1, + "hc": 1, + "ho": 1, + "dark": 2, + "blue": 3, + "BB": 1, + "yellow": 1, + "brown": 1, + "cyan": 3, + "red": 2, + "pink": 1, + "VGA": 8, + "vga_mode": 3, + "vgaptr": 3, + "hv": 5, + "bcolor": 3, + "#colortable": 2, + "#blank_line": 3, + "nobl": 1, + "_vx": 1, + "nobp": 1, + "nofp": 1, + "#blank_hsync": 1, + "front": 4, + "vf": 1, + "nofl": 1, + "#tasks": 1, + "before": 1, + "_vs": 2, + "except": 1, + "#blank_vsync": 1, + "#field": 1, + "superfield": 1, + "blank_vsync": 1, + "h2": 2, + "if_c_and_nz": 1, + "blank_hsync": 1, + "_hf": 1, + "invisble": 1, + "_hb": 1, + "#hv": 1, + "blank_hsync_ret": 1, + "blank_line_ret": 1, + "blank_vsync_ret": 1, + "_status": 1, + "#paramcount": 1, + "directions": 1, + "_rate": 3, + "pllmin": 1, + "_011": 1, + "rate": 6, + "hvbase": 5, + "frqa": 3, + "vmask": 1, + "hmask": 1, + "vcfg": 2, + "colormask": 1, + "waitcnt": 3, + "#entry": 1, + "Initialized": 1, + "lowest": 1, + "pllmax": 1, + "*16": 1, + "m4": 1, + "tihv": 1, + "_hd": 1, + "_hs": 1, + "_vd": 1, + "underneath": 1, + "BF": 1, + "___": 1, + "/1/2": 1, + "off/visible/invisible": 1, + "vga_enable": 3, + "pppttt": 1, + "vga_colors": 2, + "vga_vt": 6, + "vga_vx": 4, + "vga_vo": 4, + "vga_hf": 2, + "vga_hb": 2, + "vga_vf": 2, + "vga_vb": 2, + "tick": 2, + "@vga_status": 1, + "vga_status.": 1, + "__________": 4, + "vga_status": 1, + "________": 3, + "vga_pins": 1, + "monitors": 1, + "allows": 1, + "polarity": 1, + "respectively": 1, + "vga_screen": 1, + "vga_ht": 3, + "care": 1, + "suggested": 1, + "bits/pins": 3, + "green": 1, + "bit/pin": 1, + "signals": 1, + "connect": 3, + "RED": 1, + "BLUE": 1, + "connector": 3, + "always": 2, + "HSYNC": 1, + "VSYNC": 1, + "______": 14, + "vga_hx": 3, + "vga_ho": 2, + "equal": 1, + "vga_hd": 2, + "exceed": 1, + "vga_vd": 2, + "recommended": 2, + "vga_hs": 1, + "vga_vs": 1, + "vga_rate": 2, + "should": 1, + "Vocal": 2, + "Tract": 2, + "October": 1, + "synthesizes": 1, + "human": 1, + "vocal": 10, + "tract": 12, + "real": 2, + "It": 1, + "MHz.": 1, + "controlled": 1, + "reside": 1, + "parent": 1, + "aa": 2, + "ga": 5, + "gp": 2, + "vp": 3, + "vr": 1, + "f1": 4, + "f2": 1, + "f3": 3, + "f4": 2, + "na": 2, + "nf": 2, + "fa": 2, + "ff": 2, + "values.": 2, + "Before": 1, + "were": 1, + "interpolation": 1, + "shy": 1, + "frame": 12, + "makes": 1, + "behave": 1, + "sensibly": 1, + "gaps.": 1, + "frame_buffers": 2, + "bytes": 2, + "frame_longs": 3, + "frame_bytes": 1, + "...must": 1, + "dira_": 3, + "dirb_": 1, + "ctra_": 1, + "ctrb_": 3, + "frqa_": 3, + "cnt_": 1, + "many": 1, + "...contiguous": 1, + "tract_ptr": 3, + "pos_pin": 7, + "neg_pin": 6, + "fm_offset": 5, + "positive": 1, + "also": 1, + "enabled": 2, + "generation": 2, + "_500_000": 1, + "Remember": 1, + "duty": 2, + "Ready": 1, + "clkfreq": 2, + "Launch": 1, + "@attenuation": 1, + "Reset": 1, + "buffers": 1, + "@index": 1, + "constant": 3, + "frame_buffer_longs": 2, + "set_attenuation": 1, + "master": 2, + "attenuation": 3, + "initially": 2, + "set_pace": 2, + "percentage": 3, + "pace": 3, + "go": 1, + "Queue": 1, + "transition": 1, + "over": 2, + "Load": 1, + "bytemove": 1, + "@frames": 1, + "index": 5, + "Increment": 1, + "Returns": 4, + "queue": 2, + "useful": 2, + "checking": 1, + "would": 1, + "have": 1, + "frames": 2, + "empty": 2, + "detecting": 1, + "finished": 1, + "sample_ptr": 1, + "receives": 1, + "audio": 1, + "samples": 1, + "updated": 1, + "@sample": 1, + "aural_id": 1, + "id": 2, + "executing": 1, + "algorithm": 1, + "connecting": 1, + "Initialization": 1, + "reserved": 3, + "clear_cnt": 1, + "#2*15": 1, + "hub": 1, + "minst": 3, + "d0s0": 3, + "mult_ret": 1, + "antilog_ret": 1, + "assemble": 1, + "cordic": 4, + "reserves": 2, + "cstep": 1, + "instruction": 2, + "prepare": 1, + "cnt_value": 3, + "cnt_ticks": 3, + "Loop": 1, + "sample": 2, + "period": 1, + "cycle": 1, + "driving": 1, + "h80000000": 2, + "White": 1, + "noise": 3, + "source": 2, + "lfsr": 1, + "lfsr_taps": 2, + "Aspiration": 1, + "vibrato": 3, + "vphase": 2, + "glottal": 2, + "pitch": 5, + "mesh": 1, + "tune": 2, + "convert": 1, + "log": 2, + "phase": 2, + "gphase": 3, + "formant2": 2, + "rotate": 2, + "f2x": 3, + "f2y": 3, + "#cordic": 2, + "formant4": 2, + "f4x": 3, + "f4y": 3, + "subtract": 1, + "nx": 4, + "negated": 1, + "nasal": 2, + "amplitude": 3, + "#mult": 1, + "fphase": 4, + "frication": 2, + "#sine": 1, + "Handle": 1, + "frame_ptr": 6, + "past": 1, + "miscellaneous": 2, + "frame_index": 3, + "stepsize": 2, + "step_size": 5, + "h00FFFFFF": 2, + "final1": 2, + "finali": 2, + "iterate": 3, + "aa..ff": 4, + "accurate": 1, + "accumulation": 1, + "step_acc": 3, + "set2": 3, + "#par_curr": 1, + "set3": 2, + "#par_next": 1, + "set4": 3, + "#par_step": 1, + "#24": 1, + "par_curr": 3, + "absolute": 1, + "msb": 2, + "nr": 1, + "mult": 2, + "par_step": 1, + "frame_cnt": 2, + "step1": 2, + "stepi": 1, + "stepframe": 1, + "#frame_bytes": 1, + "par_next": 2, + "Math": 1, + "Subroutines": 1, + "Antilog": 1, + "whole": 2, + "fraction": 1, + "antilog": 2, + "FFEA0000": 1, + "h00000FFE": 2, + "insert": 2, + "leading": 1, + "Scaled": 1, + "unsigned": 3, + "h00001000": 2, + "negc": 1, + "Multiply": 1, + "#15": 1, + "mult_step": 1, + "Cordic": 1, + "degree": 1, + "#cordic_steps": 1, + "gets": 1, + "assembled": 1, + "cordic_dx": 1, + "incremented": 1, + "cordic_a": 1, + "cordic_delta": 2, + "linear": 1, + "register": 1, + "B901476": 1, + "greater": 1, + "h40000000": 1, + "h01000000": 1, + "FFFFFF": 1, + "h00010000": 1, + "h0000D000": 1, + "D000": 1, + "h00007000": 1, + "FFE": 1, + "h00000800": 1, + "registers": 2, + "startup": 2, + "Data": 1, + "zeroed": 1, + "cleared": 1, + "f1x": 1, + "f1y": 1, + "f3x": 1, + "f3y": 1, + "aspiration": 1, + "***": 1, + "mult_steps": 1, + "assembly": 1, + "area": 1, + "w/ret": 1, + "cordic_ret": 1 + }, + "Protocol Buffer": { + "package": 1, + "tutorial": 1, + ";": 13, + "option": 2, + "java_package": 1, + "java_outer_classname": 1, + "message": 3, + "Person": 2, + "{": 4, + "required": 3, + "string": 3, + "name": 1, + "int32": 1, + "id": 1, + "optional": 2, + "email": 1, + "enum": 1, + "PhoneType": 2, + "MOBILE": 1, + "HOME": 2, + "WORK": 1, + "}": 4, + "PhoneNumber": 2, + "number": 1, + "type": 1, + "[": 1, + "default": 1, + "]": 1, + "repeated": 2, + "phone": 1, + "AddressBook": 1, + "person": 1 + }, + "PureScript": { + "module": 4, + "Control.Arrow": 1, + "where": 20, + "import": 32, + "Data.Tuple": 3, + "class": 4, + "Arrow": 5, + "a": 46, + "arr": 10, + "forall": 26, + "b": 49, + "c.": 3, + "(": 111, + "-": 88, + "c": 17, + ")": 115, + "first": 4, + "d.": 2, + "Tuple": 21, + "d": 6, + "instance": 12, + "arrowFunction": 1, + "f": 28, + "second": 3, + "Category": 3, + "swap": 4, + "b.": 1, + "x": 26, + "y": 2, + "infixr": 3, + "***": 2, + "&&": 3, + "&": 3, + ".": 2, + "g": 4, + "ArrowZero": 1, + "zeroArrow": 1, + "<+>": 2, + "ArrowPlus": 1, + "Data.Foreign": 2, + "Foreign": 12, + "..": 1, + "ForeignParser": 29, + "parseForeign": 6, + "parseJSON": 3, + "ReadForeign": 11, + "read": 10, + "prop": 3, + "Prelude": 3, + "Data.Array": 3, + "Data.Either": 1, + "Data.Maybe": 3, + "Data.Traversable": 2, + "foreign": 6, + "data": 3, + "*": 1, + "fromString": 2, + "String": 13, + "Either": 6, + "readPrimType": 5, + "a.": 6, + "readMaybeImpl": 2, + "Maybe": 5, + "readPropImpl": 2, + "showForeignImpl": 2, + "showForeign": 1, + "Prelude.Show": 1, + "show": 5, + "p": 11, + "json": 2, + "monadForeignParser": 1, + "Prelude.Monad": 1, + "return": 6, + "_": 7, + "Right": 9, + "case": 9, + "of": 9, + "Left": 8, + "err": 8, + "applicativeForeignParser": 1, + "Prelude.Applicative": 1, + "pure": 1, + "<*>": 2, + "<$>": 8, + "functorForeignParser": 1, + "Prelude.Functor": 1, + "readString": 1, + "readNumber": 1, + "Number": 1, + "readBoolean": 1, + "Boolean": 1, + "readArray": 1, + "[": 5, + "]": 5, + "let": 4, + "arrayItem": 2, + "i": 2, + "result": 4, + "+": 30, + "in": 2, + "xs": 3, + "traverse": 2, + "zip": 1, + "range": 1, + "length": 3, + "readMaybe": 1, + "<<": 4, + "<": 13, + "Just": 7, + "Nothing": 7, + "Data.Map": 1, + "Map": 26, + "empty": 6, + "singleton": 5, + "insert": 10, + "lookup": 8, + "delete": 9, + "alter": 8, + "toList": 10, + "fromList": 3, + "union": 3, + "map": 8, + "qualified": 1, + "as": 1, + "P": 1, + "concat": 3, + "Data.Foldable": 2, + "foldl": 4, + "k": 108, + "v": 57, + "Leaf": 15, + "|": 9, + "Branch": 27, + "{": 25, + "key": 13, + "value": 8, + "left": 15, + "right": 14, + "}": 26, + "eqMap": 1, + "P.Eq": 11, + "m1": 6, + "m2": 6, + "P.": 11, + "/": 1, + "P.not": 1, + "showMap": 1, + "P.Show": 3, + "m": 6, + "P.show": 1, + "v.": 11, + "P.Ord": 9, + "b@": 6, + "k1": 16, + "b.left": 9, + "b.right": 8, + "findMinKey": 5, + "glue": 4, + "minKey": 3, + "root": 2, + "b.key": 1, + "b.value": 2, + "v1": 3, + "v2.": 1, + "v2": 2, + "ReactiveJQueryTest": 1, + "flip": 2, + "Control.Monad": 1, + "Control.Monad.Eff": 1, + "Control.Monad.JQuery": 1, + "Control.Reactive": 1, + "Control.Reactive.JQuery": 1, + "head": 2, + "Data.Monoid": 1, + "Debug.Trace": 1, + "Global": 1, + "parseInt": 1, + "main": 1, + "do": 4, + "personDemo": 2, + "todoListDemo": 1, + "greet": 1, + "firstName": 2, + "lastName": 2, + "Create": 3, + "new": 1, + "reactive": 1, + "variables": 1, + "to": 3, + "hold": 1, + "the": 3, + "user": 1, + "readRArray": 1, + "insertRArray": 1, + "text": 5, + "completed": 2, + "paragraph": 2, + "display": 2, + "next": 1, + "task": 4, + "nextTaskLabel": 3, + "create": 2, + "append": 2, + "nextTask": 2, + "toComputedArray": 2, + "toComputed": 2, + "bindTextOneWay": 2, + "counter": 3, + "counterLabel": 3, + "rs": 2, + "cs": 2, + "<->": 1, + "if": 1, + "then": 1, + "else": 1, + "entry": 1, + "entry.completed": 1 + }, "Python": { - "from": 34, + "xspacing": 4, + "#": 28, + "How": 2, + "far": 1, + "apart": 1, + "should": 1, + "each": 1, + "horizontal": 1, + "location": 1, + "be": 1, + "spaced": 1, + "maxwaves": 3, + "total": 1, + "of": 5, + "waves": 1, + "to": 5, + "add": 1, + "together": 1, + "theta": 3, + "amplitude": 3, + "[": 165, + "]": 165, + "Height": 1, + "wave": 2, + "dx": 8, + "yvalues": 7, + "def": 87, + "setup": 2, + "(": 850, + ")": 861, + "size": 5, + "frameRate": 1, + "colorMode": 1, + "RGB": 1, + "w": 2, + "width": 1, + "+": 51, + "for": 69, + "i": 13, + "in": 91, + "range": 5, + "amplitude.append": 1, + "random": 2, + "period": 2, + "many": 1, + "pixels": 1, + "before": 1, + "the": 6, + "repeats": 1, + "dx.append": 1, + "TWO_PI": 1, + "/": 26, + "*": 38, + "_": 6, + "yvalues.append": 1, + "draw": 2, + "background": 2, + "calcWave": 2, + "renderWave": 2, + "len": 11, + "j": 7, + "x": 34, + "if": 160, + "%": 33, + "sin": 1, + "else": 33, + "cos": 1, + "noStroke": 2, + "fill": 2, + "ellipseMode": 1, + "CENTER": 1, + "v": 19, + "enumerate": 2, + "ellipse": 1, + "height": 1, + "import": 55, + "os": 2, + "sys": 3, + "json": 1, + "c4d": 1, + "c4dtools": 1, + "itertools": 1, + "from": 36, + "c4d.modules": 1, + "graphview": 1, + "as": 14, + "gv": 1, + "c4dtools.misc": 1, + "graphnode": 1, + "res": 3, + "importer": 1, + "c4dtools.prepare": 1, + "__file__": 1, + "__res__": 1, + "settings": 2, + "c4dtools.helpers.Attributor": 2, + "{": 27, + "res.file": 3, + "}": 27, + "align_nodes": 2, + "nodes": 11, + "mode": 5, + "spacing": 7, + "r": 9, + "modes": 3, + "not": 69, + "return": 68, + "raise": 23, + "ValueError": 6, + ".join": 4, + "get_0": 12, + "lambda": 6, + "x.x": 1, + "get_1": 4, + "x.y": 1, + "set_0": 6, + "setattr": 16, + "set_1": 4, + "graphnode.GraphNode": 1, + "n": 6, + "nodes.sort": 1, + "key": 6, + "n.position": 1, + "midpoint": 3, + "graphnode.find_nodes_mid": 1, + "first_position": 2, + ".position": 1, + "new_positions": 2, + "prev_offset": 6, + "node": 2, + "position": 12, + "node.position": 2, + "-": 36, + "node.size": 1, + "<": 2, + "new_positions.append": 1, + "bbox_size": 2, + "bbox_size_2": 2, + "itertools.izip": 1, + "align_nodes_shortcut": 3, + "master": 2, + "gv.GetMaster": 1, + "root": 3, + "master.GetRoot": 1, + "graphnode.find_selected_nodes": 1, + "master.AddUndo": 1, + "c4d.EventAdd": 1, + "True": 25, + "class": 19, + "XPAT_Options": 3, + "defaults": 1, + "__init__": 7, + "self": 113, + "filename": 12, + "None": 92, + "super": 4, + ".__init__": 3, + "self.load": 1, + "load": 1, + "is": 31, + "settings.options_filename": 2, + "os.path.isfile": 1, + "self.dict_": 2, + "self.defaults.copy": 2, + "with": 2, + "open": 2, + "fp": 4, + "self.dict_.update": 1, + "json.load": 1, + "self.save": 1, + "save": 2, + "values": 15, + "dict": 4, + "k": 7, + "self.dict_.iteritems": 1, + "self.defaults": 1, + "json.dump": 1, + "XPAT_OptionsDialog": 2, + "c4d.gui.GeDialog": 1, + "CreateLayout": 1, + "self.LoadDialogResource": 1, + "res.DLG_OPTIONS": 1, + "InitValues": 1, + "self.SetLong": 2, + "res.EDT_HSPACE": 2, + "options.hspace": 3, + "res.EDT_VSPACE": 2, + "options.vspace": 3, + "Command": 1, + "id": 2, + "msg": 1, + "res.BTN_SAVE": 1, + "self.GetLong": 2, + "options.save": 1, + "self.Close": 1, + "XPAT_Command_OpenOptionsDialog": 2, + "c4dtools.plugins.Command": 3, + "self._dialog": 4, + "@property": 2, + "dialog": 1, + "PLUGIN_ID": 3, + "PLUGIN_NAME": 3, + "res.string.XPAT_COMMAND_OPENOPTIONSDIALOG": 1, + "PLUGIN_HELP": 3, + "res.string.XPAT_COMMAND_OPENOPTIONSDIALOG_HELP": 1, + "Execute": 3, + "doc": 3, + "self.dialog.Open": 1, + "c4d.DLG_TYPE_MODAL": 1, + "XPAT_Command_AlignHorizontal": 1, + "res.string.XPAT_COMMAND_ALIGNHORIZONTAL": 1, + "PLUGIN_ICON": 2, + "res.string.XPAT_COMMAND_ALIGNHORIZONTAL_HELP": 1, + "XPAT_Command_AlignVertical": 1, + "res.string.XPAT_COMMAND_ALIGNVERTICAL": 1, + "res.string.XPAT_COMMAND_ALIGNVERTICAL_HELP": 1, + "options": 4, + "__name__": 3, + "c4dtools.plugins.main": 1, "__future__": 2, - "import": 47, "unicode_literals": 1, "copy": 1, - "sys": 2, "functools": 1, "update_wrapper": 2, "future_builtins": 1, "zip": 8, "django.db.models.manager": 1, - "#": 13, "Imported": 1, - "to": 4, "register": 1, "signal": 1, "handler.": 1, "django.conf": 1, - "settings": 1, "django.core.exceptions": 1, - "(": 719, "ObjectDoesNotExist": 2, "MultipleObjectsReturned": 2, "FieldError": 4, "ValidationError": 8, "NON_FIELD_ERRORS": 3, - ")": 730, "django.core": 1, "validators": 1, "django.db.models.fields": 1, @@ -33604,8 +56807,6 @@ "get_model": 3, "django.utils.translation": 1, "ugettext_lazy": 1, - "as": 11, - "_": 5, "django.utils.functional": 1, "curry": 6, "django.utils.encoding": 1, @@ -33614,54 +56815,37 @@ "django.utils.text": 1, "get_text_list": 2, "capfirst": 6, - "class": 14, "ModelBase": 4, "type": 6, - "def": 68, "__new__": 2, "cls": 32, "name": 39, "bases": 6, "attrs": 7, "super_new": 3, - "super": 2, ".__new__": 1, "parents": 8, - "[": 152, "b": 11, - "for": 59, - "in": 79, - "if": 145, "isinstance": 11, - "]": 152, - "not": 64, - "return": 57, "module": 6, "attrs.pop": 2, "new_class": 9, - "{": 25, - "}": 25, "attr_meta": 5, - "None": 86, "abstract": 3, "getattr": 30, "False": 28, "meta": 12, - "else": 30, "base_meta": 2, - "is": 29, "model_module": 1, "sys.modules": 1, "new_class.__module__": 1, "kwargs": 9, "model_module.__name__.split": 1, - "-": 30, "new_class.add_to_class": 7, "**kwargs": 9, "subclass_exception": 3, "tuple": 3, "x.DoesNotExist": 1, - "x": 22, "hasattr": 11, "and": 35, "x._meta.abstract": 2, @@ -33687,7 +56871,6 @@ "attrs.items": 1, "new_fields": 2, "new_class._meta.local_fields": 3, - "+": 37, "new_class._meta.local_many_to_many": 2, "new_class._meta.virtual_fields": 1, "field_names": 5, @@ -33698,15 +56881,12 @@ "parent": 5, "parent._meta.abstract": 1, "parent._meta.fields": 1, - "raise": 22, "TypeError": 4, - "%": 32, "continue": 10, "new_class._meta.setup_proxy": 1, "new_class._meta.concrete_model": 2, "base._meta.concrete_model": 2, "o2o_map": 3, - "dict": 3, "f.rel.to": 1, "original_base": 1, "parent_fields": 3, @@ -33720,7 +56900,6 @@ "attr_name": 3, "base._meta.module_name": 1, "auto_created": 1, - "True": 20, "parent_link": 1, "new_class._meta.parents": 1, "copy.deepcopy": 2, @@ -33745,7 +56924,6 @@ "add_to_class": 1, "value": 9, "value.contribute_to_class": 1, - "setattr": 14, "_prepare": 1, "opts": 5, "cls._meta": 3, @@ -33764,7 +56942,6 @@ "opts.order_with_respect_to.rel.to": 1, "cls.__doc__": 3, "cls.__name__": 1, - ".join": 3, "f.attname": 5, "opts.fields": 1, "cls.get_absolute_url": 3, @@ -33773,8 +56950,6 @@ "sender": 5, "ModelState": 2, "object": 6, - "__init__": 5, - "self": 100, "db": 2, "self.db": 1, "self.adding": 1, @@ -33787,7 +56962,6 @@ "args": 8, "self._state": 1, "args_len": 2, - "len": 9, "self._meta.fields": 5, "IndexError": 2, "fields_iter": 4, @@ -33808,7 +56982,6 @@ "property": 2, "AttributeError": 1, "pass": 4, - ".__init__": 1, "signals.post_init.send": 1, "instance": 5, "__repr__": 2, @@ -33847,12 +57020,10 @@ "serializable_value": 1, "field_name": 8, "self._meta.get_field_by_name": 1, - "save": 1, "force_insert": 7, "force_update": 10, "using": 30, "update_fields": 23, - "ValueError": 5, "frozenset": 2, "field.primary_key": 1, "non_model_fields": 2, @@ -33881,13 +57052,11 @@ "manager.using": 3, ".filter": 7, ".exists": 1, - "values": 13, "f.pre_save": 1, "rows": 3, "._update": 1, "meta.order_with_respect_to": 2, "order_value": 2, - "*": 33, ".count": 1, "self._order": 1, "fields": 12, @@ -33947,8 +57116,6 @@ "self._perform_unique_checks": 1, "date_errors": 1, "self._perform_date_checks": 1, - "k": 4, - "v": 11, "date_errors.items": 1, "errors.setdefault": 3, ".extend": 2, @@ -33986,7 +57153,6 @@ "model_class._meta": 2, "qs.exclude": 2, "qs.exists": 2, - "key": 5, ".append": 2, "self.unique_error_message": 1, "_perform_date_checks": 1, @@ -34008,7 +57174,6 @@ "field.error_messages": 1, "field_labels": 4, "map": 1, - "lambda": 1, "full_clean": 1, "self.clean_fields": 1, "e": 13, @@ -34030,15 +57195,11 @@ "ordered_obj._meta.order_with_respect_to.rel.field_name": 2, "order_name": 4, "ordered_obj._meta.order_with_respect_to.name": 2, - "i": 7, - "j": 2, - "enumerate": 1, "ordered_obj.objects.filter": 2, ".update": 1, "_order": 1, "pk_name": 3, "ordered_obj._meta.pk.name": 1, - "r": 3, ".values": 1, "##############################################": 2, "func": 2, @@ -34067,8 +57228,6 @@ "decorate": 2, "based": 1, "views": 1, - "the": 5, - "of": 3, "as_view": 1, ".": 1, "However": 1, @@ -34104,6 +57263,22 @@ "meth": 5, "request.method.lower": 1, "request.method": 2, + "P3D": 1, + "lights": 1, + "camera": 1, + "mouseY": 1, + "eyeX": 1, + "eyeY": 1, + "eyeZ": 1, + "centerX": 1, + "centerY": 1, + "centerZ": 1, + "upX": 1, + "upY": 1, + "upZ": 1, + "box": 1, + "stroke": 1, + "line": 3, "google.protobuf": 4, "descriptor": 1, "_descriptor": 1, @@ -34119,7 +57294,6 @@ "_PERSON": 3, "_descriptor.Descriptor": 1, "full_name": 2, - "filename": 1, "file": 1, "containing_type": 2, "_descriptor.FieldDescriptor": 1, @@ -34133,7 +57307,6 @@ "enum_type": 1, "is_extension": 1, "extension_scope": 1, - "options": 3, "extensions": 1, "nested_types": 1, "enum_types": 1, @@ -34147,13 +57320,11 @@ "_reflection.GeneratedProtocolMessageType": 1, "SHEBANG#!python": 4, "print": 39, - "os": 1, "main": 4, "usage": 3, "string": 1, "command": 4, "sys.argv": 2, - "<": 1, "sys.exit": 1, "printDelimiter": 4, "get": 1, @@ -34176,7 +57347,6 @@ "os.walk": 1, ".next": 1, "os.path.isdir": 1, - "__name__": 2, "argparse": 1, "matplotlib.pyplot": 1, "pl": 1, @@ -34189,7 +57359,6 @@ "S": 4, "phif": 7, "U": 10, - "/": 23, "_parse_args": 2, "V": 12, "np.genfromtxt": 8, @@ -34286,7 +57455,6 @@ "phi": 5, "c": 3, "a*x": 1, - "dx": 6, "d**": 2, "dy": 4, "dx_err": 3, @@ -34478,7 +57646,6 @@ "uri.partition": 1, "self.arguments": 2, "supports_http_1_1": 1, - "@property": 1, "cookies": 1, "self._cookies": 3, "Cookie.SimpleCookie": 1, @@ -34490,10 +57657,8 @@ "get_ssl_certificate": 1, "self.connection.stream.socket.getpeercert": 1, "ssl.SSLError": 1, - "n": 3, "_valid_ip": 1, "ip": 2, - "res": 2, "socket.getaddrinfo": 1, "socket.AF_UNSPEC": 1, "socket.SOCK_STREAM": 1, @@ -34503,36 +57668,133 @@ "socket.EAI_NONAME": 1 }, "R": { - "SHEBANG#!Rscript": 1, + "df.residual.mira": 1, + "<": 46, + "-": 53, + "function": 18, + "(": 219, + "object": 12, + "...": 4, + ")": 220, + "{": 58, + "fit": 2, + "analyses": 1, + "[": 23, + "]": 24, + "return": 8, + "df.residual": 2, + "}": 58, + "df.residual.lme": 1, + "fixDF": 1, + "df.residual.mer": 1, + "sum": 1, + "object@dims": 1, + "*": 2, + "c": 11, + "+": 4, + "df.residual.default": 1, + "q": 3, + "df": 3, + "if": 19, + "is.null": 8, + "mk": 2, + "try": 3, + "coef": 1, + "silent": 3, + "TRUE": 14, + "mn": 2, + "f": 9, + "fitted": 1, + "inherits": 6, + "|": 3, + "NULL": 2, + "n": 3, + "ifelse": 1, + "is.data.frame": 1, + "is.matrix": 1, + "nrow": 1, + "length": 3, + "k": 3, + "max": 1, + "SHEBANG#!Rscript": 2, + "#": 45, + "MedianNorm": 2, + "data": 13, + "geomeans": 3, + "<->": 1, + "exp": 1, + "rowMeans": 1, + "log": 5, + "apply": 2, + "2": 1, + "cnts": 2, + "median": 1, + "library": 1, + "print_usage": 2, + "file": 4, + "stderr": 1, + "cat": 1, + "spec": 2, + "matrix": 3, + "byrow": 3, + "ncol": 3, + "opt": 23, + "getopt": 1, + "help": 1, + "stdout": 1, + "status": 1, + "height": 7, + "out": 4, + "res": 6, + "width": 7, + "ylim": 7, + "read.table": 1, + "header": 1, + "sep": 4, + "quote": 1, + "nsamp": 8, + "dim": 1, + "outfile": 4, + "sprintf": 2, + "png": 2, + "h": 13, + "hist": 4, + "plot": 7, + "FALSE": 9, + "mids": 4, + "density": 4, + "type": 3, + "col": 4, + "rainbow": 4, + "main": 2, + "xlab": 2, + "ylab": 2, + "for": 4, + "i": 6, + "in": 8, + "lines": 6, + "devnum": 2, + "dev.off": 2, + "size.factors": 2, + "data.matrix": 1, + "data.norm": 3, + "t": 1, + "x": 3, + "/": 1, "ParseDates": 2, - "<": 12, - "-": 12, - "function": 3, - "(": 28, - "lines": 4, - ")": 28, - "{": 3, "dates": 3, - "matrix": 2, "unlist": 2, - "strsplit": 2, - "ncol": 2, - "byrow": 2, - "TRUE": 3, + "strsplit": 3, "days": 2, - "[": 3, - "]": 3, "times": 2, "hours": 2, "all.days": 2, - "c": 2, "all.hours": 2, "data.frame": 1, "Day": 2, "factor": 2, "levels": 2, "Hour": 2, - "}": 3, "Main": 2, "system": 1, "intern": 1, @@ -34543,8 +57805,6 @@ "ggplot": 1, "aes": 2, "y": 1, - "x": 1, - "+": 2, "geom_point": 1, "size": 1, "Freq": 1, @@ -34552,11 +57812,279 @@ "range": 1, "ggsave": 1, "filename": 1, - "plot": 1, - "width": 1, - "height": 1, "hello": 2, - "print": 1 + "print": 1, + "module": 25, + "code": 21, + "available": 1, + "via": 1, + "the": 16, + "environment": 4, + "like": 1, + "it": 3, + "returns.": 1, + "@param": 2, + "an": 1, + "identifier": 1, + "specifying": 1, + "full": 1, + "path": 9, + "search": 5, + "see": 1, + "Details": 1, + "even": 1, + "attach": 11, + "is": 7, + "optionally": 1, + "attached": 2, + "to": 9, + "of": 2, + "current": 2, + "scope": 1, + "defaults": 1, + ".": 7, + "However": 1, + "interactive": 2, + "invoked": 1, + "directly": 1, + "from": 5, + "terminal": 1, + "only": 1, + "i.e.": 1, + "not": 4, + "within": 1, + "modules": 4, + "import.attach": 1, + "can": 3, + "be": 8, + "set": 2, + "or": 1, + "depending": 1, + "on": 2, + "user": 1, + "s": 2, + "preference.": 1, + "attach_operators": 3, + "causes": 1, + "emph": 3, + "operators": 3, + "by": 2, + "default": 1, + "path.": 1, + "Not": 1, + "attaching": 1, + "them": 1, + "therefore": 1, + "drastically": 1, + "limits": 1, + "a": 6, + "usefulness.": 1, + "Modules": 1, + "are": 4, + "searched": 1, + "options": 1, + "priority.": 1, + "The": 5, + "directory": 1, + "always": 1, + "considered": 1, + "first.": 1, + "That": 1, + "local": 3, + "./a.r": 1, + "will": 2, + "loaded.": 1, + "Module": 1, + "names": 2, + "fully": 1, + "qualified": 1, + "refer": 1, + "nested": 1, + "paths.": 1, + "See": 1, + "import": 5, + "executed": 1, + "global": 1, + "effect": 1, + "same.": 1, + "When": 1, + "used": 2, + "globally": 1, + "inside": 1, + "newly": 2, + "outside": 1, + "nor": 1, + "other": 2, + "which": 3, + "might": 1, + "loaded": 4, + "@examples": 1, + "@seealso": 3, + "reload": 3, + "@export": 2, + "substitute": 2, + "stopifnot": 3, + "missing": 1, + "&&": 2, + "module_name": 7, + "getOption": 1, + "else": 4, + "class": 4, + "module_path": 15, + "find_module": 1, + "stop": 1, + "attr": 2, + "message": 1, + "containing_modules": 3, + "module_init_files": 1, + "mapply": 1, + "do_import": 4, + "mod_ns": 5, + "as.character": 3, + "module_parent": 8, + "parent.frame": 2, + "mod_env": 7, + "exhibit_namespace": 3, + "identical": 2, + ".GlobalEnv": 2, + "name": 10, + "environmentName": 2, + "parent.env": 4, + "export_operators": 2, + "invisible": 1, + "is_module_loaded": 1, + "get_loaded_module": 1, + "namespace": 13, + "structure": 3, + "new.env": 1, + "parent": 9, + ".BaseNamespaceEnv": 1, + "paste": 3, + "source": 3, + "chdir": 1, + "envir": 5, + "cache_module": 1, + "exported_functions": 2, + "lsf.str": 2, + "list2env": 2, + "sapply": 2, + "get": 2, + "ops": 2, + "is_predefined": 2, + "%": 2, + "is_op": 2, + "prefix": 3, + "||": 1, + "grepl": 1, + "Filter": 1, + "op_env": 4, + "cache.": 1, + "@note": 1, + "Any": 1, + "references": 1, + "remain": 1, + "unchanged": 1, + "and": 5, + "files": 1, + "would": 1, + "have": 1, + "happened": 1, + "without": 1, + "unload": 2, + "should": 2, + "production": 1, + "code.": 1, + "does": 1, + "currently": 1, + "detach": 1, + "environments.": 1, + "Reload": 1, + "given": 1, + "Remove": 1, + "cache": 1, + "forcing": 1, + "reload.": 1, + "reloaded": 1, + "reference": 1, + "unloaded": 1, + "still": 1, + "work.": 1, + "Reloading": 1, + "primarily": 1, + "useful": 1, + "testing": 1, + "during": 1, + "module_ref": 3, + "rm": 1, + "list": 1, + ".loaded_modules": 1, + "whatnot.": 1, + "assign": 1, + "##polyg": 1, + "vector": 2, + "##numpoints": 1, + "number": 1, + "##output": 1, + "output": 1, + "##": 1, + "Example": 1, + "scripts": 1, + "group": 1, + "pts": 1, + "spsample": 1, + "polyg": 1, + "numpoints": 1, + "docType": 1, + "package": 5, + "scholar": 6, + "alias": 2, + "title": 1, + "reads": 1, + "url": 2, + "http": 2, + "//scholar.google.com": 1, + "Dates": 1, + "citation": 2, + "counts": 1, + "estimated": 1, + "determined": 1, + "automatically": 1, + "computer": 1, + "program.": 1, + "Use": 1, + "at": 2, + "your": 1, + "own": 1, + "risk.": 1, + "description": 1, + "provides": 1, + "functions": 3, + "extract": 1, + "Google": 2, + "Scholar.": 1, + "There": 1, + "also": 1, + "convenience": 1, + "comparing": 1, + "multiple": 1, + "scholars": 1, + "predicting": 1, + "index": 1, + "scores": 1, + "based": 1, + "past": 1, + "publication": 1, + "records.": 1, + "note": 1, + "A": 1, + "complementary": 1, + "Scholar": 1, + "found": 1, + "//biostat.jhsph.edu/": 1, + "jleek/code/googleCite.r": 1, + "was": 1, + "developed": 1, + "independently.": 1 }, "Racket": { ";": 3, @@ -34565,7 +58093,7 @@ "and": 1, "efficient": 1, "code": 1, - "-": 100, + "-": 94, "that": 2, "s": 1, "the": 3, @@ -34575,41 +58103,27 @@ "http": 1, "//racket": 1, "lang.org/": 1, - "(": 25, + "(": 23, "define": 1, "bottles": 4, "n": 8, "more": 2, - ")": 25, + ")": 23, "printf": 2, "case": 1, "[": 16, "]": 16, "else": 1, "if": 1, - "for": 3, + "for": 2, "in": 3, "range": 1, "sub1": 1, "displayln": 2, - "SHEBANG#!sh": 1, - "#": 2, - "|": 2, - "*": 2, - "scheme": 1, - "exec": 1, - "racket": 1, - "um": 1, - "require": 2, - "racket/file": 1, - "racket/path": 1, - "racket/list": 1, - "racket/string": 1, - "syntax": 1, - "racket/base": 1, "#lang": 1, "scribble/manual": 1, "@": 3, + "require": 1, "scribble/bnf": 1, "@title": 1, "{": 2, @@ -34817,15 +58331,780 @@ "my_ts..": 1, "SimpleTokenizer.new": 1 }, - "Rebol": { - "REBOL": 1, + "RDoc": { + "RDoc": 7, + "-": 9, + "Ruby": 4, + "Documentation": 2, + "System": 1, + "home": 1, + "https": 3, + "//github.com/rdoc/rdoc": 1, + "rdoc": 7, + "http": 1, + "//docs.seattlerb.org/rdoc": 1, + "bugs": 1, + "//github.com/rdoc/rdoc/issues": 1, + "code": 1, + "quality": 1, + "{": 1, + "": 1, + "src=": 1, + "alt=": 1, + "}": 1, "[": 3, + "//codeclimate.com/github/rdoc/rdoc": 1, "]": 3, - "hello": 2, + "Description": 1, + "produces": 1, + "HTML": 1, + "and": 9, + "command": 4, + "line": 1, + "documentation": 8, + "for": 9, + "projects.": 1, + "includes": 1, + "the": 12, + "+": 8, + "ri": 1, + "tools": 1, + "generating": 1, + "displaying": 1, + "from": 1, + "line.": 1, + "Generating": 1, + "Once": 1, + "installed": 1, + "you": 3, + "can": 2, + "create": 1, + "using": 1, + "options": 1, + "names...": 1, + "For": 1, + "an": 1, + "up": 1, + "to": 4, + "date": 1, + "option": 1, + "summary": 1, + "type": 2, + "help": 1, + "A": 1, + "typical": 1, + "use": 1, + "might": 1, + "be": 3, + "generate": 1, + "a": 5, + "package": 1, + "of": 2, + "source": 2, + "(": 3, + "such": 1, + "as": 1, + "itself": 1, + ")": 3, + ".": 2, + "This": 2, + "generates": 1, + "all": 1, + "C": 1, + "files": 2, + "in": 4, + "below": 1, + "current": 1, + "directory.": 1, + "These": 1, + "will": 1, + "stored": 1, + "tree": 1, + "starting": 1, + "subdirectory": 1, + "doc": 1, + "You": 2, + "make": 2, + "this": 1, + "slightly": 1, + "more": 1, + "useful": 1, + "your": 1, + "readers": 1, + "by": 1, + "having": 1, + "index": 1, + "page": 1, + "contain": 1, + "primary": 1, + "file.": 1, + "In": 1, + "our": 1, + "case": 1, + "we": 1, + "could": 1, + "#": 1, + "rdoc/rdoc": 1, + "s": 1, + "OK": 1, + "file": 1, + "bug": 1, + "report": 1, + "anything": 1, + "t": 1, + "figure": 1, + "out": 1, + "how": 1, + "produce": 1, + "output": 1, + "like": 1, + "that": 1, + "is": 4, + "probably": 1, + "bug.": 1, + "License": 1, + "Copyright": 1, + "c": 2, + "Dave": 1, + "Thomas": 1, + "The": 1, + "Pragmatic": 1, + "Programmers.": 1, + "Portions": 2, + "Eric": 1, + "Hodel.": 1, + "copyright": 1, + "others": 1, + "see": 1, + "individual": 1, + "LEGAL.rdoc": 1, + "details.": 1, + "free": 1, + "software": 2, + "may": 1, + "redistributed": 1, + "under": 1, + "terms": 1, + "specified": 1, + "LICENSE.rdoc.": 1, + "Warranty": 1, + "provided": 1, + "without": 2, + "any": 1, + "express": 1, + "or": 1, + "implied": 2, + "warranties": 2, + "including": 1, + "limitation": 1, + "merchantability": 1, + "fitness": 1, + "particular": 1, + "purpose.": 1 + }, + "Rebol": { + "REBOL": 5, + "[": 54, + "System": 1, + "Title": 2, + "Rights": 1, + "{": 8, + "Copyright": 1, + "Technologies": 2, + "is": 4, + "a": 2, + "trademark": 1, + "of": 1, + "}": 8, + "License": 2, + "Licensed": 1, + "under": 1, + "the": 3, + "Apache": 1, + "Version": 1, + "See": 1, + "http": 1, + "//www.apache.org/licenses/LICENSE": 1, + "-": 26, + "Purpose": 1, + "These": 1, + "are": 2, + "used": 3, + "to": 2, + "define": 1, + "natives": 1, + "and": 2, + "actions.": 1, + "Bind": 1, + "attributes": 1, + "for": 4, + "this": 1, + "block": 5, + "BIND_SET": 1, + "SHALLOW": 1, + "]": 61, + ";": 19, + "Special": 1, + "as": 1, + "spec": 3, + "datatype": 2, + "test": 1, + "functions": 1, + "(": 30, + "e.g.": 1, + "time": 2, + ")": 33, + "value": 1, + "any": 1, + "type": 1, + "The": 1, + "native": 5, + "function": 3, + "must": 1, + "be": 1, + "defined": 1, + "first.": 1, + "This": 1, + "special": 1, + "boot": 1, + "created": 1, + "manually": 1, + "within": 1, + "C": 1, + "code.": 1, + "Creates": 2, + "internal": 2, + "usage": 2, + "only": 2, + ".": 4, + "no": 3, + "check": 2, + "required": 2, + "we": 2, + "know": 2, + "it": 2, + "correct": 2, + "action": 2, + "Rebol": 4, + "re": 20, + "func": 5, + "s": 5, + "/i": 1, + "rejoin": 1, + "compose": 1, + "either": 1, + "i": 1, + "little": 1, + "helper": 1, + "standard": 1, + "grammar": 1, + "regex": 2, + "date": 6, + "naive": 1, + "string": 1, + "|": 22, + "S": 3, + "*": 7, + "<(?:[^^\\>": 1, + "d": 3, + "+": 6, + "/": 5, + "@": 1, + "%": 2, + "A": 3, + "F": 1, + "url": 1, + "PR_LITERAL": 10, + "string_url": 1, + "email": 1, + "string_email": 1, + "binary": 1, + "binary_base_two": 1, + "binary_base_sixty_four": 1, + "binary_base_sixteen": 1, + "re/i": 2, + "issue": 1, + "string_issue": 1, + "values": 1, + "value_date": 1, + "value_time": 1, + "tuple": 1, + "value_tuple": 1, + "pair": 1, + "value_pair": 1, + "number": 2, + "PR": 1, + "Za": 2, + "z0": 2, + "<[=>": 1, + "rebol": 1, + "red": 1, + "/system": 1, + "world": 1, + "topaz": 1, + "true": 1, + "false": 1, + "yes": 1, + "on": 1, + "off": 1, + "none": 1, + "#": 1, + "hello": 8, + "print": 4, + "author": 1 + }, + "Red": { + "Red": 3, + "[": 111, + "Title": 2, + "Author": 1, + "]": 114, + "File": 1, + "%": 2, + "console.red": 1, + "Tabs": 1, + "Rights": 1, + "License": 2, + "{": 11, + "Distributed": 1, + "under": 1, + "the": 3, + "Boost": 1, + "Software": 1, + "Version": 1, + "See": 1, + "https": 1, + "//github.com/dockimbel/Red/blob/master/BSL": 1, + "-": 74, + "License.txt": 1, + "}": 11, + "Purpose": 2, + "Language": 2, + "http": 2, + "//www.red": 2, + "lang.org/": 2, + "#system": 1, + "global": 1, + "#either": 3, + "OS": 3, + "MacOSX": 2, + "History": 1, + "library": 1, + "cdecl": 3, + "add": 2, + "history": 2, + ";": 31, + "Add": 1, + "line": 9, + "to": 2, + "history.": 1, + "c": 7, + "string": 10, + "rl": 4, + "insert": 3, + "wrapper": 2, "func": 1, - "print": 1 + "count": 3, + "integer": 16, + "key": 3, + "return": 10, + "Windows": 2, + "system/platform": 1, + "ret": 5, + "AttachConsole": 1, + "if": 2, + "zero": 3, + "print": 5, + "halt": 2, + "SetConsoleTitle": 1, + "as": 4, + "string/rs": 1, + "head": 1, + "str": 4, + "bind": 1, + "tab": 3, + "input": 2, + "routine": 1, + "prompt": 3, + "/local": 1, + "len": 1, + "buffer": 4, + "string/load": 1, + "+": 1, + "length": 1, + "free": 1, + "byte": 3, + "ptr": 14, + "SET_RETURN": 1, + "(": 6, + ")": 4, + "delimiters": 1, + "function": 6, + "block": 3, + "list": 1, + "copy": 2, + "none": 1, + "foreach": 1, + "case": 2, + "escaped": 2, + "no": 2, + "in": 2, + "comment": 2, + "switch": 3, + "#": 8, + "mono": 3, + "mode": 3, + "cnt/1": 1, + "red": 1, + "eval": 1, + "code": 3, + "load/all": 1, + "unless": 1, + "tail": 1, + "set/any": 1, + "not": 1, + "script/2": 1, + "do": 2, + "skip": 1, + "script": 1, + "quit": 2, + "init": 1, + "console": 2, + "Console": 1, + "alpha": 1, + "version": 3, + "only": 1, + "ASCII": 1, + "supported": 1, + "Red/System": 1, + "#include": 1, + "../common/FPU": 1, + "configuration.reds": 1, + "C": 1, + "types": 1, + "#define": 2, + "time": 2, + "long": 2, + "clock": 1, + "date": 1, + "alias": 2, + "struct": 5, + "second": 1, + "minute": 1, + "hour": 1, + "day": 1, + "month": 1, + "year": 1, + "Since": 1, + "weekday": 1, + "since": 1, + "Sunday": 1, + "yearday": 1, + "daylight": 1, + "saving": 1, + "Negative": 1, + "unknown": 1, + "#import": 1, + "LIBC": 1, + "file": 1, + "Error": 1, + "handling": 1, + "form": 1, + "error": 5, + "Return": 1, + "description.": 1, + "Print": 1, + "standard": 1, + "output.": 1, + "Memory": 1, + "management": 1, + "make": 1, + "Allocate": 1, + "filled": 1, + "memory.": 1, + "chunks": 1, + "size": 5, + "binary": 4, + "resize": 1, + "Resize": 1, + "memory": 2, + "allocation.": 1, + "JVM": 6, + "reserved0": 1, + "int": 6, + "reserved1": 1, + "reserved2": 1, + "DestroyJavaVM": 1, + "JNICALL": 5, + "vm": 5, + "jint": 5, + "AttachCurrentThread": 1, + "penv": 3, + "p": 3, + "args": 2, + "DetachCurrentThread": 1, + "GetEnv": 1, + "AttachCurrentThreadAsDaemon": 1, + "just": 2, + "some": 2, + "datatypes": 1, + "for": 1, + "testing": 1, + "#some": 1, + "hash": 1, + "FF0000": 3, + "FF000000": 2, + "with": 4, + "instead": 1, + "of": 1, + "space": 2, + "/wAAAA": 1, + "/wAAA": 2, + "A": 2, + "inside": 2, + "char": 1, + "bla": 2, + "ff": 1, + "foo": 3, + "numbers": 1, + "which": 1, + "interpreter": 1, + "path": 1, + "h": 1, + "#if": 1, + "type": 1, + "exe": 1, + "push": 3, + "system/stack/frame": 2, + "save": 1, + "previous": 1, + "frame": 2, + "pointer": 2, + "system/stack/top": 1, + "@@": 1, + "reposition": 1, + "after": 1, + "catch": 1, + "flag": 1, + "CATCH_ALL": 1, + "exceptions": 1, + "root": 1, + "barrier": 1, + "keep": 1, + "stack": 1, + "aligned": 1, + "on": 1, + "bit": 1 + }, + "RMarkdown": { + "Some": 1, + "text.": 1, + "##": 1, + "A": 1, + "graphic": 1, + "in": 1, + "R": 1, + "{": 1, + "r": 1, + "}": 1, + "plot": 1, + "(": 3, + ")": 3, + "hist": 1, + "rnorm": 1 + }, + "RobotFramework": { + "***": 16, + "Settings": 3, + "Documentation": 3, + "Example": 3, + "test": 6, + "cases": 2, + "using": 4, + "the": 9, + "data": 2, + "-": 16, + "driven": 4, + "testing": 2, + "approach.": 2, + "...": 28, + "Tests": 1, + "use": 2, + "Calculate": 3, + "keyword": 5, + "created": 1, + "in": 5, + "this": 1, + "file": 1, + "that": 5, + "turn": 1, + "uses": 1, + "keywords": 3, + "CalculatorLibrary": 5, + ".": 4, + "An": 1, + "exception": 1, + "is": 6, + "last": 1, + "has": 5, + "a": 4, + "custom": 1, + "_template": 1, + "keyword_.": 1, + "The": 2, + "style": 3, + "works": 3, + "well": 3, + "when": 2, + "you": 1, + "need": 3, + "to": 5, + "repeat": 1, + "same": 1, + "workflow": 3, + "multiple": 2, + "times.": 1, + "Notice": 1, + "one": 1, + "of": 3, + "these": 1, + "tests": 5, + "fails": 1, + "on": 1, + "purpose": 1, + "show": 1, + "how": 1, + "failures": 1, + "look": 1, + "like.": 1, + "Test": 4, + "Template": 2, + "Library": 3, + "Cases": 3, + "Expression": 1, + "Expected": 1, + "Addition": 2, + "+": 6, + "Subtraction": 1, + "Multiplication": 1, + "*": 4, + "Division": 2, + "/": 5, + "Failing": 1, + "Calculation": 3, + "error": 4, + "[": 4, + "]": 4, + "should": 9, + "fail": 2, + "kekkonen": 1, + "Invalid": 2, + "button": 13, + "{": 15, + "EMPTY": 3, + "}": 15, + "expression.": 1, + "by": 3, + "zero.": 1, + "Keywords": 2, + "Arguments": 2, + "expression": 5, + "expected": 4, + "Push": 16, + "buttons": 4, + "C": 4, + "Result": 8, + "be": 9, + "Should": 2, + "cause": 1, + "equal": 1, + "#": 2, + "Using": 1, + "BuiltIn": 1, + "case": 1, + "gherkin": 1, + "syntax.": 1, + "This": 3, + "similar": 1, + "examples.": 1, + "difference": 1, + "higher": 1, + "abstraction": 1, + "level": 1, + "and": 2, + "their": 1, + "arguments": 1, + "are": 1, + "embedded": 1, + "into": 1, + "names.": 1, + "kind": 2, + "_gherkin_": 2, + "syntax": 1, + "been": 3, + "made": 1, + "popular": 1, + "http": 1, + "//cukes.info": 1, + "|": 1, + "Cucumber": 1, + "It": 1, + "especially": 1, + "act": 1, + "as": 1, + "examples": 1, + "easily": 1, + "understood": 1, + "also": 2, + "business": 2, + "people.": 1, + "Given": 1, + "calculator": 1, + "cleared": 2, + "When": 1, + "user": 2, + "types": 2, + "pushes": 2, + "equals": 2, + "Then": 1, + "result": 2, + "Calculator": 1, + "User": 2, + "All": 1, + "contain": 1, + "constructed": 1, + "from": 1, + "Creating": 1, + "new": 1, + "or": 1, + "editing": 1, + "existing": 1, + "easy": 1, + "even": 1, + "for": 2, + "people": 2, + "without": 1, + "programming": 1, + "skills.": 1, + "normal": 1, + "automation.": 1, + "If": 1, + "understand": 1, + "may": 1, + "work": 1, + "better.": 1, + "Simple": 1, + "calculation": 2, + "Longer": 1, + "Clear": 1, + "built": 1, + "variable": 1 }, "Ruby": { + "appraise": 2, + "do": 37, + "gem": 3, + "end": 238, "load": 3, "Dir": 4, "[": 56, @@ -34839,9 +59118,7 @@ "}": 68, "task": 2, "default": 2, - "do": 35, "puts": 12, - "end": 236, "module": 8, "Foo": 1, "require": 58, @@ -35439,7 +59716,6 @@ "For": 1, "use/testing": 1, "no": 1, - "gem": 1, "require_all": 4, "glob": 2, "File.join": 6, @@ -36234,6 +60510,53 @@ "running_threads2": 2, "port2.recv": 1 }, + "SAS": { + "libname": 1, + "source": 1, + "data": 6, + "work.working_copy": 5, + ";": 22, + "set": 3, + "source.original_file.sas7bdat": 1, + "run": 6, + "if": 2, + "Purge": 1, + "then": 2, + "delete": 1, + "ImportantVariable": 1, + ".": 1, + "MissingFlag": 1, + "proc": 2, + "surveyselect": 1, + "work.data": 1, + "out": 2, + "work.boot": 2, + "method": 1, + "urs": 1, + "reps": 1, + "seed": 2, + "sampsize": 1, + "outhits": 1, + "samplingunit": 1, + "Site": 1, + "PROC": 1, + "MI": 1, + "work.bootmi": 2, + "nimpute": 1, + "round": 1, + "By": 2, + "Replicate": 2, + "VAR": 1, + "Variable1": 2, + "Variable2": 2, + "logistic": 1, + "descending": 1, + "_Imputation_": 1, + "model": 1, + "Outcome": 1, + "/": 1, + "risklimits": 1 + }, "Sass": { "blue": 7, "#3bbfce": 2, @@ -36262,29 +60585,29 @@ "exec": 2, "scala": 2, "#": 2, - "object": 2, + "object": 3, "Beers": 1, "extends": 1, "Application": 1, - "{": 10, - "def": 7, + "{": 21, + "def": 10, "bottles": 3, - "(": 34, + "(": 67, "qty": 12, - "Int": 3, + "Int": 11, "f": 4, "String": 5, - ")": 34, - "//": 4, + ")": 67, + "//": 29, "higher": 1, - "-": 4, + "-": 5, "order": 1, "functions": 2, "match": 2, - "case": 5, - "+": 29, + "case": 8, + "+": 49, "x": 3, - "}": 11, + "}": 22, "beers": 3, "sing": 3, "implicit": 3, @@ -36298,9 +60621,9 @@ ".capitalize": 1, "tail": 1, "recursion": 1, - "val": 2, + "val": 6, "headOfSong": 1, - "println": 2, + "println": 8, "parameter": 1, "name": 4, "version": 1, @@ -36327,10 +60650,10 @@ "<+=>": 1, "baseDirectory": 1, "map": 1, - "_": 1, + "_": 2, "input": 1, "add": 2, - "a": 2, + "a": 4, "maven": 2, "style": 2, "repository": 2, @@ -36341,8 +60664,8 @@ "of": 1, "repositories": 1, "define": 1, - "the": 4, - "to": 4, + "the": 5, + "to": 7, "publish": 1, "publishTo": 1, "set": 2, @@ -36380,7 +60703,7 @@ "false": 7, "showSuccess": 1, "timingFormat": 1, - "import": 1, + "import": 9, "java.text.DateFormat": 1, "DateFormat.getDateTimeInstance": 1, "DateFormat.SHORT": 2, @@ -36409,34 +60732,100 @@ "Credentials": 2, "Path.userHome": 1, "/": 2, + "math.random": 1, + "scala.language.postfixOps": 1, + "scala.util._": 1, + "scala.util.": 1, + "Try": 1, + "Success": 2, + "Failure": 2, + "scala.concurrent._": 1, + "duration._": 1, + "ExecutionContext.Implicits.global": 1, + "scala.concurrent.": 1, + "ExecutionContext": 1, + "CanAwait": 1, + "OnCompleteRunnable": 1, + "TimeoutException": 1, + "ExecutionException": 1, + "blocking": 3, + "node11": 1, + "Welcome": 1, + "Scala": 1, + "worksheet": 1, + "retry": 3, + "[": 11, + "T": 8, + "]": 11, + "n": 3, + "block": 8, + "Future": 5, + "ns": 1, + "Iterator": 2, + ".iterator": 1, + "attempts": 1, + "ns.map": 1, + "failed": 2, + "Future.failed": 1, + "new": 1, + "Exception": 2, + "attempts.foldLeft": 1, + "fallbackTo": 1, + "scala.concurrent.Future": 1, + "scala.concurrent.Fut": 1, + "|": 19, + "ure": 1, + "rb": 3, + "i": 9, + "Thread.sleep": 2, + "*random.toInt": 1, + "i.toString": 5, + "ri": 2, + "onComplete": 1, + "s": 1, + "s.toString": 1, + "t": 1, + "t.toString": 1, + "r": 1, + "r.toString": 1, + "Unit": 1, + "toList": 1, + ".foreach": 1, + "Iteration": 5, + "java.lang.Exception": 1, + "Hi": 10, "HelloWorld": 1, "main": 1, "args": 1, - "Array": 1, - "[": 1, - "]": 1 + "Array": 1 + }, + "Scaml": { + "%": 1, + "p": 1, + "Hello": 1, + "World": 1 }, "Scheme": { - "(": 359, + "(": 366, "import": 1, "rnrs": 1, - ")": 373, + ")": 380, "only": 1, "surfage": 4, "s1": 1, "lists": 1, "filter": 4, - "-": 188, + "-": 192, "map": 4, "gl": 12, "glut": 2, "dharmalab": 2, "records": 1, - "define": 27, + "define": 30, "record": 5, "type": 5, "math": 1, - "basic": 1, + "basic": 2, "agave": 4, "glu": 1, "compat": 1, @@ -36456,7 +60845,7 @@ ";": 1684, "utilities": 1, "say": 9, - ".": 1, + ".": 2, "args": 2, "for": 7, "each": 7, @@ -36465,7 +60854,7 @@ "translate": 6, "p": 6, "glTranslated": 1, - "x": 8, + "x": 10, "y": 3, "radians": 8, "/": 7, @@ -36578,7 +60967,7 @@ "when": 5, "<=>": 3, "distance": 3, - "begin": 1, + "begin": 2, "1": 2, "f": 1, "append": 4, @@ -36603,7 +60992,16 @@ "s": 1, "space": 1, "cons": 1, - "glutMainLoop": 1 + "glutMainLoop": 1, + "library": 1, + "libs": 1, + "export": 1, + "list2": 2, + "objs": 2, + "should": 1, + "not": 1, + "be": 1, + "exported": 1 }, "Scilab": { "function": 1, @@ -37395,6 +61793,585 @@ "foodforthought.jpg": 1, "name##*fo": 1 }, + "ShellSession": { + "echo": 2, + "FOOBAR": 2, + "Hello": 2, + "World": 2, + "gem": 4, + "install": 4, + "nokogiri": 6, + "...": 4, + "Building": 2, + "native": 2, + "extensions.": 2, + "This": 4, + "could": 2, + "take": 2, + "a": 4, + "while...": 2, + "checking": 1, + "for": 4, + "libxml/parser.h...": 1, + "***": 2, + "extconf.rb": 1, + "failed": 1, + "Could": 2, + "not": 2, + "create": 1, + "Makefile": 1, + "due": 1, + "to": 3, + "some": 1, + "reason": 2, + "probably": 1, + "lack": 1, + "of": 2, + "necessary": 1, + "libraries": 1, + "and/or": 1, + "headers.": 1, + "Check": 1, + "the": 2, + "mkmf.log": 1, + "file": 1, + "more": 1, + "details.": 1, + "You": 1, + "may": 1, + "need": 1, + "configuration": 1, + "options.": 1, + "brew": 2, + "tap": 2, + "homebrew/dupes": 1, + "Cloning": 1, + "into": 1, + "remote": 3, + "Counting": 1, + "objects": 3, + "done.": 4, + "Compressing": 1, + "%": 5, + "(": 6, + "/591": 1, + ")": 6, + "Total": 1, + "delta": 2, + "reused": 1, + "Receiving": 1, + "/1034": 1, + "KiB": 1, + "|": 1, + "bytes/s": 1, + "Resolving": 1, + "deltas": 1, + "/560": 1, + "Checking": 1, + "connectivity...": 1, + "done": 1, + "Warning": 1, + "homebrew/dupes/lsof": 1, + "over": 1, + "mxcl/master/lsof": 1, + "Tapped": 1, + "formula": 4, + "apple": 1, + "-": 12, + "gcc42": 1, + "Downloading": 1, + "http": 2, + "//r.research.att.com/tools/gcc": 1, + "darwin11.pkg": 1, + "########################################################################": 1, + "Caveats": 1, + "NOTE": 1, + "provides": 1, + "components": 1, + "that": 1, + "were": 1, + "removed": 1, + "from": 3, + "XCode": 2, + "in": 2, + "release.": 1, + "There": 1, + "is": 2, + "no": 1, + "this": 1, + "if": 1, + "you": 1, + "are": 1, + "using": 1, + "version": 1, + "prior": 1, + "contains": 1, + "compilers": 2, + "built": 2, + "Apple": 1, + "s": 1, + "GCC": 1, + "sources": 1, + "build": 1, + "available": 1, + "//opensource.apple.com/tarballs/gcc": 1, + "All": 1, + "have": 1, + "suffix.": 1, + "A": 1, + "GFortran": 1, + "compiler": 1, + "also": 1, + "included.": 1, + "Summary": 1, + "/usr/local/Cellar/apple": 1, + "gcc42/4.2.1": 1, + "files": 1, + "M": 1, + "seconds": 1, + "v": 1, + "Fetching": 1, + "Successfully": 1, + "installed": 2, + "Installing": 2, + "ri": 1, + "documentation": 2, + "RDoc": 1 + }, + "Shen": { + "*": 47, + "graph.shen": 1, + "-": 747, + "a": 30, + "library": 3, + "for": 12, + "graph": 52, + "definition": 1, + "and": 16, + "manipulation": 1, + "Copyright": 2, + "(": 267, + "C": 6, + ")": 250, + "Eric": 2, + "Schulte": 2, + "***": 5, + "License": 2, + "Redistribution": 2, + "use": 2, + "in": 13, + "source": 4, + "binary": 4, + "forms": 2, + "with": 8, + "or": 2, + "without": 2, + "modification": 2, + "are": 7, + "permitted": 2, + "provided": 4, + "that": 3, + "the": 29, + "following": 6, + "conditions": 6, + "met": 2, + "Redistributions": 4, + "of": 20, + "code": 2, + "must": 4, + "retain": 2, + "above": 4, + "copyright": 4, + "notice": 4, + "this": 4, + "list": 32, + "disclaimer.": 2, + "form": 2, + "reproduce": 2, + "disclaimer": 2, + "documentation": 2, + "and/or": 2, + "other": 2, + "materials": 2, + "distribution.": 2, + "THIS": 4, + "SOFTWARE": 4, + "IS": 2, + "PROVIDED": 2, + "BY": 2, + "THE": 10, + "COPYRIGHT": 4, + "HOLDERS": 2, + "AND": 8, + "CONTRIBUTORS": 4, + "ANY": 8, + "EXPRESS": 2, + "OR": 16, + "IMPLIED": 4, + "WARRANTIES": 4, + "INCLUDING": 6, + "BUT": 4, + "NOT": 4, + "LIMITED": 4, + "TO": 4, + "OF": 16, + "MERCHANTABILITY": 2, + "FITNESS": 2, + "FOR": 4, + "A": 32, + "PARTICULAR": 2, + "PURPOSE": 2, + "ARE": 2, + "DISCLAIMED.": 2, + "IN": 6, + "NO": 2, + "EVENT": 2, + "SHALL": 2, + "HOLDER": 2, + "BE": 2, + "LIABLE": 2, + "DIRECT": 2, + "INDIRECT": 2, + "INCIDENTAL": 2, + "SPECIAL": 2, + "EXEMPLARY": 2, + "CONSEQUENTIAL": 2, + "DAMAGES": 2, + "PROCUREMENT": 2, + "SUBSTITUTE": 2, + "GOODS": 2, + "SERVICES": 2, + ";": 12, + "LOSS": 2, + "USE": 4, + "DATA": 2, + "PROFITS": 2, + "BUSINESS": 2, + "INTERRUPTION": 2, + "HOWEVER": 2, + "CAUSED": 2, + "ON": 2, + "THEORY": 2, + "LIABILITY": 4, + "WHETHER": 2, + "CONTRACT": 2, + "STRICT": 2, + "TORT": 2, + "NEGLIGENCE": 2, + "OTHERWISE": 2, + "ARISING": 2, + "WAY": 2, + "OUT": 2, + "EVEN": 2, + "IF": 2, + "ADVISED": 2, + "POSSIBILITY": 2, + "SUCH": 2, + "DAMAGE.": 2, + "Commentary": 2, + "Graphs": 1, + "represented": 1, + "as": 2, + "two": 1, + "dictionaries": 1, + "one": 2, + "vertices": 17, + "edges.": 1, + "It": 1, + "is": 5, + "important": 1, + "to": 16, + "note": 1, + "dictionary": 3, + "implementation": 1, + "used": 2, + "able": 1, + "accept": 1, + "arbitrary": 1, + "data": 17, + "structures": 1, + "keys.": 1, + "This": 1, + "structure": 2, + "technically": 1, + "encodes": 1, + "hypergraphs": 1, + "generalization": 1, + "graphs": 1, + "which": 1, + "each": 1, + "edge": 32, + "may": 1, + "contain": 2, + "any": 1, + "number": 12, + ".": 1, + "Examples": 1, + "regular": 1, + "G": 25, + "hypergraph": 1, + "H": 3, + "corresponding": 1, + "given": 4, + "below.": 1, + "": 3, + "Vertices": 11, + "Edges": 9, + "+": 33, + "Graph": 65, + "hash": 8, + "|": 103, + "key": 9, + "value": 17, + "b": 13, + "c": 11, + "g": 19, + "[": 93, + "]": 91, + "d": 12, + "e": 14, + "f": 10, + "Hypergraph": 1, + "h": 3, + "i": 3, + "j": 2, + "associated": 1, + "edge/vertex": 1, + "@p": 17, + "V": 48, + "#": 4, + "E": 20, + "edges": 17, + "M": 4, + "vertex": 29, + "associations": 1, + "size": 2, + "all": 3, + "stored": 1, + "dict": 39, + "sizeof": 4, + "int": 1, + "indices": 1, + "into": 1, + "&": 1, + "Edge": 11, + "dicts": 3, + "entry": 2, + "storage": 2, + "Vertex": 3, + "Code": 1, + "require": 2, + "sequence": 2, + "datatype": 1, + "dictoinary": 1, + "vector": 4, + "symbol": 1, + "package": 2, + "add": 25, + "has": 5, + "neighbors": 8, + "connected": 21, + "components": 8, + "partition": 7, + "bipartite": 3, + "included": 2, + "from": 3, + "take": 2, + "drop": 2, + "while": 2, + "range": 1, + "flatten": 1, + "filter": 2, + "complement": 1, + "seperate": 1, + "zip": 1, + "indexed": 1, + "reduce": 3, + "mapcon": 3, + "unique": 3, + "frequencies": 1, + "shuffle": 1, + "pick": 1, + "remove": 2, + "first": 2, + "interpose": 1, + "subset": 3, + "cartesian": 1, + "product": 1, + "<-dict>": 5, + "contents": 1, + "keys": 3, + "vals": 1, + "make": 10, + "define": 34, + "X": 4, + "<-address>": 5, + "0": 1, + "create": 1, + "specified": 1, + "sizes": 2, + "}": 22, + "Vertsize": 2, + "Edgesize": 2, + "let": 9, + "absvector": 1, + "do": 8, + "address": 5, + "defmacro": 3, + "macro": 3, + "return": 4, + "taking": 1, + "optional": 1, + "N": 7, + "vert": 12, + "1": 1, + "2": 3, + "{": 15, + "get": 3, + "Value": 3, + "if": 8, + "tuple": 3, + "fst": 3, + "error": 7, + "string": 3, + "resolve": 6, + "Vector": 2, + "Index": 2, + "Place": 6, + "nth": 1, + "<-vector>": 2, + "Vert": 5, + "Val": 5, + "trap": 4, + "snd": 2, + "map": 5, + "lambda": 1, + "w": 4, + "B": 2, + "Data": 2, + "w/o": 5, + "D": 4, + "update": 5, + "an": 3, + "s": 1, + "Vs": 4, + "Store": 6, + "<": 4, + "limit": 2, + "VertLst": 2, + "/.": 4, + "Contents": 5, + "adjoin": 2, + "length": 5, + "EdgeID": 3, + "EdgeLst": 2, + "p": 1, + "boolean": 4, + "Return": 1, + "Already": 5, + "New": 5, + "Reachable": 2, + "difference": 3, + "append": 1, + "including": 1, + "itself": 1, + "fully": 1, + "Acc": 2, + "true": 1, + "_": 1, + "VS": 4, + "Component": 6, + "ES": 3, + "Con": 8, + "verts": 4, + "cons": 1, + "place": 3, + "partitions": 1, + "element": 2, + "simple": 3, + "CS": 3, + "Neighbors": 3, + "empty": 1, + "intersection": 1, + "check": 1, + "tests": 1, + "set": 1, + "chris": 6, + "patton": 2, + "eric": 1, + "nobody": 2, + "fail": 1, + "when": 1, + "wrapper": 1, + "function": 1, + "html.shen": 1, + "html": 2, + "generation": 1, + "functions": 1, + "shen": 1, + "The": 1, + "standard": 1, + "lisp": 1, + "conversion": 1, + "tool": 1, + "suite.": 1, + "Follows": 1, + "some": 1, + "convertions": 1, + "Clojure": 1, + "tasks": 1, + "stuff": 1, + "todo1": 1, + "today": 1, + "attributes": 1, + "AS": 1, + "load": 1, + "JSON": 1, + "Lexer": 1, + "Read": 1, + "stream": 1, + "characters": 4, + "Whitespace": 4, + "not": 1, + "strings": 2, + "should": 2, + "be": 2, + "discarded.": 1, + "preserved": 1, + "Strings": 1, + "can": 1, + "escaped": 1, + "double": 1, + "quotes.": 1, + "e.g.": 2, + "whitespacep": 2, + "ASCII": 2, + "Space.": 1, + "All": 1, + "others": 1, + "whitespace": 7, + "table.": 1, + "Char": 4, + "member": 1, + "replace": 3, + "@s": 4, + "Suffix": 4, + "where": 2, + "Prefix": 2, + "fetch": 1, + "until": 1, + "unescaped": 1, + "doublequote": 1, + "c#34": 5, + "WhitespaceChar": 2, + "Chars": 4, + "strip": 2, + "chars": 2, + "tokenise": 1, + "JSONString": 2, + "CharList": 2, + "explode": 1 + }, "Slash": { "<%>": 1, "class": 11, @@ -37469,128 +62446,1998 @@ "ast.eval": 1, "Env.new": 1 }, - "Standard ML": { - "signature": 2, - "LAZY_BASE": 3, - "sig": 2, - "type": 2, - "a": 18, - "lazy": 12, - "-": 13, - ")": 23, - "end": 6, - "LAZY": 1, - "bool": 4, - "val": 12, - "inject": 3, - "toString": 2, - "(": 22, - "string": 1, - "eq": 2, - "*": 1, - "eqBy": 3, - "compare": 2, - "order": 2, - "map": 2, - "b": 2, - "structure": 6, - "Ops": 2, - "LazyBase": 2, - "struct": 4, - "exception": 1, - "Undefined": 3, - "fun": 9, - "delay": 3, - "f": 9, - "force": 9, - "undefined": 1, - "fn": 3, - "raise": 1, - "LazyMemoBase": 2, - "datatype": 1, - "|": 1, - "Done": 1, - "of": 1, - "unit": 1, - "let": 1, - "open": 1, - "B": 1, - "x": 15, - "isUndefined": 2, - "ignore": 1, - ";": 1, - "false": 1, - "handle": 1, - "true": 1, - "if": 1, - "then": 1, + "Slim": { + "doctype": 1, + "html": 2, + "head": 1, + "title": 1, + "Slim": 2, + "Examples": 1, + "meta": 2, + "name": 2, + "content": 2, + "author": 2, + "javascript": 1, + "alert": 1, + "(": 1, + ")": 1, + "body": 1, + "h1": 1, + "Markup": 1, + "examples": 1, + "#content": 1, + "p": 2, + "This": 1, + "example": 1, + "shows": 1, + "you": 2, + "how": 1, + "a": 1, + "basic": 1, + "file": 1, + "looks": 1, + "like.": 1, + "yield": 1, + "-": 3, + "unless": 1, + "items.empty": 1, + "table": 1, + "for": 1, + "item": 1, + "in": 1, + "items": 2, + "do": 1, + "tr": 1, + "td.name": 1, + "item.name": 1, + "td.price": 1, + "item.price": 1, "else": 1, - "p": 4, - "y": 6, - "op": 1, - "Lazy": 1, - "LazyFn": 2, - "LazyMemo": 1 + "|": 2, + "No": 1, + "found.": 1, + "Please": 1, + "add": 1, + "some": 1, + "inventory.": 1, + "Thank": 1, + "div": 1, + "id": 1, + "render": 1, + "Copyright": 1, + "#": 2, + "{": 2, + "year": 1, + "}": 2 }, - "SuperCollider": { - "BCR2000": 1, - "{": 14, - "var": 2, - "controls": 2, - "controlBuses": 2, - "rangedControlBuses": 2, - "responders": 2, - ";": 32, - "*new": 1, - "super.new.init": 1, - "}": 14, - "init": 1, - "Dictionary.new": 3, - "(": 34, - ")": 34, - "this.createCCResponders": 1, - "createCCResponders": 1, - "Array.fill": 1, - "|": 4, - "i": 5, - "CCResponder": 1, - "src": 3, - "chan": 3, - "num": 3, - "val": 4, + "Smalltalk": { + "Object": 1, + "subclass": 2, + "#Philosophers": 1, + "instanceVariableNames": 1, + "classVariableNames": 1, + "poolDictionaries": 1, + "category": 1, + "Philosophers": 3, + "class": 1, + "methodsFor": 2, + "new": 4, + "self": 25, + "shouldNotImplement": 1, + "quantity": 2, + "super": 1, + "initialize": 3, + "dine": 4, + "seconds": 2, + "(": 19, + "Delay": 3, + "forSeconds": 1, + ")": 19, + "wait.": 5, + "philosophers": 2, + "do": 1, + "[": 18, + "each": 5, + "|": 18, + "terminate": 1, + "]": 18, + ".": 16, + "size": 4, + "leftFork": 6, + "n": 11, + "forks": 5, + "at": 3, + "rightFork": 6, + "ifTrue": 1, + "ifFalse": 1, + "+": 1, + "eating": 3, + "Semaphore": 2, + "new.": 2, + "-": 1, + "timesRepeat": 1, + "signal": 1, + "randy": 3, + "Random": 1, + "to": 2, + "collect": 2, + "forMutualExclusion": 1, + "philosopher": 2, + "philosopherCode": 3, + "status": 8, + "n.": 2, + "printString": 1, + "true": 2, + "whileTrue": 1, + "Transcript": 5, + "nextPutAll": 5, + ";": 8, + "nl.": 5, + "forMilliseconds": 2, + "next": 2, + "*": 2, + "critical": 1, + "signal.": 2, + "newProcess": 1, + "priority": 1, + "Processor": 1, + "userBackgroundPriority": 1, + "name": 1, + "resume": 1, + "yourself": 1, + "Koan": 1, + "TestBasic": 1, + "": 1, + "A": 1, + "collection": 1, + "of": 1, + "introductory": 1, + "tests": 2, + "testDeclarationAndAssignment": 1, + "declaration": 2, + "anotherDeclaration": 2, + "_": 1, + "expect": 10, + "fillMeIn": 10, + "toEqual": 10, + "declaration.": 1, + "anotherDeclaration.": 1, + "testEqualSignIsNotAnAssignmentOperator": 1, + "variableA": 6, + "variableB": 5, + "value": 2, + "variableB.": 2, + "testMultipleStatementsInASingleLine": 1, + "variableC": 2, + "variableA.": 1, + "variableC.": 1, + "testInequality": 1, + "testLogicalOr": 1, + "expression": 4, + "<": 2, + "expression.": 2, + "testLogicalAnd": 1, + "&": 1, + "testNot": 1, + "not.": 1, + "testSimpleChainMatches": 1, + "e": 11, + "eCtrl": 3, + "eventKey": 3, + "e.": 1, + "ctrl": 5, + "true.": 1, + "assert": 2, + "matches": 4, + "{": 4, + "}": 4, + "eCtrl.": 2, + "deny": 2, + "a": 1 + }, + "SourcePawn": { + "//#define": 1, + "DEBUG": 2, + "#if": 1, + "defined": 1, + "#define": 7, + "assert": 2, + "(": 233, + "%": 18, + ")": 234, + "if": 44, + "ThrowError": 2, + ";": 213, + "assert_msg": 2, + "#else": 1, + "#endif": 1, + "#pragma": 1, + "semicolon": 1, + "#include": 3, + "": 1, + "": 1, + "": 1, + "public": 21, + "Plugin": 1, + "myinfo": 1, + "{": 73, + "name": 7, + "author": 1, + "description": 1, + "version": 1, + "SOURCEMOD_VERSION": 1, + "url": 1, + "}": 71, + "new": 62, + "Handle": 51, + "g_Cvar_Winlimit": 5, + "INVALID_HANDLE": 56, + "g_Cvar_Maxrounds": 5, + "g_Cvar_Fraglimit": 6, + "g_Cvar_Bonusroundtime": 6, + "g_Cvar_StartTime": 3, + "g_Cvar_StartRounds": 5, + "g_Cvar_StartFrags": 3, + "g_Cvar_ExtendTimeStep": 2, + "g_Cvar_ExtendRoundStep": 2, + "g_Cvar_ExtendFragStep": 2, + "g_Cvar_ExcludeMaps": 3, + "g_Cvar_IncludeMaps": 2, + "g_Cvar_NoVoteMode": 2, + "g_Cvar_Extend": 2, + "g_Cvar_DontChange": 2, + "g_Cvar_EndOfMapVote": 8, + "g_Cvar_VoteDuration": 3, + "g_Cvar_RunOff": 2, + "g_Cvar_RunOffPercent": 2, + "g_VoteTimer": 7, + "g_RetryTimer": 4, + "g_MapList": 8, + "g_NominateList": 7, + "g_NominateOwners": 7, + "g_OldMapList": 7, + "g_NextMapList": 2, + "g_VoteMenu": 1, + "g_Extends": 2, + "g_TotalRounds": 7, + "bool": 10, + "g_HasVoteStarted": 7, + "g_WaitingForVote": 4, + "g_MapVoteCompleted": 9, + "g_ChangeMapAtRoundEnd": 6, + "g_ChangeMapInProgress": 4, + "g_mapFileSerial": 3, + "-": 12, + "g_NominateCount": 3, + "MapChange": 4, + "g_ChangeTime": 1, + "g_NominationsResetForward": 3, + "g_MapVoteStartedForward": 2, + "MAXTEAMS": 4, + "g_winCount": 4, + "[": 19, + "]": 19, + "VOTE_EXTEND": 1, + "VOTE_DONTCHANGE": 1, + "OnPluginStart": 1, + "LoadTranslations": 2, + "arraySize": 5, + "ByteCountToCells": 1, + "PLATFORM_MAX_PATH": 6, + "CreateArray": 5, + "CreateConVar": 15, + "_": 18, + "true": 26, + "RegAdminCmd": 2, + "Command_Mapvote": 2, + "ADMFLAG_CHANGEMAP": 2, + "Command_SetNextmap": 2, + "FindConVar": 4, + "||": 15, + "decl": 5, + "String": 11, + "folder": 5, + "GetGameFolderName": 1, + "sizeof": 6, + "strcmp": 3, + "HookEvent": 6, + "Event_TeamPlayWinPanel": 3, + "Event_TFRestartRound": 2, + "else": 5, + "Event_RoundEnd": 3, + "Event_PlayerDeath": 2, + "AutoExecConfig": 1, + "//Change": 1, + "the": 5, + "mp_bonusroundtime": 1, + "max": 1, + "so": 1, + "that": 2, + "we": 2, + "have": 2, + "time": 9, + "to": 4, + "display": 2, + "vote": 6, + "//If": 1, + "you": 1, + "a": 1, + "during": 2, + "bonus": 2, + "good": 1, + "defaults": 1, + "are": 1, + "duration": 1, + "and": 1, + "mp_bonustime": 1, + "SetConVarBounds": 1, + "ConVarBound_Upper": 1, + "CreateGlobalForward": 2, + "ET_Ignore": 2, + "Param_String": 1, + "Param_Cell": 1, + "APLRes": 1, + "AskPluginLoad2": 1, + "myself": 1, + "late": 1, + "error": 1, + "err_max": 1, + "RegPluginLibrary": 1, + "CreateNative": 9, + "Native_NominateMap": 1, + "Native_RemoveNominationByMap": 1, + "Native_RemoveNominationByOwner": 1, + "Native_InitiateVote": 1, + "Native_CanVoteStart": 2, + "Native_CheckVoteDone": 2, + "Native_GetExcludeMapList": 2, + "Native_GetNominatedMapList": 2, + "Native_EndOfMapVoteEnabled": 2, + "return": 23, + "APLRes_Success": 1, + "OnConfigsExecuted": 1, + "ReadMapList": 1, + "MAPLIST_FLAG_CLEARARRAY": 1, + "|": 1, + "MAPLIST_FLAG_MAPSFOLDER": 1, + "LogError": 2, + "CreateNextVote": 1, + "SetupTimeleftTimer": 3, + "false": 8, + "ClearArray": 2, + "for": 9, + "i": 13, + "<": 5, + "+": 12, + "&&": 5, + "GetConVarInt": 10, + "GetConVarFloat": 2, + "<=>": 1, + "Warning": 1, + "Bonus": 1, + "Round": 1, + "Time": 2, + "shorter": 1, + "than": 1, + "Vote": 4, + "Votes": 1, + "round": 1, + "may": 1, + "not": 1, + "complete": 1, + "OnMapEnd": 1, + "map": 27, + "GetCurrentMap": 1, + "PushArrayString": 3, + "GetArraySize": 8, + "RemoveFromArray": 3, + "OnClientDisconnect": 1, + "client": 9, + "index": 8, + "FindValueInArray": 1, + "oldmap": 4, + "GetArrayString": 3, + "Call_StartForward": 1, + "Call_PushString": 1, + "Call_PushCell": 1, + "GetArrayCell": 2, + "Call_Finish": 1, + "Action": 3, + "args": 3, + "ReplyToCommand": 2, + "Plugin_Handled": 4, + "GetCmdArg": 1, + "IsMapValid": 1, + "ShowActivity": 1, + "LogAction": 1, + "SetNextMap": 1, + "OnMapTimeLeftChanged": 1, + "GetMapTimeLeft": 1, + "startTime": 4, + "*": 1, + "GetConVarBool": 6, + "InitiateVote": 8, + "MapChange_MapEnd": 6, + "KillTimer": 1, + "//g_VoteTimer": 1, + "CreateTimer": 3, + "float": 2, + "Timer_StartMapVote": 3, + "TIMER_FLAG_NO_MAPCHANGE": 4, + "data": 8, + "CreateDataTimer": 1, + "WritePackCell": 2, + "ResetPack": 1, + "timer": 2, + "Plugin_Stop": 2, + "mapChange": 2, + "ReadPackCell": 2, + "hndl": 2, + "event": 11, + "const": 4, + "dontBroadcast": 4, + "Timer_ChangeMap": 2, + "bluescore": 2, + "GetEventInt": 7, + "redscore": 2, + "StrEqual": 1, + "CheckMaxRounds": 3, + "switch": 1, + "case": 2, + "CheckWinLimit": 4, + "//We": 1, + "need": 2, + "do": 1, + "nothing": 1, + "on": 1, + "winning_team": 1, + "this": 1, + "indicates": 1, + "stalemate.": 1, + "default": 1, + "winner": 9, + "//": 3, + "Nuclear": 1, + "Dawn": 1, + "SetFailState": 1, + "winner_score": 2, + "winlimit": 3, + "roundcount": 2, + "maxrounds": 3, + "fragger": 3, + "GetClientOfUserId": 1, + "GetClientFrags": 1, + "when": 2, + "inputlist": 1, + "IsVoteInProgress": 1, + "Can": 1, + "t": 7, + "be": 1, + "excluded": 1, + "from": 1, + "as": 2, + "they": 1, + "weren": 1, + "nominationsToAdd": 1, + "Change": 2, + "Extend": 2, + "Map": 5, + "Voting": 7, + "next": 5, + "has": 5, + "started.": 1, + "SM": 5, + "Nextmap": 5, + "Started": 1, + "Current": 2, + "Extended": 1, + "finished.": 3, + "The": 1, + "current": 1, + "been": 1, + "extended.": 1, + "Stays": 1, + "was": 3, + "Finished": 1, + "s.": 1, + "Runoff": 2, + "Starting": 2, + "indecisive": 1, + "beginning": 1, + "runoff": 1, + "T": 3, + "Dont": 1, + "because": 1, + "outside": 1, + "request": 1, + "inputarray": 1, + "plugin": 5, + "numParams": 5, + "CanVoteStart": 1, + "array": 3, + "GetNativeCell": 3, + "size": 2, + "maparray": 3, + "ownerarray": 3, + "If": 1, + "optional": 1, + "parameter": 1, + "an": 1, + "owner": 1, + "list": 1, + "passed": 1, + "then": 1, + "fill": 1, + "out": 1, + "well": 1, + "PushArrayCell": 1 + }, + "SQL": { + "IF": 13, + "EXISTS": 12, + "(": 131, + "SELECT": 4, + "*": 3, + "FROM": 1, + "DBO.SYSOBJECTS": 1, + "WHERE": 1, + "ID": 2, + "OBJECT_ID": 1, + "N": 7, + ")": 131, + "AND": 1, + "OBJECTPROPERTY": 1, + "id": 22, + "DROP": 3, + "PROCEDURE": 1, + "dbo.AvailableInSearchSel": 2, + "GO": 4, + "CREATE": 10, + "Procedure": 1, + "AvailableInSearchSel": 1, + "AS": 1, + "UNION": 2, + "ALL": 2, + "DB_NAME": 1, + "BEGIN": 1, + "GRANT": 1, + "EXECUTE": 1, + "ON": 1, + "TO": 1, + "[": 1, + "rv": 1, + "]": 1, + "END": 1, + "SHOW": 2, + "WARNINGS": 2, + ";": 31, + "-": 496, + "Table": 9, + "structure": 9, + "for": 15, + "table": 17, + "articles": 4, + "TABLE": 10, + "NOT": 46, + "int": 28, + "NULL": 91, + "AUTO_INCREMENT": 9, + "title": 4, + "varchar": 22, + "DEFAULT": 22, + "content": 2, + "longtext": 1, + "date_posted": 4, + "datetime": 10, + "created_by": 2, + "last_modified": 2, + "last_modified_by": 2, + "ordering": 2, + "is_published": 2, + "PRIMARY": 9, + "KEY": 13, + "Dumping": 6, + "data": 6, + "INSERT": 6, + "INTO": 6, + "VALUES": 6, + "challenges": 4, + "pkg_name": 2, + "description": 2, + "text": 1, + "author": 2, + "category": 2, + "visibility": 2, + "publish": 2, + "abstract": 2, + "level": 2, + "duration": 2, + "goal": 2, + "solution": 2, + "availability": 2, + "default_points": 2, + "default_duration": 2, + "challenge_attempts": 2, + "user_id": 8, + "challenge_id": 7, + "time": 1, + "status": 1, + "challenge_attempt_count": 2, + "tries": 1, + "UNIQUE": 4, + "classes": 4, + "name": 3, + "date_created": 6, + "archive": 2, + "class_challenges": 4, + "class_id": 5, + "class_memberships": 4, + "users": 4, + "username": 3, + "full_name": 2, + "email": 2, + "password": 2, + "joined": 2, + "last_visit": 2, + "is_activated": 2, + "type": 3, + "token": 3, + "user_has_challenge_token": 3, + "create": 2, + "FILIAL": 10, + "NUMBER": 1, + "not": 5, + "null": 4, + "title_ua": 1, + "VARCHAR2": 4, + "title_ru": 1, + "title_eng": 1, + "remove_date": 1, + "DATE": 2, + "modify_date": 1, + "modify_user": 1, + "alter": 1, + "add": 1, + "constraint": 1, + "PK_ID": 1, + "primary": 1, + "key": 1, + "grant": 8, + "select": 10, + "on": 8, + "to": 8, + "ATOLL": 1, + "CRAMER2GIS": 1, + "DMS": 1, + "HPSM2GIS": 1, + "PLANMONITOR": 1, + "SIEBEL": 1, + "VBIS": 1, + "VPORTAL": 1, + "if": 1, + "exists": 1, + "from": 2, + "sysobjects": 1, + "where": 2, + "and": 1, + "in": 1, + "exec": 1, + "%": 2, + "object_ddl": 1, + "go": 1, + "use": 1, + "translog": 1, + "VIEW": 1, + "suspendedtoday": 2, + "view": 1, + "as": 1, + "suspended": 1, + "datediff": 1, + "now": 1 + }, + "Squirrel": { + "//example": 1, + "from": 1, + "http": 1, + "//www.squirrel": 1, + "-": 1, + "lang.org/#documentation": 1, + "local": 3, + "table": 1, + "{": 10, + "a": 2, + "subtable": 1, + "array": 3, "[": 3, "]": 3, - ".postln": 1, - "controls.put": 1, - "+": 4, - "controlBuses.put": 1, - "Bus.control": 1, - "Server.default": 1, - "controlBuses.at": 2, - ".value": 1, - "/": 2, - "nil": 4, - "//": 4, - "value": 1, - "at": 1, - "arg": 4, - "controlNum": 6, - "controls.at": 2, - "scalarAt": 1, - "busAt": 1, + "}": 10, + "+": 2, + "b": 1, + ";": 15, + "foreach": 1, + "(": 10, + "i": 1, + "val": 2, + "in": 1, + ")": 10, + "print": 2, + "typeof": 1, + "/////////////////////////////////////////////": 1, + "class": 2, + "Entity": 3, + "constructor": 2, + "etype": 2, + "entityname": 4, + "name": 2, + "type": 2, + "x": 2, + "y": 2, + "z": 2, + "null": 2, + "function": 2, + "MoveTo": 1, + "newx": 2, + "newy": 2, + "newz": 2, + "Player": 2, + "extends": 1, + "base.constructor": 1, + "DoDomething": 1, + "newplayer": 1, + "newplayer.MoveTo": 1 + }, + "Standard ML": { + "structure": 15, + "LazyBase": 4, + "LAZY_BASE": 5, + "struct": 13, + "type": 6, + "a": 78, + "exception": 2, + "Undefined": 6, + "fun": 60, + "delay": 6, + "f": 46, + "force": 18, + "(": 840, + ")": 845, + "val": 147, + "undefined": 2, + "fn": 127, + "raise": 6, + "end": 55, + "LazyMemoBase": 4, + "datatype": 29, + "|": 226, + "Done": 2, + "of": 91, + "lazy": 13, + "unit": 7, + "-": 20, + "let": 44, + "open": 9, + "B": 2, + "inject": 5, + "x": 74, + "isUndefined": 4, + "ignore": 3, + ";": 21, + "false": 32, + "handle": 4, + "true": 36, + "toString": 4, + "if": 51, + "then": 51, + "else": 51, + "eqBy": 5, + "p": 10, + "y": 50, + "eq": 3, + "op": 2, + "compare": 8, + "Ops": 3, + "map": 3, + "Lazy": 2, + "LazyFn": 4, + "LazyMemo": 2, + "signature": 2, + "sig": 2, + "LAZY": 1, + "bool": 9, + "string": 14, + "*": 9, + "order": 2, + "b": 58, + "functor": 2, + "Main": 1, + "S": 2, + "MAIN_STRUCTS": 1, + "MAIN": 1, + "Compile": 3, + "Place": 1, + "t": 23, + "Files": 3, + "Generated": 4, + "MLB": 4, + "O": 4, + "OUT": 3, + "SML": 6, + "TypeCheck": 3, + "toInt": 1, + "int": 1, + "OptPred": 1, + "Target": 1, + "Yes": 1, + "Show": 1, + "Anns": 1, + "PathMap": 1, + "gcc": 5, + "ref": 45, + "arScript": 3, + "asOpts": 6, + "{": 79, + "opt": 34, + "pred": 15, + "OptPred.t": 3, + "}": 79, + "list": 10, + "[": 104, + "]": 108, + "ccOpts": 6, + "linkOpts": 6, + "buildConstants": 2, + "debugRuntime": 3, + "debugFormat": 5, + "Dwarf": 3, + "DwarfPlus": 3, + "Dwarf2": 3, + "Stabs": 3, + "StabsPlus": 3, + "option": 6, + "NONE": 47, + "expert": 3, + "explicitAlign": 3, + "Control.align": 1, + "explicitChunk": 2, + "Control.chunk": 1, + "explicitCodegen": 5, + "Native": 5, + "Explicit": 5, + "Control.codegen": 3, + "keepGenerated": 3, + "keepO": 3, + "output": 16, + "profileSet": 3, + "profileTimeSet": 3, + "runtimeArgs": 3, + "show": 2, + "Show.t": 1, + "stop": 10, + "Place.OUT": 1, + "parseMlbPathVar": 3, + "line": 9, + "String.t": 1, + "case": 83, + "String.tokens": 7, + "Char.isSpace": 8, + "var": 3, + "path": 7, + "SOME": 68, + "_": 83, + "readMlbPathMap": 2, + "file": 14, + "File.t": 12, + "not": 1, + "File.canRead": 1, + "Error.bug": 14, + "concat": 52, + "List.keepAllMap": 4, + "File.lines": 2, + "String.forall": 4, + "v": 4, + "targetMap": 5, + "arch": 11, + "MLton.Platform.Arch.t": 3, + "os": 13, + "MLton.Platform.OS.t": 3, + "target": 28, + "Promise.lazy": 1, + "targetsDir": 5, + "OS.Path.mkAbsolute": 4, + "relativeTo": 4, + "Control.libDir": 1, + "potentialTargets": 2, + "Dir.lsDirs": 1, + "targetDir": 5, + "osFile": 2, + "OS.Path.joinDirFile": 3, + "dir": 4, + "archFile": 2, + "File.contents": 2, + "List.first": 2, + "MLton.Platform.OS.fromString": 1, + "MLton.Platform.Arch.fromString": 1, + "in": 40, + "setTargetType": 3, + "usage": 48, + "List.peek": 7, + "...": 23, + "Control": 3, + "Target.arch": 2, + "Target.os": 2, + "hasCodegen": 8, + "cg": 21, + "z": 73, + "Control.Target.arch": 4, + "Control.Target.os": 2, + "Control.Format.t": 1, + "AMD64": 2, + "x86Codegen": 9, + "X86": 3, + "amd64Codegen": 8, + "<": 3, + "Darwin": 6, + "orelse": 7, + "Control.format": 3, + "Executable": 5, + "Archive": 4, + "hasNativeCodegen": 2, + "defaultAlignIs8": 3, + "Alpha": 1, + "ARM": 1, + "HPPA": 1, + "IA64": 1, + "MIPS": 1, + "Sparc": 1, + "S390": 1, + "makeOptions": 3, + "s": 168, + "Fail": 2, + "reportAnnotation": 4, + "flag": 12, + "e": 18, + "Control.Elaborate.Bad": 1, + "Control.Elaborate.Deprecated": 1, + "ids": 2, + "Control.warnDeprecated": 1, + "Out.output": 2, + "Out.error": 3, + "List.toString": 1, + "Control.Elaborate.Id.name": 1, + "Control.Elaborate.Good": 1, + "Control.Elaborate.Other": 1, + "Popt": 1, + "tokenizeOpt": 4, + "opts": 4, + "List.foreach": 5, + "tokenizeTargetOpt": 4, + "List.map": 3, + "Normal": 29, + "SpaceString": 48, + "Align4": 2, + "Align8": 2, + "Expert": 72, + "o": 8, + "List.push": 22, + "OptPred.Yes": 6, + "boolRef": 20, + "ChunkPerFunc": 1, + "OneChunk": 1, + "String.hasPrefix": 2, + "prefix": 3, + "String.dropPrefix": 1, + "Char.isDigit": 3, + "Int.fromString": 4, + "n": 4, + "Coalesce": 1, + "limit": 1, + "Bool": 10, + "closureConvertGlobalize": 1, + "closureConvertShrink": 1, + "String.concatWith": 2, + "Control.Codegen.all": 2, + "Control.Codegen.toString": 2, + "name": 7, + "value": 4, + "Compile.setCommandLineConstant": 2, + "contifyIntoMain": 1, + "debug": 4, + "Control.Elaborate.processDefault": 1, + "Control.defaultChar": 1, + "Control.defaultInt": 5, + "Control.defaultReal": 2, + "Control.defaultWideChar": 2, + "Control.defaultWord": 4, + "Regexp.fromString": 7, + "re": 34, + "Regexp.compileDFA": 4, + "diagPasses": 1, + "Control.Elaborate.processEnabled": 2, + "dropPasses": 1, + "intRef": 8, + "errorThreshhold": 1, + "emitMain": 1, + "exportHeader": 3, + "Control.Format.all": 2, + "Control.Format.toString": 2, + "gcCheck": 1, + "Limit": 1, + "First": 1, + "Every": 1, + "Native.IEEEFP": 1, + "indentation": 1, + "Int": 8, + "i": 8, + "inlineNonRec": 6, + "small": 19, + "product": 19, + "#product": 1, + "inlineIntoMain": 1, + "loops": 18, + "inlineLeafA": 6, + "repeat": 18, + "size": 19, + "inlineLeafB": 6, + "keepCoreML": 1, + "keepDot": 1, + "keepMachine": 1, + "keepRSSA": 1, + "keepSSA": 1, + "keepSSA2": 1, + "keepSXML": 1, + "keepXML": 1, + "keepPasses": 1, + "libname": 9, + "loopPasses": 1, + "Int.toString": 3, + "markCards": 1, + "maxFunctionSize": 1, + "mlbPathVars": 4, + "@": 3, + "Native.commented": 1, + "Native.copyProp": 1, + "Native.cutoff": 1, + "Native.liveTransfer": 1, + "Native.liveStack": 1, + "Native.moveHoist": 1, + "Native.optimize": 1, + "Native.split": 1, + "Native.shuffle": 1, + "err": 1, + "optimizationPasses": 1, + "il": 10, + "set": 10, + "Result.Yes": 6, + "Result.No": 5, + "polyvariance": 9, + "hofo": 12, + "rounds": 12, + "preferAbsPaths": 1, + "profPasses": 1, + "profile": 6, + "ProfileNone": 2, + "ProfileAlloc": 1, + "ProfileCallStack": 3, + "ProfileCount": 1, + "ProfileDrop": 1, + "ProfileLabel": 1, + "ProfileTimeLabel": 4, + "ProfileTimeField": 2, + "profileBranch": 1, + "Regexp": 3, + "seq": 3, + "anys": 6, + "compileDFA": 3, + "profileC": 1, + "profileInclExcl": 2, + "profileIL": 3, + "ProfileSource": 1, + "ProfileSSA": 1, + "ProfileSSA2": 1, + "profileRaise": 2, + "profileStack": 1, + "profileVal": 1, + "Show.Anns": 1, + "Show.PathMap": 1, + "showBasis": 1, + "showDefUse": 1, + "showTypes": 1, + "Control.optimizationPasses": 4, + "String.equals": 4, + "Place.Files": 2, + "Place.Generated": 2, + "Place.O": 3, + "Place.TypeCheck": 1, + "#target": 2, + "Self": 2, + "Cross": 2, + "SpaceString2": 6, + "OptPred.Target": 6, + "#1": 1, + "trace": 4, + "#2": 2, + "typeCheck": 1, + "verbosity": 4, + "Silent": 3, + "Top": 5, + "Pass": 1, + "Detail": 1, + "warnAnn": 1, + "warnDeprecated": 1, + "zoneCutDepth": 1, + "style": 6, + "arg": 3, + "desc": 3, + "mainUsage": 3, + "parse": 2, + "Popt.makeUsage": 1, + "showExpert": 1, + "commandLine": 5, + "args": 8, + "lib": 2, + "libDir": 2, + "OS.Path.mkCanonical": 1, + "result": 1, + "targetStr": 3, + "libTargetDir": 1, + "targetArch": 4, + "archStr": 1, + "String.toLower": 2, + "MLton.Platform.Arch.toString": 2, + "targetOS": 5, + "OSStr": 2, + "MLton.Platform.OS.toString": 1, + "positionIndependent": 3, + "format": 7, + "MinGW": 4, + "Cygwin": 4, + "Library": 6, + "LibArchive": 3, + "Control.positionIndependent": 1, + "align": 1, + "codegen": 4, + "CCodegen": 1, + "MLton.Rusage.measureGC": 1, + "exnHistory": 1, + "Bool.toString": 1, + "Control.profile": 1, + "Control.ProfileCallStack": 1, + "sizeMap": 1, + "Control.libTargetDir": 1, + "ty": 4, + "Bytes.toBits": 1, + "Bytes.fromInt": 1, + "lookup": 4, + "use": 2, + "on": 1, + "must": 1, + "x86": 1, + "with": 1, + "ieee": 1, + "fp": 1, + "can": 1, + "No": 1, + "Out.standard": 1, + "input": 22, + "rest": 3, + "inputFile": 1, + "File.base": 5, + "File.fileOf": 1, + "start": 6, + "base": 3, + "rec": 1, + "loop": 3, + "suf": 14, + "hasNum": 2, + "sufs": 2, + "String.hasSuffix": 2, + "suffix": 8, + "Place.t": 1, + "List.exists": 1, + "File.withIn": 1, + "csoFiles": 1, + "Place.compare": 1, + "GREATER": 5, + "Place.toString": 2, + "EQUAL": 5, + "LESS": 5, + "printVersion": 1, + "tempFiles": 3, + "tmpDir": 2, + "tmpVar": 2, + "default": 2, + "MLton.Platform.OS.host": 2, + "Process.getEnv": 1, + "d": 32, + "temp": 3, + "out": 9, + "File.temp": 1, + "OS.Path.concat": 1, + "Out.close": 2, + "maybeOut": 10, + "maybeOutBase": 4, + "File.extension": 3, + "outputBase": 2, + "ext": 1, + "OS.Path.splitBaseExt": 1, + "defLibname": 6, + "OS.Path.splitDirFile": 1, + "String.extract": 1, + "toAlNum": 2, + "c": 42, + "Char.isAlphaNum": 1, + "#": 3, + "CharVector.map": 1, + "atMLtons": 1, + "Vector.fromList": 1, + "tokenize": 1, + "rev": 2, + "gccDebug": 3, + "asDebug": 2, + "compileO": 3, + "inputs": 7, + "libOpts": 2, + "System.system": 4, + "List.concat": 4, + "linkArchives": 1, + "String.contains": 1, + "File.move": 1, + "from": 1, + "to": 1, + "mkOutputO": 3, + "Counter.t": 3, + "File.dirOf": 2, + "Counter.next": 1, + "compileC": 2, + "debugSwitches": 2, + "compileS": 2, + "compileCSO": 1, + "List.forall": 1, + "Counter.new": 1, + "oFiles": 2, + "List.fold": 1, + "ac": 4, + "extension": 6, + "Option.toString": 1, + "mkCompileSrc": 1, + "listFiles": 2, + "elaborate": 1, + "compile": 2, + "outputs": 2, + "r": 3, + "make": 1, + "Int.inc": 1, + "Out.openOut": 1, + "print": 4, + "outputHeader": 2, + "done": 3, + "Control.No": 1, + "l": 2, + "Layout.output": 1, + "Out.newline": 1, + "Vector.foreach": 1, + "String.translate": 1, + "/": 1, + "Type": 1, + "Check": 1, + ".c": 1, + ".s": 1, + "invalid": 1, + "MLton": 1, + "Exn.finally": 1, + "File.remove": 1, + "doit": 1, + "Process.makeCommandLine": 1, + "main": 1, + "mainWrapped": 1, + "OS.Process.exit": 1, + "CommandLine.arguments": 1, + "RedBlackTree": 1, + "key": 16, + "entry": 12, + "dict": 17, + "Empty": 15, + "Red": 41, + "local": 1, + "lk": 4, + "tree": 4, + "and": 2, + "zipper": 3, + "TOP": 5, + "LEFTB": 10, + "RIGHTB": 10, + "delete": 3, + "zip": 19, + "Black": 40, + "LEFTR": 8, + "RIGHTR": 9, + "bbZip": 28, + "w": 17, + "delMin": 8, + "Match": 1, + "joinRed": 3, + "needB": 2, + "del": 8, + "NotFound": 2, + "entry1": 16, + "as": 7, + "key1": 8, + "datum1": 4, + "joinBlack": 1, + "insertShadow": 3, + "datum": 1, + "oldEntry": 7, + "ins": 8, + "left": 10, + "right": 10, + "restore_left": 1, + "restore_right": 1, + "app": 3, + "ap": 7, + "new": 1, + "insert": 2, + "table": 14, + "clear": 1 + }, + "Stata": { + "local": 6, + "inname": 1, + "outname": 1, + "program": 2, + "hello": 1, + "vers": 1, + "display": 1, + "end": 4, + "{": 441, + "*": 25, + "version": 2, + "mar2014": 1, + "}": 440, + "...": 30, + "Hello": 1, + "world": 1, + "p_end": 47, + "MAXDIM": 1, + "smcl": 1, + "Matthew": 2, + "White": 2, + "jan2014": 1, + "title": 7, + "Title": 1, + "phang": 4, + "cmd": 111, + "odkmeta": 17, + "hline": 1, + "Create": 4, + "a": 30, + "do": 22, + "-": 42, + "file": 18, + "to": 23, + "import": 9, + "ODK": 6, + "data": 4, + "marker": 10, + "syntax": 1, + "Syntax": 1, + "p": 2, + "using": 10, + "it": 61, + "help": 27, + "filename": 3, + "opt": 25, + "csv": 9, + "(": 60, + "csvfile": 3, + ")": 61, + "Using": 7, + "histogram": 2, + "as": 29, + "template.": 8, + "notwithstanding": 1, + "is": 31, + "rarely": 1, + "preceded": 3, + "by": 7, + "an": 6, + "underscore.": 1, + "cmdab": 5, + "s": 10, + "urvey": 2, + "surveyfile": 5, + "odkmeta##surveyopts": 2, + "surveyopts": 4, + "cho": 2, + "ices": 2, + "choicesfile": 4, + "odkmeta##choicesopts": 2, + "choicesopts": 5, + "[": 6, + "options": 1, + "]": 6, + "odbc": 2, + "the": 67, + "position": 1, + "of": 36, + "last": 1, + "character": 1, + "in": 24, + "first": 2, + "column": 18, + "+": 2, + "synoptset": 5, + "tabbed": 4, + "synopthdr": 4, + "synoptline": 8, + "syntab": 6, + "Main": 3, + "heckman": 2, + "p2coldent": 3, + "name": 20, + ".csv": 2, + "that": 21, + "contains": 3, + "metadata": 5, + "from": 6, + "survey": 14, + "worksheet": 5, + "choices": 10, + "Fields": 2, + "synopt": 16, + "drop": 1, + "attrib": 2, + "headers": 8, + "not": 8, + "field": 25, + "attributes": 10, + "with": 10, + "keep": 1, + "only": 3, + "rel": 1, + "ax": 1, + "ignore": 1, + "fields": 7, + "exist": 1, + "Lists": 1, + "ca": 1, + "oth": 1, + "er": 1, + "odkmeta##other": 1, + "other": 14, + "Stata": 5, + "value": 14, + "values": 3, + "select": 6, + "or_other": 5, + ";": 15, + "default": 8, + "max": 2, + "one": 5, + "line": 4, + "write": 1, + "each": 7, + "list": 13, + "on": 7, + "single": 1, + "Options": 1, + "replace": 7, + "overwrite": 1, + "existing": 1, + "p2colreset": 4, + "and": 18, + "are": 13, + "required.": 1, + "Change": 1, + "t": 2, + "ype": 1, + "header": 15, + "type": 7, + "attribute": 10, + "la": 2, + "bel": 2, + "label": 9, + "d": 1, + "isabled": 1, + "disabled": 4, + "li": 1, + "stname": 1, + "list_name": 6, + "maximum": 3, + "plus": 2, + "min": 2, + "minimum": 2, + "minus": 1, + "#": 6, + "constant": 2, + "for": 13, + "all": 3, + "labels": 8, + "description": 1, + "Description": 1, + "pstd": 20, + "creates": 1, + "worksheets": 1, + "XLSForm.": 1, + "The": 9, + "saved": 1, + "completes": 2, + "following": 1, + "tasks": 3, + "order": 1, + "anova": 1, + "phang2": 23, + "o": 12, + "Import": 2, + "lists": 2, + "Add": 1, + "char": 4, + "characteristics": 4, + "Split": 1, + "select_multiple": 6, + "variables": 8, + "Drop": 1, + "note": 1, + "format": 1, + "Format": 1, + "date": 1, + "time": 1, + "datetime": 1, + "Attach": 2, + "variable": 14, + "notes": 1, + "merge": 3, + "Merge": 1, + "repeat": 6, + "groups": 4, + "After": 1, + "have": 2, + "been": 1, + "split": 4, + "can": 1, + "be": 12, + "removed": 1, + "without": 2, + "affecting": 1, + "tasks.": 1, + "User": 1, + "written": 2, + "supplements": 1, + "may": 2, + "make": 1, + "use": 3, + "any": 3, + "which": 6, + "imported": 4, + "characteristics.": 1, + "remarks": 1, + "Remarks": 1, + "uses": 3, + "helpb": 7, + "insheet": 4, + "data.": 1, + "long": 7, + "strings": 1, + "digits": 1, + "such": 2, + "simserial": 1, + "will": 9, + "numeric": 4, + "even": 1, + "if": 10, + "they": 2, + "more": 1, + "than": 3, + "digits.": 1, + "As": 1, + "result": 6, + "lose": 1, + "precision": 1, + ".": 22, + "makes": 1, + "limited": 1, + "mata": 1, + "Mata": 1, + "manage": 1, + "contain": 1, + "difficult": 1, + "characters.": 2, + "starts": 1, + "definitions": 1, + "several": 1, + "macros": 1, + "these": 4, + "constants": 1, + "uses.": 1, + "For": 4, + "instance": 1, + "macro": 1, + "datemask": 1, + "varname": 1, + "constraints": 1, + "names": 16, + "Further": 1, + "files": 1, + "often": 1, + "much": 1, + "longer": 1, + "length": 3, + "limit": 1, + "These": 2, + "differences": 1, + "convention": 1, + "lead": 1, + "three": 1, + "kinds": 1, + "problematic": 1, + "Long": 3, + "involve": 1, + "invalid": 1, + "combination": 1, + "characters": 3, + "example": 2, + "begins": 1, + "colon": 1, + "followed": 1, + "number.": 1, + "convert": 2, + "instead": 1, + "naming": 1, + "v": 6, + "concatenated": 1, + "positive": 1, + "integer": 1, + "v1": 1, + "unique": 1, + "but": 4, + "when": 1, + "converted": 3, + "truncated": 1, + "become": 3, + "duplicates.": 1, + "again": 1, + "names.": 6, + "form": 1, + "duplicates": 1, + "cannot": 2, + "chooses": 1, + "different": 1, + "Because": 1, + "problem": 2, + "recommended": 1, + "you": 1, + "If": 2, + "its": 3, + "characteristic": 2, + "odkmeta##Odk_bad_name": 1, + "Odk_bad_name": 3, + "otherwise": 1, + "Most": 1, + "depend": 1, + "There": 1, + "two": 2, + "exceptions": 1, + "variables.": 1, + "error": 4, + "has": 6, + "or": 7, + "splitting": 2, + "would": 1, + "duplicate": 4, + "reshape": 2, + "groups.": 1, + "there": 2, + "merging": 2, + "code": 1, + "datasets.": 1, + "Where": 1, + "renaming": 2, + "left": 1, + "user.": 1, + "section": 2, + "designated": 2, + "area": 2, + "renaming.": 3, + "In": 3, + "reshaping": 1, + "group": 4, + "own": 2, + "Many": 1, + "forms": 2, + "require": 1, + "others": 1, + "few": 1, + "need": 1, + "renamed": 1, + "should": 1, + "go": 1, + "areas.": 1, + "However": 1, + "some": 1, + "usually": 1, + "because": 1, + "many": 2, + "nested": 2, + "above": 1, + "this": 1, + "case": 1, + "work": 1, + "best": 1, + "Odk_group": 1, + "Odk_name": 1, + "Odk_is_other": 2, + "Odk_geopoint": 2, + "r": 2, + "varlist": 2, + "Odk_list_name": 2, + "foreach": 1, + "var": 5, + "*search": 1, + "n/a": 1, + "know": 1, + "don": 1, + "worksheet.": 1, + "requires": 1, + "comma": 1, + "separated": 2, + "text": 1, + "file.": 1, + "Strings": 1, + "embedded": 2, + "commas": 1, + "double": 3, + "quotes": 3, + "must": 2, + "enclosed": 1, + "another": 1, + "quote.": 1, + "pmore": 5, + "Each": 1, + "header.": 1, + "Use": 1, + "suboptions": 1, + "specify": 1, + "alternative": 1, + "respectively.": 1, + "All": 1, + "used.": 1, + "standardized": 1, + "follows": 1, + "replaced": 9, + "select_one": 3, + "begin_group": 1, + "begin": 2, + "end_group": 1, + "begin_repeat": 1, + "end_repeat": 1, + "addition": 1, + "specified": 1, + "attaches": 1, + "pmore2": 3, + "formed": 1, + "concatenating": 1, + "elements": 1, + "Odk_repeat": 1, + "nested.": 1, + "geopoint": 2, + "component": 1, + "Latitude": 1, + "Longitude": 1, + "Altitude": 1, + "Accuracy": 1, + "blank.": 1, + "imports": 4, + "XLSForm": 1, + "list.": 1, + "one.": 1, + "specifies": 4, + "vary": 1, + "definition": 1, + "rather": 1, + "multiple": 1, + "delimit": 1, + "#delimit": 1, + "dlgtab": 1, + "Other": 1, + "already": 2, + "exists.": 1, + "examples": 1, + "Examples": 1, + "named": 1, + "import.do": 7, + "including": 1, + "survey.csv": 1, + "choices.csv": 1, + "txt": 6, + "Same": 3, + "previous": 3, + "command": 3, + "appears": 2, + "fieldname": 3, + "survey_fieldname.csv": 1, + "valuename": 2, + "choices_valuename.csv": 1, + "except": 1, + "hint": 2, + "dropattrib": 2, + "does": 1, + "_all": 1, + "acknowledgements": 1, + "Acknowledgements": 1, + "Lindsey": 1, + "Shaughnessy": 1, + "Innovations": 2, + "Poverty": 2, + "Action": 2, + "assisted": 1, + "almost": 1, + "aspects": 1, + "development.": 1, + "She": 1, + "collaborated": 1, + "structure": 1, + "was": 1, + "very": 1, + "helpful": 1, + "tester": 1, + "contributed": 1, + "information": 1, + "about": 1, + "ODK.": 1, + "author": 1, + "Author": 1, + "mwhite@poverty": 1, + "action.org": 1, + "Setup": 1, + "sysuse": 1, + "auto": 1, + "Fit": 2, + "linear": 2, + "regression": 2, + "regress": 5, + "mpg": 1, + "weight": 4, + "foreign": 2, + "better": 1, + "physics": 1, + "standpoint": 1, + "gen": 1, + "gp100m": 2, + "/mpg": 1, + "Obtain": 1, + "beta": 2, + "coefficients": 1, + "refitting": 1, + "model": 1, + "Suppress": 1, + "intercept": 1, + "term": 1, + "noconstant": 1, + "Model": 1, + "bn.foreign": 1, + "hascons": 1, + "matrix": 3, + "tanh": 1, + "u": 3, + "eu": 4, + "emu": 4, + "exp": 2, + "return": 1, + "/": 1 + }, + "STON": { + "[": 11, + "]": 11, + "{": 15, + "#a": 1, + "#b": 1, + "}": 15, + "Rectangle": 1, + "#origin": 1, + "Point": 2, + "-": 2, + "#corner": 1, + "TestDomainObject": 1, + "#created": 1, + "DateAndTime": 2, + "#modified": 1, + "#integer": 1, + "#float": 1, + "#description": 1, + "#color": 1, + "#green": 1, + "#tags": 1, + "#two": 1, + "#beta": 1, + "#medium": 1, + "#bytes": 1, + "ByteArray": 1, + "#boolean": 1, + "false": 1, + "ZnResponse": 1, + "#headers": 2, + "ZnHeaders": 1, + "ZnMultiValueDictionary": 1, + "#entity": 1, + "ZnStringEntity": 1, + "#contentType": 1, + "ZnMimeType": 1, + "#main": 1, + "#sub": 1, + "#parameters": 1, + "#contentLength": 1, + "#string": 1, + "#encoder": 1, + "ZnUTF8Encoder": 1, + "#statusLine": 1, + "ZnStatusLine": 1, + "#version": 1, + "#code": 1, + "#reason": 1 + }, + "Stylus": { + "border": 6, + "-": 10, + "radius": 5, + "(": 1, + ")": 1, + "webkit": 1, + "arguments": 3, + "moz": 1, + "a.button": 1, + "px": 5, + "fonts": 2, + "helvetica": 1, + "arial": 1, + "sans": 1, + "serif": 1, + "body": 1, + "{": 1, + "padding": 3, + ";": 2, + "font": 1, + "px/1.4": 1, + "}": 1, + "form": 2, + "input": 2, + "[": 2, + "type": 2, + "text": 2, + "]": 2, + "solid": 1, + "#eee": 1, + "color": 2, + "#ddd": 1, + "textarea": 1, + "@extends": 2, + "foo": 2, + "#FFF": 1, + ".bar": 1, + "background": 1, + "#000": 1 + }, + "SuperCollider": { "//boot": 1, "server": 1, "s.boot": 1, + ";": 18, + "(": 22, "SynthDef": 1, + "{": 5, + "var": 1, "sig": 7, "resfreq": 3, "Saw.ar": 1, + ")": 22, "SinOsc.kr": 1, "*": 3, + "+": 1, "RLPF.ar": 1, "Out.ar": 1, + "}": 5, ".play": 2, "do": 2, + "arg": 1, + "i": 1, "Pan2.ar": 1, "SinOsc.ar": 1, "exprand": 1, @@ -37607,6 +64454,8 @@ "a.test.plot": 1, "b.test.plot": 1, "Env": 1, + "[": 2, + "]": 2, ".plot": 2, "e": 1, "Env.sine.asStream": 1, @@ -37614,48 +64463,919 @@ "wait": 1, ".fork": 1 }, + "Swift": { + "let": 43, + "apples": 1, + "oranges": 1, + "appleSummary": 1, + "fruitSummary": 1, + "var": 42, + "shoppingList": 3, + "[": 18, + "]": 18, + "occupations": 2, + "emptyArray": 1, + "String": 27, + "(": 89, + ")": 89, + "emptyDictionary": 1, + "Dictionary": 1, + "": 1, + "Float": 1, + "//": 1, + "Went": 1, + "shopping": 1, + "and": 1, + "bought": 1, + "everything.": 1, + "individualScores": 2, + "teamScore": 4, + "for": 10, + "score": 2, + "in": 11, + "{": 77, + "if": 6, + "+": 15, + "}": 77, + "else": 1, + "optionalString": 2, + "nil": 1, + "optionalName": 2, + "greeting": 2, + "name": 21, + "vegetable": 2, + "switch": 4, + "case": 21, + "vegetableComment": 4, + "x": 1, + "where": 2, + "x.hasSuffix": 1, + "default": 2, + "interestingNumbers": 2, + "largest": 4, + "kind": 1, + "numbers": 6, + "number": 13, + "n": 5, + "while": 2, + "<": 4, + "*": 7, + "m": 5, + "do": 1, + "firstForLoop": 3, + "i": 6, + "secondForLoop": 3, + ";": 2, + "println": 1, + "func": 24, + "greet": 2, + "day": 1, + "-": 21, + "return": 30, + "getGasPrices": 2, + "Double": 11, + "sumOf": 3, + "Int...": 1, + "Int": 19, + "sum": 3, + "returnFifteen": 2, + "y": 3, + "add": 2, + "makeIncrementer": 2, + "addOne": 2, + "increment": 2, + "hasAnyMatches": 2, + "list": 2, + "condition": 2, + "Bool": 4, + "item": 4, + "true": 2, + "false": 2, + "lessThanTen": 2, + "numbers.map": 2, + "result": 5, + "sort": 1, + "class": 7, + "Shape": 2, + "numberOfSides": 4, + "simpleDescription": 14, + "myVariable": 2, + "myConstant": 1, + "shape": 1, + "shape.numberOfSides": 1, + "shapeDescription": 1, + "shape.simpleDescription": 1, + "NamedShape": 3, + "init": 4, + "self.name": 1, + "Square": 7, + "sideLength": 17, + "self.sideLength": 2, + "super.init": 2, + "area": 1, + "override": 2, + "test": 1, + "test.area": 1, + "test.simpleDescription": 1, + "EquilateralTriangle": 4, + "perimeter": 1, + "get": 2, + "set": 1, + "newValue": 1, + "/": 1, + "triangle": 3, + "triangle.perimeter": 2, + "triangle.sideLength": 2, + "TriangleAndSquare": 2, + "willSet": 2, + "square.sideLength": 1, + "newValue.sideLength": 2, + "square": 2, + "size": 4, + "triangleAndSquare": 1, + "triangleAndSquare.square.sideLength": 1, + "triangleAndSquare.triangle.sideLength": 2, + "triangleAndSquare.square": 1, + "Counter": 2, + "count": 2, + "incrementBy": 1, + "amount": 2, + "numberOfTimes": 2, + "times": 4, + "counter": 1, + "counter.incrementBy": 1, + "optionalSquare": 2, + ".sideLength": 1, + "enum": 4, + "Rank": 2, + "Ace": 1, + "Two": 1, + "Three": 1, + "Four": 1, + "Five": 1, + "Six": 1, + "Seven": 1, + "Eight": 1, + "Nine": 1, + "Ten": 1, + "Jack": 1, + "Queen": 1, + "King": 1, + "self": 3, + ".Ace": 1, + ".Jack": 1, + ".Queen": 1, + ".King": 1, + "self.toRaw": 1, + "ace": 1, + "Rank.Ace": 1, + "aceRawValue": 1, + "ace.toRaw": 1, + "convertedRank": 1, + "Rank.fromRaw": 1, + "threeDescription": 1, + "convertedRank.simpleDescription": 1, + "Suit": 2, + "Spades": 1, + "Hearts": 1, + "Diamonds": 1, + "Clubs": 1, + ".Spades": 2, + ".Hearts": 1, + ".Diamonds": 1, + ".Clubs": 1, + "hearts": 1, + "Suit.Hearts": 1, + "heartsDescription": 1, + "hearts.simpleDescription": 1, + "implicitInteger": 1, + "implicitDouble": 1, + "explicitDouble": 1, + "struct": 2, + "Card": 2, + "rank": 2, + "suit": 2, + "threeOfSpades": 1, + ".Three": 1, + "threeOfSpadesDescription": 1, + "threeOfSpades.simpleDescription": 1, + "ServerResponse": 1, + "Result": 1, + "Error": 1, + "success": 2, + "ServerResponse.Result": 1, + "failure": 1, + "ServerResponse.Error": 1, + ".Result": 1, + "sunrise": 1, + "sunset": 1, + "serverResponse": 2, + ".Error": 1, + "error": 1, + "protocol": 1, + "ExampleProtocol": 5, + "mutating": 3, + "adjust": 4, + "SimpleClass": 2, + "anotherProperty": 1, + "a": 2, + "a.adjust": 1, + "aDescription": 1, + "a.simpleDescription": 1, + "SimpleStructure": 2, + "b": 1, + "b.adjust": 1, + "bDescription": 1, + "b.simpleDescription": 1, + "extension": 1, + "protocolValue": 1, + "protocolValue.simpleDescription": 1, + "repeat": 2, + "": 1, + "ItemType": 3, + "OptionalValue": 2, + "": 1, + "None": 1, + "Some": 1, + "T": 5, + "possibleInteger": 2, + "": 1, + ".None": 1, + ".Some": 1, + "anyCommonElements": 2, + "": 1, + "U": 4, + "Sequence": 2, + "GeneratorType": 3, + "Element": 3, + "Equatable": 1, + "lhs": 2, + "rhs": 2, + "lhsItem": 2, + "rhsItem": 2, + "label": 2, + "width": 2, + "widthLabel": 1 + }, + "SystemVerilog": { + "module": 3, + "endpoint_phy_wrapper": 2, + "(": 92, + "input": 12, + "clk_sys_i": 2, + "clk_ref_i": 6, + "clk_rx_i": 3, + "rst_n_i": 3, + "IWishboneMaster.master": 2, + "src": 1, + "IWishboneSlave.slave": 1, + "snk": 1, + "sys": 1, + "output": 6, + "[": 17, + "]": 17, + "td_o": 2, + "rd_i": 2, + "txn_o": 2, + "txp_o": 2, + "rxn_i": 2, + "rxp_i": 2, + ")": 92, + ";": 32, + "wire": 12, + "rx_clock": 3, + "parameter": 2, + "g_phy_type": 6, + "gtx_data": 3, + "gtx_k": 3, + "gtx_disparity": 3, + "gtx_enc_error": 3, + "grx_data": 3, + "grx_clk": 1, + "grx_k": 3, + "grx_enc_error": 3, + "grx_bitslide": 2, + "gtp_rst": 2, + "tx_clock": 3, + "generate": 1, + "if": 5, + "begin": 4, + "assign": 2, + "wr_tbi_phy": 1, + "U_Phy": 1, + ".serdes_rst_i": 1, + ".serdes_loopen_i": 1, + "b0": 5, + ".serdes_enable_i": 1, + "b1": 2, + ".serdes_tx_data_i": 1, + ".serdes_tx_k_i": 1, + ".serdes_tx_disparity_o": 1, + ".serdes_tx_enc_err_o": 1, + ".serdes_rx_data_o": 1, + ".serdes_rx_k_o": 1, + ".serdes_rx_enc_err_o": 1, + ".serdes_rx_bitslide_o": 1, + ".tbi_refclk_i": 1, + ".tbi_rbclk_i": 1, + ".tbi_td_o": 1, + ".tbi_rd_i": 1, + ".tbi_syncen_o": 1, + ".tbi_loopen_o": 1, + ".tbi_prbsen_o": 1, + ".tbi_enable_o": 1, + "end": 4, + "else": 2, + "//": 3, + "wr_gtx_phy_virtex6": 1, + "#": 3, + ".g_simulation": 2, + "U_PHY": 1, + ".clk_ref_i": 2, + ".tx_clk_o": 1, + ".tx_data_i": 1, + ".tx_k_i": 1, + ".tx_disparity_o": 1, + ".tx_enc_err_o": 1, + ".rx_rbclk_o": 1, + ".rx_data_o": 1, + ".rx_k_o": 1, + ".rx_enc_err_o": 1, + ".rx_bitslide_o": 1, + ".rst_i": 1, + ".loopen_i": 1, + ".pad_txn0_o": 1, + ".pad_txp0_o": 1, + ".pad_rxn0_i": 1, + ".pad_rxp0_i": 1, + "endgenerate": 1, + "wr_endpoint": 1, + ".g_pcs_16bit": 1, + ".g_rx_buffer_size": 1, + ".g_with_rx_buffer": 1, + ".g_with_timestamper": 1, + ".g_with_dmtd": 1, + ".g_with_dpi_classifier": 1, + ".g_with_vlans": 1, + ".g_with_rtu": 1, + "DUT": 1, + ".clk_sys_i": 1, + ".clk_dmtd_i": 1, + ".rst_n_i": 1, + ".pps_csync_p1_i": 1, + ".src_dat_o": 1, + "snk.dat_i": 1, + ".src_adr_o": 1, + "snk.adr": 1, + ".src_sel_o": 1, + "snk.sel": 1, + ".src_cyc_o": 1, + "snk.cyc": 1, + ".src_stb_o": 1, + "snk.stb": 1, + ".src_we_o": 1, + "snk.we": 1, + ".src_stall_i": 1, + "snk.stall": 1, + ".src_ack_i": 1, + "snk.ack": 1, + ".src_err_i": 1, + ".rtu_full_i": 1, + ".rtu_rq_strobe_p1_o": 1, + ".rtu_rq_smac_o": 1, + ".rtu_rq_dmac_o": 1, + ".rtu_rq_vid_o": 1, + ".rtu_rq_has_vid_o": 1, + ".rtu_rq_prio_o": 1, + ".rtu_rq_has_prio_o": 1, + ".wb_cyc_i": 1, + "sys.cyc": 1, + ".wb_stb_i": 1, + "sys.stb": 1, + ".wb_we_i": 1, + "sys.we": 1, + ".wb_sel_i": 1, + "sys.sel": 1, + ".wb_adr_i": 1, + "sys.adr": 1, + ".wb_dat_i": 1, + "sys.dat_o": 1, + ".wb_dat_o": 1, + "sys.dat_i": 1, + ".wb_ack_o": 1, + "sys.ack": 1, + "endmodule": 2, + "fifo": 1, + "clk_50": 1, + "clk_2": 1, + "reset_n": 1, + "data_out": 1, + "empty": 1, + "priority_encoder": 1, + "INPUT_WIDTH": 3, + "OUTPUT_WIDTH": 3, + "logic": 2, + "-": 4, + "input_data": 2, + "output_data": 3, + "int": 1, + "ii": 6, + "always_comb": 1, + "for": 2, + "<": 1, + "+": 3, + "function": 1, + "integer": 2, + "log2": 4, + "x": 6, + "endfunction": 1 + }, + "Tcl": { + "#": 7, + "package": 2, + "require": 2, + "Tcl": 2, + "namespace": 6, + "eval": 2, + "stream": 61, + "{": 148, + "export": 3, + "[": 76, + "a": 1, + "-": 5, + "z": 1, + "]": 76, + "*": 19, + "}": 148, + "ensemble": 1, + "create": 7, + "proc": 28, + "first": 24, + "restCmdPrefix": 2, + "return": 22, + "list": 18, + "lassign": 11, + "foldl": 1, + "cmdPrefix": 19, + "initialValue": 7, + "args": 13, + "set": 34, + "numStreams": 3, + "llength": 5, + "if": 14, + "FoldlSingleStream": 2, + "lindex": 5, + "elseif": 3, + "FoldlMultiStream": 2, + "else": 5, + "Usage": 4, + "foreach": 5, + "numArgs": 7, + "varName": 7, + "body": 8, + "ForeachSingleStream": 2, + "(": 11, + ")": 11, + "&&": 2, + "%": 1, + "end": 2, + "items": 5, + "lrange": 1, + "ForeachMultiStream": 2, + "fromList": 2, + "_list": 4, + "index": 4, + "expr": 4, + "+": 1, + "isEmpty": 10, + "map": 1, + "MapSingleStream": 3, + "MapMultiStream": 3, + "rest": 22, + "select": 2, + "while": 6, + "take": 2, + "num": 3, + "||": 1, + "<": 1, + "toList": 1, + "res": 10, + "lappend": 8, + "#################################": 2, + "acc": 9, + "streams": 5, + "firsts": 6, + "restStreams": 6, + "uplevel": 4, + "nextItems": 4, + "msg": 1, + "code": 1, + "error": 1, + "level": 1, + "XDG": 11, + "variable": 4, + "DEFAULTS": 8, + "DATA_HOME": 4, + "CONFIG_HOME": 4, + "CACHE_HOME": 4, + "RUNTIME_DIR": 3, + "DATA_DIRS": 4, + "CONFIG_DIRS": 4, + "SetDefaults": 3, + "ne": 2, + "file": 9, + "join": 9, + "env": 8, + "HOME": 3, + ".local": 1, + "share": 3, + ".config": 1, + ".cache": 1, + "/usr": 2, + "local": 1, + "/etc": 1, + "xdg": 1, + "XDGVarSet": 4, + "var": 11, + "info": 1, + "exists": 1, + "XDG_": 4, + "Dir": 4, + "subdir": 16, + "dir": 5, + "dict": 2, + "get": 2, + "Dirs": 3, + "rawDirs": 3, + "split": 1, + "outDirs": 3, + "XDG_RUNTIME_DIR": 1 + }, "Tea": { "<%>": 1, "template": 1, "foo": 1 }, "TeX": { - "%": 59, + "%": 135, + "ProvidesClass": 2, + "{": 463, + "problemset": 1, + "}": 469, + "DeclareOption*": 2, + "PassOptionsToClass": 2, + "final": 2, + "article": 2, + "DeclareOption": 2, + "worksheet": 1, + "providecommand": 45, + "@solutionvis": 3, + "expand": 1, + "@expand": 3, + "ProcessOptions": 2, + "relax": 3, + "LoadClass": 2, + "[": 81, + "pt": 5, + "letterpaper": 1, + "]": 80, + "RequirePackage": 20, + "top": 1, + "in": 20, + "bottom": 1, + "left": 15, + "right": 16, + "geometry": 1, + "pgfkeys": 1, + "For": 13, + "mathtable": 2, + "environment.": 3, + "tabularx": 1, + "pset": 1, + "heading": 2, + "float": 1, + "Used": 6, + "for": 21, + "floats": 1, + "(": 12, + "tables": 1, + "figures": 1, + "etc.": 1, + ")": 12, + "graphicx": 1, + "inserting": 3, + "images.": 1, + "enumerate": 2, + "the": 19, + "mathtools": 2, + "Required.": 7, + "Loads": 1, + "amsmath.": 1, + "amsthm": 1, + "theorem": 1, + "environments.": 1, + "amssymb": 1, + "booktabs": 1, + "esdiff": 1, + "derivatives": 4, + "and": 5, + "partial": 2, + "Optional.": 1, + "shortintertext.": 1, + "fancyhdr": 2, + "customizing": 1, + "headers/footers.": 1, + "lastpage": 1, + "page": 4, + "count": 1, + "header/footer.": 1, + "xcolor": 1, + "setting": 3, + "color": 3, + "of": 14, + "hyperlinks": 2, + "obeyFinal": 1, + "Disable": 1, + "todos": 1, + "by": 1, + "option": 1, + "class": 1, + "@todoclr": 2, + "linecolor": 1, + "red": 1, + "todonotes": 1, + "keeping": 1, + "track": 1, + "to": 16, + "-": 9, + "dos.": 1, + "colorlinks": 1, + "true": 1, + "linkcolor": 1, + "navy": 2, + "urlcolor": 1, + "black": 2, + "hyperref": 1, + "following": 2, + "urls": 2, + "references": 1, + "a": 2, + "document.": 1, + "url": 2, + "Enables": 1, + "with": 5, + "tag": 1, + "all": 2, + "hypcap": 1, + "definecolor": 2, + "gray": 1, + "To": 1, + "Dos.": 1, + "brightness": 1, + "RGB": 1, + "coloring": 1, + "setlength": 12, + "parskip": 1, + "ex": 2, + "Sets": 1, + "space": 8, + "between": 1, + "paragraphs.": 2, + "parindent": 2, + "Indent": 1, + "first": 1, + "line": 2, + "new": 1, + "let": 11, + "VERBATIM": 2, + "verbatim": 2, + "def": 18, + "verbatim@font": 1, + "small": 8, + "ttfamily": 1, + "usepackage": 2, + "caption": 1, + "footnotesize": 2, + "subcaption": 1, + "captionsetup": 4, + "table": 2, + "labelformat": 4, + "simple": 3, + "labelsep": 4, + "period": 3, + "labelfont": 4, + "bf": 4, + "figure": 2, + "subtable": 1, + "parens": 1, + "subfigure": 1, + "TRUE": 1, + "FALSE": 1, + "SHOW": 3, + "HIDE": 2, + "thispagestyle": 5, + "empty": 6, + "listoftodos": 1, + "clearpage": 4, + "pagenumbering": 1, + "arabic": 2, + "shortname": 2, + "#1": 40, + "authorname": 2, + "#2": 17, + "coursename": 3, + "#3": 8, + "assignment": 3, + "#4": 4, + "duedate": 2, + "#5": 2, + "begin": 11, + "minipage": 4, + "textwidth": 4, + "flushleft": 2, + "hypertarget": 1, + "@assignment": 2, + "textbf": 5, + "end": 12, + "flushright": 2, + "renewcommand": 10, + "headrulewidth": 1, + "footrulewidth": 1, + "pagestyle": 3, + "fancyplain": 4, + "fancyhf": 2, + "lfoot": 1, + "hyperlink": 1, + "cfoot": 1, + "rfoot": 1, + "thepage": 2, + "pageref": 1, + "LastPage": 1, + "newcounter": 1, + "theproblem": 3, + "Problem": 2, + "counter": 1, + "environment": 1, + "problem": 1, + "addtocounter": 2, + "setcounter": 5, + "equation": 1, + "noindent": 2, + ".": 3, + "textit": 1, + "Default": 2, + "is": 2, + "omit": 1, + "pagebreaks": 1, + "after": 1, + "solution": 2, + "qqed": 2, + "hfill": 3, + "rule": 1, + "mm": 2, + "ifnum": 3, + "pagebreak": 2, + "fi": 15, + "show": 1, + "solutions.": 1, + "vspace": 2, + "em": 8, + "Solution.": 1, + "ifnum#1": 2, + "else": 9, + "chap": 1, + "section": 2, + "Sum": 3, + "n": 4, + "ensuremath": 15, + "sum_": 2, + "from": 5, + "infsum": 2, + "infty": 2, + "Infinite": 1, + "sum": 1, + "Int": 1, + "x": 4, + "int_": 1, + "mathrm": 1, + "d": 1, + "Integrate": 1, + "respect": 1, + "Lim": 2, + "displaystyle": 2, + "lim_": 1, + "Take": 1, + "limit": 1, + "infinity": 1, + "f": 1, + "Frac": 1, + "/": 1, + "_": 1, + "Slanted": 1, + "fraction": 1, + "proper": 1, + "spacing.": 1, + "Usefule": 1, + "display": 2, + "fractions.": 1, + "eval": 1, + "vert_": 1, + "L": 1, + "hand": 2, + "sizing": 2, + "R": 1, + "D": 1, + "diff": 1, + "writing": 2, + "PD": 1, + "diffp": 1, + "full": 1, + "Forces": 1, + "style": 1, + "math": 4, + "mode": 4, + "Deg": 1, + "circ": 1, + "adding": 1, + "degree": 1, + "symbol": 4, + "even": 1, + "if": 1, + "not": 2, + "abs": 1, + "vert": 3, + "Absolute": 1, + "Value": 1, + "norm": 1, + "Vert": 2, + "Norm": 1, + "vector": 1, + "magnitude": 1, + "e": 1, + "times": 3, + "Scientific": 2, + "Notation": 2, + "E": 2, + "u": 1, + "text": 7, + "units": 1, + "Roman": 1, + "mc": 1, + "hspace": 3, + "comma": 1, + "into": 2, + "mtxt": 1, + "insterting": 1, + "on": 2, + "either": 1, + "side.": 1, + "Option": 1, + "preceding": 1, + "punctuation.": 1, + "prob": 1, + "P": 2, + "cndprb": 1, + "right.": 1, + "cov": 1, + "Cov": 1, + "twovector": 1, + "r": 3, + "array": 6, + "threevector": 1, + "fourvector": 1, + "vecs": 4, + "vec": 2, + "bm": 2, + "bolded": 2, + "arrow": 2, + "vect": 3, + "unitvecs": 1, + "hat": 2, + "unitvect": 1, + "Div": 1, + "del": 3, + "cdot": 1, + "Curl": 1, + "Grad": 1, "NeedsTeXFormat": 1, - "{": 180, "LaTeX2e": 1, - "}": 185, - "ProvidesClass": 1, "reedthesis": 1, - "[": 22, "/01/27": 1, "The": 4, "Reed": 5, "College": 5, "Thesis": 5, "Class": 4, - "]": 22, - "DeclareOption*": 1, - "PassOptionsToClass": 1, "CurrentOption": 1, "book": 2, - "ProcessOptions": 1, - "relax": 2, - "LoadClass": 1, - "RequirePackage": 1, - "fancyhdr": 1, "AtBeginDocument": 1, - "fancyhf": 1, "fancyhead": 5, "LE": 1, "RO": 1, - "thepage": 1, "above": 1, "makes": 2, "your": 1, "headers": 6, - "in": 10, - "all": 1, "caps.": 2, "If": 1, "you": 1, @@ -37664,28 +65384,16 @@ "different": 1, "choose": 1, "one": 1, - "of": 8, - "the": 14, - "following": 1, "options": 1, - "(": 3, "be": 3, "sure": 1, - "to": 8, "remove": 1, - "symbol": 1, - "from": 1, "both": 1, - "right": 1, - "and": 2, - "left": 1, - ")": 3, "RE": 2, "slshape": 2, "nouppercase": 2, "leftmark": 2, "This": 2, - "on": 1, "RIGHT": 2, "side": 2, "pages": 2, @@ -37705,25 +65413,19 @@ "or": 1, "scshape": 2, "will": 2, - "small": 2, "And": 1, "so": 1, - "pagestyle": 2, "fancy": 1, - "let": 10, "oldthebibliography": 2, "thebibliography": 2, "endoldthebibliography": 2, "endthebibliography": 1, "renewenvironment": 2, - "#1": 12, "addcontentsline": 5, "toc": 5, "chapter": 9, "bibname": 2, - "end": 5, "things": 1, - "for": 5, "psych": 1, "majors": 1, "comment": 1, @@ -37734,14 +65436,8 @@ "endtheindex": 1, "indexname": 1, "RToldchapter": 1, - "renewcommand": 6, "if@openright": 1, "RTcleardoublepage": 3, - "else": 7, - "clearpage": 3, - "fi": 13, - "thispagestyle": 3, - "empty": 4, "global": 2, "@topnum": 1, "z@": 2, @@ -37749,16 +65445,12 @@ "secdef": 1, "@chapter": 2, "@schapter": 1, - "def": 12, - "#2": 4, - "ifnum": 2, "c@secnumdepth": 1, "m@ne": 2, "if@mainmatter": 1, "refstepcounter": 1, "typeout": 1, "@chapapp": 2, - "space": 4, "thechapter.": 1, "thechapter": 1, "space#1": 1, @@ -37781,18 +65473,15 @@ "newpage": 3, "RToldcleardoublepage": 1, "cleardoublepage": 4, - "setlength": 10, "oddsidemargin": 2, ".5in": 3, "evensidemargin": 2, - "textwidth": 2, "textheight": 4, "topmargin": 6, "addtolength": 8, "headheight": 4, "headsep": 3, ".6in": 1, - "pt": 1, "division#1": 1, "gdef": 6, "@division": 3, @@ -37828,15 +65517,12 @@ "addpenalty": 1, "@highpenalty": 2, "vskip": 4, - "em": 3, "@plus": 1, "@tempdima": 2, "begingroup": 1, - "parindent": 1, "rightskip": 1, "@pnumwidth": 3, "parfillskip": 1, - "-": 2, "leavevmode": 1, "bfseries": 3, "advance": 1, @@ -37849,8 +65535,6 @@ "mkern": 2, "@dotsep": 2, "mu": 2, - ".": 1, - "hfill": 1, "hb@xt@": 1, "hss": 1, "par": 6, @@ -37862,7 +65546,6 @@ "onecolumn": 1, "@restonecolfalse": 1, "Abstract": 2, - "begin": 4, "center": 7, "fontsize": 7, "selectfont": 6, @@ -37884,7 +65567,6 @@ "/Creator": 1, "maketitle": 1, "titlepage": 2, - "footnotesize": 1, "footnoterule": 1, "footnote": 1, "thanks": 1, @@ -37892,8 +65574,6 @@ "setbox0": 2, "Requirements": 2, "Degree": 2, - "setcounter": 1, - "page": 3, "null": 3, "vfil": 8, "@title": 1, @@ -37919,7 +65599,6 @@ "just": 1, "below": 2, "cm": 2, - "not": 1, "copy0": 1, "approved": 1, "major": 1, @@ -37991,17 +65670,17 @@ "Animal": 4, "{": 9, "constructor": 3, - "(": 17, + "(": 18, "public": 1, "name": 5, - ")": 17, + ")": 18, "}": 9, "move": 3, "meters": 2, "alert": 3, "this.name": 1, "+": 3, - ";": 7, + ";": 8, "Snake": 2, "extends": 2, "super": 2, @@ -38015,6 +65694,512 @@ "tom.move": 1, "console.log": 1 }, + "UnrealScript": { + "//": 5, + "-": 220, + "class": 18, + "MutU2Weapons": 1, + "extends": 2, + "Mutator": 1, + "config": 18, + "(": 189, + "U2Weapons": 1, + ")": 189, + ";": 295, + "var": 30, + "string": 25, + "ReplacedWeaponClassNames0": 1, + "ReplacedWeaponClassNames1": 1, + "ReplacedWeaponClassNames2": 1, + "ReplacedWeaponClassNames3": 1, + "ReplacedWeaponClassNames4": 1, + "ReplacedWeaponClassNames5": 1, + "ReplacedWeaponClassNames6": 1, + "ReplacedWeaponClassNames7": 1, + "ReplacedWeaponClassNames8": 1, + "ReplacedWeaponClassNames9": 1, + "ReplacedWeaponClassNames10": 1, + "ReplacedWeaponClassNames11": 1, + "ReplacedWeaponClassNames12": 1, + "bool": 18, + "bConfigUseU2Weapon0": 1, + "bConfigUseU2Weapon1": 1, + "bConfigUseU2Weapon2": 1, + "bConfigUseU2Weapon3": 1, + "bConfigUseU2Weapon4": 1, + "bConfigUseU2Weapon5": 1, + "bConfigUseU2Weapon6": 1, + "bConfigUseU2Weapon7": 1, + "bConfigUseU2Weapon8": 1, + "bConfigUseU2Weapon9": 1, + "bConfigUseU2Weapon10": 1, + "bConfigUseU2Weapon11": 1, + "bConfigUseU2Weapon12": 1, + "//var": 8, + "byte": 4, + "bUseU2Weapon": 1, + "[": 125, + "]": 125, + "": 7, + "ReplacedWeaponClasses": 3, + "": 2, + "ReplacedWeaponPickupClasses": 1, + "": 3, + "ReplacedAmmoPickupClasses": 1, + "U2WeaponClasses": 2, + "//GE": 17, + "For": 3, + "default": 12, + "properties": 3, + "ONLY": 3, + "U2WeaponPickupClassNames": 1, + "U2AmmoPickupClassNames": 2, + "bIsVehicle": 4, + "bNotVehicle": 3, + "localized": 2, + "U2WeaponDisplayText": 1, + "U2WeaponDescText": 1, + "GUISelectOptions": 1, + "int": 10, + "FirePowerMode": 1, + "bExperimental": 3, + "bUseFieldGenerator": 2, + "bUseProximitySensor": 2, + "bIntegrateShieldReward": 2, + "IterationNum": 8, + "Weapons.Length": 1, + "const": 1, + "DamageMultiplier": 28, + "DamagePercentage": 3, + "bUseXMPFeel": 4, + "FlashbangModeString": 1, + "struct": 1, + "WeaponInfo": 2, + "{": 28, + "ReplacedWeaponClass": 1, + "Generated": 4, + "from": 6, + "ReplacedWeaponClassName.": 2, + "This": 3, + "is": 6, + "what": 1, + "we": 3, + "replace.": 1, + "ReplacedWeaponPickupClass": 1, + "UNUSED": 1, + "ReplacedAmmoPickupClass": 1, + "WeaponClass": 1, + "the": 31, + "weapon": 10, + "are": 1, + "going": 1, + "to": 4, + "put": 1, + "inside": 1, + "world.": 1, + "WeaponPickupClassName": 1, + "WeponClass.": 1, + "AmmoPickupClassName": 1, + "WeaponClass.": 1, + "bEnabled": 1, + "Structs": 1, + "can": 2, + "d": 1, + "thus": 1, + "still": 1, + "require": 1, + "bConfigUseU2WeaponX": 1, + "indicates": 1, + "that": 3, + "spawns": 1, + "a": 2, + "vehicle": 3, + "deployable": 1, + "turrets": 1, + ".": 2, + "These": 1, + "only": 2, + "work": 1, + "in": 4, + "gametypes": 1, + "duh.": 1, + "Opposite": 1, + "of": 1, + "works": 1, + "non": 1, + "gametypes.": 2, + "Think": 1, + "shotgun.": 1, + "}": 27, + "Weapons": 31, + "function": 5, + "PostBeginPlay": 1, + "local": 8, + "FireMode": 8, + "x": 65, + "//local": 3, + "ReplacedWeaponPickupClassName": 1, + "//IterationNum": 1, + "ArrayCount": 2, + "Level.Game.bAllowVehicles": 4, + "He": 1, + "he": 1, + "neat": 1, + "way": 1, + "get": 1, + "required": 1, + "number.": 1, + "for": 11, + "<": 9, + "+": 18, + ".bEnabled": 3, + "GetPropertyText": 5, + "needed": 1, + "use": 1, + "variables": 1, + "an": 1, + "array": 2, + "like": 1, + "fashion.": 1, + "//bUseU2Weapon": 1, + ".ReplacedWeaponClass": 5, + "DynamicLoadObject": 2, + "//ReplacedWeaponClasses": 1, + "//ReplacedWeaponPickupClassName": 1, + ".default.PickupClass": 1, + "if": 55, + ".ReplacedWeaponClass.default.FireModeClass": 4, + "None": 10, + "&&": 15, + ".default.AmmoClass": 1, + ".default.AmmoClass.default.PickupClass": 2, + ".ReplacedAmmoPickupClass": 2, + "break": 1, + ".WeaponClass": 7, + ".WeaponPickupClassName": 1, + ".WeaponClass.default.PickupClass": 1, + ".AmmoPickupClassName": 2, + ".bIsVehicle": 2, + ".bNotVehicle": 2, + "Super.PostBeginPlay": 1, + "ValidReplacement": 6, + "return": 47, + "CheckReplacement": 1, + "Actor": 1, + "Other": 23, + "out": 2, + "bSuperRelevant": 3, + "i": 12, + "WeaponLocker": 3, + "L": 2, + "xWeaponBase": 3, + ".WeaponType": 2, + "false": 3, + "true": 5, + "Weapon": 1, + "Other.IsA": 2, + "Other.Class": 2, + "Ammo": 1, + "ReplaceWith": 1, + "L.Weapons.Length": 1, + "L.Weapons": 2, + "//STARTING": 1, + "WEAPON": 1, + "xPawn": 6, + ".RequiredEquipment": 3, + "True": 2, + "Special": 1, + "handling": 1, + "Shield": 2, + "Reward": 2, + "integration": 1, + "ShieldPack": 7, + ".SetStaticMesh": 1, + "StaticMesh": 1, + ".Skins": 1, + "Shader": 2, + ".RepSkin": 1, + ".SetDrawScale": 1, + ".SetCollisionSize": 1, + ".PickupMessage": 1, + ".PickupSound": 1, + "Sound": 1, + "Super.CheckReplacement": 1, + "GetInventoryClassOverride": 1, + "InventoryClassName": 3, + "Super.GetInventoryClassOverride": 1, + "static": 2, + "FillPlayInfo": 1, + "PlayInfo": 3, + "": 1, + "Recs": 4, + "WeaponOptions": 17, + "Super.FillPlayInfo": 1, + ".static.GetWeaponList": 1, + "Recs.Length": 1, + ".ClassName": 1, + ".FriendlyName": 1, + "PlayInfo.AddSetting": 33, + "default.RulesGroup": 33, + "default.U2WeaponDisplayText": 33, + "event": 3, + "GetDescriptionText": 1, + "PropName": 35, + "default.U2WeaponDescText": 33, + "Super.GetDescriptionText": 1, + "PreBeginPlay": 1, + "float": 3, + "k": 29, + "Multiplier.": 1, + "Super.PreBeginPlay": 1, + "/100.0": 1, + "//log": 1, + "@k": 1, + "//Sets": 1, + "various": 1, + "settings": 1, + "match": 1, + "different": 1, + "games": 1, + ".default.DamagePercentage": 1, + "//Original": 1, + "U2": 3, + "compensate": 1, + "division": 1, + "errors": 1, + "Class": 105, + ".default.DamageMin": 12, + "*": 54, + ".default.DamageMax": 12, + ".default.Damage": 27, + ".default.myDamage": 4, + "//Dampened": 1, + "already": 1, + "no": 2, + "need": 1, + "rewrite": 1, + "else": 1, + "//General": 2, + "XMP": 4, + ".default.Spread": 1, + ".default.MaxAmmo": 7, + ".default.Speed": 8, + ".default.MomentumTransfer": 4, + ".default.ClipSize": 4, + ".default.FireLastReloadTime": 3, + ".default.DamageRadius": 4, + ".default.LifeSpan": 4, + ".default.ShakeRadius": 1, + ".default.ShakeMagnitude": 1, + ".default.MaxSpeed": 5, + ".default.FireRate": 3, + ".default.ReloadTime": 3, + "//3200": 1, + "too": 1, + "much": 1, + ".default.VehicleDamageScaling": 2, + "*k": 28, + "//Experimental": 1, + "options": 1, + "lets": 1, + "you": 2, + "Unuse": 1, + "EMPimp": 1, + "projectile": 1, + "and": 3, + "fire": 1, + "two": 1, + "CAR": 1, + "barrels": 1, + "//CAR": 1, + "nothing": 1, + "U2Weapons.U2AssaultRifleFire": 1, + "U2Weapons.U2AssaultRifleAltFire": 1, + "U2ProjectileConcussionGrenade": 1, + "U2Weapons.U2AssaultRifleInv": 1, + "U2Weapons.U2WeaponEnergyRifle": 1, + "U2Weapons.U2WeaponFlameThrower": 1, + "U2Weapons.U2WeaponPistol": 1, + "U2Weapons.U2AutoTurretDeploy": 1, + "U2Weapons.U2WeaponRocketLauncher": 1, + "U2Weapons.U2WeaponGrenadeLauncher": 1, + "U2Weapons.U2WeaponSniper": 2, + "U2Weapons.U2WeaponRocketTurret": 1, + "U2Weapons.U2WeaponLandMine": 1, + "U2Weapons.U2WeaponLaserTripMine": 1, + "U2Weapons.U2WeaponShotgun": 1, + "s": 7, + "Minigun.": 1, + "Enable": 5, + "Shock": 1, + "Lance": 1, + "Energy": 2, + "Rifle": 3, + "What": 7, + "should": 7, + "be": 8, + "replaced": 8, + "with": 9, + "Rifle.": 3, + "By": 7, + "it": 7, + "Bio": 1, + "Magnum": 2, + "Pistol": 1, + "Pistol.": 1, + "Onslaught": 1, + "Grenade": 1, + "Launcher.": 2, + "Shark": 2, + "Rocket": 4, + "Launcher": 1, + "Flak": 1, + "Cannon.": 1, + "Should": 1, + "Lightning": 1, + "Gun": 2, + "Widowmaker": 2, + "Sniper": 3, + "Classic": 1, + "here.": 1, + "Turret": 2, + "delpoyable": 1, + "deployable.": 1, + "Redeemer.": 1, + "Laser": 2, + "Trip": 2, + "Mine": 1, + "Mine.": 1, + "t": 2, + "replace": 1, + "Link": 1, + "matches": 1, + "vehicles.": 1, + "Crowd": 1, + "Pleaser": 1, + "Shotgun.": 1, + "have": 1, + "shields": 1, + "or": 2, + "damage": 1, + "filtering.": 1, + "If": 1, + "checked": 1, + "mutator": 1, + "produces": 1, + "Unreal": 4, + "II": 4, + "shield": 1, + "pickups.": 1, + "Choose": 1, + "between": 2, + "white": 1, + "overlay": 3, + "depending": 2, + "on": 2, + "player": 2, + "view": 1, + "style": 1, + "distance": 1, + "foolproof": 1, + "FM_DistanceBased": 1, + "Arena": 1, + "Add": 1, + "weapons": 1, + "other": 1, + "Fully": 1, + "customisable": 1, + "choose": 1, + "behaviour.": 1, + "US3HelloWorld": 1, + "GameInfo": 1, + "InitGame": 1, + "Options": 1, + "Error": 1, + "log": 1, + "defaultproperties": 1 + }, + "VCL": { + "sub": 23, + "vcl_recv": 2, + "{": 50, + "if": 14, + "(": 50, + "req.request": 18, + "&&": 14, + ")": 50, + "return": 33, + "pipe": 4, + ";": 48, + "}": 50, + "pass": 9, + "req.http.Authorization": 2, + "||": 4, + "req.http.Cookie": 2, + "lookup": 2, + "vcl_pipe": 2, + "vcl_pass": 2, + "vcl_hash": 2, + "set": 10, + "req.hash": 3, + "+": 17, + "req.url": 2, + "req.http.host": 4, + "else": 3, + "server.ip": 2, + "hash": 2, + "vcl_hit": 2, + "obj.cacheable": 2, + "deliver": 8, + "vcl_miss": 2, + "fetch": 3, + "vcl_fetch": 2, + "obj.http.Set": 1, + "-": 21, + "Cookie": 2, + "obj.prefetch": 1, + "s": 3, + "vcl_deliver": 2, + "vcl_discard": 1, + "discard": 2, + "vcl_prefetch": 1, + "vcl_timeout": 1, + "vcl_error": 2, + "obj.http.Content": 2, + "Type": 2, + "synthetic": 2, + "utf": 2, + "//W3C//DTD": 2, + "XHTML": 2, + "Strict//EN": 2, + "http": 3, + "//www.w3.org/TR/xhtml1/DTD/xhtml1": 2, + "strict.dtd": 2, + "obj.status": 4, + "obj.response": 6, + "req.xid": 2, + "//www.varnish": 1, + "cache.org/": 1, + "req.restarts": 1, + "req.http.x": 1, + "forwarded": 1, + "for": 1, + "req.http.X": 3, + "Forwarded": 3, + "For": 3, + "client.ip": 2, + "hash_data": 3, + "beresp.ttl": 2, + "<": 1, + "beresp.http.Set": 1, + "beresp.http.Vary": 1, + "hit_for_pass": 1, + "obj.http.Retry": 1, + "After": 1, + "vcl_init": 1, + "ok": 2, + "vcl_fini": 1 + }, "Verilog": { "////////////////////////////////////////////////////////////////////////////////": 14, "//": 117, @@ -38547,16 +66732,16 @@ "CLASS": 1, "BEGIN": 1, "MultiUse": 1, - "-": 6, + "-": 9, "NotPersistable": 1, "DataBindingBehavior": 1, "vbNone": 1, "MTSTransactionMode": 1, "*************************************************************************************************************************************************************************************************************************************************": 2, "Copyright": 1, - "(": 14, + "(": 20, "c": 1, - ")": 14, + ")": 20, "David": 1, "Briant": 1, "All": 1, @@ -38617,8 +66802,8 @@ "Release": 1, "hide": 1, "us": 1, - "from": 1, - "the": 3, + "from": 2, + "the": 7, "Applications": 1, "list": 1, "in": 1, @@ -38635,11 +66820,11 @@ "myMouseEventsForm.icon": 1, "make": 1, "myself": 1, - "easily": 1, + "easily": 2, "found": 1, "myMouseEventsForm.hwnd": 3, - "End": 7, - "Sub": 7, + "End": 11, + "Sub": 9, "shutdown": 1, "myAST.destroy": 1, "Nothing": 2, @@ -38655,17 +66840,17 @@ "MF_SEPARATOR": 1, "MF_CHECKED": 1, "route": 2, - "to": 1, - "a": 1, + "to": 4, + "a": 4, "remote": 1, "machine": 1, "Else": 1, - "for": 1, + "for": 4, "moment": 1, "just": 1, "between": 1, "MMFileTransports": 1, - "If": 3, + "If": 4, "myMMTransportIDsByRouterID.Exists": 1, "message.toAddress.RouterID": 2, "Then": 1, @@ -38685,7 +66870,224 @@ "id": 1, "oReceived": 2, "Boolean": 1, - "True": 1 + "True": 1, + "@Code": 1, + "ViewData": 1, + "Code": 1, + "@section": 1, + "featured": 1, + "": 1, + "Section": 1, + "

": 1, + "We": 1, + "suggest": 1, + "following": 1, + "

": 1, + "
    ": 1, + "
  1. ": 3, + "
    ": 3, + "Getting": 1, + "Started": 1, + "
    ": 3, + "gives": 2, + "powerful": 1, + "patterns": 1, + "based": 1, + "way": 1, + "build": 1, + "dynamic": 1, + "websites": 1, + "that": 5, + "enables": 1, + "clean": 1, + "separation": 1, + "of": 2, + "concerns": 1, + "full": 1, + "control": 1, + "over": 1, + "markup": 1, + "enjoyable": 1, + "agile": 1, + "development.": 1, + "includes": 1, + "many": 1, + "enable": 1, + "fast": 1, + "TDD": 1, + "friendly": 1, + "development": 1, + "creating": 1, + "sophisticated": 1, + "applications": 1, + "use": 1, + "latest": 1, + "web": 2, + "standards.": 1, + "Learn": 3, + "
  2. ": 3, + "Add": 1, + "NuGet": 2, + "packages": 1, + "jump": 1, + "start": 1, + "your": 2, + "coding": 1, + "makes": 1, + "it": 1, + "easy": 1, + "install": 1, + "update": 1, + "free": 1, + "libraries": 1, + "tools.": 1, + "Find": 1, + "Web": 1, + "Hosting": 1, + "You": 1, + "can": 1, + "find": 1, + "hosting": 1, + "company": 1, + "offers": 1, + "right": 1, + "mix": 1, + "price": 1, + "applications.": 1, + "
": 1, + "Module": 2, + "Module1": 1, + "Main": 1, + "Console.Out.WriteLine": 2 + }, + "Volt": { + "module": 1, + "main": 2, + ";": 53, + "import": 7, + "core.stdc.stdio": 1, + "core.stdc.stdlib": 1, + "watt.process": 1, + "watt.path": 1, + "results": 1, + "list": 1, + "cmd": 1, + "int": 8, + "(": 37, + ")": 37, + "{": 12, + "auto": 6, + "cmdGroup": 2, + "new": 3, + "CmdGroup": 1, + "bool": 4, + "printOk": 2, + "true": 4, + "printImprovments": 2, + "printFailing": 2, + "printRegressions": 2, + "string": 1, + "compiler": 3, + "getEnv": 1, + "if": 7, + "is": 2, + "null": 3, + "printf": 6, + ".ptr": 14, + "return": 2, + "-": 3, + "}": 12, + "///": 1, + "@todo": 1, + "Scan": 1, + "for": 4, + "files": 1, + "tests": 2, + "testList": 1, + "total": 5, + "passed": 5, + "failed": 5, + "improved": 3, + "regressed": 6, + "rets": 5, + "Result": 2, + "[": 6, + "]": 6, + "tests.length": 3, + "size_t": 3, + "i": 14, + "<": 3, + "+": 14, + ".runTest": 1, + "cmdGroup.waitAll": 1, + "ret": 1, + "ret.ok": 1, + "cast": 5, + "ret.hasPassed": 4, + "&&": 2, + "ret.test.ptr": 4, + "ret.msg.ptr": 4, + "else": 3, + "fflush": 2, + "stdout": 1, + "xml": 8, + "fopen": 1, + "fprintf": 2, + "rets.length": 1, + ".xmlLog": 1, + "fclose": 1, + "rate": 2, + "float": 2, + "/": 1, + "*": 1, + "f": 1, + "double": 1 }, "wisp": { ";": 199, @@ -39131,17 +67533,140 @@ "return": 1 }, "XML": { - "": 3, - "version=": 4, + "": 11, + "version=": 17, + "encoding=": 7, + "": 7, + "ToolsVersion=": 6, + "DefaultTargets=": 5, + "xmlns=": 8, + "": 21, + "Project=": 12, + "Condition=": 37, + "": 26, + "": 6, + "Debug": 10, + "": 6, + "": 6, + "AnyCPU": 10, + "": 6, + "": 5, + "{": 6, + "D9BF15": 1, + "-": 90, + "D10": 1, + "ABAD688E8B": 1, + "}": 6, + "": 5, + "": 4, + "Exe": 4, + "": 4, + "": 2, + "Properties": 3, + "": 2, + "": 5, + "csproj_sample": 1, + "": 5, + "": 4, + "csproj": 1, + "sample": 6, + "": 4, + "": 5, + "v4.5.1": 5, + "": 5, + "": 3, + "": 3, + "": 3, + "true": 24, + "": 3, + "": 25, + "": 6, + "": 6, + "": 5, + "": 5, + "": 6, + "full": 4, + "": 6, + "": 7, + "false": 11, + "": 7, + "": 8, + "bin": 11, + "": 8, + "": 6, + "DEBUG": 3, + ";": 52, + "TRACE": 6, + "": 6, + "": 4, + "prompt": 4, + "": 4, + "": 8, + "": 8, + "pdbonly": 3, + "Release": 6, + "": 26, + "": 30, + "Include=": 78, + "": 26, + "": 10, + "": 5, + "": 7, + "": 2, + "": 2, + "cfa7a11": 1, + "a5cd": 1, + "bd7b": 1, + "b210d4d51a29": 1, + "fsproj_sample": 2, + "": 1, + "": 1, + "": 3, + "fsproj": 1, + "": 3, + "": 2, + "": 2, + "": 5, + "fsproj_sample.XML": 2, + "": 5, + "": 2, + "": 2, + "": 2, + "True": 13, + "": 2, + "": 5, + "": 1, + "": 1, + "": 1, + "": 1, + "": 2, + "(": 65, + "MSBuildExtensionsPath32": 2, + ")": 58, + "..": 1, + "Microsoft": 2, + "SDKs": 1, + "F#": 1, + "Framework": 1, + "v4.0": 1, + "Microsoft.FSharp.Targets": 2, + "": 2, + "": 1, + "": 1, + "VisualStudio": 1, + "v": 1, + "VisualStudioVersion": 1, + "FSharp": 1, + "": 1, + "": 1, "": 1, - "name=": 223, + "name=": 227, "xmlns": 2, "ea=": 2, - "": 2, + "": 4, "This": 21, "easyant": 3, "module.ant": 1, - "sample": 2, "file": 3, "is": 123, "optionnal": 1, @@ -39155,7 +67680,7 @@ "own": 2, "specific": 8, "target.": 1, - "": 2, + "": 4, "": 2, "": 2, "my": 2, @@ -39182,9 +67707,9 @@ "revision=": 3, "status=": 1, "this": 77, - "a": 127, + "a": 128, "module.ivy": 1, - "for": 59, + "for": 60, "java": 1, "standard": 1, "application": 2, @@ -39200,32 +67725,31 @@ "description=": 2, "": 1, "": 1, - "": 1, + "": 4, "org=": 1, "rev=": 1, "conf=": 1, "default": 9, "junit": 2, "test": 7, - "-": 49, "/": 6, "": 1, "": 1, "": 1, "": 1, - "": 1, + "": 2, "ReactiveUI": 2, - "": 1, + "": 2, "": 1, "": 1, "": 120, - "": 120, + "": 121, "IObservedChange": 5, "generic": 3, "interface": 4, "that": 94, "replaces": 1, - "the": 260, + "the": 261, "non": 1, "PropertyChangedEventArgs.": 1, "Note": 7, @@ -39233,9 +67757,7 @@ "used": 19, "both": 2, "Changing": 5, - "(": 52, "i.e.": 23, - ")": 45, "Changed": 4, "Observables.": 2, "In": 6, @@ -39249,15 +67771,15 @@ "casting": 1, "between": 15, "changes.": 2, - "": 121, + "": 122, "": 120, - "The": 74, + "The": 75, "object": 42, "has": 16, "raised": 1, "change.": 12, "name": 7, - "of": 75, + "of": 76, "property": 74, "changed": 18, "on": 35, @@ -39353,7 +67875,7 @@ "itself": 2, "changes": 13, ".": 20, - "It": 1, + "It": 2, "important": 6, "implement": 5, "Changing/Changed": 1, @@ -39395,7 +67917,6 @@ "ItemChanging": 2, "ItemChanged": 2, "properties": 29, - ";": 10, "implementing": 2, "rebroadcast": 2, "through": 3, @@ -39431,7 +67952,7 @@ "string": 13, "distinguish": 12, "arbitrarily": 2, - "by": 13, + "by": 14, "client.": 2, "Listen": 4, "provides": 6, @@ -39443,7 +67964,7 @@ "to.": 7, "": 12, "": 84, - "A": 19, + "A": 21, "identical": 11, "types": 10, "one": 27, @@ -39455,7 +67976,6 @@ "particular": 2, "registered.": 2, "message.": 1, - "True": 6, "posted": 3, "Type.": 2, "Registers": 3, @@ -39489,7 +68009,7 @@ "allows": 15, "log": 2, "attached.": 1, - "data": 1, + "data": 2, "structure": 1, "representation": 1, "memoizing": 2, @@ -39531,7 +68051,6 @@ "evicted": 2, "because": 2, "Invalidate": 2, - "full": 1, "Evaluates": 1, "returning": 1, "cached": 2, @@ -39560,7 +68079,7 @@ "object.": 3, "ViewModel": 8, "another": 3, - "s": 1, + "s": 3, "Return": 1, "instance": 2, "type.": 3, @@ -39683,7 +68202,7 @@ "manage": 1, "disk": 1, "download": 1, - "save": 1, + "save": 2, "temporary": 1, "folder": 1, "onRelease": 1, @@ -39749,7 +68268,6 @@ "notification": 6, "Attempts": 1, "expression": 3, - "false": 2, "expression.": 1, "entire": 1, "able": 1, @@ -39839,7 +68357,7 @@ "private": 1, "field.": 1, "Reference": 1, - "Use": 13, + "Use": 15, "custom": 4, "raiseAndSetIfChanged": 1, "doesn": 1, @@ -39914,7 +68432,518 @@ "need": 12, "setup.": 12, "": 1, - "": 1 + "": 1, + "": 1, + "": 1, + "c67af951": 1, + "d8d6376993e7": 1, + "nproj_sample": 2, + "": 1, + "": 1, + "": 1, + "Net": 1, + "": 1, + "": 1, + "ProgramFiles": 1, + "Nemerle": 3, + "": 1, + "": 1, + "NemerleBinPathRoot": 1, + "NemerleVersion": 1, + "": 1, + "nproj": 1, + "OutputPath": 1, + "AssemblyName": 1, + ".xml": 1, + "": 3, + "": 3, + "": 1, + "False": 1, + "": 1, + "": 2, + "Nemerle.dll": 1, + "": 2, + "": 1, + "Nemerle.Linq.dll": 1, + "": 1, + "": 1, + "": 1, + "TS": 1, + "": 1, + "language=": 1, + "": 1, + "MainWindow": 1, + "": 8, + "": 8, + "filename=": 8, + "line=": 8, + "": 8, + "United": 1, + "Kingdom": 1, + "": 8, + "": 8, + "Reino": 1, + "Unido": 1, + "": 8, + "": 8, + "God": 1, + "Queen": 1, + "Deus": 1, + "salve": 1, + "Rainha": 1, + "England": 1, + "Inglaterra": 1, + "Wales": 1, + "Gales": 1, + "Scotland": 1, + "Esc": 1, + "cia": 1, + "Northern": 1, + "Ireland": 1, + "Irlanda": 1, + "Norte": 1, + "Portuguese": 1, + "Portugu": 1, + "English": 1, + "Ingl": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "Sample": 2, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "Hugh": 2, + "Bot": 2, + "": 1, + "": 1, + "": 1, + "package": 1, + "nuget": 1, + "just": 1, + "works": 1, + "": 1, + "http": 2, + "//hubot.github.com": 1, + "": 1, + "": 1, + "": 1, + "https": 1, + "//github.com/github/hubot/LICENSEmd": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "src=": 1, + "target=": 1, + "": 1, + "": 1, + "MyCommon": 1, + "": 1, + "Name=": 1, + "": 1, + "Text=": 1, + "": 1, + "D377F": 1, + "A798": 1, + "B3FD04C": 1, + "": 1, + "vbproj_sample.Module1": 1, + "": 1, + "vbproj_sample": 1, + "vbproj": 3, + "": 1, + "Console": 3, + "": 1, + "": 2, + "": 2, + "": 2, + "": 2, + "sample.xml": 2, + "": 2, + "": 2, + "": 1, + "On": 2, + "": 1, + "": 1, + "Binary": 1, + "": 1, + "": 1, + "Off": 1, + "": 1, + "": 1, + "": 1, + "": 3, + "": 3, + "": 3, + "Application.myapp": 1, + "": 3, + "": 3, + "": 1, + "": 1, + "Resources.resx": 1, + "Settings.settings": 1, + "": 1, + "": 1, + "": 1, + "": 3, + "VbMyResourcesResXFileCodeGenerator": 1, + "": 3, + "": 3, + "Resources.Designer.vb": 1, + "": 3, + "": 2, + "My.Resources": 1, + "": 2, + "": 1, + "Designer": 1, + "": 1, + "": 1, + "MyApplicationCodeGenerator": 1, + "Application.Designer.vb": 1, + "": 2, + "SettingsSingleFileGenerator": 1, + "My": 1, + "Settings.Designer.vb": 1, + "Label=": 11, + "": 2, + "Win32": 2, + "": 2, + "BF6EED48": 1, + "BF18": 1, + "C54": 1, + "F": 1, + "BBF19EEDC7C": 1, + "": 1, + "ManagedCProj": 1, + "": 1, + "vcxprojsample": 1, + "": 2, + "Application": 2, + "": 2, + "": 2, + "": 2, + "": 2, + "v120": 2, + "": 2, + "": 2, + "": 2, + "": 2, + "Unicode": 2, + "": 2, + "": 4, + "": 4, + "": 2, + "": 2, + "": 2, + "": 8, + "Level3": 2, + "": 1, + "Disabled": 1, + "": 1, + "": 2, + "WIN32": 2, + "_DEBUG": 1, + "%": 2, + "PreprocessorDefinitions": 2, + "": 2, + "": 4, + "": 4, + "": 6, + "": 2, + "": 2, + "": 2, + "": 2, + "": 2, + "": 2, + "": 2, + "": 2, + "NDEBUG": 1, + "": 2, + "": 4, + "": 2, + "Create": 2, + "": 2, + "": 10, + "": 3, + "FC737F1": 1, + "C7A5": 1, + "A066": 1, + "A32D752A2FF": 1, + "": 3, + "": 3, + "cpp": 1, + "c": 1, + "cc": 1, + "cxx": 1, + "def": 1, + "odl": 1, + "idl": 1, + "hpj": 1, + "bat": 1, + "asm": 1, + "asmx": 1, + "": 3, + "": 10, + "BD": 1, + "b04": 1, + "EB": 1, + "FBE52EBFB": 1, + "h": 1, + "hh": 1, + "hpp": 1, + "hxx": 1, + "hm": 1, + "inl": 1, + "inc": 1, + "xsd": 1, + "DA6AB6": 1, + "F800": 1, + "c08": 1, + "B7A": 1, + "BB121AAD01": 1, + "rc": 1, + "ico": 1, + "cur": 1, + "bmp": 1, + "dlg": 1, + "rc2": 1, + "rct": 1, + "rgs": 1, + "gif": 1, + "jpg": 1, + "jpeg": 1, + "jpe": 1, + "resx": 1, + "tiff": 1, + "tif": 1, + "png": 1, + "wav": 1, + "mfcribbon": 1, + "ms": 1, + "Header": 2, + "Files": 7, + "": 2, + "Resource": 2, + "": 1, + "Source": 3, + "": 1, + "": 1, + "compatVersion=": 1, + "": 1, + "FreeMedForms": 1, + "": 1, + "": 1, + "C": 1, + "Eric": 1, + "MAEKER": 1, + "MD": 1, + "": 1, + "": 1, + "GPLv3": 1, + "": 1, + "": 1, + "Patient": 1, + "": 1, + "XML": 1, + "form": 1, + "loader/saver": 1, + "FreeMedForms.": 1, + "": 1, + "//www.freemedforms.com/": 1, + "": 1, + "": 1, + "": 1, + "": 1 + }, + "Xojo": { + "#tag": 88, + "Class": 3, + "Protected": 1, + "App": 1, + "Inherits": 1, + "Application": 1, + "Constant": 3, + "Name": 31, + "kEditClear": 1, + "Type": 34, + "String": 3, + "Dynamic": 3, + "False": 14, + "Default": 9, + "Scope": 4, + "Public": 3, + "#Tag": 5, + "Instance": 5, + "Platform": 5, + "Windows": 2, + "Language": 5, + "Definition": 5, + "Linux": 2, + "EndConstant": 3, + "kFileQuit": 1, + "kFileQuitShortcut": 1, + "Mac": 1, + "OS": 1, + "ViewBehavior": 2, + "EndViewBehavior": 2, + "End": 27, + "EndClass": 1, + "Report": 2, + "Begin": 23, + "BillingReport": 1, + "Compatibility": 2, + "Units": 1, + "Width": 3, + "PageHeader": 1, + "Height": 5, + "Body": 1, + "PageFooter": 1, + "EndReport": 1, + "ReportCode": 1, + "EndReportCode": 1, + "Dim": 3, + "dbFile": 3, + "As": 4, + "FolderItem": 1, + "db": 1, + "New": 1, + "SQLiteDatabase": 1, + "GetFolderItem": 1, + "(": 7, + ")": 7, + "db.DatabaseFile": 1, + "If": 4, + "db.Connect": 1, + "Then": 1, + "db.SQLExecute": 2, + "_": 1, + "+": 5, + "db.Error": 1, + "then": 1, + "MsgBox": 3, + "db.ErrorMessage": 2, + "db.Rollback": 1, + "Else": 2, + "db.Commit": 1, + "Menu": 2, + "MainMenuBar": 1, + "MenuItem": 11, + "FileMenu": 1, + "SpecialMenu": 13, + "Text": 13, + "Index": 14, + "-": 14, + "AutoEnable": 13, + "True": 46, + "Visible": 41, + "QuitMenuItem": 1, + "FileQuit": 1, + "ShortcutKey": 6, + "Shortcut": 6, + "EditMenu": 1, + "EditUndo": 1, + "MenuModifier": 5, + "EditSeparator1": 1, + "EditCut": 1, + "EditCopy": 1, + "EditPaste": 1, + "EditClear": 1, + "EditSeparator2": 1, + "EditSelectAll": 1, + "UntitledSeparator": 1, + "AppleMenuItem": 1, + "AboutItem": 1, + "EndMenu": 1, + "Toolbar": 2, + "MyToolbar": 1, + "ToolButton": 2, + "FirstItem": 1, + "Caption": 3, + "HelpTag": 3, + "Style": 2, + "SecondItem": 1, + "EndToolbar": 1, + "Window": 2, + "Window1": 1, + "BackColor": 1, + "&": 1, + "cFFFFFF00": 1, + "Backdrop": 1, + "CloseButton": 1, + "Composite": 1, + "Frame": 1, + "FullScreen": 1, + "FullScreenButton": 1, + "HasBackColor": 1, + "ImplicitInstance": 1, + "LiveResize": 1, + "MacProcID": 1, + "MaxHeight": 1, + "MaximizeButton": 1, + "MaxWidth": 1, + "MenuBar": 1, + "MenuBarVisible": 1, + "MinHeight": 1, + "MinimizeButton": 1, + "MinWidth": 1, + "Placement": 1, + "Resizeable": 1, + "Title": 1, + "PushButton": 1, + "HelloWorldButton": 2, + "AutoDeactivate": 1, + "Bold": 1, + "ButtonStyle": 1, + "Cancel": 1, + "Enabled": 1, + "InitialParent": 1, + "Italic": 1, + "Left": 1, + "LockBottom": 1, + "LockedInPosition": 1, + "LockLeft": 1, + "LockRight": 1, + "LockTop": 1, + "TabIndex": 1, + "TabPanelIndex": 1, + "TabStop": 1, + "TextFont": 1, + "TextSize": 1, + "TextUnit": 1, + "Top": 1, + "Underline": 1, + "EndWindow": 1, + "WindowCode": 1, + "EndWindowCode": 1, + "Events": 1, + "Event": 1, + "Sub": 2, + "Action": 1, + "total": 4, + "Integer": 2, + "For": 1, + "i": 2, + "To": 1, + "Next": 1, + "Str": 1, + "EndEvent": 1, + "EndEvents": 1, + "ViewProperty": 28, + "true": 26, + "Group": 28, + "InitialValue": 23, + "EndViewProperty": 28, + "EditorType": 14, + "EnumValues": 2, + "EndEnumValues": 2 }, "XProc": { "": 1, @@ -40223,7 +69252,7 @@ }, "YAML": { "gem": 1, - "-": 16, + "-": 25, "local": 1, "gen": 1, "rdoc": 2, @@ -40235,216 +69264,646 @@ "numbers": 1, "gempath": 1, "/usr/local/rubygems": 1, - "/home/gavin/.rubygems": 1 + "/home/gavin/.rubygems": 1, + "http_interactions": 1, + "request": 1, + "method": 1, + "get": 1, + "uri": 1, + "http": 1, + "//example.com/": 1, + "body": 3, + "headers": 2, + "{": 1, + "}": 1, + "response": 2, + "status": 1, + "code": 1, + "message": 1, + "OK": 1, + "Content": 2, + "Type": 1, + "text/html": 1, + ";": 1, + "charset": 1, + "utf": 1, + "Length": 1, + "This": 1, + "is": 1, + "the": 1, + "http_version": 1, + "recorded_at": 1, + "Tue": 1, + "Nov": 1, + "GMT": 1, + "recorded_with": 1, + "VCR": 1 + }, + "Zephir": { + "%": 10, + "{": 58, + "#define": 1, + "MAX_FACTOR": 3, + "}": 52, + "namespace": 4, + "Test": 4, + ";": 91, + "#include": 9, + "static": 1, + "long": 3, + "fibonacci": 4, + "(": 59, + "n": 5, + ")": 57, + "if": 39, + "<": 2, + "return": 26, + "else": 11, + "-": 25, + "+": 5, + "class": 3, + "Cblock": 1, + "public": 22, + "function": 22, + "testCblock1": 1, + "int": 3, + "a": 6, + "testCblock2": 1, + "#ifdef": 1, + "HAVE_CONFIG_H": 1, + "#endif": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "ZEPHIR_INIT_CLASS": 2, + "Test_Router_Exception": 2, + "ZEPHIR_REGISTER_CLASS_EX": 1, + "Router": 3, + "Exception": 4, + "test": 1, + "router_exception": 1, + "zend_exception_get_default": 1, + "TSRMLS_C": 1, + "NULL": 1, + "SUCCESS": 1, + "extern": 1, + "zend_class_entry": 1, + "*test_router_exception_ce": 1, + "php": 1, + "extends": 1, + "Route": 1, + "protected": 9, + "_pattern": 3, + "_compiledPattern": 3, + "_paths": 3, + "_methods": 5, + "_hostname": 3, + "_converters": 3, + "_id": 2, + "_name": 3, + "_beforeMatch": 3, + "__construct": 1, + "pattern": 37, + "paths": 7, + "null": 11, + "httpMethods": 6, + "this": 28, + "reConfigure": 2, + "let": 51, + "compilePattern": 2, + "var": 4, + "idPattern": 6, + "memstr": 10, + "str_replace": 6, + ".": 5, + "via": 1, + "extractNamedParams": 2, + "string": 6, + "char": 1, + "ch": 27, + "tmp": 4, + "matches": 5, + "boolean": 1, + "notValid": 5, + "false": 3, + "cursor": 4, + "cursorVar": 5, + "marker": 4, + "bracketCount": 7, + "parenthesesCount": 5, + "foundPattern": 6, + "intermediate": 4, + "numberMatches": 4, + "route": 12, + "item": 7, + "variable": 5, + "regexp": 7, + "strlen": 1, + "<=>": 5, + "0": 9, + "for": 4, + "in": 4, + "1": 3, + "substr": 3, + "break": 9, + "&&": 6, + "z": 2, + "Z": 2, + "true": 2, + "<='9')>": 1, + "_": 1, + "2": 2, + "continue": 1, + "[": 14, + "]": 14, + "moduleName": 5, + "controllerName": 7, + "actionName": 4, + "parts": 9, + "routePaths": 5, + "realClassName": 1, + "namespaceName": 1, + "pcrePattern": 4, + "compiledPattern": 4, + "extracted": 4, + "typeof": 2, + "throw": 1, + "new": 1, + "explode": 1, + "switch": 1, + "count": 1, + "case": 3, + "controller": 1, + "action": 1, + "array": 1, + "The": 1, + "contains": 1, + "invalid": 1, + "#": 1, + "array_merge": 1, + "//Update": 1, + "the": 1, + "s": 1, + "name": 5, + "*": 2, + "@return": 1, + "*/": 1, + "getName": 1, + "setName": 1, + "beforeMatch": 1, + "callback": 2, + "getBeforeMatch": 1, + "getRouteId": 1, + "getPattern": 1, + "getCompiledPattern": 1, + "getPaths": 1, + "getReversedPaths": 1, + "reversed": 4, + "path": 3, + "position": 3, + "setHttpMethods": 1, + "getHttpMethods": 1, + "setHostname": 1, + "hostname": 2, + "getHostname": 1, + "convert": 1, + "converter": 2, + "getConverters": 1 + }, + "Zimpl": { + "#": 2, + "param": 1, + "columns": 2, + ";": 7, + "set": 3, + "I": 3, + "{": 2, + "..": 1, + "}": 2, + "IxI": 6, + "*": 2, + "TABU": 4, + "[": 8, + "": 3, + "in": 5, + "]": 8, + "": 2, + "with": 1, + "(": 6, + "m": 4, + "i": 8, + "or": 3, + "n": 4, + "j": 8, + ")": 6, + "and": 1, + "abs": 2, + "-": 3, + "var": 1, + "x": 4, + "binary": 1, + "maximize": 1, + "queens": 1, + "sum": 2, + "subto": 1, + "c1": 1, + "forall": 1, + "do": 1, + "card": 2 } }, "language_tokens": { "ABAP": 1500, + "Agda": 376, + "Alloy": 1143, "ApacheConf": 1449, "Apex": 4408, "AppleScript": 1862, "Arduino": 20, + "AsciiDoc": 103, + "AspectJ": 324, + "Assembly": 21750, + "ATS": 4558, "AutoHotkey": 3, "Awk": 544, - "C": 58732, - "C++": 21480, + "BlitzBasic": 2065, + "Bluespec": 1298, + "Brightscript": 579, + "C": 59053, + "C#": 278, + "C++": 34739, "Ceylon": 50, + "Cirru": 244, + "Clojure": 510, + "COBOL": 90, "CoffeeScript": 2951, + "Common Lisp": 2186, + "Component Pascal": 825, "Coq": 18259, + "Creole": 134, + "Crystal": 1506, "CSS": 43867, - "Dart": 68, - "Delphi": 30, + "Cuda": 290, + "Dart": 74, "Diff": 16, - "Ecl": 281, + "DM": 169, + "Dogescript": 30, + "E": 601, + "Eagle": 30089, + "ECL": 281, "edn": 227, "Elm": 628, "Emacs Lisp": 1756, "Erlang": 2928, "fish": 636, "Forth": 1516, + "Frege": 5564, + "Game Maker Language": 13310, + "GAMS": 363, + "GAP": 9944, "GAS": 133, - "Gosu": 413, - "Groovy": 69, + "GLSL": 4033, + "Gnuplot": 1023, + "Gosu": 410, + "Grammatical Framework": 10607, + "Groovy": 93, "Groovy Server Pages": 91, "Haml": 4, "Handlebars": 69, + "Haskell": 302, + "HTML": 413, + "Hy": 155, + "IDL": 418, + "Idris": 148, + "Inform 7": 75, "INI": 27, "Ioke": 2, + "Isabelle": 136, + "Jade": 3, "Java": 8987, - "JavaScript": 76934, - "JSON": 619, + "JavaScript": 76970, + "JSON": 183, + "JSON5": 57, + "JSONiq": 151, + "JSONLD": 18, "Julia": 247, + "Kit": 6, "Kotlin": 155, + "KRL": 25, "Lasso": 9849, + "Latte": 759, "Less": 39, + "LFE": 1711, + "Liquid": 633, + "Literate Agda": 478, "Literate CoffeeScript": 275, "LiveScript": 123, "Logos": 93, "Logtalk": 36, "Lua": 724, - "M": 23373, + "M": 23615, "Makefile": 50, "Markdown": 1, - "Matlab": 11787, - "Max": 136, + "Mask": 74, + "Mathematica": 1857, + "Matlab": 11942, + "Max": 714, + "MediaWiki": 766, + "Mercury": 31096, "Monkey": 207, + "Moocode": 5234, "MoonScript": 1718, + "MTML": 93, "Nemerle": 17, + "NetLogo": 243, "Nginx": 179, "Nimrod": 1, + "Nix": 188, "NSIS": 725, "Nu": 116, "Objective-C": 26518, + "Objective-C++": 6021, "OCaml": 382, "Omgrofl": 57, "Opa": 28, - "OpenCL": 88, + "OpenCL": 144, "OpenEdge ABL": 762, + "Org": 358, + "Ox": 1006, + "Oxygene": 157, + "Pan": 130, "Parrot Assembly": 6, "Parrot Internal Representation": 5, - "Perl": 17497, + "Pascal": 30, + "PAWN": 3263, + "Perl": 17979, + "Perl6": 372, "PHP": 20724, + "Pike": 1835, + "Pod": 658, "PogoScript": 250, + "PostScript": 107, "PowerShell": 12, "Processing": 74, - "Prolog": 4040, - "Python": 5715, - "R": 175, - "Racket": 360, + "Prolog": 2420, + "Propeller Spin": 13519, + "Protocol Buffer": 63, + "PureScript": 1652, + "Python": 6587, + "R": 1790, + "Racket": 331, "Ragel in Ruby Host": 593, - "Rebol": 11, - "Ruby": 3854, + "RDoc": 279, + "Rebol": 533, + "Red": 816, + "RMarkdown": 19, + "RobotFramework": 483, + "Ruby": 3862, "Rust": 3566, + "SAS": 93, "Sass": 56, - "Scala": 420, - "Scheme": 3478, + "Scala": 750, + "Scaml": 4, + "Scheme": 3515, "Scilab": 69, "SCSS": 39, "Shell": 3744, + "ShellSession": 233, + "Shen": 3472, "Slash": 187, - "Standard ML": 243, - "SuperCollider": 268, + "Slim": 77, + "Smalltalk": 423, + "SourcePawn": 2080, + "SQL": 1485, + "Squirrel": 130, + "Standard ML": 6567, + "Stata": 3133, + "STON": 100, + "Stylus": 76, + "SuperCollider": 133, + "Swift": 1128, + "SystemVerilog": 541, + "Tcl": 1133, "Tea": 3, - "TeX": 1155, + "TeX": 2701, "Turing": 44, "TXL": 213, - "TypeScript": 106, + "TypeScript": 109, + "UnrealScript": 2873, + "VCL": 545, "Verilog": 3778, "VHDL": 42, "VimL": 20, - "Visual Basic": 345, + "Visual Basic": 581, + "Volt": 388, "wisp": 1363, "XC": 24, - "XML": 5622, + "XML": 7057, + "Xojo": 807, "XProc": 22, "XQuery": 801, "XSLT": 44, "Xtend": 399, - "YAML": 30 + "YAML": 77, + "Zephir": 1085, + "Zimpl": 123 }, "languages": { "ABAP": 1, + "Agda": 1, + "Alloy": 3, "ApacheConf": 3, "Apex": 6, "AppleScript": 7, "Arduino": 1, + "AsciiDoc": 3, + "AspectJ": 2, + "Assembly": 4, + "ATS": 10, "AutoHotkey": 1, "Awk": 1, - "C": 24, - "C++": 20, + "BlitzBasic": 3, + "Bluespec": 2, + "Brightscript": 1, + "C": 29, + "C#": 2, + "C++": 29, "Ceylon": 1, + "Cirru": 9, + "Clojure": 7, + "COBOL": 4, "CoffeeScript": 9, + "Common Lisp": 3, + "Component Pascal": 2, "Coq": 12, + "Creole": 1, + "Crystal": 3, "CSS": 2, + "Cuda": 2, "Dart": 1, - "Delphi": 1, "Diff": 1, - "Ecl": 1, + "DM": 1, + "Dogescript": 1, + "E": 6, + "Eagle": 2, + "ECL": 1, "edn": 1, "Elm": 3, "Emacs Lisp": 2, "Erlang": 5, "fish": 3, "Forth": 7, + "Frege": 4, + "Game Maker Language": 13, + "GAMS": 1, + "GAP": 7, "GAS": 1, - "Gosu": 5, - "Groovy": 2, + "GLSL": 5, + "Gnuplot": 6, + "Gosu": 4, + "Grammatical Framework": 41, + "Groovy": 5, "Groovy Server Pages": 4, "Haml": 1, "Handlebars": 2, + "Haskell": 3, + "HTML": 2, + "Hy": 2, + "IDL": 4, + "Idris": 1, + "Inform 7": 2, "INI": 2, "Ioke": 1, + "Isabelle": 1, + "Jade": 1, "Java": 6, - "JavaScript": 20, - "JSON": 5, + "JavaScript": 22, + "JSON": 4, + "JSON5": 2, + "JSONiq": 2, + "JSONLD": 1, "Julia": 1, + "Kit": 1, "Kotlin": 1, + "KRL": 1, "Lasso": 4, + "Latte": 2, "Less": 1, + "LFE": 4, + "Liquid": 2, + "Literate Agda": 1, "Literate CoffeeScript": 1, "LiveScript": 1, "Logos": 1, "Logtalk": 1, "Lua": 3, - "M": 28, + "M": 29, "Makefile": 2, "Markdown": 1, - "Matlab": 37, - "Max": 1, + "Mask": 1, + "Mathematica": 6, + "Matlab": 39, + "Max": 3, + "MediaWiki": 1, + "Mercury": 9, "Monkey": 1, + "Moocode": 3, "MoonScript": 1, + "MTML": 1, "Nemerle": 1, + "NetLogo": 1, "Nginx": 1, "Nimrod": 1, + "Nix": 1, "NSIS": 2, "Nu": 2, "Objective-C": 19, + "Objective-C++": 2, "OCaml": 2, "Omgrofl": 1, "Opa": 2, - "OpenCL": 1, + "OpenCL": 2, "OpenEdge ABL": 5, + "Org": 1, + "Ox": 3, + "Oxygene": 1, + "Pan": 1, "Parrot Assembly": 1, "Parrot Internal Representation": 1, - "Perl": 14, + "Pascal": 1, + "PAWN": 1, + "Perl": 15, + "Perl6": 3, "PHP": 9, + "Pike": 2, + "Pod": 1, "PogoScript": 1, + "PostScript": 1, "PowerShell": 2, "Processing": 1, - "Prolog": 6, - "Python": 7, - "R": 2, - "Racket": 3, + "Prolog": 5, + "Propeller Spin": 10, + "Protocol Buffer": 1, + "PureScript": 4, + "Python": 10, + "R": 7, + "Racket": 2, "Ragel in Ruby Host": 3, - "Rebol": 1, - "Ruby": 16, + "RDoc": 1, + "Rebol": 6, + "Red": 2, + "RMarkdown": 1, + "RobotFramework": 3, + "Ruby": 17, "Rust": 1, + "SAS": 2, "Sass": 2, - "Scala": 3, - "Scheme": 1, + "Scala": 4, + "Scaml": 1, + "Scheme": 2, "Scilab": 3, "SCSS": 1, "Shell": 37, + "ShellSession": 3, + "Shen": 3, "Slash": 1, - "Standard ML": 2, - "SuperCollider": 2, + "Slim": 1, + "Smalltalk": 3, + "SourcePawn": 1, + "SQL": 5, + "Squirrel": 1, + "Standard ML": 5, + "Stata": 7, + "STON": 7, + "Stylus": 1, + "SuperCollider": 1, + "Swift": 43, + "SystemVerilog": 4, + "Tcl": 2, "Tea": 1, - "TeX": 1, + "TeX": 2, "Turing": 1, "TXL": 1, "TypeScript": 3, + "UnrealScript": 2, + "VCL": 2, "Verilog": 13, "VHDL": 1, "VimL": 2, - "Visual Basic": 1, + "Visual Basic": 3, + "Volt": 1, "wisp": 1, "XC": 1, - "XML": 3, + "XML": 13, + "Xojo": 6, "XProc": 1, "XQuery": 1, "XSLT": 1, "Xtend": 2, - "YAML": 1 + "YAML": 2, + "Zephir": 5, + "Zimpl": 1 }, - "md5": "98ddc204696b84bb42fd75ba9d22e0ca" + "md5": "dac5efdbb630ce51506df095cd2a6e40" } \ No newline at end of file diff --git a/lib/linguist/samples.rb b/lib/linguist/samples.rb index d9099385..2bd5212e 100644 --- a/lib/linguist/samples.rb +++ b/lib/linguist/samples.rb @@ -1,4 +1,8 @@ -require 'yaml' +begin + require 'json' +rescue LoadError + require 'yaml' +end require 'linguist/md5' require 'linguist/classifier' @@ -14,7 +18,8 @@ module Linguist # Hash of serialized samples object if File.exist?(PATH) - DATA = YAML.load_file(PATH) + serializer = defined?(JSON) ? JSON : YAML + DATA = serializer.load(File.read(PATH)) end # Public: Iterate over each sample. @@ -52,6 +57,7 @@ module Linguist yield({ :path => File.join(dirname, filename), :language => category, + :interpreter => File.exist?(filename) ? Linguist.interpreter_from_shebang(File.read(filename)) : nil, :extname => File.extname(filename) }) end @@ -67,6 +73,7 @@ module Linguist def self.data db = {} db['extnames'] = {} + db['interpreters'] = {} db['filenames'] = {} each do |sample| @@ -80,6 +87,14 @@ module Linguist end end + if sample[:interpreter] + db['interpreters'][language_name] ||= [] + if !db['interpreters'][language_name].include?(sample[:interpreter]) + db['interpreters'][language_name] << sample[:interpreter] + db['interpreters'][language_name].sort! + end + end + if sample[:filename] db['filenames'][language_name] ||= [] db['filenames'][language_name] << sample[:filename] @@ -95,4 +110,40 @@ module Linguist db end end + + # Used to retrieve the interpreter from the shebang line of a file's + # data. + def self.interpreter_from_shebang(data) + lines = data.lines.to_a + + if lines.any? && (match = lines[0].match(/(.+)\n?/)) && (bang = match[0]) =~ /^#!/ + bang.sub!(/^#! /, '#!') + tokens = bang.split(' ') + pieces = tokens.first.split('/') + + if pieces.size > 1 + script = pieces.last + else + script = pieces.first.sub('#!', '') + end + + script = script == 'env' ? tokens[1] : script + + # "python2.6" -> "python" + if script =~ /((?:\d+\.?)+)/ + script.sub! $1, '' + end + + # Check for multiline shebang hacks that call `exec` + if script == 'sh' && + lines[0...5].any? { |l| l.match(/exec (\w+).+\$0.+\$@/) } + script = $1 + end + + script + else + nil + end + end + end diff --git a/lib/linguist/vendor.yml b/lib/linguist/vendor.yml index 8967c266..4d8481e5 100644 --- a/lib/linguist/vendor.yml +++ b/lib/linguist/vendor.yml @@ -10,7 +10,10 @@ ## Vendor Conventions ## # Caches -- cache/ +- (^|/)cache/ + +# Dependencies +- ^[Dd]ependencies/ # C deps # https://github.com/joyent/node @@ -24,20 +27,34 @@ # Node dependencies - node_modules/ +# Bower Components +- bower_components/ + # Erlang bundles - ^rebar$ +# Bootstrap minified css and js +- (^|/)bootstrap([^.]*)(\.min)?\.(js|css)$ + +# Foundation css +- foundation.min.css +- foundation.css + # Vendored dependencies -- vendor/ +- thirdparty/ +- vendors?/ # Debian packaging - ^debian/ +# Haxelib projects often contain a neko bytecode file named run.n +- run.n$ + ## Commonly Bundled JavaScript frameworks ## # jQuery - (^|/)jquery([^.]*)(\.min)?\.js$ -- (^|/)jquery\-\d\.\d(\.\d)?(\.min)?\.js$ +- (^|/)jquery\-\d\.\d+(\.\d+)?(\.min)?\.js$ # jQuery UI - (^|/)jquery\-ui(\-\d\.\d+(\.\d+)?)?(\.\w+)?(\.min)?\.(js|css)$ @@ -49,6 +66,9 @@ - (^|/)controls\.js$ - (^|/)dragdrop\.js$ +# Typescript definition files +- (.*?)\.d\.ts$ + # MooTools - (^|/)mootools([^.]*)\d+\.\d+.\d+([^.]*)\.js$ @@ -75,6 +95,19 @@ - (^|/)shCore\.js$ - (^|/)shLegacy\.js$ +# AngularJS +- (^|/)angular([^.]*)(\.min)?\.js$ + +# D3.js +- (^|\/)d3(\.v\d+)?([^.]*)(\.min)?\.js$ + +# React +- (^|/)react(-[^.]*)?(\.min)?\.js$ + +# Modernizr +- (^|/)modernizr\-\d\.\d+(\.\d+)?(\.min)?\.js$ +- (^|/)modernizr\.custom\.\d+\.js$ + ## Python ## # django @@ -86,16 +119,26 @@ # WAF - ^waf$ +# .osx +- ^.osx$ ## Obj-C ## # Sparkle - (^|/)Sparkle/ +## Groovy ## + +# Gradle +- (^|/)gradlew$ +- (^|/)gradlew\.bat$ +- (^|/)gradle/wrapper/ + ## .NET ## # Visual Studio IntelliSense - -vsdoc\.js$ +- \.intellisense\.js$ # jQuery validation plugin (MS bundles this with asp.net mvc) - (^|/)jquery([^.]*)\.validate(\.unobtrusive)?(\.min)?\.js$ @@ -105,17 +148,36 @@ - (^|/)[Mm]icrosoft([Mm]vc)?([Aa]jax|[Vv]alidation)(\.debug)?\.js$ # NuGet -- ^[Pp]ackages/ +- ^[Pp]ackages\/.+\.\d+\/ # ExtJS -- (^|/)extjs/ +- (^|/)extjs/.*?\.js$ +- (^|/)extjs/.*?\.xml$ +- (^|/)extjs/.*?\.txt$ +- (^|/)extjs/.*?\.html$ +- (^|/)extjs/.*?\.properties$ +- (^|/)extjs/.sencha/ +- (^|/)extjs/docs/ +- (^|/)extjs/builds/ +- (^|/)extjs/cmd/ +- (^|/)extjs/examples/ +- (^|/)extjs/locale/ +- (^|/)extjs/packages/ +- (^|/)extjs/plugins/ +- (^|/)extjs/resources/ +- (^|/)extjs/src/ +- (^|/)extjs/welcome/ + +# Html5shiv +- (^|/)html5shiv(\.min)?\.js$ # Samples folders - ^[Ss]amples/ # LICENSE, README, git config files - ^COPYING$ -- ^LICENSE$ +- LICENSE$ +- License$ - gitattributes$ - gitignore$ - gitmodules$ @@ -125,5 +187,24 @@ # Test fixtures - ^[Tt]est/fixtures/ +# PhoneGap/Cordova +- (^|/)cordova([^.]*)(\.min)?\.js$ +- (^|/)cordova\-\d\.\d(\.\d)?(\.min)?\.js$ + +# Vagrant +- ^Vagrantfile$ + # .DS_Store's - .[Dd][Ss]_[Ss]tore$ + +# Mercury --use-subdirs +- Mercury/ + +# R packages +- ^vignettes/ +- ^inst/extdata/ + +# Octicons +- octicons.css +- octicons.min.css +- sprockets-octicons.scss diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb new file mode 100644 index 00000000..6704b3fb --- /dev/null +++ b/lib/linguist/version.rb @@ -0,0 +1,3 @@ +module Linguist + VERSION = "2.12.0" +end diff --git a/samples/ATS/CoYonedaLemma.dats b/samples/ATS/CoYonedaLemma.dats new file mode 100644 index 00000000..aeac8bb1 --- /dev/null +++ b/samples/ATS/CoYonedaLemma.dats @@ -0,0 +1,110 @@ +(* ****** ****** *) +// +// HX-2014-01 +// CoYoneda Lemma: +// +(* ****** ****** *) +// +#include +"share/atspre_staload.hats" +// +(* ****** ****** *) + +staload +"libats/ML/SATS/basis.sats" +staload +"libats/ML/SATS/list0.sats" + +(* ****** ****** *) + +staload _ = "libats/ML/DATS/list0.dats" + +(* ****** ****** *) + +sortdef ftype = type -> type + +(* ****** ****** *) + +infixr (->) ->> +typedef ->> (a:type, b:type) = a - b + +(* ****** ****** *) + +typedef +functor(F:ftype) = + {a,b:type} (a ->> b) ->> F(a) ->> F(b) + +(* ****** ****** *) + +typedef +list0 (a:type) = list0 (a) +extern +val functor_list0 : functor (list0) + +(* ****** ****** *) + +implement +functor_list0{a,b} + (f) = lam xs => list0_map (xs, f) + +(* ****** ****** *) + +datatype +CoYoneda + (F:ftype, r:type) = {a:type} CoYoneda of (a ->> r, F(a)) +// end of [CoYoneda] + +(* ****** ****** *) +// +extern +fun CoYoneda_phi + : {F:ftype}functor(F) -> {r:type} (F (r) ->> CoYoneda (F, r)) +extern +fun CoYoneda_psi + : {F:ftype}functor(F) -> {r:type} (CoYoneda (F, r) ->> F (r)) +// +(* ****** ****** *) + +implement +CoYoneda_phi(ftor) = lam (fx) => CoYoneda (lam x => x, fx) +implement +CoYoneda_psi(ftor) = lam (CoYoneda(f, fx)) => ftor (f) (fx) + +(* ****** ****** *) + +datatype int0 = I of (int) +datatype bool = True | False // boxed boolean + +(* ****** ****** *) +// +fun bool2string + (x:bool): string = +( + case+ x of True() => "True" | False() => "False" +) +// +implement +fprint_val (out, x) = fprint (out, bool2string(x)) +// +(* ****** ****** *) + +fun int2bool (i: int0): bool = + let val+I(i) = i in if i > 0 then True else False end + +(* ****** ****** *) + +val myintlist0 = g0ofg1($list{int0}((I)1, (I)0, (I)1, (I)0, (I)0)) +val myboolist0 = CoYoneda{list0,bool}{int0}(lam (i) => int2bool(i), myintlist0) +val myboolist0 = CoYoneda_psi{list0}(functor_list0){bool}(myboolist0) + +(* ****** ****** *) + +val ((*void*)) = fprintln! (stdout_ref, "myboolist0 = ", myboolist0) + +(* ****** ****** *) + +implement main0 () = () + +(* ****** ****** *) + +(* end of [CoYonedaLemma.dats] *) diff --git a/samples/ATS/DiningPhil2.dats b/samples/ATS/DiningPhil2.dats new file mode 100644 index 00000000..55c39654 --- /dev/null +++ b/samples/ATS/DiningPhil2.dats @@ -0,0 +1,178 @@ +(* ****** ****** *) +// +// HX-2013-11 +// +// Implementing a variant of +// the problem of Dining Philosophers +// +(* ****** ****** *) +// +#include +"share/atspre_define.hats" +#include +"share/atspre_staload.hats" +// +(* ****** ****** *) + +staload +UN = "prelude/SATS/unsafe.sats" + +(* ****** ****** *) + +staload "libc/SATS/stdlib.sats" +staload "libc/SATS/unistd.sats" + +(* ****** ****** *) + +staload "{$LIBATSHWXI}/teaching/mythread/SATS/channel.sats" + +(* ****** ****** *) + +staload _ = "libats/DATS/deqarray.dats" +staload _ = "{$LIBATSHWXI}/teaching/mythread/DATS/channel.dats" + +(* ****** ****** *) + +staload "./DiningPhil2.sats" + +(* ****** ****** *) + +implement phil_left (n) = n +implement phil_right (n) = (n+1) \nmod NPHIL + +(* ****** ****** *) +// +extern +fun randsleep (n: intGte(1)): void +// +implement +randsleep (n) = + ignoret (sleep($UN.cast{uInt}(rand() mod n + 1))) +// end of [randsleep] +// +(* ****** ****** *) + +implement +phil_think (n) = +{ +val () = println! ("phil_think(", n, ") starts") +val () = randsleep (6) +val () = println! ("phil_think(", n, ") finishes") +} + +(* ****** ****** *) + +implement +phil_dine (n, lf, rf) = +{ +val () = println! ("phil_dine(", n, ") starts") +val () = randsleep (3) +val () = println! ("phil_dine(", n, ") finishes") +} + +(* ****** ****** *) + +implement +phil_loop (n) = let +// +val () = phil_think (n) +// +val nl = phil_left (n) +val nr = phil_right (n) +// +val ch_lfork = fork_changet (nl) +val ch_rfork = fork_changet (nr) +// +val lf = channel_takeout (ch_lfork) +val () = println! ("phil_loop(", n, ") picks left fork") +// +val () = randsleep (2) // HX: try to actively induce deadlock +// +val rf = channel_takeout (ch_rfork) +val () = println! ("phil_loop(", n, ") picks right fork") +// +val () = phil_dine (n, lf, rf) +// +val ch_forktray = forktray_changet () +val () = channel_insert (ch_forktray, lf) +val () = channel_insert (ch_forktray, rf) +// +in + phil_loop (n) +end // end of [phil_loop] + +(* ****** ****** *) + +implement +cleaner_wash (f) = +{ +val f = fork_get_num (f) +val () = println! ("cleaner_wash(", f, ") starts") +val () = randsleep (1) +val () = println! ("cleaner_wash(", f, ") finishes") +} + +(* ****** ****** *) + +implement +cleaner_return (f) = +{ + val n = fork_get_num (f) + val ch = fork_changet (n) + val () = channel_insert (ch, f) +} + +(* ****** ****** *) + +implement +cleaner_loop () = let +// +val ch = forktray_changet () +val f0 = channel_takeout (ch) +// +val () = cleaner_wash (f0) +val () = cleaner_return (f0) +// +in + cleaner_loop () +end // end of [cleaner_loop] + +(* ****** ****** *) + +dynload "DiningPhil2.sats" +dynload "DiningPhil2_fork.dats" +dynload "DiningPhil2_thread.dats" + +(* ****** ****** *) + +local +// +staload +"{$LIBATSHWXI}/teaching/mythread/SATS/mythread.sats" +// +in (* in of [local] *) +// +val () = mythread_create_cloptr (llam () => phil_loop (0)) +val () = mythread_create_cloptr (llam () => phil_loop (1)) +val () = mythread_create_cloptr (llam () => phil_loop (2)) +val () = mythread_create_cloptr (llam () => phil_loop (3)) +val () = mythread_create_cloptr (llam () => phil_loop (4)) +// +val () = mythread_create_cloptr (llam () => cleaner_loop ()) +// +end // end of [local] + +(* ****** ****** *) + +implement +main0 () = +{ +// +val () = println! ("DiningPhil2: starting") +val ((*void*)) = while (true) ignoret (sleep(1)) +// +} (* end of [main0] *) + +(* ****** ****** *) + +(* end of [DiningPhil2.dats] *) diff --git a/samples/ATS/DiningPhil2.sats b/samples/ATS/DiningPhil2.sats new file mode 100644 index 00000000..bc7e96be --- /dev/null +++ b/samples/ATS/DiningPhil2.sats @@ -0,0 +1,71 @@ +(* ****** ****** *) +// +// HX-2013-11 +// +// Implementing a variant of +// the problem of Dining Philosophers +// +(* ****** ****** *) + +#include +"share/atspre_define.hats" + +(* ****** ****** *) + +staload "{$LIBATSHWXI}/teaching/mythread/SATS/channel.sats" + +(* ****** ****** *) + +%{# +#define NPHIL 5 +%} // end of [%{#] +#define NPHIL 5 + +(* ****** ****** *) + +typedef nphil = natLt(NPHIL) + +(* ****** ****** *) + +fun phil_left (n: nphil): nphil +fun phil_right (n: nphil): nphil + +(* ****** ****** *) +// +fun phil_loop (n: nphil): void +// +(* ****** ****** *) + +fun cleaner_loop ((*void*)): void + +(* ****** ****** *) + +absvtype fork_vtype = ptr +vtypedef fork = fork_vtype + +(* ****** ****** *) + +fun fork_get_num (!fork): nphil + +(* ****** ****** *) + +fun phil_dine + (n: nphil, lf: !fork, rf: !fork): void +// end of [phil_dine] + +fun phil_think (n: nphil): void + +(* ****** ****** *) + +fun cleaner_wash (f: !fork): void +fun cleaner_return (f: fork): void + +(* ****** ****** *) +// +fun fork_changet (n: nphil): channel(fork) +// +fun forktray_changet ((*void*)): channel(fork) +// +(* ****** ****** *) + +(* end of [DiningPhil2.sats] *) diff --git a/samples/ATS/DiningPhil2_fork.dats b/samples/ATS/DiningPhil2_fork.dats new file mode 100644 index 00000000..a6a8d4df --- /dev/null +++ b/samples/ATS/DiningPhil2_fork.dats @@ -0,0 +1,89 @@ +(* ****** ****** *) +// +// HX-2013-11 +// +// Implementing a variant of +// the problem of Dining Philosophers +// +(* ****** ****** *) +// +#include +"share/atspre_define.hats" +#include +"share/atspre_staload.hats" +// +(* ****** ****** *) + +staload +UN = "prelude/SATS/unsafe.sats" + +(* ****** ****** *) + +staload "{$LIBATSHWXI}/teaching/mythread/SATS/channel.sats" + +(* ****** ****** *) + +staload _ = "libats/DATS/deqarray.dats" +staload _ = "{$LIBATSHWXI}/teaching/mythread/DATS/channel.dats" + +(* ****** ****** *) + +staload "./DiningPhil2.sats" + +(* ****** ****** *) + +datavtype fork = FORK of (nphil) + +(* ****** ****** *) + +assume fork_vtype = fork + +(* ****** ****** *) + +implement +fork_get_num (f) = let val FORK(n) = f in n end + +(* ****** ****** *) + +local + +val +the_forkarray = let +// +typedef t = channel(fork) +// +implement +array_tabulate$fopr + (n) = ch where +{ + val n = $UN.cast{nphil}(n) + val ch = channel_create_exn (i2sz(2)) + val () = channel_insert (ch, FORK (n)) +} +// +in + arrayref_tabulate (i2sz(NPHIL)) +end // end of [val] + +in (* in of [local] *) + +implement fork_changet (n) = the_forkarray[n] + +end // end of [local] + +(* ****** ****** *) + +local + +val the_forktray = + channel_create_exn (i2sz(NPHIL+1)) + +in (* in of [local] *) + +implement forktray_changet () = the_forktray + +end // end of [local] + +(* ****** ****** *) + +(* end of [DiningPhil2_fork.dats] *) diff --git a/samples/ATS/DiningPhil2_thread.dats b/samples/ATS/DiningPhil2_thread.dats new file mode 100644 index 00000000..be73840b --- /dev/null +++ b/samples/ATS/DiningPhil2_thread.dats @@ -0,0 +1,43 @@ +(* ****** ****** *) +// +// HX-2013-11 +// +// Implementing a variant of +// the problem of Dining Philosophers +// +(* ****** ****** *) +// +#include "share/atspre_define.hats" +#include "share/atspre_staload.hats" +// +(* ****** ****** *) + +staload "{$LIBATSHWXI}/teaching/mythread/SATS/mythread.sats" + +(* ****** ****** *) + +local +// +#include "{$LIBATSHWXI}/teaching/mythread/DATS/mythread.dats" +// +in (* in of [local] *) +// +// HX: it is intentionally left to be empty +// +end // end of [local] + +(* ****** ****** *) + +local +// +#include "{$LIBATSHWXI}/teaching/mythread/DATS/mythread_posix.dats" +// +in (* in of [local] *) +// +// HX: it is intentionally left to be empty +// +end // end of [local] + +(* ****** ****** *) + +(* end of [DiningPhil2_thread.dats] *) diff --git a/samples/ATS/YonedaLemma.dats b/samples/ATS/YonedaLemma.dats new file mode 100644 index 00000000..cd3c31e6 --- /dev/null +++ b/samples/ATS/YonedaLemma.dats @@ -0,0 +1,178 @@ +(* ****** ****** *) +// +// HX-2014-01 +// Yoneda Lemma: +// The hardest "trivial" theorem :) +// +(* ****** ****** *) +// +#include +"share/atspre_staload.hats" +// +(* ****** ****** *) + +staload +"libats/ML/SATS/basis.sats" +staload +"libats/ML/SATS/list0.sats" +staload +"libats/ML/SATS/option0.sats" + +(* ****** ****** *) + +staload _ = "libats/ML/DATS/list0.dats" +staload _ = "libats/ML/DATS/option0.dats" + +(* ****** ****** *) + +sortdef ftype = type -> type + +(* ****** ****** *) + +infixr (->) ->> +typedef ->> (a:type, b:type) = a - b + +(* ****** ****** *) + +typedef +functor(F:ftype) = + {a,b:type} (a ->> b) ->> F(a) ->> F(b) + +(* ****** ****** *) + +typedef +list0 (a:type) = list0 (a) +extern +val functor_list0 : functor (list0) + +(* ****** ****** *) + +implement +functor_list0{a,b} + (f) = lam xs => list0_map (xs, f) + +(* ****** ****** *) + +typedef +option0 (a:type) = option0 (a) +extern +val functor_option0 : functor (option0) + +(* ****** ****** *) + +implement +functor_option0{a,b} + (f) = lam opt => option0_map (opt, f) + +(* ****** ****** *) + +extern +val functor_homres + : {c:type} functor (lam(r:type) => c ->> r) + +(* ****** ****** *) + +implement +functor_homres{c}{a,b} (f) = lam (r) => lam (x) => f (r(x)) + +(* ****** ****** *) +// +extern +fun Yoneda_phi : {F:ftype}functor(F) -> + {a:type}F(a) ->> ({r:type}(a ->> r) ->> F(r)) +extern +fun Yoneda_psi : {F:ftype}functor(F) -> + {a:type}({r:type}(a ->> r) ->> F(r)) ->> F(a) +// +(* ****** ****** *) +// +implement +Yoneda_phi + (ftor) = lam(fx) => lam (m) => ftor(m)(fx) +// +implement +Yoneda_psi (ftor) = lam(mf) => mf(lam x => x) +// +(* ****** ****** *) + +(* + +(* ****** ****** *) +// +// HX-2014-01-05: +// Another version based on Natural Transformation +// +(* ****** ****** *) + +typedef +natrans(F:ftype, G:ftype) = {x:type} (F(x) ->> G(x)) + +(* ****** ****** *) +// +extern +fun Yoneda_phi_nat : {F:ftype}functor(F) -> + {a:type} F(a) ->> natrans(lam (r:type) => (a ->> r), F) +extern +fun Yoneda_psi_nat : {F:ftype}functor(F) -> + {a:type} natrans(lam (r:type) => (a ->> r), F) ->> F(a) +// +(* ****** ****** *) +// +implement +Yoneda_phi_nat + (ftor) = lam(fx) => lam (m) => ftor(m)(fx) +// +implement +Yoneda_psi_nat (ftor) = lam(mf) => mf(lam x => x) +// +(* ****** ****** *) + +*) + +(* ****** ****** *) + +datatype bool = True | False // boxed boolean + +(* ****** ****** *) +// +fun bool2string + (x:bool): string = +( + case+ x of True() => "True" | False() => "False" +) +// +implement +fprint_val (out, x) = fprint (out, bool2string(x)) +// +(* ****** ****** *) +// +val myboolist0 = + $list_t{bool}(True, False, True, False, False) +val myboolist0 = g0ofg1_list (myboolist0) +// +(* ****** ****** *) +// +extern +val Yoneda_bool_list0 : {r:type} (bool ->> r) ->> list0(r) +// +implement +Yoneda_bool_list0 = + Yoneda_phi(functor_list0){bool}(myboolist0) +// +(* ****** ****** *) +// +val myboolist1 = + Yoneda_psi(functor_list0){bool}(Yoneda_bool_list0) +// +(* ****** ****** *) + +val () = fprintln! (stdout_ref, "myboolist0 = ", myboolist0) +val () = fprintln! (stdout_ref, "myboolist1 = ", myboolist1) + +(* ****** ****** *) + +implement main0 () = () + +(* ****** ****** *) + +(* end of [YonedaLemma.dats] *) diff --git a/samples/ATS/linset.hats b/samples/ATS/linset.hats new file mode 100644 index 00000000..29e44c44 --- /dev/null +++ b/samples/ATS/linset.hats @@ -0,0 +1,187 @@ +(***********************************************************************) +(* *) +(* Applied Type System *) +(* *) +(***********************************************************************) + +(* +** ATS/Postiats - Unleashing the Potential of Types! +** Copyright (C) 2011-2013 Hongwei Xi, ATS Trustful Software, Inc. +** All rights reserved +** +** ATS is free software; you can redistribute it and/or modify it under +** the terms of the GNU GENERAL PUBLIC LICENSE (GPL) as published by the +** Free Software Foundation; either version 3, or (at your option) any +** later version. +** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY +** WARRANTY; without even the implied warranty of MERCHANTABILITY or +** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +** for more details. +** +** You should have received a copy of the GNU General Public License +** along with ATS; see the file COPYING. If not, please write to the +** Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +** 02110-1301, USA. +*) + +(* ****** ****** *) + +(* Author: Hongwei Xi *) +(* Authoremail: hwxi AT cs DOT bu DOT edu *) +(* Start time: December, 2012 *) + +(* ****** ****** *) +// +// HX: shared by linset_listord (* ordered list *) +// HX: shared by linset_avltree (* AVL-tree-based *) +// +(* ****** ****** *) +// +// HX-2013-02: +// for sets of nonlinear elements +// +absvtype set_vtype (a:t@ype+) = ptr +// +(* ****** ****** *) + +vtypedef set (a:t0p) = set_vtype (a) + +(* ****** ****** *) + +fun{a:t0p} +compare_elt_elt (x1: a, x2: a):<> int + +(* ****** ****** *) + +fun{} linset_nil{a:t0p} ():<> set(a) +fun{} linset_make_nil{a:t0p} ():<> set(a) + +(* ****** ****** *) + +fun{a:t0p} linset_sing (x: a): set(a) +fun{a:t0p} linset_make_sing (x: a): set(a) + +(* ****** ****** *) + +fun{a:t0p} +linset_make_list (xs: List(INV(a))): set(a) + +(* ****** ****** *) + +fun{} +linset_is_nil {a:t0p} (xs: !set(INV(a))):<> bool +fun{} +linset_isnot_nil {a:t0p} (xs: !set(INV(a))):<> bool + +(* ****** ****** *) + +fun{a:t0p} linset_size (!set(INV(a))): size_t + +(* ****** ****** *) + +fun{a:t0p} +linset_is_member (xs: !set(INV(a)), x0: a):<> bool +fun{a:t0p} +linset_isnot_member (xs: !set(INV(a)), x0: a):<> bool + +(* ****** ****** *) + +fun{a:t0p} +linset_copy (!set(INV(a))): set(a) +fun{a:t0p} +linset_free (xs: set(INV(a))): void + +(* ****** ****** *) +// +fun{a:t0p} +linset_insert + (xs: &set(INV(a)) >> _, x0: a): bool +// +(* ****** ****** *) +// +fun{a:t0p} +linset_takeout +( + &set(INV(a)) >> _, a, res: &(a?) >> opt(a, b) +) : #[b:bool] bool(b) // endfun +fun{a:t0p} +linset_takeout_opt (&set(INV(a)) >> _, a): Option_vt(a) +// +(* ****** ****** *) +// +fun{a:t0p} +linset_remove + (xs: &set(INV(a)) >> _, x0: a): bool +// +(* ****** ****** *) +// +// HX: choosing an element in an unspecified manner +// +fun{a:t0p} +linset_choose +( + xs: !set(INV(a)), x: &a? >> opt (a, b) +) : #[b:bool] bool(b) +// +fun{a:t0p} +linset_choose_opt (xs: !set(INV(a))): Option_vt(a) +// +(* ****** ****** *) + +fun{a:t0p} +linset_takeoutmax +( + xs: &set(INV(a)) >> _, res: &a? >> opt(a, b) +) : #[b:bool] bool (b) +fun{a:t0p} +linset_takeoutmax_opt (xs: &set(INV(a)) >> _): Option_vt(a) + +(* ****** ****** *) + +fun{a:t0p} +linset_takeoutmin +( + xs: &set(INV(a)) >> _, res: &a? >> opt(a, b) +) : #[b:bool] bool (b) +fun{a:t0p} +linset_takeoutmin_opt (xs: &set(INV(a)) >> _): Option_vt(a) + +(* ****** ****** *) +// +fun{} +fprint_linset$sep (FILEref): void // ", " +// +fun{a:t0p} +fprint_linset (out: FILEref, xs: !set(INV(a))): void +// +overload fprint with fprint_linset +// +(* ****** ****** *) +// +fun{ +a:t0p}{env:vt0p +} linset_foreach$fwork + (x: a, env: &(env) >> _): void +// +fun{a:t0p} +linset_foreach (set: !set(INV(a))): void +fun{ +a:t0p}{env:vt0p +} linset_foreach_env + (set: !set(INV(a)), env: &(env) >> _): void +// end of [linset_foreach_env] +// +(* ****** ****** *) + +fun{a:t0p} +linset_listize (xs: set(INV(a))): List0_vt (a) + +(* ****** ****** *) + +fun{a:t0p} +linset_listize1 (xs: !set(INV(a))): List0_vt (a) + +(* ****** ****** *) + +(* end of [linset.hats] *) diff --git a/samples/ATS/linset_listord.dats b/samples/ATS/linset_listord.dats new file mode 100644 index 00000000..eb7dd642 --- /dev/null +++ b/samples/ATS/linset_listord.dats @@ -0,0 +1,504 @@ +(***********************************************************************) +(* *) +(* Applied Type System *) +(* *) +(***********************************************************************) + +(* +** ATS/Postiats - Unleashing the Potential of Types! +** Copyright (C) 2011-2013 Hongwei Xi, ATS Trustful Software, Inc. +** All rights reserved +** +** ATS is free software; you can redistribute it and/or modify it under +** the terms of the GNU GENERAL PUBLIC LICENSE (GPL) as published by the +** Free Software Foundation; either version 3, or (at your option) any +** later version. +** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY +** WARRANTY; without even the implied warranty of MERCHANTABILITY or +** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +** for more details. +** +** You should have received a copy of the GNU General Public License +** along with ATS; see the file COPYING. If not, please write to the +** Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +** 02110-1301, USA. +*) + +(* ****** ****** *) + +(* Author: Hongwei Xi *) +(* Authoremail: hwxi AT cs DOT bu DOT edu *) +(* Start time: February, 2013 *) + +(* ****** ****** *) +// +// HX-2013-08: +// a set is represented as a sorted list in descending order; +// note that descending order is chosen to faciliate set comparison +// +(* ****** ****** *) + +staload +UN = "prelude/SATS/unsafe.sats" + +(* ****** ****** *) + +staload "libats/SATS/linset_listord.sats" + +(* ****** ****** *) + +#include "./SHARE/linset.hats" // code reuse +#include "./SHARE/linset_node.hats" // code reuse + +(* ****** ****** *) + +assume +set_vtype (elt:t@ype) = List0_vt (elt) + +(* ****** ****** *) + +implement{} +linset_nil () = list_vt_nil () +implement{} +linset_make_nil () = list_vt_nil () + +(* ****** ****** *) + +implement +{a}(*tmp*) +linset_sing + (x) = list_vt_cons{a}(x, list_vt_nil) +// end of [linset_sing] +implement{a} +linset_make_sing + (x) = list_vt_cons{a}(x, list_vt_nil) +// end of [linset_make_sing] + +(* ****** ****** *) + +implement{} +linset_is_nil (xs) = list_vt_is_nil (xs) +implement{} +linset_isnot_nil (xs) = list_vt_is_cons (xs) + +(* ****** ****** *) + +implement{a} +linset_size (xs) = + let val n = list_vt_length(xs) in i2sz(n) end +// end of [linset_size] + +(* ****** ****** *) + +implement{a} +linset_is_member + (xs, x0) = let +// +fun aux + {n:nat} .. +( + xs: !list_vt (a, n) +) :<> bool = let +in +// +case+ xs of +| list_vt_cons (x, xs) => let + val sgn = compare_elt_elt (x0, x) in + if sgn > 0 then false else (if sgn < 0 then aux (xs) else true) + end // end of [list_vt_cons] +| list_vt_nil ((*void*)) => false +// +end // end of [aux] +// +in + aux (xs) +end // end of [linset_is_member] + +(* ****** ****** *) + +implement{a} +linset_copy (xs) = list_vt_copy (xs) +implement{a} +linset_free (xs) = list_vt_free (xs) + +(* ****** ****** *) + +implement{a} +linset_insert + (xs, x0) = let +// +fun +mynode_cons + {n:nat} .<>. +( + nx: mynode1 (a), xs: list_vt (a, n) +) : list_vt (a, n+1) = let +// +val xs1 = +$UN.castvwtp0{List1_vt(a)}(nx) +val+@list_vt_cons (_, xs2) = xs1 +prval () = $UN.cast2void (xs2); val () = (xs2 := xs) +// +in + fold@ (xs1); xs1 +end // end of [mynode_cons] +// +fun ins + {n:nat} .. // tail-recursive +( + xs: &list_vt (a, n) >> list_vt (a, n1) +) : #[n1:nat | n <= n1; n1 <= n+1] bool = +( +case+ xs of +| @list_vt_cons + (x, xs1) => let + val sgn = + compare_elt_elt (x0, x) + // end of [val] + in + if sgn > 0 then let + prval () = fold@ (xs) + val nx = mynode_make_elt (x0) + val ((*void*)) = xs := mynode_cons (nx, xs) + in + false + end else if sgn < 0 then let + val ans = ins (xs1) + prval () = fold@ (xs) + in + ans + end else let // [x0] is found + prval () = fold@ (xs) + in + true (* [x0] in [xs] *) + end (* end of [if] *) + end // end of [list_vt_cons] +| list_vt_nil () => let + val nx = mynode_make_elt (x0) + val ((*void*)) = xs := mynode_cons (nx, xs) + in + false + end // end of [list_vt_nil] +) (* end of [ins] *) +// +in + $effmask_all (ins (xs)) +end // end of [linset_insert] + +(* ****** ****** *) + +(* +// +HX-2013-08: +[linset_remove] moved up +// +implement{a} +linset_remove + (xs, x0) = let +// +fun rem + {n:nat} .. // tail-recursive +( + xs: &list_vt (a, n) >> list_vt (a, n1) +) : #[n1:nat | n1 <= n; n <= n1+1] bool = +( +case+ xs of +| @list_vt_cons + (x, xs1) => let + val sgn = + compare_elt_elt (x0, x) + // end of [val] + in + if sgn > 0 then let + prval () = fold@ (xs) + in + false + end else if sgn < 0 then let + val ans = rem (xs1) + prval () = fold@ (xs) + in + ans + end else let // x0 = x + val xs1_ = xs1 + val ((*void*)) = free@{a}{0}(xs) + val () = xs := xs1_ + in + true // [x0] in [xs] + end (* end of [if] *) + end // end of [list_vt_cons] +| list_vt_nil () => false +) (* end of [rem] *) +// +in + $effmask_all (rem (xs)) +end // end of [linset_remove] +*) + +(* ****** ****** *) +(* +** By Brandon Barker +*) +implement +{a}(*tmp*) +linset_choose + (xs, x0) = let +in +// +case+ xs of +| list_vt_cons + (x, xs1) => let + val () = x0 := x + prval () = opt_some{a}(x0) + in + true + end // end of [list_vt_cons] +| list_vt_nil () => let + prval () = opt_none{a}(x0) + in + false + end // end of [list_vt_nil] +// +end // end of [linset_choose] + +(* ****** ****** *) + +implement +{a}{env} +linset_foreach_env (xs, env) = let +// +implement +list_vt_foreach$fwork + (x, env) = linset_foreach$fwork (x, env) +// +in + list_vt_foreach_env (xs, env) +end // end of [linset_foreach_env] + +(* ****** ****** *) + +implement{a} +linset_listize (xs) = xs + +(* ****** ****** *) + +implement{a} +linset_listize1 (xs) = list_vt_copy (xs) + +(* ****** ****** *) +// +// HX: functions for processing mynodes +// +(* ****** ****** *) + +implement{ +} mynode_null{a} () = + $UN.castvwtp0{mynode(a,null)}(the_null_ptr) +// end of [mynode_null] + +(* ****** ****** *) + +implement +{a}(*tmp*) +mynode_make_elt + (x) = let +// +val nx = list_vt_cons{a}{0}(x, _ ) +// +in + $UN.castvwtp0{mynode1(a)}(nx) +end // end of [mynode_make_elt] + +(* ****** ****** *) + +implement{ +} mynode_free + {a}(nx) = () where { +val nx = + $UN.castvwtp0{List1_vt(a)}(nx) +// +val+~list_vt_cons (_, nx2) = nx +// +prval ((*void*)) = $UN.cast2void (nx2) +// +} (* end of [mynode_free] *) + +(* ****** ****** *) + +implement +{a}(*tmp*) +mynode_get_elt + (nx) = (x) where { +// +val nx1 = + $UN.castvwtp1{List1_vt(a)}(nx) +// +val+list_vt_cons (x, _) = nx1 +// +prval ((*void*)) = $UN.cast2void (nx1) +// +} (* end of [mynode_get_elt] *) + +(* ****** ****** *) + +implement +{a}(*tmp*) +mynode_set_elt + {l} (nx, x0) = +{ +// +val nx1 = + $UN.castvwtp1{List1_vt(a)}(nx) +// +val+@list_vt_cons (x, _) = nx1 +// +val () = x := x0 +// +prval () = fold@ (nx1) +prval () = $UN.cast2void (nx1) +// +prval () = __assert (nx) where +{ + extern praxi __assert (nx: !mynode(a?, l) >> mynode (a, l)): void +} (* end of [prval] *) +// +} (* end of [mynode_set_elt] *) + +(* ****** ****** *) + +implement +{a}(*tmp*) +mynode_getfree_elt + (nx) = (x) where { +// +val nx = + $UN.castvwtp0{List1_vt(a)}(nx) +// +val+~list_vt_cons (x, nx2) = nx +// +prval ((*void*)) = $UN.cast2void (nx2) +// +} (* end of [mynode_getfree_elt] *) + +(* ****** ****** *) + +(* +fun{a:t0p} +linset_takeout_ngc + (set: &set(INV(a)) >> _, x0: a): mynode0 (a) +// end of [linset_takeout_ngc] +*) +implement +{a}(*tmp*) +linset_takeout_ngc + (set, x0) = let +// +fun takeout +( + xs: &List0_vt (a) >> _ +) : mynode0(a) = let +in +// +case+ xs of +| @list_vt_cons + (x, xs1) => let + prval pf_x = view@x + prval pf_xs1 = view@xs1 + val sgn = + compare_elt_elt (x0, x) + // end of [val] + in + if sgn > 0 then let + prval () = fold@ (xs) + in + mynode_null{a}((*void*)) + end else if sgn < 0 then let + val res = takeout (xs1) + prval ((*void*)) = fold@ (xs) + in + res + end else let // x0 = x + val xs1_ = xs1 + val res = $UN.castvwtp0{mynode1(a)}((pf_x, pf_xs1 | xs)) + val () = xs := xs1_ + in + res // [x0] in [xs] + end (* end of [if] *) + end // end of [list_vt_cons] +| list_vt_nil () => mynode_null{a}((*void*)) +// +end (* end of [takeout] *) +// +in + $effmask_all (takeout (set)) +end // end of [linset_takeout_ngc] + +(* ****** ****** *) + +implement +{a}(*tmp*) +linset_takeoutmax_ngc + (xs) = let +in +// +case+ xs of +| @list_vt_cons + (x, xs1) => let + prval pf_x = view@x + prval pf_xs1 = view@xs1 + val xs_ = xs + val () = xs := xs1 + in + $UN.castvwtp0{mynode1(a)}((pf_x, pf_xs1 | xs_)) + end // end of [list_vt_cons] +| @list_vt_nil () => let + prval () = fold@ (xs) + in + mynode_null{a}((*void*)) + end // end of [list_vt_nil] +// +end // end of [linset_takeoutmax_ngc] + +(* ****** ****** *) + +implement +{a}(*tmp*) +linset_takeoutmin_ngc + (xs) = let +// +fun unsnoc + {n:pos} .. +( + xs: &list_vt (a, n) >> list_vt (a, n-1) +) : mynode1 (a) = let +// +val+@list_vt_cons (x, xs1) = xs +// +prval pf_x = view@x and pf_xs1 = view@xs1 +// +in +// +case+ xs1 of +| list_vt_cons _ => + let val res = unsnoc(xs1) in fold@xs; res end + // end of [list_vt_cons] +| list_vt_nil () => let + val xs_ = xs + val () = xs := list_vt_nil{a}() + in + $UN.castvwtp0{mynode1(a)}((pf_x, pf_xs1 | xs_)) + end // end of [list_vt_nil] +// +end // end of [unsnoc] +// +in +// +case+ xs of +| list_vt_cons _ => unsnoc (xs) +| list_vt_nil () => mynode_null{a}((*void*)) +// +end // end of [linset_takeoutmin_ngc] + +(* ****** ****** *) + +(* end of [linset_listord.dats] *) diff --git a/samples/ATS/linset_listord.sats b/samples/ATS/linset_listord.sats new file mode 100644 index 00000000..468a534f --- /dev/null +++ b/samples/ATS/linset_listord.sats @@ -0,0 +1,51 @@ +(***********************************************************************) +(* *) +(* Applied Type System *) +(* *) +(***********************************************************************) + +(* +** ATS/Postiats - Unleashing the Potential of Types! +** Copyright (C) 2011-2013 Hongwei Xi, ATS Trustful Software, Inc. +** All rights reserved +** +** ATS is free software; you can redistribute it and/or modify it under +** the terms of the GNU GENERAL PUBLIC LICENSE (GPL) as published by the +** Free Software Foundation; either version 3, or (at your option) any +** later version. +** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY +** WARRANTY; without even the implied warranty of MERCHANTABILITY or +** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +** for more details. +** +** You should have received a copy of the GNU General Public License +** along with ATS; see the file COPYING. If not, please write to the +** Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +** 02110-1301, USA. +*) + +(* ****** ****** *) +// +// Author: Hongwei Xi +// Authoremail: hwxiATcsDOTbuDOTedu +// Time: October, 2010 +// +(* ****** ****** *) + +#define ATS_PACKNAME "ATSLIB.libats.linset_listord" +#define ATS_STALOADFLAG 0 // no static loading at run-time + +(* ****** ****** *) + +#include "./SHARE/linset.hats" +#include "./SHARE/linset_node.hats" + +(* ****** ****** *) + +castfn +linset2list {a:t0p} (xs: set (INV(a))):<> List0_vt (a) + +(* ****** ****** *) + +(* end of [linset_listord.sats] *) diff --git a/samples/ATS/main.atxt b/samples/ATS/main.atxt new file mode 100644 index 00000000..3bba35f0 --- /dev/null +++ b/samples/ATS/main.atxt @@ -0,0 +1,215 @@ +%{ +#include "./../ATEXT/atextfun.hats" +%} + + + + + + +EFFECTIVATS-DiningPhil2 +#patscode_style() + + + + +

+Effective ATS: Dining Philosophers +

+ +In this article, I present an implementation of a slight variant of the +famous problem of 5-Dining-Philosophers by Dijkstra that makes simple but +convincing use of linear types. + +

+The Original Problem +

+ +There are five philosophers sitting around a table and there are also 5 +forks placed on the table such that each fork is located between the left +hand of a philosopher and the right hand of another philosopher. Each +philosopher does the following routine repeatedly: thinking and dining. In +order to dine, a philosopher needs to first acquire two forks: one located +on his left-hand side and the other on his right-hand side. After +finishing dining, a philosopher puts the two acquired forks onto the table: +one on his left-hand side and the other on his right-hand side. + +

+A Variant of the Original Problem +

+ +The following twist is added to the original version: + +

+ +After a fork is used, it becomes a "dirty" fork and needs to be put in a +tray for dirty forks. There is a cleaner who cleans dirty forks and then +puts them back on the table. + +

+Channels for Communication +

+ +A channel is just a shared queue of fixed capacity. The following two +functions are for inserting an element into and taking an element out of a +given channel: + +
+#pats2xhtml_sats("\
+fun{a:vt0p} channel_insert (channel (a), a): void
+fun{a:vt0p} channel_takeout (chan: channel (a)): (a) 
+")
+ +If [channel_insert] is called on a channel that is full, then the caller is +blocked until an element is taken out of the channel. If [channel_takeout] +is called on a channel that is empty, then the caller is blocked until an +element is inserted into the channel. + +

+A Channel for Each Fork +

+ +Forks are resources given a linear type. Each fork is initially stored in a +channel, which can be obtained by calling the following function: + +
+#pats2xhtml_sats("\
+fun fork_changet (n: nphil): channel(fork)
+")
+ +where the type [nphil] is defined to be [natLt(5)] (for natural numbers +less than 5). The channels for storing forks are chosen to be of capacity +2. The reason that channels of capacity 2 are chosen to store at most one +element (in each of them) is to guarantee that these channels can never be +full (so that there is no attempt made to send signals to awake callers +supposedly being blocked due to channels being full). + + +

+A Channel for the Fork Tray +

+ +A tray for storing "dirty" forks is also a channel, which can be obtained +by calling the following function: + +
+#pats2xhtml_sats("\
+fun forktray_changet ((*void*)): channel(fork)
+")
+ +The capacity chosen for the channel is 6 (instead of 5) so that it can +never become full (as there are only 5 forks in total). + +

+Philosopher Loop +

+ +Each philosopher is implemented as a loop: + +
+#pats2xhtml_dats('\
+implement
+phil_loop (n) = let
+//
+val () = phil_think (n)
+//
+val nl = phil_left (n) // = n
+val nr = phil_right (n) // = (n+1) % 5
+//
+val ch_lfork = fork_changet (nl)
+val ch_rfork = fork_changet (nr)
+//
+val lf = channel_takeout (ch_lfork)
+val () = println! ("phil_loop(", n, ") picks left fork")
+//
+val () = randsleep (2) // sleep up to 2 seconds
+//
+val rf = channel_takeout (ch_rfork)
+val () = println! ("phil_loop(", n, ") picks right fork")
+//
+val () = phil_dine (n, lf, rf)
+//
+val ch_forktray = forktray_changet ()
+val () = channel_insert (ch_forktray, lf) // left fork to dirty tray
+val () = channel_insert (ch_forktray, rf) // right fork to dirty tray
+//
+in
+  phil_loop (n)
+end // end of [phil_loop]
+')
+ +It should be straighforward to follow the code for [phil_loop]. + +

+Fork Cleaner Loop +

+ +A cleaner is implemented as a loop: + +
+#pats2xhtml_dats('\
+implement
+cleaner_loop () = let
+//
+val ch = forktray_changet ()
+val f0 = channel_takeout (ch) // [f0] is dirty
+//
+val () = cleaner_wash (f0) // washes dirty [f0]
+val () = cleaner_return (f0) // puts back cleaned [f0]
+//
+in
+  cleaner_loop ()
+end // end of [cleaner_loop]
+')
+ +The function [cleaner_return] first finds out the number of a given fork +and then uses the number to locate the channel for storing the fork. Its +actual implementation is given as follows: + +
+#pats2xhtml_dats('\
+implement
+cleaner_return (f) =
+{
+  val n = fork_get_num (f)
+  val ch = fork_changet (n)
+  val () = channel_insert (ch, f)
+}
+')
+ +It should now be straighforward to follow the code for [cleaner_loop]. + +

+Testing +

+ +The entire code of this implementation is stored in the following files: + +
+DiningPhil2.sats
+DiningPhil2.dats
+DiningPhil2_fork.dats
+DiningPhil2_thread.dats
+
+ +There is also a Makefile available for compiling the ATS source code into +an excutable for testing. One should be able to encounter a deadlock after +running the simulation for a while. + +
+ +This article is written by
Hongwei Xi. + + + + +%{ +implement main () = fprint_filsub (stdout_ref, "main_atxt.txt") +%} diff --git a/samples/Agda/NatCat.agda b/samples/Agda/NatCat.agda new file mode 100644 index 00000000..6169a085 --- /dev/null +++ b/samples/Agda/NatCat.agda @@ -0,0 +1,39 @@ +module NatCat where + +open import Relation.Binary.PropositionalEquality + +-- If you can show that a relation only ever has one inhabitant +-- you get the category laws for free +module + EasyCategory + (obj : Set) + (_⟶_ : obj → obj → Set) + (_∘_ : ∀ {x y z} → x ⟶ y → y ⟶ z → x ⟶ z) + (id : ∀ x → x ⟶ x) + (single-inhabitant : (x y : obj) (r s : x ⟶ y) → r ≡ s) + where + + idʳ : ∀ x y (r : x ⟶ y) → r ∘ id y ≡ r + idʳ x y r = single-inhabitant x y (r ∘ id y) r + + idˡ : ∀ x y (r : x ⟶ y) → id x ∘ r ≡ r + idˡ x y r = single-inhabitant x y (id x ∘ r) r + + ∘-assoc : ∀ w x y z (r : w ⟶ x) (s : x ⟶ y) (t : y ⟶ z) → (r ∘ s) ∘ t ≡ r ∘ (s ∘ t) + ∘-assoc w x y z r s t = single-inhabitant w z ((r ∘ s) ∘ t) (r ∘ (s ∘ t)) + +open import Data.Nat + +same : (x y : ℕ) (r s : x ≤ y) → r ≡ s +same .0 y z≤n z≤n = refl +same .(suc m) .(suc n) (s≤s {m} {n} r) (s≤s s) = cong s≤s (same m n r s) + +≤-trans : ∀ x y z → x ≤ y → y ≤ z → x ≤ z +≤-trans .0 y z z≤n s = z≤n +≤-trans .(suc m) .(suc n) .(suc n₁) (s≤s {m} {n} r) (s≤s {.n} {n₁} s) = s≤s (≤-trans m n n₁ r s) + +≤-refl : ∀ x → x ≤ x +≤-refl zero = z≤n +≤-refl (suc x) = s≤s (≤-refl x) + +module Nat-EasyCategory = EasyCategory ℕ _≤_ (λ {x}{y}{z} → ≤-trans x y z) ≤-refl same diff --git a/samples/Alloy/file_system.als b/samples/Alloy/file_system.als new file mode 100644 index 00000000..60fd959b --- /dev/null +++ b/samples/Alloy/file_system.als @@ -0,0 +1,59 @@ +module examples/systems/file_system + +/* + * Model of a generic file system. + */ + +abstract sig Object {} + +sig Name {} + +sig File extends Object {} { some d: Dir | this in d.entries.contents } + +sig Dir extends Object { + entries: set DirEntry, + parent: lone Dir +} { + parent = this.~@contents.~@entries + all e1, e2 : entries | e1.name = e2.name => e1 = e2 + this !in this.^@parent + this != Root => Root in this.^@parent +} + +one sig Root extends Dir {} { no parent } + +lone sig Cur extends Dir {} + +sig DirEntry { + name: Name, + contents: Object +} { + one this.~entries +} + + +/** + * all directories besides root have one parent + */ +pred OneParent_buggyVersion { + all d: Dir - Root | one d.parent +} + +/** + * all directories besides root have one parent + */ +pred OneParent_correctVersion { + all d: Dir - Root | (one d.parent && one contents.d) +} + +/** + * Only files may be linked (that is, have more than one entry) + * That is, all directories are the contents of at most one directory entry + */ +pred NoDirAliases { + all o: Dir | lone o.~contents +} + +check { OneParent_buggyVersion => NoDirAliases } for 5 expect 1 + +check { OneParent_correctVersion => NoDirAliases } for 5 expect 0 diff --git a/samples/Alloy/marksweepgc.als b/samples/Alloy/marksweepgc.als new file mode 100644 index 00000000..b8081e3f --- /dev/null +++ b/samples/Alloy/marksweepgc.als @@ -0,0 +1,83 @@ +module examples/systems/marksweepgc + +/* + * Model of mark and sweep garbage collection. + */ + +// a node in the heap +sig Node {} + +sig HeapState { + left, right : Node -> lone Node, + marked : set Node, + freeList : lone Node +} + +pred clearMarks[hs, hs' : HeapState] { + // clear marked set + no hs'.marked + // left and right fields are unchanged + hs'.left = hs.left + hs'.right = hs.right +} + +/** + * simulate the recursion of the mark() function using transitive closure + */ +fun reachable[hs: HeapState, n: Node] : set Node { + n + n.^(hs.left + hs.right) +} + +pred mark[hs: HeapState, from : Node, hs': HeapState] { + hs'.marked = hs.reachable[from] + hs'.left = hs.left + hs'.right = hs.right +} + +/** + * complete hack to simulate behavior of code to set freeList + */ +pred setFreeList[hs, hs': HeapState] { + // especially hackish + hs'.freeList.*(hs'.left) in (Node - hs.marked) + all n: Node | + (n !in hs.marked) => { + no hs'.right[n] + hs'.left[n] in (hs'.freeList.*(hs'.left)) + n in hs'.freeList.*(hs'.left) + } else { + hs'.left[n] = hs.left[n] + hs'.right[n] = hs.right[n] + } + hs'.marked = hs.marked +} + +pred GC[hs: HeapState, root : Node, hs': HeapState] { + some hs1, hs2: HeapState | + hs.clearMarks[hs1] && hs1.mark[root, hs2] && hs2.setFreeList[hs'] +} + +assert Soundness1 { + all h, h' : HeapState, root : Node | + h.GC[root, h'] => + (all live : h.reachable[root] | { + h'.left[live] = h.left[live] + h'.right[live] = h.right[live] + }) +} + +assert Soundness2 { + all h, h' : HeapState, root : Node | + h.GC[root, h'] => + no h'.reachable[root] & h'.reachable[h'.freeList] +} + +assert Completeness { + all h, h' : HeapState, root : Node | + h.GC[root, h'] => + (Node - h'.reachable[root]) in h'.reachable[h'.freeList] +} + +check Soundness1 for 3 expect 0 +check Soundness2 for 3 expect 0 +check Completeness for 3 expect 0 diff --git a/samples/Alloy/views.als b/samples/Alloy/views.als new file mode 100644 index 00000000..3a5ab82b --- /dev/null +++ b/samples/Alloy/views.als @@ -0,0 +1,217 @@ +module examples/systems/views + +/* + * Model of views in object-oriented programming. + * + * Two object references, called the view and the backing, + * are related by a view mechanism when changes to the + * backing are automatically propagated to the view. Note + * that the state of a view need not be a projection of the + * state of the backing; the keySet method of Map, for + * example, produces two view relationships, and for the + * one in which the map is modified by changes to the key + * set, the value of the new map cannot be determined from + * the key set. Note that in the iterator view mechanism, + * the iterator is by this definition the backing object, + * since changes are propagated from iterator to collection + * and not vice versa. Oddly, a reference may be a view of + * more than one backing: there can be two iterators on the + * same collection, eg. A reference cannot be a view under + * more than one view type. + * + * A reference is made dirty when it is a backing for a view + * with which it is no longer related by the view invariant. + * This usually happens when a view is modified, either + * directly or via another backing. For example, changing a + * collection directly when it has an iterator invalidates + * it, as does changing the collection through one iterator + * when there are others. + * + * More work is needed if we want to model more closely the + * failure of an iterator when its collection is invalidated. + * + * As a terminological convention, when there are two + * complementary view relationships, we will give them types + * t and t'. For example, KeySetView propagates from map to + * set, and KeySetView' propagates from set to map. + * + * author: Daniel Jackson + */ + +open util/ordering[State] as so +open util/relation as rel + +sig Ref {} +sig Object {} + +-- t->b->v in views when v is view of type t of backing b +-- dirty contains refs that have been invalidated +sig State { + refs: set Ref, + obj: refs -> one Object, + views: ViewType -> refs -> refs, + dirty: set refs +-- , anyviews: Ref -> Ref -- for visualization + } +-- {anyviews = ViewType.views} + +sig Map extends Object { + keys: set Ref, + map: keys -> one Ref + }{all s: State | keys + Ref.map in s.refs} +sig MapRef extends Ref {} +fact {State.obj[MapRef] in Map} + +sig Iterator extends Object { + left, done: set Ref, + lastRef: lone done + }{all s: State | done + left + lastRef in s.refs} +sig IteratorRef extends Ref {} +fact {State.obj[IteratorRef] in Iterator} + +sig Set extends Object { + elts: set Ref + }{all s: State | elts in s.refs} +sig SetRef extends Ref {} +fact {State.obj[SetRef] in Set} + +abstract sig ViewType {} +one sig KeySetView, KeySetView', IteratorView extends ViewType {} +fact ViewTypes { + State.views[KeySetView] in MapRef -> SetRef + State.views[KeySetView'] in SetRef -> MapRef + State.views[IteratorView] in IteratorRef -> SetRef + all s: State | s.views[KeySetView] = ~(s.views[KeySetView']) + } + +/** + * mods is refs modified directly or by view mechanism + * doesn't handle possibility of modifying an object and its view at once? + * should we limit frame conds to non-dirty refs? + */ +pred modifies [pre, post: State, rs: set Ref] { + let vr = pre.views[ViewType], mods = rs.*vr { + all r: pre.refs - mods | pre.obj[r] = post.obj[r] + all b: mods, v: pre.refs, t: ViewType | + b->v in pre.views[t] => viewFrame [t, pre.obj[v], post.obj[v], post.obj[b]] + post.dirty = pre.dirty + + {b: pre.refs | some v: Ref, t: ViewType | + b->v in pre.views[t] && !viewFrame [t, pre.obj[v], post.obj[v], post.obj[b]] + } + } + } + +pred allocates [pre, post: State, rs: set Ref] { + no rs & pre.refs + post.refs = pre.refs + rs + } + +/** + * models frame condition that limits change to view object from v to v' when backing object changes to b' + */ +pred viewFrame [t: ViewType, v, v', b': Object] { + t in KeySetView => v'.elts = dom [b'.map] + t in KeySetView' => b'.elts = dom [v'.map] + t in KeySetView' => (b'.elts) <: (v.map) = (b'.elts) <: (v'.map) + t in IteratorView => v'.elts = b'.left + b'.done + } + +pred MapRef.keySet [pre, post: State, setRefs: SetRef] { + post.obj[setRefs].elts = dom [pre.obj[this].map] + modifies [pre, post, none] + allocates [pre, post, setRefs] + post.views = pre.views + KeySetView->this->setRefs + KeySetView'->setRefs->this + } + +pred MapRef.put [pre, post: State, k, v: Ref] { + post.obj[this].map = pre.obj[this].map ++ k->v + modifies [pre, post, this] + allocates [pre, post, none] + post.views = pre.views + } + +pred SetRef.iterator [pre, post: State, iterRef: IteratorRef] { + let i = post.obj[iterRef] { + i.left = pre.obj[this].elts + no i.done + i.lastRef + } + modifies [pre,post,none] + allocates [pre, post, iterRef] + post.views = pre.views + IteratorView->iterRef->this + } + +pred IteratorRef.remove [pre, post: State] { + let i = pre.obj[this], i' = post.obj[this] { + i'.left = i.left + i'.done = i.done - i.lastRef + no i'.lastRef + } + modifies [pre,post,this] + allocates [pre, post, none] + pre.views = post.views + } + +pred IteratorRef.next [pre, post: State, ref: Ref] { + let i = pre.obj[this], i' = post.obj[this] { + ref in i.left + i'.left = i.left - ref + i'.done = i.done + ref + i'.lastRef = ref + } + modifies [pre, post, this] + allocates [pre, post, none] + pre.views = post.views + } + +pred IteratorRef.hasNext [s: State] { + some s.obj[this].left + } + +assert zippishOK { + all + ks, vs: SetRef, + m: MapRef, + ki, vi: IteratorRef, + k, v: Ref | + let s0=so/first, + s1=so/next[s0], + s2=so/next[s1], + s3=so/next[s2], + s4=so/next[s3], + s5=so/next[s4], + s6=so/next[s5], + s7=so/next[s6] | + ({ + precondition [s0, ks, vs, m] + no s0.dirty + ks.iterator [s0, s1, ki] + vs.iterator [s1, s2, vi] + ki.hasNext [s2] + vi.hasNext [s2] + ki.this/next [s2, s3, k] + vi.this/next [s3, s4, v] + m.put [s4, s5, k, v] + ki.remove [s5, s6] + vi.remove [s6, s7] + } => no State.dirty) + } + +pred precondition [pre: State, ks, vs, m: Ref] { + // all these conditions and other errors discovered in scope of 6 but 8,3 + // in initial state, must have view invariants hold + (all t: ViewType, b, v: pre.refs | + b->v in pre.views[t] => viewFrame [t, pre.obj[v], pre.obj[v], pre.obj[b]]) + // sets are not aliases +-- ks != vs + // sets are not views of map +-- no (ks+vs)->m & ViewType.pre.views + // no iterator currently on either set +-- no Ref->(ks+vs) & ViewType.pre.views + } + +check zippishOK for 6 but 8 State, 3 ViewType expect 1 + +/** + * experiment with controlling heap size + */ +fact {all s: State | #s.obj < 5} diff --git a/samples/AsciiDoc/encoding.asciidoc b/samples/AsciiDoc/encoding.asciidoc new file mode 100644 index 00000000..8cf1b761 --- /dev/null +++ b/samples/AsciiDoc/encoding.asciidoc @@ -0,0 +1,13 @@ +Gregory Romé has written an AsciiDoc plugin for the Redmine project management application. + +https://github.com/foo-users/foo +へと `vicmd` キーマップを足してみている試み、 +アニメーションgifです。 + +tag::romé[] +Gregory Romé has written an AsciiDoc plugin for the Redmine project management application. +end::romé[] + +== Überschrift + +* Codierungen sind verrückt auf älteren Versionen von Ruby \ No newline at end of file diff --git a/samples/AsciiDoc/list.asc b/samples/AsciiDoc/list.asc new file mode 100644 index 00000000..066d14fc --- /dev/null +++ b/samples/AsciiDoc/list.asc @@ -0,0 +1,10 @@ +AsciiDoc Home Page +================== + +Example Articles +~~~~~~~~~~~~~~~~ +- Item 1 + +- Item 2 + +- Item 3 diff --git a/samples/AsciiDoc/sample.adoc b/samples/AsciiDoc/sample.adoc new file mode 100644 index 00000000..51e1e45e --- /dev/null +++ b/samples/AsciiDoc/sample.adoc @@ -0,0 +1,25 @@ +Document Title +============== +Doc Writer +:idprefix: id_ + +Preamble paragraph. + +NOTE: This is test, only a test. + +== Section A + +*Section A* paragraph. + +=== Section A Subsection + +*Section A* 'subsection' paragraph. + +== Section B + +*Section B* paragraph. + +.Section B list +* Item 1 +* Item 2 +* Item 3 diff --git a/samples/AspectJ/CacheAspect.aj b/samples/AspectJ/CacheAspect.aj new file mode 100644 index 00000000..bfab7bc4 --- /dev/null +++ b/samples/AspectJ/CacheAspect.aj @@ -0,0 +1,41 @@ +package com.blogspot.miguelinlas3.aspectj.cache; + +import java.util.Map; +import java.util.WeakHashMap; + +import org.aspectj.lang.JoinPoint; + +import com.blogspot.miguelinlas3.aspectj.cache.marker.Cachable; + +/** + * This simple aspect simulates the behaviour of a very simple cache + * + * @author migue + * + */ +public aspect CacheAspect { + + public pointcut cache(Cachable cachable): execution(@Cachable * * (..)) && @annotation(cachable); + + Object around(Cachable cachable): cache(cachable){ + + String evaluatedKey = this.evaluateKey(cachable.scriptKey(), thisJoinPoint); + + if(cache.containsKey(evaluatedKey)){ + System.out.println("Cache hit for key " + evaluatedKey); + return this.cache.get(evaluatedKey); + } + + System.out.println("Cache miss for key " + evaluatedKey); + Object value = proceed(cachable); + cache.put(evaluatedKey, value); + return value; + } + + protected String evaluateKey(String key, JoinPoint joinPoint) { + // TODO add some smart staff to allow simple scripting in @Cachable annotation + return key; + } + + protected Map cache = new WeakHashMap(); +} diff --git a/samples/AspectJ/OptimizeRecursionCache.aj b/samples/AspectJ/OptimizeRecursionCache.aj new file mode 100644 index 00000000..ed1e8695 --- /dev/null +++ b/samples/AspectJ/OptimizeRecursionCache.aj @@ -0,0 +1,50 @@ +package aspects.caching; + +import java.util.Map; + +/** + * Cache aspect for optimize recursive functions. + * + * @author Migueli + * @date 05/11/2013 + * @version 1.0 + * + */ +public abstract aspect OptimizeRecursionCache { + + @SuppressWarnings("rawtypes") + private Map _cache; + + public OptimizeRecursionCache() { + _cache = getCache(); + } + + @SuppressWarnings("rawtypes") + abstract public Map getCache(); + + abstract public pointcut operation(Object o); + + pointcut topLevelOperation(Object o): operation(o) && !cflowbelow(operation(Object)); + + before(Object o) : topLevelOperation(o) { + System.out.println("Seeking value for " + o); + } + + Object around(Object o) : operation(o) { + Object cachedValue = _cache.get(o); + if (cachedValue != null) { + System.out.println("Found cached value for " + o + ": " + cachedValue); + return cachedValue; + } + return proceed(o); + } + + @SuppressWarnings("unchecked") + after(Object o) returning(Object result) : topLevelOperation(o) { + _cache.put(o, result); + } + + after(Object o) returning(Object result) : topLevelOperation(o) { + System.out.println("cache size: " + _cache.size()); + } +} diff --git a/samples/Assembly/ASSEMBLE.inc b/samples/Assembly/ASSEMBLE.inc new file mode 100644 index 00000000..c4ffdae3 --- /dev/null +++ b/samples/Assembly/ASSEMBLE.inc @@ -0,0 +1,2048 @@ + +; flat assembler core +; Copyright (c) 1999-2014, Tomasz Grysztar. +; All rights reserved. + +assembler: + xor eax,eax + mov [stub_size],eax + mov [current_pass],ax + mov [resolver_flags],eax + mov [number_of_sections],eax + mov [actual_fixups_size],eax + assembler_loop: + mov eax,[labels_list] + mov [tagged_blocks],eax + mov eax,[additional_memory] + mov [free_additional_memory],eax + mov eax,[additional_memory_end] + mov [structures_buffer],eax + mov esi,[source_start] + mov edi,[code_start] + xor eax,eax + mov dword [adjustment],eax + mov dword [adjustment+4],eax + mov [addressing_space],eax + mov [error_line],eax + mov [counter],eax + mov [format_flags],eax + mov [number_of_relocations],eax + mov [undefined_data_end],eax + mov [file_extension],eax + mov [next_pass_needed],al + mov [output_format],al + mov [adjustment_sign],al + mov [code_type],16 + call init_addressing_space + pass_loop: + call assemble_line + jnc pass_loop + mov eax,[additional_memory_end] + cmp eax,[structures_buffer] + je pass_done + sub eax,18h + mov eax,[eax+4] + mov [current_line],eax + jmp missing_end_directive + pass_done: + call close_pass + mov eax,[labels_list] + check_symbols: + cmp eax,[memory_end] + jae symbols_checked + test byte [eax+8],8 + jz symbol_defined_ok + mov cx,[current_pass] + cmp cx,[eax+18] + jne symbol_defined_ok + test byte [eax+8],1 + jz symbol_defined_ok + sub cx,[eax+16] + cmp cx,1 + jne symbol_defined_ok + and byte [eax+8],not 1 + or [next_pass_needed],-1 + symbol_defined_ok: + test byte [eax+8],10h + jz use_prediction_ok + mov cx,[current_pass] + and byte [eax+8],not 10h + test byte [eax+8],20h + jnz check_use_prediction + cmp cx,[eax+18] + jne use_prediction_ok + test byte [eax+8],8 + jz use_prediction_ok + jmp use_misprediction + check_use_prediction: + test byte [eax+8],8 + jz use_misprediction + cmp cx,[eax+18] + je use_prediction_ok + use_misprediction: + or [next_pass_needed],-1 + use_prediction_ok: + test byte [eax+8],40h + jz check_next_symbol + and byte [eax+8],not 40h + test byte [eax+8],4 + jnz define_misprediction + mov cx,[current_pass] + test byte [eax+8],80h + jnz check_define_prediction + cmp cx,[eax+16] + jne check_next_symbol + test byte [eax+8],1 + jz check_next_symbol + jmp define_misprediction + check_define_prediction: + test byte [eax+8],1 + jz define_misprediction + cmp cx,[eax+16] + je check_next_symbol + define_misprediction: + or [next_pass_needed],-1 + check_next_symbol: + add eax,LABEL_STRUCTURE_SIZE + jmp check_symbols + symbols_checked: + cmp [next_pass_needed],0 + jne next_pass + mov eax,[error_line] + or eax,eax + jz assemble_ok + mov [current_line],eax + cmp [error],undefined_symbol + jne error_confirmed + mov eax,[error_info] + or eax,eax + jz error_confirmed + test byte [eax+8],1 + jnz next_pass + error_confirmed: + call error_handler + error_handler: + mov eax,[error] + sub eax,error_handler + add [esp],eax + ret + next_pass: + inc [current_pass] + mov ax,[current_pass] + cmp ax,[passes_limit] + je code_cannot_be_generated + jmp assembler_loop + assemble_ok: + ret + +create_addressing_space: + mov ebx,[addressing_space] + test ebx,ebx + jz init_addressing_space + test byte [ebx+0Ah],1 + jnz illegal_instruction + mov eax,edi + sub eax,[ebx+18h] + mov [ebx+1Ch],eax + init_addressing_space: + mov ebx,[tagged_blocks] + mov dword [ebx-4],10h + mov dword [ebx-8],20h + sub ebx,8+20h + cmp ebx,edi + jbe out_of_memory + mov [tagged_blocks],ebx + mov [addressing_space],ebx + xor eax,eax + mov [ebx],edi + mov [ebx+4],eax + mov [ebx+8],eax + mov [ebx+10h],eax + mov [ebx+14h],eax + mov [ebx+18h],edi + mov [ebx+1Ch],eax + ret + +assemble_line: + mov eax,[tagged_blocks] + sub eax,100h + cmp edi,eax + ja out_of_memory + lods byte [esi] + cmp al,1 + je assemble_instruction + jb source_end + cmp al,3 + jb define_label + je define_constant + cmp al,4 + je label_addressing_space + cmp al,0Fh + je new_line + cmp al,13h + je code_type_setting + cmp al,10h + jne illegal_instruction + lods byte [esi] + jmp segment_prefix + code_type_setting: + lods byte [esi] + mov [code_type],al + jmp instruction_assembled + new_line: + lods dword [esi] + mov [current_line],eax + mov [prefixed_instruction],0 + cmp [symbols_file],0 + je continue_line + cmp [next_pass_needed],0 + jne continue_line + mov ebx,[tagged_blocks] + mov dword [ebx-4],1 + mov dword [ebx-8],14h + sub ebx,8+14h + cmp ebx,edi + jbe out_of_memory + mov [tagged_blocks],ebx + mov [ebx],eax + mov [ebx+4],edi + mov eax,[addressing_space] + mov [ebx+8],eax + mov al,[code_type] + mov [ebx+10h],al + continue_line: + cmp byte [esi],0Fh + je line_assembled + jmp assemble_line + define_label: + lods dword [esi] + cmp eax,0Fh + jb invalid_use_of_symbol + je reserved_word_used_as_symbol + mov ebx,eax + lods byte [esi] + mov [label_size],al + call make_label + jmp continue_line + make_label: + mov eax,edi + xor edx,edx + xor cl,cl + mov ebp,[addressing_space] + sub eax,[ds:ebp] + sbb edx,[ds:ebp+4] + sbb cl,[ds:ebp+8] + jp label_value_ok + call recoverable_overflow + label_value_ok: + mov [address_sign],cl + test byte [ds:ebp+0Ah],1 + jnz make_virtual_label + or byte [ebx+9],1 + xchg eax,[ebx] + xchg edx,[ebx+4] + mov ch,[ebx+9] + shr ch,1 + and ch,1 + neg ch + sub eax,[ebx] + sbb edx,[ebx+4] + sbb ch,cl + mov dword [adjustment],eax + mov dword [adjustment+4],edx + mov [adjustment_sign],ch + or al,ch + or eax,edx + setnz ah + jmp finish_label + make_virtual_label: + and byte [ebx+9],not 1 + cmp eax,[ebx] + mov [ebx],eax + setne ah + cmp edx,[ebx+4] + mov [ebx+4],edx + setne al + or ah,al + finish_label: + mov ebp,[addressing_space] + mov ch,[ds:ebp+9] + mov cl,[label_size] + mov edx,[ds:ebp+14h] + mov ebp,[ds:ebp+10h] + finish_label_symbol: + mov al,[address_sign] + xor al,[ebx+9] + and al,10b + or ah,al + xor [ebx+9],al + cmp cl,[ebx+10] + mov [ebx+10],cl + setne al + or ah,al + cmp ch,[ebx+11] + mov [ebx+11],ch + setne al + or ah,al + cmp ebp,[ebx+12] + mov [ebx+12],ebp + setne al + or ah,al + or ch,ch + jz label_symbol_ok + cmp edx,[ebx+20] + mov [ebx+20],edx + setne al + or ah,al + label_symbol_ok: + mov cx,[current_pass] + xchg [ebx+16],cx + mov edx,[current_line] + mov [ebx+28],edx + and byte [ebx+8],not 2 + test byte [ebx+8],1 + jz new_label + cmp cx,[ebx+16] + je symbol_already_defined + btr dword [ebx+8],10 + jc requalified_label + inc cx + sub cx,[ebx+16] + setnz al + or ah,al + jz label_made + test byte [ebx+8],8 + jz label_made + mov cx,[current_pass] + cmp cx,[ebx+18] + jne label_made + requalified_label: + or [next_pass_needed],-1 + label_made: + ret + new_label: + or byte [ebx+8],1 + ret + define_constant: + lods dword [esi] + inc esi + cmp eax,0Fh + jb invalid_use_of_symbol + je reserved_word_used_as_symbol + mov edx,[eax+8] + push edx + cmp [current_pass],0 + je get_constant_value + test dl,4 + jnz get_constant_value + mov cx,[current_pass] + cmp cx,[eax+16] + je get_constant_value + or dl,4 + mov [eax+8],dl + get_constant_value: + push eax + mov al,byte [esi-1] + push eax + or [size_override],-1 + call get_value + pop ebx + mov ch,bl + pop ebx + pop ecx + test cl,4 + jnz constant_referencing_mode_ok + and byte [ebx+8],not 4 + constant_referencing_mode_ok: + xor cl,cl + mov ch,[value_type] + cmp ch,3 + je invalid_use_of_symbol + make_constant: + and byte [ebx+9],not 1 + cmp eax,[ebx] + mov [ebx],eax + setne ah + cmp edx,[ebx+4] + mov [ebx+4],edx + setne al + or ah,al + mov al,[value_sign] + xor al,[ebx+9] + and al,10b + or ah,al + xor [ebx+9],al + cmp cl,[ebx+10] + mov [ebx+10],cl + setne al + or ah,al + cmp ch,[ebx+11] + mov [ebx+11],ch + setne al + or ah,al + xor edx,edx + cmp edx,[ebx+12] + mov [ebx+12],edx + setne al + or ah,al + or ch,ch + jz constant_symbol_ok + mov edx,[symbol_identifier] + cmp edx,[ebx+20] + mov [ebx+20],edx + setne al + or ah,al + constant_symbol_ok: + mov cx,[current_pass] + xchg [ebx+16],cx + mov edx,[current_line] + mov [ebx+28],edx + test byte [ebx+8],1 + jz new_constant + cmp cx,[ebx+16] + jne redeclare_constant + test byte [ebx+8],2 + jz symbol_already_defined + or byte [ebx+8],4 + and byte [ebx+9],not 4 + jmp instruction_assembled + redeclare_constant: + btr dword [ebx+8],10 + jc requalified_constant + inc cx + sub cx,[ebx+16] + setnz al + or ah,al + jz instruction_assembled + test byte [ebx+8],4 + jnz instruction_assembled + test byte [ebx+8],8 + jz instruction_assembled + mov cx,[current_pass] + cmp cx,[ebx+18] + jne instruction_assembled + requalified_constant: + or [next_pass_needed],-1 + jmp instruction_assembled + new_constant: + or byte [ebx+8],1+2 + jmp instruction_assembled + label_addressing_space: + lods dword [esi] + cmp eax,0Fh + jb invalid_use_of_symbol + je reserved_word_used_as_symbol + mov cx,[current_pass] + test byte [eax+8],1 + jz make_addressing_space_label + cmp cx,[eax+16] + je symbol_already_defined + test byte [eax+9],4 + jnz make_addressing_space_label + or [next_pass_needed],-1 + make_addressing_space_label: + mov dx,[eax+8] + and dx,not (2 or 100h) + or dx,1 or 4 or 400h + mov [eax+8],dx + mov [eax+16],cx + mov edx,[current_line] + mov [eax+28],edx + mov ebx,[addressing_space] + mov [eax],ebx + or byte [ebx+0Ah],2 + jmp continue_line + assemble_instruction: +; mov [operand_size],0 +; mov [size_override],0 +; mov [operand_prefix],0 +; mov [opcode_prefix],0 + and dword [operand_size],0 +; mov [rex_prefix],0 +; mov [vex_required],0 +; mov [vex_register],0 +; mov [immediate_size],0 + and dword [rex_prefix],0 + call instruction_handler + instruction_handler: + movzx ebx,word [esi] + mov al,[esi+2] + add esi,3 + add [esp],ebx + ret + instruction_assembled: + mov al,[esi] + cmp al,0Fh + je line_assembled + or al,al + jnz extra_characters_on_line + line_assembled: + clc + ret + source_end: + dec esi + stc + ret + +org_directive: + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],'.' + je invalid_value + call get_qword_value + mov cl,[value_type] + test cl,1 + jnz invalid_use_of_symbol + push eax + mov ebx,[addressing_space] + mov eax,edi + sub eax,[ebx+18h] + mov [ebx+1Ch],eax + test byte [ebx+0Ah],1 + jnz in_virtual + call init_addressing_space + jmp org_space_ok + in_virtual: + call close_virtual_addressing_space + call init_addressing_space + or byte [ebx+0Ah],1 + org_space_ok: + pop eax + mov [ebx+9],cl + mov cl,[value_sign] + sub [ebx],eax + sbb [ebx+4],edx + sbb byte [ebx+8],cl + jp org_value_ok + call recoverable_overflow + org_value_ok: + mov edx,[symbol_identifier] + mov [ebx+14h],edx + cmp [output_format],1 + ja instruction_assembled + cmp edi,[code_start] + jne instruction_assembled + cmp eax,100h + jne instruction_assembled + bts [format_flags],0 + jmp instruction_assembled +label_directive: + lods byte [esi] + cmp al,2 + jne invalid_argument + lods dword [esi] + cmp eax,0Fh + jb invalid_use_of_symbol + je reserved_word_used_as_symbol + inc esi + mov ebx,eax + mov [label_size],0 + lods byte [esi] + cmp al,':' + je get_label_size + dec esi + cmp al,11h + jne label_size_ok + get_label_size: + lods word [esi] + cmp al,11h + jne invalid_argument + mov [label_size],ah + label_size_ok: + cmp byte [esi],80h + je get_free_label_value + call make_label + jmp instruction_assembled + get_free_label_value: + inc esi + lods byte [esi] + cmp al,'(' + jne invalid_argument + push ebx ecx + or byte [ebx+8],4 + cmp byte [esi],'.' + je invalid_value + call get_address_value + or bh,bh + setnz ch + xchg ch,cl + mov bp,cx + shl ebp,16 + xchg bl,bh + mov bp,bx + pop ecx ebx + and byte [ebx+8],not 4 + mov ch,[value_type] + test ch,1 + jnz invalid_use_of_symbol + make_free_label: + and byte [ebx+9],not 1 + cmp eax,[ebx] + mov [ebx],eax + setne ah + cmp edx,[ebx+4] + mov [ebx+4],edx + setne al + or ah,al + mov edx,[address_symbol] + mov cl,[label_size] + call finish_label_symbol + jmp instruction_assembled +load_directive: + lods byte [esi] + cmp al,2 + jne invalid_argument + lods dword [esi] + cmp eax,0Fh + jb invalid_use_of_symbol + je reserved_word_used_as_symbol + inc esi + push eax + mov al,1 + cmp byte [esi],11h + jne load_size_ok + lods byte [esi] + lods byte [esi] + load_size_ok: + cmp al,8 + ja invalid_value + mov [operand_size],al + and dword [value],0 + and dword [value+4],0 + lods byte [esi] + cmp al,82h + jne invalid_argument + call get_data_point + jc value_loaded + push esi edi + mov esi,ebx + mov edi,value + rep movs byte [edi],[esi] + pop edi esi + value_loaded: + mov [value_sign],0 + mov eax,dword [value] + mov edx,dword [value+4] + pop ebx + xor cx,cx + jmp make_constant + get_data_point: + mov ebx,[addressing_space] + mov ecx,edi + sub ecx,[ebx+18h] + mov [ebx+1Ch],ecx + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],11h + jne get_data_address + cmp word [esi+1+4],'):' + jne get_data_address + inc esi + lods dword [esi] + add esi,2 + cmp byte [esi],'(' + jne invalid_argument + inc esi + cmp eax,0Fh + jbe reserved_word_used_as_symbol + mov edx,undefined_symbol + test byte [eax+8],1 + jz addressing_space_unavailable + mov edx,symbol_out_of_scope + mov cx,[eax+16] + cmp cx,[current_pass] + jne addressing_space_unavailable + test byte [eax+9],4 + jz invalid_use_of_symbol + mov ebx,eax + mov ax,[current_pass] + mov [ebx+18],ax + or byte [ebx+8],8 + cmp [symbols_file],0 + je get_addressing_space + cmp [next_pass_needed],0 + jne get_addressing_space + call store_label_reference + get_addressing_space: + mov ebx,[ebx] + get_data_address: + push ebx + cmp byte [esi],'.' + je invalid_value + or [size_override],-1 + call get_address_value + pop ebp + call calculate_relative_offset + cmp [next_pass_needed],0 + jne data_address_type_ok + cmp [value_type],0 + jne invalid_use_of_symbol + data_address_type_ok: + mov ebx,edi + xor ecx,ecx + add ebx,eax + adc edx,ecx + mov eax,ebx + sub eax,[ds:ebp+18h] + sbb edx,ecx + jnz bad_data_address + mov cl,[operand_size] + add eax,ecx + cmp eax,[ds:ebp+1Ch] + ja bad_data_address + clc + ret + addressing_space_unavailable: + cmp [error_line],0 + jne get_data_address + push [current_line] + pop [error_line] + mov [error],edx + mov [error_info],eax + jmp get_data_address + bad_data_address: + call recoverable_overflow + stc + ret +store_directive: + cmp byte [esi],11h + je sized_store + lods byte [esi] + cmp al,'(' + jne invalid_argument + call get_byte_value + xor edx,edx + movzx eax,al + mov [operand_size],1 + jmp store_value_ok + sized_store: + or [size_override],-1 + call get_value + store_value_ok: + cmp [value_type],0 + jne invalid_use_of_symbol + mov dword [value],eax + mov dword [value+4],edx + lods byte [esi] + cmp al,80h + jne invalid_argument + call get_data_point + jc instruction_assembled + push esi edi + mov esi,value + mov edi,ebx + rep movs byte [edi],[esi] + mov eax,edi + pop edi esi + cmp ebx,[undefined_data_end] + jae instruction_assembled + cmp eax,[undefined_data_start] + jbe instruction_assembled + mov [undefined_data_start],eax + jmp instruction_assembled + +display_directive: + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],0 + jne display_byte + inc esi + lods dword [esi] + mov ecx,eax + push edi + mov edi,[tagged_blocks] + sub edi,8 + sub edi,eax + cmp edi,[esp] + jbe out_of_memory + mov [tagged_blocks],edi + rep movs byte [edi],[esi] + stos dword [edi] + xor eax,eax + stos dword [edi] + pop edi + inc esi + jmp display_next + display_byte: + call get_byte_value + push edi + mov edi,[tagged_blocks] + sub edi,8+1 + mov [tagged_blocks],edi + stos byte [edi] + mov eax,1 + stos dword [edi] + dec eax + stos dword [edi] + pop edi + display_next: + cmp edi,[tagged_blocks] + ja out_of_memory + lods byte [esi] + cmp al,',' + je display_directive + dec esi + jmp instruction_assembled +show_display_buffer: + mov eax,[tagged_blocks] + or eax,eax + jz display_done + mov esi,[labels_list] + cmp esi,eax + je display_done + display_messages: + sub esi,8 + mov eax,[esi+4] + mov ecx,[esi] + sub esi,ecx + test eax,eax + jnz skip_block + push esi + call display_block + pop esi + skip_block: + cmp esi,[tagged_blocks] + jne display_messages + display_done: + ret + +times_directive: + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],'.' + je invalid_value + call get_count_value + cmp eax,0 + je zero_times + cmp byte [esi],':' + jne times_argument_ok + inc esi + times_argument_ok: + push [counter] + push [counter_limit] + mov [counter_limit],eax + mov [counter],1 + times_loop: + mov eax,esp + sub eax,100h + jc stack_overflow + cmp eax,[stack_limit] + jb stack_overflow + push esi + or [prefixed_instruction],-1 + call continue_line + mov eax,[counter_limit] + cmp [counter],eax + je times_done + inc [counter] + pop esi + jmp times_loop + times_done: + pop eax + pop [counter_limit] + pop [counter] + jmp instruction_assembled + zero_times: + call skip_symbol + jnc zero_times + jmp instruction_assembled + +virtual_directive: + lods byte [esi] + cmp al,80h + jne virtual_at_current + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],'.' + je invalid_value + call get_address_value + mov ebp,[address_symbol] + or bh,bh + setnz ch + jmp set_virtual + virtual_at_current: + dec esi + mov ebp,[addressing_space] + mov al,[ds:ebp+9] + mov [value_type],al + mov eax,edi + xor edx,edx + xor cl,cl + sub eax,[ds:ebp] + sbb edx,[ds:ebp+4] + sbb cl,[ds:ebp+8] + mov [address_sign],cl + mov bx,[ds:ebp+10h] + mov cx,[ds:ebp+10h+2] + xchg bh,bl + xchg ch,cl + mov ebp,[ds:ebp+14h] + set_virtual: + xchg bl,bh + xchg cl,ch + shl ecx,16 + mov cx,bx + push ecx eax + call allocate_structure_data + mov word [ebx],virtual_directive-instruction_handler + mov ecx,[addressing_space] + mov [ebx+12],ecx + mov [ebx+8],edi + mov ecx,[current_line] + mov [ebx+4],ecx + mov ebx,[addressing_space] + mov eax,edi + sub eax,[ebx+18h] + mov [ebx+1Ch],eax + call init_addressing_space + or byte [ebx+0Ah],1 + pop eax + mov cl,[address_sign] + not eax + not edx + not cl + add eax,1 + adc edx,0 + adc cl,0 + add eax,edi + adc edx,0 + adc cl,0 + mov [ebx],eax + mov [ebx+4],edx + mov [ebx+8],cl + pop dword [ebx+10h] + mov [ebx+14h],ebp + mov al,[value_type] + test al,1 + jnz invalid_use_of_symbol + mov [ebx+9],al + jmp instruction_assembled + allocate_structure_data: + mov ebx,[structures_buffer] + sub ebx,18h + cmp ebx,[free_additional_memory] + jb out_of_memory + mov [structures_buffer],ebx + ret + find_structure_data: + mov ebx,[structures_buffer] + scan_structures: + cmp ebx,[additional_memory_end] + je no_such_structure + cmp ax,[ebx] + je structure_data_found + add ebx,18h + jmp scan_structures + structure_data_found: + ret + no_such_structure: + stc + ret + end_virtual: + call find_structure_data + jc unexpected_instruction + push ebx + call close_virtual_addressing_space + pop ebx + mov eax,[ebx+12] + mov [addressing_space],eax + mov edi,[ebx+8] + remove_structure_data: + push esi edi + mov ecx,ebx + sub ecx,[structures_buffer] + shr ecx,2 + lea esi,[ebx-4] + lea edi,[esi+18h] + std + rep movs dword [edi],[esi] + cld + add [structures_buffer],18h + pop edi esi + ret + close_virtual_addressing_space: + mov ebx,[addressing_space] + mov eax,edi + sub eax,[ebx+18h] + mov [ebx+1Ch],eax + test byte [ebx+0Ah],2 + jz addressing_space_closed + push esi edi ecx edx + mov ecx,eax + mov eax,[tagged_blocks] + mov dword [eax-4],11h + mov dword [eax-8],ecx + sub eax,8 + sub eax,ecx + mov [tagged_blocks],eax + lea edi,[eax+ecx-1] + xchg eax,[ebx+18h] + lea esi,[eax+ecx-1] + mov eax,edi + sub eax,esi + std + shr ecx,1 + jnc virtual_byte_ok + movs byte [edi],[esi] + virtual_byte_ok: + dec esi + dec edi + shr ecx,1 + jnc virtual_word_ok + movs word [edi],[esi] + virtual_word_ok: + sub esi,2 + sub edi,2 + rep movs dword [edi],[esi] + cld + xor edx,edx + add [ebx],eax + adc dword [ebx+4],edx + adc byte [ebx+8],dl + pop edx ecx edi esi + addressing_space_closed: + ret +repeat_directive: + cmp [prefixed_instruction],0 + jne unexpected_instruction + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],'.' + je invalid_value + call get_count_value + cmp eax,0 + je zero_repeat + call allocate_structure_data + mov word [ebx],repeat_directive-instruction_handler + xchg eax,[counter_limit] + mov [ebx+10h],eax + mov eax,1 + xchg eax,[counter] + mov [ebx+14h],eax + mov [ebx+8],esi + mov eax,[current_line] + mov [ebx+4],eax + jmp instruction_assembled + end_repeat: + cmp [prefixed_instruction],0 + jne unexpected_instruction + call find_structure_data + jc unexpected_instruction + mov eax,[counter_limit] + inc [counter] + cmp [counter],eax + jbe continue_repeating + stop_repeat: + mov eax,[ebx+10h] + mov [counter_limit],eax + mov eax,[ebx+14h] + mov [counter],eax + call remove_structure_data + jmp instruction_assembled + continue_repeating: + mov esi,[ebx+8] + jmp instruction_assembled + zero_repeat: + mov al,[esi] + or al,al + jz missing_end_directive + cmp al,0Fh + jne extra_characters_on_line + call find_end_repeat + jmp instruction_assembled + find_end_repeat: + call find_structure_end + cmp ax,repeat_directive-instruction_handler + jne unexpected_instruction + ret +while_directive: + cmp [prefixed_instruction],0 + jne unexpected_instruction + call allocate_structure_data + mov word [ebx],while_directive-instruction_handler + mov eax,1 + xchg eax,[counter] + mov [ebx+10h],eax + mov [ebx+8],esi + mov eax,[current_line] + mov [ebx+4],eax + do_while: + push ebx + call calculate_logical_expression + or al,al + jnz while_true + mov al,[esi] + or al,al + jz missing_end_directive + cmp al,0Fh + jne extra_characters_on_line + stop_while: + call find_end_while + pop ebx + mov eax,[ebx+10h] + mov [counter],eax + call remove_structure_data + jmp instruction_assembled + while_true: + pop ebx + jmp instruction_assembled + end_while: + cmp [prefixed_instruction],0 + jne unexpected_instruction + call find_structure_data + jc unexpected_instruction + mov eax,[ebx+4] + mov [current_line],eax + inc [counter] + jz too_many_repeats + mov esi,[ebx+8] + jmp do_while + find_end_while: + call find_structure_end + cmp ax,while_directive-instruction_handler + jne unexpected_instruction + ret +if_directive: + cmp [prefixed_instruction],0 + jne unexpected_instruction + call calculate_logical_expression + mov dl,al + mov al,[esi] + or al,al + jz missing_end_directive + cmp al,0Fh + jne extra_characters_on_line + or dl,dl + jnz if_true + call find_else + jc instruction_assembled + mov al,[esi] + cmp al,1 + jne else_true + cmp word [esi+1],if_directive-instruction_handler + jne else_true + add esi,4 + jmp if_directive + if_true: + xor al,al + make_if_structure: + call allocate_structure_data + mov word [ebx],if_directive-instruction_handler + mov byte [ebx+2],al + mov eax,[current_line] + mov [ebx+4],eax + jmp instruction_assembled + else_true: + or al,al + jz missing_end_directive + cmp al,0Fh + jne extra_characters_on_line + or al,-1 + jmp make_if_structure + else_directive: + cmp [prefixed_instruction],0 + jne unexpected_instruction + mov ax,if_directive-instruction_handler + call find_structure_data + jc unexpected_instruction + cmp byte [ebx+2],0 + jne unexpected_instruction + found_else: + mov al,[esi] + cmp al,1 + jne skip_else + cmp word [esi+1],if_directive-instruction_handler + jne skip_else + add esi,4 + call find_else + jnc found_else + call remove_structure_data + jmp instruction_assembled + skip_else: + or al,al + jz missing_end_directive + cmp al,0Fh + jne extra_characters_on_line + call find_end_if + call remove_structure_data + jmp instruction_assembled + end_if: + cmp [prefixed_instruction],0 + jne unexpected_instruction + call find_structure_data + jc unexpected_instruction + call remove_structure_data + jmp instruction_assembled + find_else: + call find_structure_end + cmp ax,else_directive-instruction_handler + je else_found + cmp ax,if_directive-instruction_handler + jne unexpected_instruction + stc + ret + else_found: + clc + ret + find_end_if: + call find_structure_end + cmp ax,if_directive-instruction_handler + jne unexpected_instruction + ret + find_structure_end: + push [error_line] + mov eax,[current_line] + mov [error_line],eax + find_end_directive: + call skip_symbol + jnc find_end_directive + lods byte [esi] + cmp al,0Fh + jne no_end_directive + lods dword [esi] + mov [current_line],eax + skip_labels: + cmp byte [esi],2 + jne labels_ok + add esi,6 + jmp skip_labels + labels_ok: + cmp byte [esi],1 + jne find_end_directive + mov ax,[esi+1] + cmp ax,prefix_instruction-instruction_handler + je find_end_directive + add esi,4 + cmp ax,repeat_directive-instruction_handler + je skip_repeat + cmp ax,while_directive-instruction_handler + je skip_while + cmp ax,if_directive-instruction_handler + je skip_if + cmp ax,else_directive-instruction_handler + je structure_end + cmp ax,end_directive-instruction_handler + jne find_end_directive + cmp byte [esi],1 + jne find_end_directive + mov ax,[esi+1] + add esi,4 + cmp ax,repeat_directive-instruction_handler + je structure_end + cmp ax,while_directive-instruction_handler + je structure_end + cmp ax,if_directive-instruction_handler + jne find_end_directive + structure_end: + pop [error_line] + ret + no_end_directive: + mov eax,[error_line] + mov [current_line],eax + jmp missing_end_directive + skip_repeat: + call find_end_repeat + jmp find_end_directive + skip_while: + call find_end_while + jmp find_end_directive + skip_if: + call skip_if_block + jmp find_end_directive + skip_if_block: + call find_else + jc if_block_skipped + cmp byte [esi],1 + jne skip_after_else + cmp word [esi+1],if_directive-instruction_handler + jne skip_after_else + add esi,4 + jmp skip_if_block + skip_after_else: + call find_end_if + if_block_skipped: + ret +end_directive: + lods byte [esi] + cmp al,1 + jne invalid_argument + lods word [esi] + inc esi + cmp ax,virtual_directive-instruction_handler + je end_virtual + cmp ax,repeat_directive-instruction_handler + je end_repeat + cmp ax,while_directive-instruction_handler + je end_while + cmp ax,if_directive-instruction_handler + je end_if + cmp ax,data_directive-instruction_handler + je end_data + jmp invalid_argument +break_directive: + mov ebx,[structures_buffer] + mov al,[esi] + or al,al + jz find_breakable_structure + cmp al,0Fh + jne extra_characters_on_line + find_breakable_structure: + cmp ebx,[additional_memory_end] + je unexpected_instruction + mov ax,[ebx] + cmp ax,repeat_directive-instruction_handler + je break_repeat + cmp ax,while_directive-instruction_handler + je break_while + cmp ax,if_directive-instruction_handler + je break_if + add ebx,18h + jmp find_breakable_structure + break_if: + push [current_line] + mov eax,[ebx+4] + mov [current_line],eax + call remove_structure_data + call skip_if_block + pop [current_line] + mov ebx,[structures_buffer] + jmp find_breakable_structure + break_repeat: + push ebx + call find_end_repeat + pop ebx + jmp stop_repeat + break_while: + push ebx + jmp stop_while + +data_bytes: + call define_data + lods byte [esi] + cmp al,'(' + je get_byte + cmp al,'?' + jne invalid_argument + mov eax,edi + mov byte [edi],0 + inc edi + jmp undefined_data + get_byte: + cmp byte [esi],0 + je get_string + call get_byte_value + stos byte [edi] + ret + get_string: + inc esi + lods dword [esi] + mov ecx,eax + lea eax,[edi+ecx] + cmp eax,[tagged_blocks] + ja out_of_memory + rep movs byte [edi],[esi] + inc esi + ret + undefined_data: + mov ebp,[addressing_space] + test byte [ds:ebp+0Ah],1 + jz mark_undefined_data + ret + mark_undefined_data: + cmp eax,[undefined_data_end] + je undefined_data_ok + mov [undefined_data_start],eax + undefined_data_ok: + mov [undefined_data_end],edi + ret + define_data: + cmp edi,[tagged_blocks] + jae out_of_memory + cmp byte [esi],'(' + jne simple_data_value + mov ebx,esi + inc esi + call skip_expression + xchg esi,ebx + cmp byte [ebx],81h + jne simple_data_value + inc esi + call get_count_value + inc esi + or eax,eax + jz duplicate_zero_times + cmp byte [esi],'{' + jne duplicate_single_data_value + inc esi + duplicate_data: + push eax esi + duplicated_values: + cmp edi,[tagged_blocks] + jae out_of_memory + call near dword [esp+8] + lods byte [esi] + cmp al,',' + je duplicated_values + cmp al,'}' + jne invalid_argument + pop ebx eax + dec eax + jz data_defined + mov esi,ebx + jmp duplicate_data + duplicate_single_data_value: + cmp edi,[tagged_blocks] + jae out_of_memory + push eax esi + call near dword [esp+8] + pop ebx eax + dec eax + jz data_defined + mov esi,ebx + jmp duplicate_single_data_value + duplicate_zero_times: + cmp byte [esi],'{' + jne skip_single_data_value + inc esi + skip_data_value: + call skip_symbol + jc invalid_argument + cmp byte [esi],'}' + jne skip_data_value + inc esi + jmp data_defined + skip_single_data_value: + call skip_symbol + jmp data_defined + simple_data_value: + cmp edi,[tagged_blocks] + jae out_of_memory + call near dword [esp] + data_defined: + lods byte [esi] + cmp al,',' + je define_data + dec esi + add esp,4 + jmp instruction_assembled +data_unicode: + or [base_code],-1 + jmp define_words +data_words: + mov [base_code],0 + define_words: + call define_data + lods byte [esi] + cmp al,'(' + je get_word + cmp al,'?' + jne invalid_argument + mov eax,edi + and word [edi],0 + scas word [edi] + jmp undefined_data + ret + get_word: + cmp [base_code],0 + je word_data_value + cmp byte [esi],0 + je word_string + word_data_value: + call get_word_value + call mark_relocation + stos word [edi] + ret + word_string: + inc esi + lods dword [esi] + mov ecx,eax + jecxz word_string_ok + lea eax,[edi+ecx*2] + cmp eax,[tagged_blocks] + ja out_of_memory + xor ah,ah + copy_word_string: + lods byte [esi] + stos word [edi] + loop copy_word_string + word_string_ok: + inc esi + ret +data_dwords: + call define_data + lods byte [esi] + cmp al,'(' + je get_dword + cmp al,'?' + jne invalid_argument + mov eax,edi + and dword [edi],0 + scas dword [edi] + jmp undefined_data + get_dword: + push esi + call get_dword_value + pop ebx + cmp byte [esi],':' + je complex_dword + call mark_relocation + stos dword [edi] + ret + complex_dword: + mov esi,ebx + cmp byte [esi],'.' + je invalid_value + call get_word_value + push eax + inc esi + lods byte [esi] + cmp al,'(' + jne invalid_operand + mov al,[value_type] + push eax + cmp byte [esi],'.' + je invalid_value + call get_word_value + call mark_relocation + stos word [edi] + pop eax + mov [value_type],al + pop eax + call mark_relocation + stos word [edi] + ret +data_pwords: + call define_data + lods byte [esi] + cmp al,'(' + je get_pword + cmp al,'?' + jne invalid_argument + mov eax,edi + and dword [edi],0 + scas dword [edi] + and word [edi],0 + scas word [edi] + jmp undefined_data + get_pword: + push esi + call get_pword_value + pop ebx + cmp byte [esi],':' + je complex_pword + call mark_relocation + stos dword [edi] + mov ax,dx + stos word [edi] + ret + complex_pword: + mov esi,ebx + cmp byte [esi],'.' + je invalid_value + call get_word_value + push eax + inc esi + lods byte [esi] + cmp al,'(' + jne invalid_operand + mov al,[value_type] + push eax + cmp byte [esi],'.' + je invalid_value + call get_dword_value + call mark_relocation + stos dword [edi] + pop eax + mov [value_type],al + pop eax + call mark_relocation + stos word [edi] + ret +data_qwords: + call define_data + lods byte [esi] + cmp al,'(' + je get_qword + cmp al,'?' + jne invalid_argument + mov eax,edi + and dword [edi],0 + scas dword [edi] + and dword [edi],0 + scas dword [edi] + jmp undefined_data + get_qword: + call get_qword_value + call mark_relocation + stos dword [edi] + mov eax,edx + stos dword [edi] + ret +data_twords: + call define_data + lods byte [esi] + cmp al,'(' + je get_tword + cmp al,'?' + jne invalid_argument + mov eax,edi + and dword [edi],0 + scas dword [edi] + and dword [edi],0 + scas dword [edi] + and word [edi],0 + scas word [edi] + jmp undefined_data + get_tword: + cmp byte [esi],'.' + jne complex_tword + inc esi + cmp word [esi+8],8000h + je fp_zero_tword + mov eax,[esi] + stos dword [edi] + mov eax,[esi+4] + stos dword [edi] + mov ax,[esi+8] + add ax,3FFFh + jo value_out_of_range + cmp ax,7FFFh + jge value_out_of_range + cmp ax,0 + jg tword_exp_ok + mov cx,ax + neg cx + inc cx + cmp cx,64 + jae value_out_of_range + cmp cx,32 + ja large_shift + mov eax,[esi] + mov edx,[esi+4] + mov ebx,edx + shr edx,cl + shrd eax,ebx,cl + jmp tword_mantissa_shift_done + large_shift: + sub cx,32 + xor edx,edx + mov eax,[esi+4] + shr eax,cl + tword_mantissa_shift_done: + jnc store_shifted_mantissa + add eax,1 + adc edx,0 + store_shifted_mantissa: + mov [edi-8],eax + mov [edi-4],edx + xor ax,ax + test edx,1 shl 31 + jz tword_exp_ok + inc ax + tword_exp_ok: + mov bl,[esi+11] + shl bx,15 + or ax,bx + stos word [edi] + add esi,13 + ret + fp_zero_tword: + xor eax,eax + stos dword [edi] + stos dword [edi] + mov al,[esi+11] + shl ax,15 + stos word [edi] + add esi,13 + ret + complex_tword: + call get_word_value + push eax + cmp byte [esi],':' + jne invalid_operand + inc esi + lods byte [esi] + cmp al,'(' + jne invalid_operand + mov al,[value_type] + push eax + cmp byte [esi],'.' + je invalid_value + call get_qword_value + call mark_relocation + stos dword [edi] + mov eax,edx + stos dword [edi] + pop eax + mov [value_type],al + pop eax + call mark_relocation + stos word [edi] + ret +data_file: + lods word [esi] + cmp ax,'(' + jne invalid_argument + add esi,4 + call open_binary_file + mov eax,[esi-4] + lea esi,[esi+eax+1] + mov al,2 + xor edx,edx + call lseek + push eax + xor edx,edx + cmp byte [esi],':' + jne position_ok + inc esi + cmp byte [esi],'(' + jne invalid_argument + inc esi + cmp byte [esi],'.' + je invalid_value + push ebx + call get_count_value + pop ebx + mov edx,eax + sub [esp],edx + jc value_out_of_range + position_ok: + cmp byte [esi],',' + jne size_ok + inc esi + cmp byte [esi],'(' + jne invalid_argument + inc esi + cmp byte [esi],'.' + je invalid_value + push ebx edx + call get_count_value + pop edx ebx + cmp eax,[esp] + ja value_out_of_range + mov [esp],eax + size_ok: + xor al,al + call lseek + pop ecx + mov edx,edi + add edi,ecx + jc out_of_memory + cmp edi,[tagged_blocks] + ja out_of_memory + call read + jc error_reading_file + call close + lods byte [esi] + cmp al,',' + je data_file + dec esi + jmp instruction_assembled + open_binary_file: + push esi + push edi + mov eax,[current_line] + find_current_source_path: + mov esi,[eax] + test byte [eax+7],80h + jz get_current_path + mov eax,[eax+8] + jmp find_current_source_path + get_current_path: + lodsb + stosb + or al,al + jnz get_current_path + cut_current_path: + cmp edi,[esp] + je current_path_ok + cmp byte [edi-1],'\' + je current_path_ok + cmp byte [edi-1],'/' + je current_path_ok + dec edi + jmp cut_current_path + current_path_ok: + mov esi,[esp+4] + call expand_path + pop edx + mov esi,edx + call open + jnc file_opened + mov edx,[include_paths] + search_in_include_paths: + push edx esi + mov edi,esi + mov esi,[esp+4] + call get_include_directory + mov [esp+4],esi + mov esi,[esp+8] + call expand_path + pop edx + mov esi,edx + call open + pop edx + jnc file_opened + cmp byte [edx],0 + jne search_in_include_paths + mov edi,esi + mov esi,[esp] + push edi + call expand_path + pop edx + mov esi,edx + call open + jc file_not_found + file_opened: + mov edi,esi + pop esi + ret +reserve_bytes: + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],'.' + je invalid_value + call get_count_value + mov ecx,eax + mov edx,ecx + add edx,edi + jc out_of_memory + cmp edx,[tagged_blocks] + ja out_of_memory + push edi + cmp [next_pass_needed],0 + je zero_bytes + add edi,ecx + jmp reserved_data + zero_bytes: + xor eax,eax + shr ecx,1 + jnc bytes_stosb_ok + stos byte [edi] + bytes_stosb_ok: + shr ecx,1 + jnc bytes_stosw_ok + stos word [edi] + bytes_stosw_ok: + rep stos dword [edi] + reserved_data: + pop eax + call undefined_data + jmp instruction_assembled +reserve_words: + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],'.' + je invalid_value + call get_count_value + mov ecx,eax + mov edx,ecx + shl edx,1 + jc out_of_memory + add edx,edi + jc out_of_memory + cmp edx,[tagged_blocks] + ja out_of_memory + push edi + cmp [next_pass_needed],0 + je zero_words + lea edi,[edi+ecx*2] + jmp reserved_data + zero_words: + xor eax,eax + shr ecx,1 + jnc words_stosw_ok + stos word [edi] + words_stosw_ok: + rep stos dword [edi] + jmp reserved_data +reserve_dwords: + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],'.' + je invalid_value + call get_count_value + mov ecx,eax + mov edx,ecx + shl edx,1 + jc out_of_memory + shl edx,1 + jc out_of_memory + add edx,edi + jc out_of_memory + cmp edx,[tagged_blocks] + ja out_of_memory + push edi + cmp [next_pass_needed],0 + je zero_dwords + lea edi,[edi+ecx*4] + jmp reserved_data + zero_dwords: + xor eax,eax + rep stos dword [edi] + jmp reserved_data +reserve_pwords: + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],'.' + je invalid_value + call get_count_value + mov ecx,eax + shl ecx,1 + jc out_of_memory + add ecx,eax + mov edx,ecx + shl edx,1 + jc out_of_memory + add edx,edi + jc out_of_memory + cmp edx,[tagged_blocks] + ja out_of_memory + push edi + cmp [next_pass_needed],0 + je zero_words + lea edi,[edi+ecx*2] + jmp reserved_data +reserve_qwords: + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],'.' + je invalid_value + call get_count_value + mov ecx,eax + shl ecx,1 + jc out_of_memory + mov edx,ecx + shl edx,1 + jc out_of_memory + shl edx,1 + jc out_of_memory + add edx,edi + jc out_of_memory + cmp edx,[tagged_blocks] + ja out_of_memory + push edi + cmp [next_pass_needed],0 + je zero_dwords + lea edi,[edi+ecx*4] + jmp reserved_data +reserve_twords: + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],'.' + je invalid_value + call get_count_value + mov ecx,eax + shl ecx,2 + jc out_of_memory + add ecx,eax + mov edx,ecx + shl edx,1 + jc out_of_memory + add edx,edi + jc out_of_memory + cmp edx,[tagged_blocks] + ja out_of_memory + push edi + cmp [next_pass_needed],0 + je zero_words + lea edi,[edi+ecx*2] + jmp reserved_data +align_directive: + lods byte [esi] + cmp al,'(' + jne invalid_argument + cmp byte [esi],'.' + je invalid_value + call get_count_value + mov edx,eax + dec edx + test eax,edx + jnz invalid_align_value + or eax,eax + jz invalid_align_value + cmp eax,1 + je instruction_assembled + mov ecx,edi + mov ebp,[addressing_space] + sub ecx,[ds:ebp] + cmp dword [ds:ebp+10h],0 + jne section_not_aligned_enough + cmp byte [ds:ebp+9],0 + je make_alignment + cmp [output_format],3 + je pe_alignment + mov ebx,[ds:ebp+14h] + cmp byte [ebx],0 + jne section_not_aligned_enough + cmp eax,[ebx+10h] + jbe make_alignment + jmp section_not_aligned_enough + pe_alignment: + cmp eax,1000h + ja section_not_aligned_enough + make_alignment: + dec eax + and ecx,eax + jz instruction_assembled + neg ecx + add ecx,eax + inc ecx + mov edx,ecx + add edx,edi + jc out_of_memory + cmp edx,[tagged_blocks] + ja out_of_memory + push edi + cmp [next_pass_needed],0 + je nops + add edi,ecx + jmp reserved_data + invalid_align_value: + cmp [error_line],0 + jne instruction_assembled + mov eax,[current_line] + mov [error_line],eax + mov [error],invalid_value + jmp instruction_assembled + nops: + mov eax,90909090h + shr ecx,1 + jnc nops_stosb_ok + stos byte [edi] + nops_stosb_ok: + shr ecx,1 + jnc nops_stosw_ok + stos word [edi] + nops_stosw_ok: + rep stos dword [edi] + jmp reserved_data +err_directive: + mov al,[esi] + cmp al,0Fh + je invoked_error + or al,al + jz invoked_error + jmp extra_characters_on_line +assert_directive: + call calculate_logical_expression + or al,al + jnz instruction_assembled + cmp [error_line],0 + jne instruction_assembled + mov eax,[current_line] + mov [error_line],eax + mov [error],assertion_failed + jmp instruction_assembled diff --git a/samples/Assembly/FASM.asm b/samples/Assembly/FASM.asm new file mode 100644 index 00000000..9a2201ae --- /dev/null +++ b/samples/Assembly/FASM.asm @@ -0,0 +1,350 @@ + +; flat assembler interface for Win32 +; Copyright (c) 1999-2014, Tomasz Grysztar. +; All rights reserved. + + format PE console + +section '.text' code readable executable + +start: + + mov [con_handle],STD_OUTPUT_HANDLE + mov esi,_logo + call display_string + + call get_params + jc information + + call init_memory + + mov esi,_memory_prefix + call display_string + mov eax,[memory_end] + sub eax,[memory_start] + add eax,[additional_memory_end] + sub eax,[additional_memory] + shr eax,10 + call display_number + mov esi,_memory_suffix + call display_string + + call [GetTickCount] + mov [start_time],eax + + call preprocessor + call parser + call assembler + call formatter + + call display_user_messages + movzx eax,[current_pass] + inc eax + call display_number + mov esi,_passes_suffix + call display_string + call [GetTickCount] + sub eax,[start_time] + xor edx,edx + mov ebx,100 + div ebx + or eax,eax + jz display_bytes_count + xor edx,edx + mov ebx,10 + div ebx + push edx + call display_number + mov dl,'.' + call display_character + pop eax + call display_number + mov esi,_seconds_suffix + call display_string + display_bytes_count: + mov eax,[written_size] + call display_number + mov esi,_bytes_suffix + call display_string + xor al,al + jmp exit_program + +information: + mov esi,_usage + call display_string + mov al,1 + jmp exit_program + +get_params: + mov [input_file],0 + mov [output_file],0 + mov [symbols_file],0 + mov [memory_setting],0 + mov [passes_limit],100 + call [GetCommandLine] + mov esi,eax + mov edi,params + find_command_start: + lodsb + cmp al,20h + je find_command_start + cmp al,22h + je skip_quoted_name + skip_name: + lodsb + cmp al,20h + je find_param + or al,al + jz all_params + jmp skip_name + skip_quoted_name: + lodsb + cmp al,22h + je find_param + or al,al + jz all_params + jmp skip_quoted_name + find_param: + lodsb + cmp al,20h + je find_param + cmp al,'-' + je option_param + cmp al,0Dh + je all_params + or al,al + jz all_params + cmp [input_file],0 + jne get_output_file + mov [input_file],edi + jmp process_param + get_output_file: + cmp [output_file],0 + jne bad_params + mov [output_file],edi + process_param: + cmp al,22h + je string_param + copy_param: + stosb + lodsb + cmp al,20h + je param_end + cmp al,0Dh + je param_end + or al,al + jz param_end + jmp copy_param + string_param: + lodsb + cmp al,22h + je string_param_end + cmp al,0Dh + je param_end + or al,al + jz param_end + stosb + jmp string_param + option_param: + lodsb + cmp al,'m' + je memory_option + cmp al,'M' + je memory_option + cmp al,'p' + je passes_option + cmp al,'P' + je passes_option + cmp al,'s' + je symbols_option + cmp al,'S' + je symbols_option + bad_params: + stc + ret + get_option_value: + xor eax,eax + mov edx,eax + get_option_digit: + lodsb + cmp al,20h + je option_value_ok + cmp al,0Dh + je option_value_ok + or al,al + jz option_value_ok + sub al,30h + jc invalid_option_value + cmp al,9 + ja invalid_option_value + imul edx,10 + jo invalid_option_value + add edx,eax + jc invalid_option_value + jmp get_option_digit + option_value_ok: + dec esi + clc + ret + invalid_option_value: + stc + ret + memory_option: + lodsb + cmp al,20h + je memory_option + cmp al,0Dh + je bad_params + or al,al + jz bad_params + dec esi + call get_option_value + or edx,edx + jz bad_params + cmp edx,1 shl (32-10) + jae bad_params + mov [memory_setting],edx + jmp find_param + passes_option: + lodsb + cmp al,20h + je passes_option + cmp al,0Dh + je bad_params + or al,al + jz bad_params + dec esi + call get_option_value + or edx,edx + jz bad_params + cmp edx,10000h + ja bad_params + mov [passes_limit],dx + jmp find_param + symbols_option: + mov [symbols_file],edi + find_symbols_file_name: + lodsb + cmp al,20h + jne process_param + jmp find_symbols_file_name + param_end: + dec esi + string_param_end: + xor al,al + stosb + jmp find_param + all_params: + cmp [input_file],0 + je bad_params + clc + ret + +include 'system.inc' + +include '..\errors.inc' +include '..\symbdump.inc' +include '..\preproce.inc' +include '..\parser.inc' +include '..\exprpars.inc' +include '..\assemble.inc' +include '..\exprcalc.inc' +include '..\formats.inc' +include '..\x86_64.inc' +include '..\avx.inc' + +include '..\tables.inc' +include '..\messages.inc' + +section '.data' data readable writeable + +include '..\version.inc' + +_copyright db 'Copyright (c) 1999-2014, Tomasz Grysztar',0Dh,0Ah,0 + +_logo db 'flat assembler version ',VERSION_STRING,0 +_usage db 0Dh,0Ah + db 'usage: fasm [output]',0Dh,0Ah + db 'optional settings:',0Dh,0Ah + db ' -m set the limit in kilobytes for the available memory',0Dh,0Ah + db ' -p set the maximum allowed number of passes',0Dh,0Ah + db ' -s dump symbolic information for debugging',0Dh,0Ah + db 0 +_memory_prefix db ' (',0 +_memory_suffix db ' kilobytes memory)',0Dh,0Ah,0 +_passes_suffix db ' passes, ',0 +_seconds_suffix db ' seconds, ',0 +_bytes_suffix db ' bytes.',0Dh,0Ah,0 + +align 4 + +include '..\variable.inc' + +con_handle dd ? +memory_setting dd ? +start_time dd ? +bytes_count dd ? +displayed_count dd ? +character db ? +last_displayed rb 2 + +params rb 1000h +options rb 1000h +buffer rb 4000h + +stack 10000h + +section '.idata' import data readable writeable + + dd 0,0,0,rva kernel_name,rva kernel_table + dd 0,0,0,0,0 + + kernel_table: + ExitProcess dd rva _ExitProcess + CreateFile dd rva _CreateFileA + ReadFile dd rva _ReadFile + WriteFile dd rva _WriteFile + CloseHandle dd rva _CloseHandle + SetFilePointer dd rva _SetFilePointer + GetCommandLine dd rva _GetCommandLineA + GetEnvironmentVariable dd rva _GetEnvironmentVariable + GetStdHandle dd rva _GetStdHandle + VirtualAlloc dd rva _VirtualAlloc + VirtualFree dd rva _VirtualFree + GetTickCount dd rva _GetTickCount + GetSystemTime dd rva _GetSystemTime + GlobalMemoryStatus dd rva _GlobalMemoryStatus + dd 0 + + kernel_name db 'KERNEL32.DLL',0 + + _ExitProcess dw 0 + db 'ExitProcess',0 + _CreateFileA dw 0 + db 'CreateFileA',0 + _ReadFile dw 0 + db 'ReadFile',0 + _WriteFile dw 0 + db 'WriteFile',0 + _CloseHandle dw 0 + db 'CloseHandle',0 + _SetFilePointer dw 0 + db 'SetFilePointer',0 + _GetCommandLineA dw 0 + db 'GetCommandLineA',0 + _GetEnvironmentVariable dw 0 + db 'GetEnvironmentVariableA',0 + _GetStdHandle dw 0 + db 'GetStdHandle',0 + _VirtualAlloc dw 0 + db 'VirtualAlloc',0 + _VirtualFree dw 0 + db 'VirtualFree',0 + _GetTickCount dw 0 + db 'GetTickCount',0 + _GetSystemTime dw 0 + db 'GetSystemTime',0 + _GlobalMemoryStatus dw 0 + db 'GlobalMemoryStatus',0 + +section '.reloc' fixups data readable discardable diff --git a/samples/Assembly/SYSTEM.inc b/samples/Assembly/SYSTEM.inc new file mode 100644 index 00000000..77a61d29 --- /dev/null +++ b/samples/Assembly/SYSTEM.inc @@ -0,0 +1,503 @@ + +; flat assembler interface for Win32 +; Copyright (c) 1999-2014, Tomasz Grysztar. +; All rights reserved. + +CREATE_NEW = 1 +CREATE_ALWAYS = 2 +OPEN_EXISTING = 3 +OPEN_ALWAYS = 4 +TRUNCATE_EXISTING = 5 + +FILE_SHARE_READ = 1 +FILE_SHARE_WRITE = 2 +FILE_SHARE_DELETE = 4 + +GENERIC_READ = 80000000h +GENERIC_WRITE = 40000000h + +STD_INPUT_HANDLE = 0FFFFFFF6h +STD_OUTPUT_HANDLE = 0FFFFFFF5h +STD_ERROR_HANDLE = 0FFFFFFF4h + +MEM_COMMIT = 1000h +MEM_RESERVE = 2000h +MEM_DECOMMIT = 4000h +MEM_RELEASE = 8000h +MEM_FREE = 10000h +MEM_PRIVATE = 20000h +MEM_MAPPED = 40000h +MEM_RESET = 80000h +MEM_TOP_DOWN = 100000h + +PAGE_NOACCESS = 1 +PAGE_READONLY = 2 +PAGE_READWRITE = 4 +PAGE_WRITECOPY = 8 +PAGE_EXECUTE = 10h +PAGE_EXECUTE_READ = 20h +PAGE_EXECUTE_READWRITE = 40h +PAGE_EXECUTE_WRITECOPY = 80h +PAGE_GUARD = 100h +PAGE_NOCACHE = 200h + +init_memory: + xor eax,eax + mov [memory_start],eax + mov eax,esp + and eax,not 0FFFh + add eax,1000h-10000h + mov [stack_limit],eax + mov eax,[memory_setting] + shl eax,10 + jnz allocate_memory + push buffer + call [GlobalMemoryStatus] + mov eax,dword [buffer+20] + mov edx,dword [buffer+12] + cmp eax,0 + jl large_memory + cmp edx,0 + jl large_memory + shr eax,2 + add eax,edx + jmp allocate_memory + large_memory: + mov eax,80000000h + allocate_memory: + mov edx,eax + shr edx,2 + mov ecx,eax + sub ecx,edx + mov [memory_end],ecx + mov [additional_memory_end],edx + push PAGE_READWRITE + push MEM_COMMIT + push eax + push 0 + call [VirtualAlloc] + or eax,eax + jz not_enough_memory + mov [memory_start],eax + add eax,[memory_end] + mov [memory_end],eax + mov [additional_memory],eax + add [additional_memory_end],eax + ret + not_enough_memory: + mov eax,[additional_memory_end] + shl eax,1 + cmp eax,4000h + jb out_of_memory + jmp allocate_memory + +exit_program: + movzx eax,al + push eax + mov eax,[memory_start] + test eax,eax + jz do_exit + push MEM_RELEASE + push 0 + push eax + call [VirtualFree] + do_exit: + call [ExitProcess] + +get_environment_variable: + mov ecx,[memory_end] + sub ecx,edi + cmp ecx,4000h + jbe buffer_for_variable_ok + mov ecx,4000h + buffer_for_variable_ok: + push ecx + push edi + push esi + call [GetEnvironmentVariable] + add edi,eax + cmp edi,[memory_end] + jae out_of_memory + ret + +open: + push 0 + push 0 + push OPEN_EXISTING + push 0 + push FILE_SHARE_READ + push GENERIC_READ + push edx + call [CreateFile] + cmp eax,-1 + je file_error + mov ebx,eax + clc + ret + file_error: + stc + ret +create: + push 0 + push 0 + push CREATE_ALWAYS + push 0 + push FILE_SHARE_READ + push GENERIC_WRITE + push edx + call [CreateFile] + cmp eax,-1 + je file_error + mov ebx,eax + clc + ret +write: + push 0 + push bytes_count + push ecx + push edx + push ebx + call [WriteFile] + or eax,eax + jz file_error + clc + ret +read: + mov ebp,ecx + push 0 + push bytes_count + push ecx + push edx + push ebx + call [ReadFile] + or eax,eax + jz file_error + cmp ebp,[bytes_count] + jne file_error + clc + ret +close: + push ebx + call [CloseHandle] + ret +lseek: + movzx eax,al + push eax + push 0 + push edx + push ebx + call [SetFilePointer] + ret + +display_string: + push [con_handle] + call [GetStdHandle] + mov ebp,eax + mov edi,esi + or ecx,-1 + xor al,al + repne scasb + neg ecx + sub ecx,2 + push 0 + push bytes_count + push ecx + push esi + push ebp + call [WriteFile] + ret +display_character: + push ebx + mov [character],dl + push [con_handle] + call [GetStdHandle] + mov ebx,eax + push 0 + push bytes_count + push 1 + push character + push ebx + call [WriteFile] + pop ebx + ret +display_number: + push ebx + mov ecx,1000000000 + xor edx,edx + xor bl,bl + display_loop: + div ecx + push edx + cmp ecx,1 + je display_digit + or bl,bl + jnz display_digit + or al,al + jz digit_ok + not bl + display_digit: + mov dl,al + add dl,30h + push ecx + call display_character + pop ecx + digit_ok: + mov eax,ecx + xor edx,edx + mov ecx,10 + div ecx + mov ecx,eax + pop eax + or ecx,ecx + jnz display_loop + pop ebx + ret + +display_user_messages: + mov [displayed_count],0 + call show_display_buffer + cmp [displayed_count],1 + jb line_break_ok + je make_line_break + mov ax,word [last_displayed] + cmp ax,0A0Dh + je line_break_ok + cmp ax,0D0Ah + je line_break_ok + make_line_break: + mov word [buffer],0A0Dh + push [con_handle] + call [GetStdHandle] + push 0 + push bytes_count + push 2 + push buffer + push eax + call [WriteFile] + line_break_ok: + ret +display_block: + add [displayed_count],ecx + cmp ecx,1 + ja take_last_two_characters + jb block_displayed + mov al,[last_displayed+1] + mov ah,[esi] + mov word [last_displayed],ax + jmp block_ok + take_last_two_characters: + mov ax,[esi+ecx-2] + mov word [last_displayed],ax + block_ok: + push ecx + push [con_handle] + call [GetStdHandle] + pop ecx + push 0 + push bytes_count + push ecx + push esi + push eax + call [WriteFile] + block_displayed: + ret + +fatal_error: + mov [con_handle],STD_ERROR_HANDLE + mov esi,error_prefix + call display_string + pop esi + call display_string + mov esi,error_suffix + call display_string + mov al,0FFh + jmp exit_program +assembler_error: + mov [con_handle],STD_ERROR_HANDLE + call display_user_messages + push dword 0 + mov ebx,[current_line] + get_error_lines: + mov eax,[ebx] + cmp byte [eax],0 + je get_next_error_line + push ebx + test byte [ebx+7],80h + jz display_error_line + mov edx,ebx + find_definition_origin: + mov edx,[edx+12] + test byte [edx+7],80h + jnz find_definition_origin + push edx + get_next_error_line: + mov ebx,[ebx+8] + jmp get_error_lines + display_error_line: + mov esi,[ebx] + call display_string + mov esi,line_number_start + call display_string + mov eax,[ebx+4] + and eax,7FFFFFFFh + call display_number + mov dl,']' + call display_character + pop esi + cmp ebx,esi + je line_number_ok + mov dl,20h + call display_character + push esi + mov esi,[esi] + movzx ecx,byte [esi] + inc esi + call display_block + mov esi,line_number_start + call display_string + pop esi + mov eax,[esi+4] + and eax,7FFFFFFFh + call display_number + mov dl,']' + call display_character + line_number_ok: + mov esi,line_data_start + call display_string + mov esi,ebx + mov edx,[esi] + call open + mov al,2 + xor edx,edx + call lseek + mov edx,[esi+8] + sub eax,edx + jz line_data_displayed + push eax + xor al,al + call lseek + mov ecx,[esp] + mov edx,[additional_memory] + lea eax,[edx+ecx] + cmp eax,[additional_memory_end] + ja out_of_memory + call read + call close + pop ecx + mov esi,[additional_memory] + get_line_data: + mov al,[esi] + cmp al,0Ah + je display_line_data + cmp al,0Dh + je display_line_data + cmp al,1Ah + je display_line_data + or al,al + jz display_line_data + inc esi + loop get_line_data + display_line_data: + mov ecx,esi + mov esi,[additional_memory] + sub ecx,esi + call display_block + line_data_displayed: + mov esi,cr_lf + call display_string + pop ebx + or ebx,ebx + jnz display_error_line + mov esi,error_prefix + call display_string + pop esi + call display_string + mov esi,error_suffix + call display_string + mov al,2 + jmp exit_program + +make_timestamp: + push buffer + call [GetSystemTime] + movzx ecx,word [buffer] + mov eax,ecx + sub eax,1970 + mov ebx,365 + mul ebx + mov ebp,eax + mov eax,ecx + sub eax,1969 + shr eax,2 + add ebp,eax + mov eax,ecx + sub eax,1901 + mov ebx,100 + div ebx + sub ebp,eax + mov eax,ecx + xor edx,edx + sub eax,1601 + mov ebx,400 + div ebx + add ebp,eax + movzx ecx,word [buffer+2] + mov eax,ecx + dec eax + mov ebx,30 + mul ebx + add ebp,eax + cmp ecx,8 + jbe months_correction + mov eax,ecx + sub eax,7 + shr eax,1 + add ebp,eax + mov ecx,8 + months_correction: + mov eax,ecx + shr eax,1 + add ebp,eax + cmp ecx,2 + jbe day_correction_ok + sub ebp,2 + movzx ecx,word [buffer] + test ecx,11b + jnz day_correction_ok + xor edx,edx + mov eax,ecx + mov ebx,100 + div ebx + or edx,edx + jnz day_correction + mov eax,ecx + mov ebx,400 + div ebx + or edx,edx + jnz day_correction_ok + day_correction: + inc ebp + day_correction_ok: + movzx eax,word [buffer+6] + dec eax + add eax,ebp + mov ebx,24 + mul ebx + movzx ecx,word [buffer+8] + add eax,ecx + mov ebx,60 + mul ebx + movzx ecx,word [buffer+10] + add eax,ecx + mov ebx,60 + mul ebx + movzx ecx,word [buffer+12] + add eax,ecx + adc edx,0 + ret + +error_prefix db 'error: ',0 +error_suffix db '.' +cr_lf db 0Dh,0Ah,0 +line_number_start db ' [',0 +line_data_start db ':',0Dh,0Ah,0 diff --git a/samples/Assembly/X86_64.inc b/samples/Assembly/X86_64.inc new file mode 100644 index 00000000..28413065 --- /dev/null +++ b/samples/Assembly/X86_64.inc @@ -0,0 +1,7060 @@ + +; flat assembler core +; Copyright (c) 1999-2014, Tomasz Grysztar. +; All rights reserved. + +simple_instruction_except64: + cmp [code_type],64 + je illegal_instruction +simple_instruction: + stos byte [edi] + jmp instruction_assembled +simple_instruction_only64: + cmp [code_type],64 + jne illegal_instruction + jmp simple_instruction +simple_instruction_16bit_except64: + cmp [code_type],64 + je illegal_instruction +simple_instruction_16bit: + cmp [code_type],16 + jne size_prefix + stos byte [edi] + jmp instruction_assembled + size_prefix: + mov ah,al + mov al,66h + stos word [edi] + jmp instruction_assembled +simple_instruction_32bit_except64: + cmp [code_type],64 + je illegal_instruction +simple_instruction_32bit: + cmp [code_type],16 + je size_prefix + stos byte [edi] + jmp instruction_assembled +iret_instruction: + cmp [code_type],64 + jne simple_instruction +simple_instruction_64bit: + cmp [code_type],64 + jne illegal_instruction + mov ah,al + mov al,48h + stos word [edi] + jmp instruction_assembled +simple_extended_instruction_64bit: + cmp [code_type],64 + jne illegal_instruction + mov byte [edi],48h + inc edi +simple_extended_instruction: + mov ah,al + mov al,0Fh + stos word [edi] + jmp instruction_assembled +prefix_instruction: + stos byte [edi] + or [prefixed_instruction],-1 + jmp continue_line +segment_prefix: + mov ah,al + shr ah,4 + cmp ah,6 + jne illegal_instruction + and al,1111b + mov [segment_register],al + call store_segment_prefix + or [prefixed_instruction],-1 + jmp continue_line +int_instruction: + lods byte [esi] + call get_size_operator + cmp ah,1 + ja invalid_operand_size + cmp al,'(' + jne invalid_operand + call get_byte_value + test eax,eax + jns int_imm_ok + call recoverable_overflow + int_imm_ok: + mov ah,al + mov al,0CDh + stos word [edi] + jmp instruction_assembled +aa_instruction: + cmp [code_type],64 + je illegal_instruction + push eax + mov bl,10 + cmp byte [esi],'(' + jne aa_store + inc esi + xor al,al + xchg al,[operand_size] + cmp al,1 + ja invalid_operand_size + call get_byte_value + mov bl,al + aa_store: + cmp [operand_size],0 + jne invalid_operand + pop eax + mov ah,bl + stos word [edi] + jmp instruction_assembled + +basic_instruction: + mov [base_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + je basic_reg + cmp al,'[' + jne invalid_operand + basic_mem: + call get_address + push edx ebx ecx + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'(' + je basic_mem_imm + cmp al,10h + jne invalid_operand + basic_mem_reg: + lods byte [esi] + call convert_register + mov [postbyte_register],al + pop ecx ebx edx + mov al,ah + cmp al,1 + je instruction_ready + call operand_autodetect + inc [base_code] + instruction_ready: + call store_instruction + jmp instruction_assembled + basic_mem_imm: + mov al,[operand_size] + cmp al,1 + jb basic_mem_imm_nosize + je basic_mem_imm_8bit + cmp al,2 + je basic_mem_imm_16bit + cmp al,4 + je basic_mem_imm_32bit + cmp al,8 + jne invalid_operand_size + basic_mem_imm_64bit: + cmp [size_declared],0 + jne long_immediate_not_encodable + call operand_64bit + call get_simm32 + cmp [value_type],4 + jae long_immediate_not_encodable + jmp basic_mem_imm_32bit_ok + basic_mem_imm_nosize: + call recoverable_unknown_size + basic_mem_imm_8bit: + call get_byte_value + mov byte [value],al + mov al,[base_code] + shr al,3 + mov [postbyte_register],al + pop ecx ebx edx + mov [base_code],80h + call store_instruction_with_imm8 + jmp instruction_assembled + basic_mem_imm_16bit: + call operand_16bit + call get_word_value + mov word [value],ax + mov al,[base_code] + shr al,3 + mov [postbyte_register],al + pop ecx ebx edx + cmp [value_type],0 + jne basic_mem_imm_16bit_store + cmp [size_declared],0 + jne basic_mem_imm_16bit_store + cmp word [value],80h + jb basic_mem_simm_8bit + cmp word [value],-80h + jae basic_mem_simm_8bit + basic_mem_imm_16bit_store: + mov [base_code],81h + call store_instruction_with_imm16 + jmp instruction_assembled + basic_mem_simm_8bit: + mov [base_code],83h + call store_instruction_with_imm8 + jmp instruction_assembled + basic_mem_imm_32bit: + call operand_32bit + call get_dword_value + basic_mem_imm_32bit_ok: + mov dword [value],eax + mov al,[base_code] + shr al,3 + mov [postbyte_register],al + pop ecx ebx edx + cmp [value_type],0 + jne basic_mem_imm_32bit_store + cmp [size_declared],0 + jne basic_mem_imm_32bit_store + cmp dword [value],80h + jb basic_mem_simm_8bit + cmp dword [value],-80h + jae basic_mem_simm_8bit + basic_mem_imm_32bit_store: + mov [base_code],81h + call store_instruction_with_imm32 + jmp instruction_assembled + get_simm32: + call get_qword_value + mov ecx,edx + cdq + cmp ecx,edx + jne value_out_of_range + cmp [value_type],4 + jne get_simm32_ok + mov [value_type],2 + get_simm32_ok: + ret + basic_reg: + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je basic_reg_reg + cmp al,'(' + je basic_reg_imm + cmp al,'[' + jne invalid_operand + basic_reg_mem: + call get_address + mov al,[operand_size] + cmp al,1 + je basic_reg_mem_8bit + call operand_autodetect + add [base_code],3 + jmp instruction_ready + basic_reg_mem_8bit: + add [base_code],2 + jmp instruction_ready + basic_reg_reg: + lods byte [esi] + call convert_register + mov bl,[postbyte_register] + mov [postbyte_register],al + mov al,ah + cmp al,1 + je nomem_instruction_ready + call operand_autodetect + inc [base_code] + nomem_instruction_ready: + call store_nomem_instruction + jmp instruction_assembled + basic_reg_imm: + mov al,[operand_size] + cmp al,1 + je basic_reg_imm_8bit + cmp al,2 + je basic_reg_imm_16bit + cmp al,4 + je basic_reg_imm_32bit + cmp al,8 + jne invalid_operand_size + basic_reg_imm_64bit: + cmp [size_declared],0 + jne long_immediate_not_encodable + call operand_64bit + call get_simm32 + cmp [value_type],4 + jae long_immediate_not_encodable + jmp basic_reg_imm_32bit_ok + basic_reg_imm_8bit: + call get_byte_value + mov dl,al + mov bl,[base_code] + shr bl,3 + xchg bl,[postbyte_register] + or bl,bl + jz basic_al_imm + mov [base_code],80h + call store_nomem_instruction + mov al,dl + stos byte [edi] + jmp instruction_assembled + basic_al_imm: + mov al,[base_code] + add al,4 + stos byte [edi] + mov al,dl + stos byte [edi] + jmp instruction_assembled + basic_reg_imm_16bit: + call operand_16bit + call get_word_value + mov dx,ax + mov bl,[base_code] + shr bl,3 + xchg bl,[postbyte_register] + cmp [value_type],0 + jne basic_reg_imm_16bit_store + cmp [size_declared],0 + jne basic_reg_imm_16bit_store + cmp dx,80h + jb basic_reg_simm_8bit + cmp dx,-80h + jae basic_reg_simm_8bit + basic_reg_imm_16bit_store: + or bl,bl + jz basic_ax_imm + mov [base_code],81h + call store_nomem_instruction + basic_store_imm_16bit: + mov ax,dx + call mark_relocation + stos word [edi] + jmp instruction_assembled + basic_reg_simm_8bit: + mov [base_code],83h + call store_nomem_instruction + mov al,dl + stos byte [edi] + jmp instruction_assembled + basic_ax_imm: + add [base_code],5 + call store_instruction_code + jmp basic_store_imm_16bit + basic_reg_imm_32bit: + call operand_32bit + call get_dword_value + basic_reg_imm_32bit_ok: + mov edx,eax + mov bl,[base_code] + shr bl,3 + xchg bl,[postbyte_register] + cmp [value_type],0 + jne basic_reg_imm_32bit_store + cmp [size_declared],0 + jne basic_reg_imm_32bit_store + cmp edx,80h + jb basic_reg_simm_8bit + cmp edx,-80h + jae basic_reg_simm_8bit + basic_reg_imm_32bit_store: + or bl,bl + jz basic_eax_imm + mov [base_code],81h + call store_nomem_instruction + basic_store_imm_32bit: + mov eax,edx + call mark_relocation + stos dword [edi] + jmp instruction_assembled + basic_eax_imm: + add [base_code],5 + call store_instruction_code + jmp basic_store_imm_32bit + recoverable_unknown_size: + cmp [error_line],0 + jne ignore_unknown_size + push [current_line] + pop [error_line] + mov [error],operand_size_not_specified + ignore_unknown_size: + ret +single_operand_instruction: + mov [base_code],0F6h + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,10h + je single_reg + cmp al,'[' + jne invalid_operand + single_mem: + call get_address + mov al,[operand_size] + cmp al,1 + je single_mem_8bit + jb single_mem_nosize + call operand_autodetect + inc [base_code] + jmp instruction_ready + single_mem_nosize: + call recoverable_unknown_size + single_mem_8bit: + jmp instruction_ready + single_reg: + lods byte [esi] + call convert_register + mov bl,al + mov al,ah + cmp al,1 + je single_reg_8bit + call operand_autodetect + inc [base_code] + single_reg_8bit: + jmp nomem_instruction_ready +mov_instruction: + mov [base_code],88h + lods byte [esi] + call get_size_operator + cmp al,10h + je mov_reg + cmp al,'[' + jne invalid_operand + mov_mem: + call get_address + push edx ebx ecx + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'(' + je mov_mem_imm + cmp al,10h + jne invalid_operand + mov_mem_reg: + lods byte [esi] + cmp al,60h + jb mov_mem_general_reg + cmp al,70h + jb mov_mem_sreg + mov_mem_general_reg: + call convert_register + mov [postbyte_register],al + pop ecx ebx edx + cmp ah,1 + je mov_mem_reg_8bit + mov al,ah + call operand_autodetect + mov al,[postbyte_register] + or al,bl + or al,bh + jz mov_mem_ax + inc [base_code] + jmp instruction_ready + mov_mem_reg_8bit: + or al,bl + or al,bh + jnz instruction_ready + mov_mem_al: + test ch,22h + jnz mov_mem_address16_al + test ch,44h + jnz mov_mem_address32_al + test ch,88h + jnz mov_mem_address64_al + or ch,ch + jnz invalid_address_size + cmp [code_type],64 + je mov_mem_address64_al + cmp [code_type],32 + je mov_mem_address32_al + cmp edx,10000h + jb mov_mem_address16_al + mov_mem_address32_al: + call store_segment_prefix_if_necessary + call address_32bit_prefix + mov [base_code],0A2h + store_mov_address32: + call store_instruction_code + call store_address_32bit_value + jmp instruction_assembled + mov_mem_address16_al: + call store_segment_prefix_if_necessary + call address_16bit_prefix + mov [base_code],0A2h + store_mov_address16: + cmp [code_type],64 + je invalid_address + call store_instruction_code + mov eax,edx + stos word [edi] + cmp edx,10000h + jge value_out_of_range + jmp instruction_assembled + mov_mem_address64_al: + call store_segment_prefix_if_necessary + mov [base_code],0A2h + store_mov_address64: + call store_instruction_code + call store_address_64bit_value + jmp instruction_assembled + mov_mem_ax: + test ch,22h + jnz mov_mem_address16_ax + test ch,44h + jnz mov_mem_address32_ax + test ch,88h + jnz mov_mem_address64_ax + or ch,ch + jnz invalid_address_size + cmp [code_type],64 + je mov_mem_address64_ax + cmp [code_type],32 + je mov_mem_address32_ax + cmp edx,10000h + jb mov_mem_address16_ax + mov_mem_address32_ax: + call store_segment_prefix_if_necessary + call address_32bit_prefix + mov [base_code],0A3h + jmp store_mov_address32 + mov_mem_address16_ax: + call store_segment_prefix_if_necessary + call address_16bit_prefix + mov [base_code],0A3h + jmp store_mov_address16 + mov_mem_address64_ax: + call store_segment_prefix_if_necessary + mov [base_code],0A3h + jmp store_mov_address64 + mov_mem_sreg: + sub al,61h + mov [postbyte_register],al + pop ecx ebx edx + mov ah,[operand_size] + or ah,ah + jz mov_mem_sreg_store + cmp ah,2 + jne invalid_operand_size + mov_mem_sreg_store: + mov [base_code],8Ch + jmp instruction_ready + mov_mem_imm: + mov al,[operand_size] + cmp al,1 + jb mov_mem_imm_nosize + je mov_mem_imm_8bit + cmp al,2 + je mov_mem_imm_16bit + cmp al,4 + je mov_mem_imm_32bit + cmp al,8 + jne invalid_operand_size + mov_mem_imm_64bit: + cmp [size_declared],0 + jne long_immediate_not_encodable + call operand_64bit + call get_simm32 + cmp [value_type],4 + jae long_immediate_not_encodable + jmp mov_mem_imm_32bit_store + mov_mem_imm_8bit: + call get_byte_value + mov byte [value],al + mov [postbyte_register],0 + mov [base_code],0C6h + pop ecx ebx edx + call store_instruction_with_imm8 + jmp instruction_assembled + mov_mem_imm_16bit: + call operand_16bit + call get_word_value + mov word [value],ax + mov [postbyte_register],0 + mov [base_code],0C7h + pop ecx ebx edx + call store_instruction_with_imm16 + jmp instruction_assembled + mov_mem_imm_nosize: + call recoverable_unknown_size + mov_mem_imm_32bit: + call operand_32bit + call get_dword_value + mov_mem_imm_32bit_store: + mov dword [value],eax + mov [postbyte_register],0 + mov [base_code],0C7h + pop ecx ebx edx + call store_instruction_with_imm32 + jmp instruction_assembled + mov_reg: + lods byte [esi] + mov ah,al + sub ah,10h + and ah,al + test ah,0F0h + jnz mov_sreg + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + je mov_reg_mem + cmp al,'(' + je mov_reg_imm + cmp al,10h + jne invalid_operand + mov_reg_reg: + lods byte [esi] + mov ah,al + sub ah,10h + and ah,al + test ah,0F0h + jnz mov_reg_sreg + call convert_register + mov bl,[postbyte_register] + mov [postbyte_register],al + mov al,ah + cmp al,1 + je mov_reg_reg_8bit + call operand_autodetect + inc [base_code] + mov_reg_reg_8bit: + jmp nomem_instruction_ready + mov_reg_sreg: + mov bl,[postbyte_register] + mov ah,al + and al,1111b + mov [postbyte_register],al + shr ah,4 + cmp ah,5 + je mov_reg_creg + cmp ah,7 + je mov_reg_dreg + ja mov_reg_treg + dec [postbyte_register] + cmp [operand_size],8 + je mov_reg_sreg64 + cmp [operand_size],4 + je mov_reg_sreg32 + cmp [operand_size],2 + jne invalid_operand_size + call operand_16bit + jmp mov_reg_sreg_store + mov_reg_sreg64: + call operand_64bit + jmp mov_reg_sreg_store + mov_reg_sreg32: + call operand_32bit + mov_reg_sreg_store: + mov [base_code],8Ch + jmp nomem_instruction_ready + mov_reg_treg: + cmp ah,9 + jne invalid_operand + mov [extended_code],24h + jmp mov_reg_xrx + mov_reg_dreg: + mov [extended_code],21h + jmp mov_reg_xrx + mov_reg_creg: + mov [extended_code],20h + mov_reg_xrx: + mov [base_code],0Fh + cmp [code_type],64 + je mov_reg_xrx_64bit + cmp [operand_size],4 + jne invalid_operand_size + cmp [postbyte_register],8 + jne mov_reg_xrx_store + cmp [extended_code],20h + jne mov_reg_xrx_store + mov al,0F0h + stos byte [edi] + mov [postbyte_register],0 + mov_reg_xrx_store: + jmp nomem_instruction_ready + mov_reg_xrx_64bit: + cmp [operand_size],8 + jne invalid_operand_size + jmp nomem_instruction_ready + mov_reg_mem: + call get_address + mov al,[operand_size] + cmp al,1 + je mov_reg_mem_8bit + call operand_autodetect + mov al,[postbyte_register] + or al,bl + or al,bh + jz mov_ax_mem + add [base_code],3 + jmp instruction_ready + mov_reg_mem_8bit: + mov al,[postbyte_register] + or al,bl + or al,bh + jz mov_al_mem + add [base_code],2 + jmp instruction_ready + mov_al_mem: + test ch,22h + jnz mov_al_mem_address16 + test ch,44h + jnz mov_al_mem_address32 + test ch,88h + jnz mov_al_mem_address64 + or ch,ch + jnz invalid_address_size + cmp [code_type],64 + je mov_al_mem_address64 + cmp [code_type],32 + je mov_al_mem_address32 + cmp edx,10000h + jb mov_al_mem_address16 + mov_al_mem_address32: + call store_segment_prefix_if_necessary + call address_32bit_prefix + mov [base_code],0A0h + jmp store_mov_address32 + mov_al_mem_address16: + call store_segment_prefix_if_necessary + call address_16bit_prefix + mov [base_code],0A0h + jmp store_mov_address16 + mov_al_mem_address64: + call store_segment_prefix_if_necessary + mov [base_code],0A0h + jmp store_mov_address64 + mov_ax_mem: + test ch,22h + jnz mov_ax_mem_address16 + test ch,44h + jnz mov_ax_mem_address32 + test ch,88h + jnz mov_ax_mem_address64 + or ch,ch + jnz invalid_address_size + cmp [code_type],64 + je mov_ax_mem_address64 + cmp [code_type],32 + je mov_ax_mem_address32 + cmp edx,10000h + jb mov_ax_mem_address16 + mov_ax_mem_address32: + call store_segment_prefix_if_necessary + call address_32bit_prefix + mov [base_code],0A1h + jmp store_mov_address32 + mov_ax_mem_address16: + call store_segment_prefix_if_necessary + call address_16bit_prefix + mov [base_code],0A1h + jmp store_mov_address16 + mov_ax_mem_address64: + call store_segment_prefix_if_necessary + mov [base_code],0A1h + jmp store_mov_address64 + mov_reg_imm: + mov al,[operand_size] + cmp al,1 + je mov_reg_imm_8bit + cmp al,2 + je mov_reg_imm_16bit + cmp al,4 + je mov_reg_imm_32bit + cmp al,8 + jne invalid_operand_size + mov_reg_imm_64bit: + call operand_64bit + call get_qword_value + mov ecx,edx + cmp [size_declared],0 + jne mov_reg_imm_64bit_store + cmp [value_type],4 + jae mov_reg_imm_64bit_store + cdq + cmp ecx,edx + je mov_reg_64bit_imm_32bit + mov_reg_imm_64bit_store: + push eax ecx + mov al,0B8h + call store_mov_reg_imm_code + pop edx eax + call mark_relocation + stos dword [edi] + mov eax,edx + stos dword [edi] + jmp instruction_assembled + mov_reg_imm_8bit: + call get_byte_value + mov dl,al + mov al,0B0h + call store_mov_reg_imm_code + mov al,dl + stos byte [edi] + jmp instruction_assembled + mov_reg_imm_16bit: + call get_word_value + mov dx,ax + call operand_16bit + mov al,0B8h + call store_mov_reg_imm_code + mov ax,dx + call mark_relocation + stos word [edi] + jmp instruction_assembled + mov_reg_imm_32bit: + call operand_32bit + call get_dword_value + mov edx,eax + mov al,0B8h + call store_mov_reg_imm_code + mov_store_imm_32bit: + mov eax,edx + call mark_relocation + stos dword [edi] + jmp instruction_assembled + store_mov_reg_imm_code: + mov ah,[postbyte_register] + test ah,1000b + jz mov_reg_imm_prefix_ok + or [rex_prefix],41h + mov_reg_imm_prefix_ok: + and ah,111b + add al,ah + mov [base_code],al + call store_instruction_code + ret + mov_reg_64bit_imm_32bit: + mov edx,eax + mov bl,[postbyte_register] + mov [postbyte_register],0 + mov [base_code],0C7h + call store_nomem_instruction + jmp mov_store_imm_32bit + mov_sreg: + mov ah,al + and al,1111b + mov [postbyte_register],al + shr ah,4 + cmp ah,5 + je mov_creg + cmp ah,7 + je mov_dreg + ja mov_treg + cmp al,2 + je illegal_instruction + dec [postbyte_register] + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + je mov_sreg_mem + cmp al,10h + jne invalid_operand + mov_sreg_reg: + lods byte [esi] + call convert_register + or ah,ah + jz mov_sreg_reg_size_ok + cmp ah,2 + jne invalid_operand_size + mov bl,al + mov_sreg_reg_size_ok: + mov [base_code],8Eh + jmp nomem_instruction_ready + mov_sreg_mem: + call get_address + mov al,[operand_size] + or al,al + jz mov_sreg_mem_size_ok + cmp al,2 + jne invalid_operand_size + mov_sreg_mem_size_ok: + mov [base_code],8Eh + jmp instruction_ready + mov_treg: + cmp ah,9 + jne invalid_operand + mov [extended_code],26h + jmp mov_xrx + mov_dreg: + mov [extended_code],23h + jmp mov_xrx + mov_creg: + mov [extended_code],22h + mov_xrx: + mov [base_code],0Fh + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov bl,al + cmp [code_type],64 + je mov_xrx_64bit + cmp ah,4 + jne invalid_operand_size + cmp [postbyte_register],8 + jne mov_xrx_store + cmp [extended_code],22h + jne mov_xrx_store + mov al,0F0h + stos byte [edi] + mov [postbyte_register],0 + mov_xrx_store: + jmp nomem_instruction_ready + mov_xrx_64bit: + cmp ah,8 + je mov_xrx_store + jmp invalid_operand_size +test_instruction: + mov [base_code],84h + lods byte [esi] + call get_size_operator + cmp al,10h + je test_reg + cmp al,'[' + jne invalid_operand + test_mem: + call get_address + push edx ebx ecx + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'(' + je test_mem_imm + cmp al,10h + jne invalid_operand + test_mem_reg: + lods byte [esi] + call convert_register + mov [postbyte_register],al + pop ecx ebx edx + mov al,ah + cmp al,1 + je test_mem_reg_8bit + call operand_autodetect + inc [base_code] + test_mem_reg_8bit: + jmp instruction_ready + test_mem_imm: + mov al,[operand_size] + cmp al,1 + jb test_mem_imm_nosize + je test_mem_imm_8bit + cmp al,2 + je test_mem_imm_16bit + cmp al,4 + je test_mem_imm_32bit + cmp al,8 + jne invalid_operand_size + test_mem_imm_64bit: + cmp [size_declared],0 + jne long_immediate_not_encodable + call operand_64bit + call get_simm32 + cmp [value_type],4 + jae long_immediate_not_encodable + jmp test_mem_imm_32bit_store + test_mem_imm_8bit: + call get_byte_value + mov byte [value],al + mov [postbyte_register],0 + mov [base_code],0F6h + pop ecx ebx edx + call store_instruction_with_imm8 + jmp instruction_assembled + test_mem_imm_16bit: + call operand_16bit + call get_word_value + mov word [value],ax + mov [postbyte_register],0 + mov [base_code],0F7h + pop ecx ebx edx + call store_instruction_with_imm16 + jmp instruction_assembled + test_mem_imm_nosize: + call recoverable_unknown_size + test_mem_imm_32bit: + call operand_32bit + call get_dword_value + test_mem_imm_32bit_store: + mov dword [value],eax + mov [postbyte_register],0 + mov [base_code],0F7h + pop ecx ebx edx + call store_instruction_with_imm32 + jmp instruction_assembled + test_reg: + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + je test_reg_mem + cmp al,'(' + je test_reg_imm + cmp al,10h + jne invalid_operand + test_reg_reg: + lods byte [esi] + call convert_register + mov bl,[postbyte_register] + mov [postbyte_register],al + mov al,ah + cmp al,1 + je test_reg_reg_8bit + call operand_autodetect + inc [base_code] + test_reg_reg_8bit: + jmp nomem_instruction_ready + test_reg_imm: + mov al,[operand_size] + cmp al,1 + je test_reg_imm_8bit + cmp al,2 + je test_reg_imm_16bit + cmp al,4 + je test_reg_imm_32bit + cmp al,8 + jne invalid_operand_size + test_reg_imm_64bit: + cmp [size_declared],0 + jne long_immediate_not_encodable + call operand_64bit + call get_simm32 + cmp [value_type],4 + jae long_immediate_not_encodable + jmp test_reg_imm_32bit_store + test_reg_imm_8bit: + call get_byte_value + mov dl,al + mov bl,[postbyte_register] + mov [postbyte_register],0 + mov [base_code],0F6h + or bl,bl + jz test_al_imm + call store_nomem_instruction + mov al,dl + stos byte [edi] + jmp instruction_assembled + test_al_imm: + mov [base_code],0A8h + call store_instruction_code + mov al,dl + stos byte [edi] + jmp instruction_assembled + test_reg_imm_16bit: + call operand_16bit + call get_word_value + mov dx,ax + mov bl,[postbyte_register] + mov [postbyte_register],0 + mov [base_code],0F7h + or bl,bl + jz test_ax_imm + call store_nomem_instruction + mov ax,dx + call mark_relocation + stos word [edi] + jmp instruction_assembled + test_ax_imm: + mov [base_code],0A9h + call store_instruction_code + mov ax,dx + stos word [edi] + jmp instruction_assembled + test_reg_imm_32bit: + call operand_32bit + call get_dword_value + test_reg_imm_32bit_store: + mov edx,eax + mov bl,[postbyte_register] + mov [postbyte_register],0 + mov [base_code],0F7h + or bl,bl + jz test_eax_imm + call store_nomem_instruction + mov eax,edx + call mark_relocation + stos dword [edi] + jmp instruction_assembled + test_eax_imm: + mov [base_code],0A9h + call store_instruction_code + mov eax,edx + stos dword [edi] + jmp instruction_assembled + test_reg_mem: + call get_address + mov al,[operand_size] + cmp al,1 + je test_reg_mem_8bit + call operand_autodetect + inc [base_code] + test_reg_mem_8bit: + jmp instruction_ready +xchg_instruction: + mov [base_code],86h + lods byte [esi] + call get_size_operator + cmp al,10h + je xchg_reg + cmp al,'[' + jne invalid_operand + xchg_mem: + call get_address + push edx ebx ecx + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je test_mem_reg + jmp invalid_operand + xchg_reg: + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + je test_reg_mem + cmp al,10h + jne invalid_operand + xchg_reg_reg: + lods byte [esi] + call convert_register + mov bl,al + mov al,ah + cmp al,1 + je xchg_reg_reg_8bit + call operand_autodetect + cmp [postbyte_register],0 + je xchg_ax_reg + or bl,bl + jnz xchg_reg_reg_store + mov bl,[postbyte_register] + xchg_ax_reg: + cmp [code_type],64 + jne xchg_ax_reg_ok + cmp ah,4 + jne xchg_ax_reg_ok + or bl,bl + jz xchg_reg_reg_store + xchg_ax_reg_ok: + test bl,1000b + jz xchg_ax_reg_store + or [rex_prefix],41h + and bl,111b + xchg_ax_reg_store: + add bl,90h + mov [base_code],bl + call store_instruction_code + jmp instruction_assembled + xchg_reg_reg_store: + inc [base_code] + xchg_reg_reg_8bit: + jmp nomem_instruction_ready +push_instruction: + mov [push_size],al + push_next: + lods byte [esi] + call get_size_operator + cmp al,10h + je push_reg + cmp al,'(' + je push_imm + cmp al,'[' + jne invalid_operand + push_mem: + call get_address + mov al,[operand_size] + mov ah,[push_size] + cmp al,2 + je push_mem_16bit + cmp al,4 + je push_mem_32bit + cmp al,8 + je push_mem_64bit + or al,al + jnz invalid_operand_size + cmp ah,2 + je push_mem_16bit + cmp ah,4 + je push_mem_32bit + cmp ah,8 + je push_mem_64bit + call recoverable_unknown_size + jmp push_mem_store + push_mem_16bit: + test ah,not 2 + jnz invalid_operand_size + call operand_16bit + jmp push_mem_store + push_mem_32bit: + test ah,not 4 + jnz invalid_operand_size + cmp [code_type],64 + je illegal_instruction + call operand_32bit + jmp push_mem_store + push_mem_64bit: + test ah,not 8 + jnz invalid_operand_size + cmp [code_type],64 + jne illegal_instruction + push_mem_store: + mov [base_code],0FFh + mov [postbyte_register],110b + call store_instruction + jmp push_done + push_reg: + lods byte [esi] + mov ah,al + sub ah,10h + and ah,al + test ah,0F0h + jnz push_sreg + call convert_register + test al,1000b + jz push_reg_ok + or [rex_prefix],41h + and al,111b + push_reg_ok: + add al,50h + mov [base_code],al + mov al,ah + mov ah,[push_size] + cmp al,2 + je push_reg_16bit + cmp al,4 + je push_reg_32bit + cmp al,8 + jne invalid_operand_size + push_reg_64bit: + test ah,not 8 + jnz invalid_operand_size + cmp [code_type],64 + jne illegal_instruction + jmp push_reg_store + push_reg_32bit: + test ah,not 4 + jnz invalid_operand_size + cmp [code_type],64 + je illegal_instruction + call operand_32bit + jmp push_reg_store + push_reg_16bit: + test ah,not 2 + jnz invalid_operand_size + call operand_16bit + push_reg_store: + call store_instruction_code + jmp push_done + push_sreg: + mov bl,al + mov dl,[operand_size] + mov dh,[push_size] + cmp dl,2 + je push_sreg16 + cmp dl,4 + je push_sreg32 + cmp dl,8 + je push_sreg64 + or dl,dl + jnz invalid_operand_size + cmp dh,2 + je push_sreg16 + cmp dh,4 + je push_sreg32 + cmp dh,8 + je push_sreg64 + jmp push_sreg_store + push_sreg16: + test dh,not 2 + jnz invalid_operand_size + call operand_16bit + jmp push_sreg_store + push_sreg32: + test dh,not 4 + jnz invalid_operand_size + cmp [code_type],64 + je illegal_instruction + call operand_32bit + jmp push_sreg_store + push_sreg64: + test dh,not 8 + jnz invalid_operand_size + cmp [code_type],64 + jne illegal_instruction + push_sreg_store: + mov al,bl + cmp al,70h + jae invalid_operand + sub al,61h + jc invalid_operand + cmp al,4 + jae push_sreg_386 + shl al,3 + add al,6 + mov [base_code],al + cmp [code_type],64 + je illegal_instruction + jmp push_reg_store + push_sreg_386: + sub al,4 + shl al,3 + add al,0A0h + mov [extended_code],al + mov [base_code],0Fh + jmp push_reg_store + push_imm: + mov al,[operand_size] + mov ah,[push_size] + or al,al + je push_imm_size_ok + or ah,ah + je push_imm_size_ok + cmp al,ah + jne invalid_operand_size + push_imm_size_ok: + cmp al,2 + je push_imm_16bit + cmp al,4 + je push_imm_32bit + cmp al,8 + je push_imm_64bit + cmp ah,2 + je push_imm_optimized_16bit + cmp ah,4 + je push_imm_optimized_32bit + cmp ah,8 + je push_imm_optimized_64bit + or al,al + jnz invalid_operand_size + cmp [code_type],16 + je push_imm_optimized_16bit + cmp [code_type],32 + je push_imm_optimized_32bit + push_imm_optimized_64bit: + cmp [code_type],64 + jne illegal_instruction + call get_simm32 + mov edx,eax + cmp [value_type],0 + jne push_imm_32bit_store + cmp eax,-80h + jl push_imm_32bit_store + cmp eax,80h + jge push_imm_32bit_store + jmp push_imm_8bit + push_imm_optimized_32bit: + cmp [code_type],64 + je illegal_instruction + call get_dword_value + mov edx,eax + call operand_32bit + cmp [value_type],0 + jne push_imm_32bit_store + cmp eax,-80h + jl push_imm_32bit_store + cmp eax,80h + jge push_imm_32bit_store + jmp push_imm_8bit + push_imm_optimized_16bit: + call get_word_value + mov dx,ax + call operand_16bit + cmp [value_type],0 + jne push_imm_16bit_store + cmp ax,-80h + jl push_imm_16bit_store + cmp ax,80h + jge push_imm_16bit_store + push_imm_8bit: + mov ah,al + mov [base_code],6Ah + call store_instruction_code + mov al,ah + stos byte [edi] + jmp push_done + push_imm_16bit: + call get_word_value + mov dx,ax + call operand_16bit + push_imm_16bit_store: + mov [base_code],68h + call store_instruction_code + mov ax,dx + call mark_relocation + stos word [edi] + jmp push_done + push_imm_64bit: + cmp [code_type],64 + jne illegal_instruction + call get_simm32 + mov edx,eax + jmp push_imm_32bit_store + push_imm_32bit: + cmp [code_type],64 + je illegal_instruction + call get_dword_value + mov edx,eax + call operand_32bit + push_imm_32bit_store: + mov [base_code],68h + call store_instruction_code + mov eax,edx + call mark_relocation + stos dword [edi] + push_done: + lods byte [esi] + dec esi + cmp al,0Fh + je instruction_assembled + or al,al + jz instruction_assembled + mov [operand_size],0 + mov [size_override],0 + mov [operand_prefix],0 + mov [rex_prefix],0 + jmp push_next +pop_instruction: + mov [push_size],al + pop_next: + lods byte [esi] + call get_size_operator + cmp al,10h + je pop_reg + cmp al,'[' + jne invalid_operand + pop_mem: + call get_address + mov al,[operand_size] + mov ah,[push_size] + cmp al,2 + je pop_mem_16bit + cmp al,4 + je pop_mem_32bit + cmp al,8 + je pop_mem_64bit + or al,al + jnz invalid_operand_size + cmp ah,2 + je pop_mem_16bit + cmp ah,4 + je pop_mem_32bit + cmp ah,8 + je pop_mem_64bit + call recoverable_unknown_size + jmp pop_mem_store + pop_mem_16bit: + test ah,not 2 + jnz invalid_operand_size + call operand_16bit + jmp pop_mem_store + pop_mem_32bit: + test ah,not 4 + jnz invalid_operand_size + cmp [code_type],64 + je illegal_instruction + call operand_32bit + jmp pop_mem_store + pop_mem_64bit: + test ah,not 8 + jnz invalid_operand_size + cmp [code_type],64 + jne illegal_instruction + pop_mem_store: + mov [base_code],08Fh + mov [postbyte_register],0 + call store_instruction + jmp pop_done + pop_reg: + lods byte [esi] + mov ah,al + sub ah,10h + and ah,al + test ah,0F0h + jnz pop_sreg + call convert_register + test al,1000b + jz pop_reg_ok + or [rex_prefix],41h + and al,111b + pop_reg_ok: + add al,58h + mov [base_code],al + mov al,ah + mov ah,[push_size] + cmp al,2 + je pop_reg_16bit + cmp al,4 + je pop_reg_32bit + cmp al,8 + je pop_reg_64bit + jmp invalid_operand_size + pop_reg_64bit: + test ah,not 8 + jnz invalid_operand_size + cmp [code_type],64 + jne illegal_instruction + jmp pop_reg_store + pop_reg_32bit: + test ah,not 4 + jnz invalid_operand_size + cmp [code_type],64 + je illegal_instruction + call operand_32bit + jmp pop_reg_store + pop_reg_16bit: + test ah,not 2 + jnz invalid_operand_size + call operand_16bit + pop_reg_store: + call store_instruction_code + pop_done: + lods byte [esi] + dec esi + cmp al,0Fh + je instruction_assembled + or al,al + jz instruction_assembled + mov [operand_size],0 + mov [size_override],0 + mov [operand_prefix],0 + mov [rex_prefix],0 + jmp pop_next + pop_sreg: + mov dl,[operand_size] + mov dh,[push_size] + cmp al,62h + je pop_cs + mov bl,al + cmp dl,2 + je pop_sreg16 + cmp dl,4 + je pop_sreg32 + cmp dl,8 + je pop_sreg64 + or dl,dl + jnz invalid_operand_size + cmp dh,2 + je pop_sreg16 + cmp dh,4 + je pop_sreg32 + cmp dh,8 + je pop_sreg64 + jmp pop_sreg_store + pop_sreg16: + test dh,not 2 + jnz invalid_operand_size + call operand_16bit + jmp pop_sreg_store + pop_sreg32: + test dh,not 4 + jnz invalid_operand_size + cmp [code_type],64 + je illegal_instruction + call operand_32bit + jmp pop_sreg_store + pop_sreg64: + test dh,not 8 + jnz invalid_operand_size + cmp [code_type],64 + jne illegal_instruction + pop_sreg_store: + mov al,bl + cmp al,70h + jae invalid_operand + sub al,61h + jc invalid_operand + cmp al,4 + jae pop_sreg_386 + shl al,3 + add al,7 + mov [base_code],al + cmp [code_type],64 + je illegal_instruction + jmp pop_reg_store + pop_cs: + cmp [code_type],16 + jne illegal_instruction + cmp dl,2 + je pop_cs_store + or dl,dl + jnz invalid_operand_size + cmp dh,2 + je pop_cs_store + or dh,dh + jnz illegal_instruction + pop_cs_store: + test dh,not 2 + jnz invalid_operand_size + mov al,0Fh + stos byte [edi] + jmp pop_done + pop_sreg_386: + sub al,4 + shl al,3 + add al,0A1h + mov [extended_code],al + mov [base_code],0Fh + jmp pop_reg_store +inc_instruction: + mov [base_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + je inc_reg + cmp al,'[' + je inc_mem + jne invalid_operand + inc_mem: + call get_address + mov al,[operand_size] + cmp al,1 + je inc_mem_8bit + jb inc_mem_nosize + call operand_autodetect + mov al,0FFh + xchg al,[base_code] + mov [postbyte_register],al + jmp instruction_ready + inc_mem_nosize: + call recoverable_unknown_size + inc_mem_8bit: + mov al,0FEh + xchg al,[base_code] + mov [postbyte_register],al + jmp instruction_ready + inc_reg: + lods byte [esi] + call convert_register + mov bl,al + mov al,0FEh + xchg al,[base_code] + mov [postbyte_register],al + mov al,ah + cmp al,1 + je inc_reg_8bit + call operand_autodetect + cmp [code_type],64 + je inc_reg_long_form + mov al,[postbyte_register] + shl al,3 + add al,bl + add al,40h + mov [base_code],al + call store_instruction_code + jmp instruction_assembled + inc_reg_long_form: + inc [base_code] + inc_reg_8bit: + jmp nomem_instruction_ready +set_instruction: + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + je set_reg + cmp al,'[' + jne invalid_operand + set_mem: + call get_address + cmp [operand_size],1 + ja invalid_operand_size + mov [postbyte_register],0 + jmp instruction_ready + set_reg: + lods byte [esi] + call convert_register + cmp ah,1 + jne invalid_operand_size + mov bl,al + mov [postbyte_register],0 + jmp nomem_instruction_ready +arpl_instruction: + cmp [code_type],64 + je illegal_instruction + mov [base_code],63h + lods byte [esi] + call get_size_operator + cmp al,10h + je arpl_reg + cmp al,'[' + jne invalid_operand + call get_address + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + cmp ah,2 + jne invalid_operand_size + jmp instruction_ready + arpl_reg: + lods byte [esi] + call convert_register + cmp ah,2 + jne invalid_operand_size + mov bl,al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + jmp nomem_instruction_ready +bound_instruction: + cmp [code_type],64 + je illegal_instruction + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + cmp al,2 + je bound_store + cmp al,4 + jne invalid_operand_size + bound_store: + call operand_autodetect + mov [base_code],62h + jmp instruction_ready +enter_instruction: + lods byte [esi] + call get_size_operator + cmp ah,2 + je enter_imm16_size_ok + or ah,ah + jnz invalid_operand_size + enter_imm16_size_ok: + cmp al,'(' + jne invalid_operand + call get_word_value + cmp [next_pass_needed],0 + jne enter_imm16_ok + cmp [value_type],0 + jne invalid_use_of_symbol + test eax,eax + js value_out_of_range + enter_imm16_ok: + push eax + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp ah,1 + je enter_imm8_size_ok + or ah,ah + jnz invalid_operand_size + enter_imm8_size_ok: + cmp al,'(' + jne invalid_operand + call get_byte_value + cmp [next_pass_needed],0 + jne enter_imm8_ok + test eax,eax + js value_out_of_range + enter_imm8_ok: + mov dl,al + pop ebx + mov al,0C8h + stos byte [edi] + mov ax,bx + stos word [edi] + mov al,dl + stos byte [edi] + jmp instruction_assembled +ret_instruction_only64: + cmp [code_type],64 + jne illegal_instruction + jmp ret_instruction +ret_instruction_32bit_except64: + cmp [code_type],64 + je illegal_instruction +ret_instruction_32bit: + call operand_32bit + jmp ret_instruction +ret_instruction_16bit: + call operand_16bit + jmp ret_instruction +retf_instruction: + cmp [code_type],64 + jne ret_instruction +ret_instruction_64bit: + call operand_64bit +ret_instruction: + mov [base_code],al + lods byte [esi] + dec esi + or al,al + jz simple_ret + cmp al,0Fh + je simple_ret + lods byte [esi] + call get_size_operator + or ah,ah + jz ret_imm + cmp ah,2 + je ret_imm + jmp invalid_operand_size + ret_imm: + cmp al,'(' + jne invalid_operand + call get_word_value + cmp [next_pass_needed],0 + jne ret_imm_ok + cmp [value_type],0 + jne invalid_use_of_symbol + test eax,eax + js value_out_of_range + ret_imm_ok: + cmp [size_declared],0 + jne ret_imm_store + or ax,ax + jz simple_ret + ret_imm_store: + mov dx,ax + call store_instruction_code + mov ax,dx + stos word [edi] + jmp instruction_assembled + simple_ret: + inc [base_code] + call store_instruction_code + jmp instruction_assembled +lea_instruction: + mov [base_code],8Dh + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + xor al,al + xchg al,[operand_size] + push eax + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + mov [size_override],-1 + call get_address + pop eax + mov [operand_size],al + call operand_autodetect + jmp instruction_ready +ls_instruction: + or al,al + jz les_instruction + cmp al,3 + jz lds_instruction + add al,0B0h + mov [extended_code],al + mov [base_code],0Fh + jmp ls_code_ok + les_instruction: + mov [base_code],0C4h + jmp ls_short_code + lds_instruction: + mov [base_code],0C5h + ls_short_code: + cmp [code_type],64 + je illegal_instruction + ls_code_ok: + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + add [operand_size],2 + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + cmp al,4 + je ls_16bit + cmp al,6 + je ls_32bit + cmp al,10 + je ls_64bit + jmp invalid_operand_size + ls_16bit: + call operand_16bit + jmp instruction_ready + ls_32bit: + call operand_32bit + jmp instruction_ready + ls_64bit: + call operand_64bit + jmp instruction_ready +sh_instruction: + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,10h + je sh_reg + cmp al,'[' + jne invalid_operand + sh_mem: + call get_address + push edx ebx ecx + mov al,[operand_size] + push eax + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'(' + je sh_mem_imm + cmp al,10h + jne invalid_operand + sh_mem_reg: + lods byte [esi] + cmp al,11h + jne invalid_operand + pop eax ecx ebx edx + cmp al,1 + je sh_mem_cl_8bit + jb sh_mem_cl_nosize + call operand_autodetect + mov [base_code],0D3h + jmp instruction_ready + sh_mem_cl_nosize: + call recoverable_unknown_size + sh_mem_cl_8bit: + mov [base_code],0D2h + jmp instruction_ready + sh_mem_imm: + mov al,[operand_size] + or al,al + jz sh_mem_imm_size_ok + cmp al,1 + jne invalid_operand_size + sh_mem_imm_size_ok: + call get_byte_value + mov byte [value],al + pop eax ecx ebx edx + cmp al,1 + je sh_mem_imm_8bit + jb sh_mem_imm_nosize + call operand_autodetect + cmp byte [value],1 + je sh_mem_1 + mov [base_code],0C1h + call store_instruction_with_imm8 + jmp instruction_assembled + sh_mem_1: + mov [base_code],0D1h + jmp instruction_ready + sh_mem_imm_nosize: + call recoverable_unknown_size + sh_mem_imm_8bit: + cmp byte [value],1 + je sh_mem_1_8bit + mov [base_code],0C0h + call store_instruction_with_imm8 + jmp instruction_assembled + sh_mem_1_8bit: + mov [base_code],0D0h + jmp instruction_ready + sh_reg: + lods byte [esi] + call convert_register + mov bx,ax + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'(' + je sh_reg_imm + cmp al,10h + jne invalid_operand + sh_reg_reg: + lods byte [esi] + cmp al,11h + jne invalid_operand + mov al,bh + cmp al,1 + je sh_reg_cl_8bit + call operand_autodetect + mov [base_code],0D3h + jmp nomem_instruction_ready + sh_reg_cl_8bit: + mov [base_code],0D2h + jmp nomem_instruction_ready + sh_reg_imm: + mov al,[operand_size] + or al,al + jz sh_reg_imm_size_ok + cmp al,1 + jne invalid_operand_size + sh_reg_imm_size_ok: + push ebx + call get_byte_value + mov dl,al + pop ebx + mov al,bh + cmp al,1 + je sh_reg_imm_8bit + call operand_autodetect + cmp dl,1 + je sh_reg_1 + mov [base_code],0C1h + call store_nomem_instruction + mov al,dl + stos byte [edi] + jmp instruction_assembled + sh_reg_1: + mov [base_code],0D1h + jmp nomem_instruction_ready + sh_reg_imm_8bit: + cmp dl,1 + je sh_reg_1_8bit + mov [base_code],0C0h + call store_nomem_instruction + mov al,dl + stos byte [edi] + jmp instruction_assembled + sh_reg_1_8bit: + mov [base_code],0D0h + jmp nomem_instruction_ready +shd_instruction: + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + je shd_reg + cmp al,'[' + jne invalid_operand + shd_mem: + call get_address + push edx ebx ecx + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + mov al,ah + mov [operand_size],0 + push eax + lods byte [esi] + call get_size_operator + cmp al,'(' + je shd_mem_reg_imm + cmp al,10h + jne invalid_operand + lods byte [esi] + cmp al,11h + jne invalid_operand + pop eax ecx ebx edx + call operand_autodetect + inc [extended_code] + jmp instruction_ready + shd_mem_reg_imm: + mov al,[operand_size] + or al,al + jz shd_mem_reg_imm_size_ok + cmp al,1 + jne invalid_operand_size + shd_mem_reg_imm_size_ok: + call get_byte_value + mov byte [value],al + pop eax ecx ebx edx + call operand_autodetect + call store_instruction_with_imm8 + jmp instruction_assembled + shd_reg: + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov bl,[postbyte_register] + mov [postbyte_register],al + mov al,ah + push eax ebx + lods byte [esi] + cmp al,',' + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,'(' + je shd_reg_reg_imm + cmp al,10h + jne invalid_operand + lods byte [esi] + cmp al,11h + jne invalid_operand + pop ebx eax + call operand_autodetect + inc [extended_code] + jmp nomem_instruction_ready + shd_reg_reg_imm: + mov al,[operand_size] + or al,al + jz shd_reg_reg_imm_size_ok + cmp al,1 + jne invalid_operand_size + shd_reg_reg_imm_size_ok: + call get_byte_value + mov dl,al + pop ebx eax + call operand_autodetect + call store_nomem_instruction + mov al,dl + stos byte [edi] + jmp instruction_assembled +movx_instruction: + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + mov al,ah + push eax + lods byte [esi] + cmp al,',' + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,10h + je movx_reg + cmp al,'[' + jne invalid_operand + call get_address + pop eax + mov ah,[operand_size] + or ah,ah + jz movx_unknown_size + cmp ah,al + jae invalid_operand_size + cmp ah,1 + je movx_mem_store + cmp ah,2 + jne invalid_operand_size + inc [extended_code] + movx_mem_store: + call operand_autodetect + jmp instruction_ready + movx_unknown_size: + call recoverable_unknown_size + jmp movx_mem_store + movx_reg: + lods byte [esi] + call convert_register + pop ebx + xchg bl,al + cmp ah,al + jae invalid_operand_size + cmp ah,1 + je movx_reg_8bit + cmp ah,2 + je movx_reg_16bit + jmp invalid_operand_size + movx_reg_8bit: + call operand_autodetect + jmp nomem_instruction_ready + movx_reg_16bit: + call operand_autodetect + inc [extended_code] + jmp nomem_instruction_ready +movsxd_instruction: + mov [base_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + cmp ah,8 + jne invalid_operand_size + lods byte [esi] + cmp al,',' + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,10h + je movsxd_reg + cmp al,'[' + jne invalid_operand + call get_address + cmp [operand_size],4 + je movsxd_mem_store + cmp [operand_size],0 + jne invalid_operand_size + movsxd_mem_store: + call operand_64bit + jmp instruction_ready + movsxd_reg: + lods byte [esi] + call convert_register + cmp ah,4 + jne invalid_operand_size + mov bl,al + call operand_64bit + jmp nomem_instruction_ready +bt_instruction: + mov [postbyte_register],al + shl al,3 + add al,83h + mov [extended_code],al + mov [base_code],0Fh + lods byte [esi] + call get_size_operator + cmp al,10h + je bt_reg + cmp al,'[' + jne invalid_operand + call get_address + push eax ebx ecx + lods byte [esi] + cmp al,',' + jne invalid_operand + cmp byte [esi],'(' + je bt_mem_imm + cmp byte [esi],11h + jne bt_mem_reg + cmp byte [esi+2],'(' + je bt_mem_imm + bt_mem_reg: + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + pop ecx ebx edx + mov al,ah + call operand_autodetect + jmp instruction_ready + bt_mem_imm: + xor al,al + xchg al,[operand_size] + push eax + lods byte [esi] + call get_size_operator + cmp al,'(' + jne invalid_operand + mov al,[operand_size] + or al,al + jz bt_mem_imm_size_ok + cmp al,1 + jne invalid_operand_size + bt_mem_imm_size_ok: + call get_byte_value + mov byte [value],al + pop eax + or al,al + jz bt_mem_imm_nosize + call operand_autodetect + bt_mem_imm_store: + pop ecx ebx edx + mov [extended_code],0BAh + call store_instruction_with_imm8 + jmp instruction_assembled + bt_mem_imm_nosize: + call recoverable_unknown_size + jmp bt_mem_imm_store + bt_reg: + lods byte [esi] + call convert_register + mov bl,al + lods byte [esi] + cmp al,',' + jne invalid_operand + cmp byte [esi],'(' + je bt_reg_imm + cmp byte [esi],11h + jne bt_reg_reg + cmp byte [esi+2],'(' + je bt_reg_imm + bt_reg_reg: + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + mov al,ah + call operand_autodetect + jmp nomem_instruction_ready + bt_reg_imm: + xor al,al + xchg al,[operand_size] + push eax ebx + lods byte [esi] + call get_size_operator + cmp al,'(' + jne invalid_operand + mov al,[operand_size] + or al,al + jz bt_reg_imm_size_ok + cmp al,1 + jne invalid_operand_size + bt_reg_imm_size_ok: + call get_byte_value + mov byte [value],al + pop ebx eax + call operand_autodetect + bt_reg_imm_store: + mov [extended_code],0BAh + call store_nomem_instruction + mov al,byte [value] + stos byte [edi] + jmp instruction_assembled +bs_instruction: + mov [extended_code],al + mov [base_code],0Fh + call get_reg_mem + jc bs_reg_reg + mov al,[operand_size] + call operand_autodetect + jmp instruction_ready + bs_reg_reg: + mov al,ah + call operand_autodetect + jmp nomem_instruction_ready + get_reg_mem: + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je get_reg_reg + cmp al,'[' + jne invalid_argument + call get_address + clc + ret + get_reg_reg: + lods byte [esi] + call convert_register + mov bl,al + stc + ret + +imul_instruction: + mov [base_code],0F6h + mov [postbyte_register],5 + lods byte [esi] + call get_size_operator + cmp al,10h + je imul_reg + cmp al,'[' + jne invalid_operand + imul_mem: + call get_address + mov al,[operand_size] + cmp al,1 + je imul_mem_8bit + jb imul_mem_nosize + call operand_autodetect + inc [base_code] + jmp instruction_ready + imul_mem_nosize: + call recoverable_unknown_size + imul_mem_8bit: + jmp instruction_ready + imul_reg: + lods byte [esi] + call convert_register + cmp byte [esi],',' + je imul_reg_ + mov bl,al + mov al,ah + cmp al,1 + je imul_reg_8bit + call operand_autodetect + inc [base_code] + imul_reg_8bit: + jmp nomem_instruction_ready + imul_reg_: + mov [postbyte_register],al + inc esi + cmp byte [esi],'(' + je imul_reg_imm + cmp byte [esi],11h + jne imul_reg_noimm + cmp byte [esi+2],'(' + je imul_reg_imm + imul_reg_noimm: + lods byte [esi] + call get_size_operator + cmp al,10h + je imul_reg_reg + cmp al,'[' + jne invalid_operand + imul_reg_mem: + call get_address + push edx ebx ecx + cmp byte [esi],',' + je imul_reg_mem_imm + mov al,[operand_size] + call operand_autodetect + pop ecx ebx edx + mov [base_code],0Fh + mov [extended_code],0AFh + jmp instruction_ready + imul_reg_mem_imm: + inc esi + lods byte [esi] + call get_size_operator + cmp al,'(' + jne invalid_operand + mov al,[operand_size] + cmp al,2 + je imul_reg_mem_imm_16bit + cmp al,4 + je imul_reg_mem_imm_32bit + cmp al,8 + jne invalid_operand_size + imul_reg_mem_imm_64bit: + cmp [size_declared],0 + jne long_immediate_not_encodable + call operand_64bit + call get_simm32 + cmp [value_type],4 + jae long_immediate_not_encodable + jmp imul_reg_mem_imm_32bit_ok + imul_reg_mem_imm_16bit: + call operand_16bit + call get_word_value + mov word [value],ax + cmp [value_type],0 + jne imul_reg_mem_imm_16bit_store + cmp [size_declared],0 + jne imul_reg_mem_imm_16bit_store + cmp ax,-80h + jl imul_reg_mem_imm_16bit_store + cmp ax,80h + jl imul_reg_mem_imm_8bit_store + imul_reg_mem_imm_16bit_store: + pop ecx ebx edx + mov [base_code],69h + call store_instruction_with_imm16 + jmp instruction_assembled + imul_reg_mem_imm_32bit: + call operand_32bit + call get_dword_value + imul_reg_mem_imm_32bit_ok: + mov dword [value],eax + cmp [value_type],0 + jne imul_reg_mem_imm_32bit_store + cmp [size_declared],0 + jne imul_reg_mem_imm_32bit_store + cmp eax,-80h + jl imul_reg_mem_imm_32bit_store + cmp eax,80h + jl imul_reg_mem_imm_8bit_store + imul_reg_mem_imm_32bit_store: + pop ecx ebx edx + mov [base_code],69h + call store_instruction_with_imm32 + jmp instruction_assembled + imul_reg_mem_imm_8bit_store: + pop ecx ebx edx + mov [base_code],6Bh + call store_instruction_with_imm8 + jmp instruction_assembled + imul_reg_imm: + mov bl,[postbyte_register] + dec esi + jmp imul_reg_reg_imm + imul_reg_reg: + lods byte [esi] + call convert_register + mov bl,al + cmp byte [esi],',' + je imul_reg_reg_imm + mov al,ah + call operand_autodetect + mov [base_code],0Fh + mov [extended_code],0AFh + jmp nomem_instruction_ready + imul_reg_reg_imm: + inc esi + lods byte [esi] + call get_size_operator + cmp al,'(' + jne invalid_operand + mov al,[operand_size] + cmp al,2 + je imul_reg_reg_imm_16bit + cmp al,4 + je imul_reg_reg_imm_32bit + cmp al,8 + jne invalid_operand_size + imul_reg_reg_imm_64bit: + cmp [size_declared],0 + jne long_immediate_not_encodable + call operand_64bit + push ebx + call get_simm32 + cmp [value_type],4 + jae long_immediate_not_encodable + jmp imul_reg_reg_imm_32bit_ok + imul_reg_reg_imm_16bit: + call operand_16bit + push ebx + call get_word_value + pop ebx + mov dx,ax + cmp [value_type],0 + jne imul_reg_reg_imm_16bit_store + cmp [size_declared],0 + jne imul_reg_reg_imm_16bit_store + cmp ax,-80h + jl imul_reg_reg_imm_16bit_store + cmp ax,80h + jl imul_reg_reg_imm_8bit_store + imul_reg_reg_imm_16bit_store: + mov [base_code],69h + call store_nomem_instruction + mov ax,dx + call mark_relocation + stos word [edi] + jmp instruction_assembled + imul_reg_reg_imm_32bit: + call operand_32bit + push ebx + call get_dword_value + imul_reg_reg_imm_32bit_ok: + pop ebx + mov edx,eax + cmp [value_type],0 + jne imul_reg_reg_imm_32bit_store + cmp [size_declared],0 + jne imul_reg_reg_imm_32bit_store + cmp eax,-80h + jl imul_reg_reg_imm_32bit_store + cmp eax,80h + jl imul_reg_reg_imm_8bit_store + imul_reg_reg_imm_32bit_store: + mov [base_code],69h + call store_nomem_instruction + mov eax,edx + call mark_relocation + stos dword [edi] + jmp instruction_assembled + imul_reg_reg_imm_8bit_store: + mov [base_code],6Bh + call store_nomem_instruction + mov al,dl + stos byte [edi] + jmp instruction_assembled +in_instruction: + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + or al,al + jnz invalid_operand + lods byte [esi] + cmp al,',' + jne invalid_operand + mov al,ah + push eax + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,'(' + je in_imm + cmp al,10h + je in_reg + jmp invalid_operand + in_reg: + lods byte [esi] + cmp al,22h + jne invalid_operand + pop eax + cmp al,1 + je in_al_dx + cmp al,2 + je in_ax_dx + cmp al,4 + jne invalid_operand_size + in_ax_dx: + call operand_autodetect + mov [base_code],0EDh + call store_instruction_code + jmp instruction_assembled + in_al_dx: + mov al,0ECh + stos byte [edi] + jmp instruction_assembled + in_imm: + mov al,[operand_size] + or al,al + jz in_imm_size_ok + cmp al,1 + jne invalid_operand_size + in_imm_size_ok: + call get_byte_value + mov dl,al + pop eax + cmp al,1 + je in_al_imm + cmp al,2 + je in_ax_imm + cmp al,4 + jne invalid_operand_size + in_ax_imm: + call operand_autodetect + mov [base_code],0E5h + call store_instruction_code + mov al,dl + stos byte [edi] + jmp instruction_assembled + in_al_imm: + mov al,0E4h + stos byte [edi] + mov al,dl + stos byte [edi] + jmp instruction_assembled +out_instruction: + lods byte [esi] + call get_size_operator + cmp al,'(' + je out_imm + cmp al,10h + jne invalid_operand + lods byte [esi] + cmp al,22h + jne invalid_operand + lods byte [esi] + cmp al,',' + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + or al,al + jnz invalid_operand + mov al,ah + cmp al,1 + je out_dx_al + cmp al,2 + je out_dx_ax + cmp al,4 + jne invalid_operand_size + out_dx_ax: + call operand_autodetect + mov [base_code],0EFh + call store_instruction_code + jmp instruction_assembled + out_dx_al: + mov al,0EEh + stos byte [edi] + jmp instruction_assembled + out_imm: + mov al,[operand_size] + or al,al + jz out_imm_size_ok + cmp al,1 + jne invalid_operand_size + out_imm_size_ok: + call get_byte_value + mov dl,al + lods byte [esi] + cmp al,',' + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + or al,al + jnz invalid_operand + mov al,ah + cmp al,1 + je out_imm_al + cmp al,2 + je out_imm_ax + cmp al,4 + jne invalid_operand_size + out_imm_ax: + call operand_autodetect + mov [base_code],0E7h + call store_instruction_code + mov al,dl + stos byte [edi] + jmp instruction_assembled + out_imm_al: + mov al,0E6h + stos byte [edi] + mov al,dl + stos byte [edi] + jmp instruction_assembled + +call_instruction: + mov [postbyte_register],10b + mov [base_code],0E8h + mov [extended_code],9Ah + jmp process_jmp +jmp_instruction: + mov [postbyte_register],100b + mov [base_code],0E9h + mov [extended_code],0EAh + process_jmp: + lods byte [esi] + call get_jump_operator + call get_size_operator + cmp al,'(' + je jmp_imm + mov [base_code],0FFh + cmp al,10h + je jmp_reg + cmp al,'[' + jne invalid_operand + jmp_mem: + cmp [jump_type],1 + je illegal_instruction + call get_address + mov edx,eax + mov al,[operand_size] + or al,al + jz jmp_mem_size_not_specified + cmp al,2 + je jmp_mem_16bit + cmp al,4 + je jmp_mem_32bit + cmp al,6 + je jmp_mem_48bit + cmp al,8 + je jmp_mem_64bit + cmp al,10 + je jmp_mem_80bit + jmp invalid_operand_size + jmp_mem_size_not_specified: + cmp [jump_type],3 + je jmp_mem_far + cmp [jump_type],2 + je jmp_mem_near + call recoverable_unknown_size + jmp_mem_near: + cmp [code_type],16 + je jmp_mem_16bit + cmp [code_type],32 + je jmp_mem_near_32bit + jmp_mem_64bit: + cmp [jump_type],3 + je invalid_operand_size + cmp [code_type],64 + jne illegal_instruction + jmp instruction_ready + jmp_mem_far: + cmp [code_type],16 + je jmp_mem_far_32bit + jmp_mem_48bit: + call operand_32bit + jmp_mem_far_store: + cmp [jump_type],2 + je invalid_operand_size + inc [postbyte_register] + jmp instruction_ready + jmp_mem_80bit: + call operand_64bit + jmp jmp_mem_far_store + jmp_mem_far_32bit: + call operand_16bit + jmp jmp_mem_far_store + jmp_mem_32bit: + cmp [jump_type],3 + je jmp_mem_far_32bit + cmp [jump_type],2 + je jmp_mem_near_32bit + cmp [code_type],16 + je jmp_mem_far_32bit + jmp_mem_near_32bit: + cmp [code_type],64 + je illegal_instruction + call operand_32bit + jmp instruction_ready + jmp_mem_16bit: + cmp [jump_type],3 + je invalid_operand_size + call operand_16bit + jmp instruction_ready + jmp_reg: + test [jump_type],1 + jnz invalid_operand + lods byte [esi] + call convert_register + mov bl,al + mov al,ah + cmp al,2 + je jmp_reg_16bit + cmp al,4 + je jmp_reg_32bit + cmp al,8 + jne invalid_operand_size + jmp_reg_64bit: + cmp [code_type],64 + jne illegal_instruction + jmp nomem_instruction_ready + jmp_reg_32bit: + cmp [code_type],64 + je illegal_instruction + call operand_32bit + jmp nomem_instruction_ready + jmp_reg_16bit: + call operand_16bit + jmp nomem_instruction_ready + jmp_imm: + cmp byte [esi],'.' + je invalid_value + mov ebx,esi + dec esi + call skip_symbol + xchg esi,ebx + cmp byte [ebx],':' + je jmp_far + cmp [jump_type],3 + je invalid_operand + jmp_near: + mov al,[operand_size] + cmp al,2 + je jmp_imm_16bit + cmp al,4 + je jmp_imm_32bit + cmp al,8 + je jmp_imm_64bit + or al,al + jnz invalid_operand_size + cmp [code_type],16 + je jmp_imm_16bit + cmp [code_type],64 + je jmp_imm_64bit + jmp_imm_32bit: + cmp [code_type],64 + je invalid_operand_size + call get_address_dword_value + cmp [code_type],16 + jne jmp_imm_32bit_prefix_ok + mov byte [edi],66h + inc edi + jmp_imm_32bit_prefix_ok: + call calculate_jump_offset + cdq + call check_for_short_jump + jc jmp_short + jmp_imm_32bit_store: + mov edx,eax + sub edx,3 + jno jmp_imm_32bit_ok + cmp [code_type],64 + je relative_jump_out_of_range + jmp_imm_32bit_ok: + mov al,[base_code] + stos byte [edi] + mov eax,edx + call mark_relocation + stos dword [edi] + jmp instruction_assembled + jmp_imm_64bit: + cmp [code_type],64 + jne invalid_operand_size + call get_address_qword_value + call calculate_jump_offset + mov ecx,edx + cdq + cmp edx,ecx + jne relative_jump_out_of_range + call check_for_short_jump + jnc jmp_imm_32bit_store + jmp_short: + mov ah,al + mov al,0EBh + stos word [edi] + jmp instruction_assembled + jmp_imm_16bit: + call get_address_word_value + cmp [code_type],16 + je jmp_imm_16bit_prefix_ok + mov byte [edi],66h + inc edi + jmp_imm_16bit_prefix_ok: + call calculate_jump_offset + cwde + cdq + call check_for_short_jump + jc jmp_short + cmp [value_type],0 + jne invalid_use_of_symbol + mov edx,eax + dec edx + mov al,[base_code] + stos byte [edi] + mov eax,edx + stos word [edi] + jmp instruction_assembled + calculate_jump_offset: + add edi,2 + mov ebp,[addressing_space] + call calculate_relative_offset + sub edi,2 + ret + check_for_short_jump: + cmp [jump_type],1 + je forced_short + ja no_short_jump + cmp [base_code],0E8h + je no_short_jump + cmp [value_type],0 + jne no_short_jump + cmp eax,80h + jb short_jump + cmp eax,-80h + jae short_jump + no_short_jump: + clc + ret + forced_short: + cmp [base_code],0E8h + je illegal_instruction + cmp [next_pass_needed],0 + jne jmp_short_value_type_ok + cmp [value_type],0 + jne invalid_use_of_symbol + jmp_short_value_type_ok: + cmp eax,-80h + jae short_jump + cmp eax,80h + jae jump_out_of_range + short_jump: + stc + ret + jump_out_of_range: + cmp [error_line],0 + jne instruction_assembled + mov eax,[current_line] + mov [error_line],eax + mov [error],relative_jump_out_of_range + jmp instruction_assembled + jmp_far: + cmp [jump_type],2 + je invalid_operand + cmp [code_type],64 + je illegal_instruction + mov al,[extended_code] + mov [base_code],al + call get_word_value + push eax + inc esi + lods byte [esi] + cmp al,'(' + jne invalid_operand + mov al,[value_type] + push eax [symbol_identifier] + cmp byte [esi],'.' + je invalid_value + mov al,[operand_size] + cmp al,4 + je jmp_far_16bit + cmp al,6 + je jmp_far_32bit + or al,al + jnz invalid_operand_size + cmp [code_type],16 + jne jmp_far_32bit + jmp_far_16bit: + call get_word_value + mov ebx,eax + call operand_16bit + call store_instruction_code + mov ax,bx + call mark_relocation + stos word [edi] + jmp_far_segment: + pop [symbol_identifier] eax + mov [value_type],al + pop eax + call mark_relocation + stos word [edi] + jmp instruction_assembled + jmp_far_32bit: + call get_dword_value + mov ebx,eax + call operand_32bit + call store_instruction_code + mov eax,ebx + call mark_relocation + stos dword [edi] + jmp jmp_far_segment +conditional_jump: + mov [base_code],al + lods byte [esi] + call get_jump_operator + cmp [jump_type],3 + je invalid_operand + call get_size_operator + cmp al,'(' + jne invalid_operand + cmp byte [esi],'.' + je invalid_value + mov al,[operand_size] + cmp al,2 + je conditional_jump_16bit + cmp al,4 + je conditional_jump_32bit + cmp al,8 + je conditional_jump_64bit + or al,al + jnz invalid_operand_size + cmp [code_type],16 + je conditional_jump_16bit + cmp [code_type],64 + je conditional_jump_64bit + conditional_jump_32bit: + cmp [code_type],64 + je invalid_operand_size + call get_address_dword_value + cmp [code_type],16 + jne conditional_jump_32bit_prefix_ok + mov byte [edi],66h + inc edi + conditional_jump_32bit_prefix_ok: + call calculate_jump_offset + cdq + call check_for_short_jump + jc conditional_jump_short + conditional_jump_32bit_store: + mov edx,eax + sub edx,4 + jno conditional_jump_32bit_range_ok + cmp [code_type],64 + je relative_jump_out_of_range + conditional_jump_32bit_range_ok: + mov ah,[base_code] + add ah,10h + mov al,0Fh + stos word [edi] + mov eax,edx + call mark_relocation + stos dword [edi] + jmp instruction_assembled + conditional_jump_64bit: + cmp [code_type],64 + jne invalid_operand_size + call get_address_qword_value + call calculate_jump_offset + mov ecx,edx + cdq + cmp edx,ecx + jne relative_jump_out_of_range + call check_for_short_jump + jnc conditional_jump_32bit_store + conditional_jump_short: + mov ah,al + mov al,[base_code] + stos word [edi] + jmp instruction_assembled + conditional_jump_16bit: + call get_address_word_value + cmp [code_type],16 + je conditional_jump_16bit_prefix_ok + mov byte [edi],66h + inc edi + conditional_jump_16bit_prefix_ok: + call calculate_jump_offset + cwde + cdq + call check_for_short_jump + jc conditional_jump_short + cmp [value_type],0 + jne invalid_use_of_symbol + mov edx,eax + sub dx,2 + mov ah,[base_code] + add ah,10h + mov al,0Fh + stos word [edi] + mov eax,edx + stos word [edi] + jmp instruction_assembled +loop_instruction_16bit: + cmp [code_type],64 + je illegal_instruction + cmp [code_type],16 + je loop_instruction + mov [operand_prefix],67h + jmp loop_instruction +loop_instruction_32bit: + cmp [code_type],32 + je loop_instruction + mov [operand_prefix],67h + jmp loop_instruction +loop_instruction_64bit: + cmp [code_type],64 + jne illegal_instruction +loop_instruction: + mov [base_code],al + lods byte [esi] + call get_jump_operator + cmp [jump_type],1 + ja invalid_operand + call get_size_operator + cmp al,'(' + jne invalid_operand + cmp byte [esi],'.' + je invalid_value + mov al,[operand_size] + cmp al,2 + je loop_jump_16bit + cmp al,4 + je loop_jump_32bit + cmp al,8 + je loop_jump_64bit + or al,al + jnz invalid_operand_size + cmp [code_type],16 + je loop_jump_16bit + cmp [code_type],64 + je loop_jump_64bit + loop_jump_32bit: + cmp [code_type],64 + je invalid_operand_size + call get_address_dword_value + cmp [code_type],16 + jne loop_jump_32bit_prefix_ok + mov byte [edi],66h + inc edi + loop_jump_32bit_prefix_ok: + call loop_counter_size + call calculate_jump_offset + cdq + make_loop_jump: + call check_for_short_jump + jc conditional_jump_short + scas word [edi] + jmp jump_out_of_range + loop_counter_size: + cmp [operand_prefix],0 + je loop_counter_size_ok + push eax + mov al,[operand_prefix] + stos byte [edi] + pop eax + loop_counter_size_ok: + ret + loop_jump_64bit: + cmp [code_type],64 + jne invalid_operand_size + call get_address_qword_value + call loop_counter_size + call calculate_jump_offset + mov ecx,edx + cdq + cmp edx,ecx + jne relative_jump_out_of_range + jmp make_loop_jump + loop_jump_16bit: + call get_address_word_value + cmp [code_type],16 + je loop_jump_16bit_prefix_ok + mov byte [edi],66h + inc edi + loop_jump_16bit_prefix_ok: + call loop_counter_size + call calculate_jump_offset + cwde + cdq + jmp make_loop_jump + +movs_instruction: + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + or eax,eax + jnz invalid_address + or bl,ch + jnz invalid_address + cmp [segment_register],1 + ja invalid_address + push ebx + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + pop edx + or eax,eax + jnz invalid_address + or bl,ch + jnz invalid_address + mov al,dh + mov ah,bh + shr al,4 + shr ah,4 + cmp al,ah + jne address_sizes_do_not_agree + and bh,111b + and dh,111b + cmp bh,6 + jne invalid_address + cmp dh,7 + jne invalid_address + cmp al,2 + je movs_address_16bit + cmp al,4 + je movs_address_32bit + cmp [code_type],64 + jne invalid_address_size + jmp movs_store + movs_address_32bit: + call address_32bit_prefix + jmp movs_store + movs_address_16bit: + cmp [code_type],64 + je invalid_address_size + call address_16bit_prefix + movs_store: + xor ebx,ebx + call store_segment_prefix_if_necessary + mov al,0A4h + movs_check_size: + mov bl,[operand_size] + cmp bl,1 + je simple_instruction + inc al + cmp bl,2 + je simple_instruction_16bit + cmp bl,4 + je simple_instruction_32bit + cmp bl,8 + je simple_instruction_64bit + or bl,bl + jnz invalid_operand_size + call recoverable_unknown_size + jmp simple_instruction +lods_instruction: + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + or eax,eax + jnz invalid_address + or bl,ch + jnz invalid_address + cmp bh,26h + je lods_address_16bit + cmp bh,46h + je lods_address_32bit + cmp bh,86h + jne invalid_address + cmp [code_type],64 + jne invalid_address_size + jmp lods_store + lods_address_32bit: + call address_32bit_prefix + jmp lods_store + lods_address_16bit: + cmp [code_type],64 + je invalid_address_size + call address_16bit_prefix + lods_store: + xor ebx,ebx + call store_segment_prefix_if_necessary + mov al,0ACh + jmp movs_check_size +stos_instruction: + mov [base_code],al + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + or eax,eax + jnz invalid_address + or bl,ch + jnz invalid_address + cmp bh,27h + je stos_address_16bit + cmp bh,47h + je stos_address_32bit + cmp bh,87h + jne invalid_address + cmp [code_type],64 + jne invalid_address_size + jmp stos_store + stos_address_32bit: + call address_32bit_prefix + jmp stos_store + stos_address_16bit: + cmp [code_type],64 + je invalid_address_size + call address_16bit_prefix + stos_store: + cmp [segment_register],1 + ja invalid_address + mov al,[base_code] + jmp movs_check_size +cmps_instruction: + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + or eax,eax + jnz invalid_address + or bl,ch + jnz invalid_address + mov al,[segment_register] + push eax ebx + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + or eax,eax + jnz invalid_address + or bl,ch + jnz invalid_address + pop edx eax + cmp [segment_register],1 + ja invalid_address + mov [segment_register],al + mov al,dh + mov ah,bh + shr al,4 + shr ah,4 + cmp al,ah + jne address_sizes_do_not_agree + and bh,111b + and dh,111b + cmp bh,7 + jne invalid_address + cmp dh,6 + jne invalid_address + cmp al,2 + je cmps_address_16bit + cmp al,4 + je cmps_address_32bit + cmp [code_type],64 + jne invalid_address_size + jmp cmps_store + cmps_address_32bit: + call address_32bit_prefix + jmp cmps_store + cmps_address_16bit: + cmp [code_type],64 + je invalid_address_size + call address_16bit_prefix + cmps_store: + xor ebx,ebx + call store_segment_prefix_if_necessary + mov al,0A6h + jmp movs_check_size +ins_instruction: + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + or eax,eax + jnz invalid_address + or bl,ch + jnz invalid_address + cmp bh,27h + je ins_address_16bit + cmp bh,47h + je ins_address_32bit + cmp bh,87h + jne invalid_address + cmp [code_type],64 + jne invalid_address_size + jmp ins_store + ins_address_32bit: + call address_32bit_prefix + jmp ins_store + ins_address_16bit: + cmp [code_type],64 + je invalid_address_size + call address_16bit_prefix + ins_store: + cmp [segment_register],1 + ja invalid_address + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + cmp al,10h + jne invalid_operand + lods byte [esi] + cmp al,22h + jne invalid_operand + mov al,6Ch + ins_check_size: + cmp [operand_size],8 + jne movs_check_size + jmp invalid_operand_size +outs_instruction: + lods byte [esi] + cmp al,10h + jne invalid_operand + lods byte [esi] + cmp al,22h + jne invalid_operand + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + or eax,eax + jnz invalid_address + or bl,ch + jnz invalid_address + cmp bh,26h + je outs_address_16bit + cmp bh,46h + je outs_address_32bit + cmp bh,86h + jne invalid_address + cmp [code_type],64 + jne invalid_address_size + jmp outs_store + outs_address_32bit: + call address_32bit_prefix + jmp outs_store + outs_address_16bit: + cmp [code_type],64 + je invalid_address_size + call address_16bit_prefix + outs_store: + xor ebx,ebx + call store_segment_prefix_if_necessary + mov al,6Eh + jmp ins_check_size +xlat_instruction: + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + or eax,eax + jnz invalid_address + or bl,ch + jnz invalid_address + cmp bh,23h + je xlat_address_16bit + cmp bh,43h + je xlat_address_32bit + cmp bh,83h + jne invalid_address + cmp [code_type],64 + jne invalid_address_size + jmp xlat_store + xlat_address_32bit: + call address_32bit_prefix + jmp xlat_store + xlat_address_16bit: + cmp [code_type],64 + je invalid_address_size + call address_16bit_prefix + xlat_store: + call store_segment_prefix_if_necessary + mov al,0D7h + cmp [operand_size],1 + jbe simple_instruction + jmp invalid_operand_size + +pm_word_instruction: + mov ah,al + shr ah,4 + and al,111b + mov [base_code],0Fh + mov [extended_code],ah + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,10h + je pm_reg + pm_mem: + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + cmp al,2 + je pm_mem_store + or al,al + jnz invalid_operand_size + pm_mem_store: + jmp instruction_ready + pm_reg: + lods byte [esi] + call convert_register + mov bl,al + cmp ah,2 + jne invalid_operand_size + jmp nomem_instruction_ready +pm_store_word_instruction: + mov ah,al + shr ah,4 + and al,111b + mov [base_code],0Fh + mov [extended_code],ah + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne pm_mem + lods byte [esi] + call convert_register + mov bl,al + mov al,ah + call operand_autodetect + jmp nomem_instruction_ready +lgdt_instruction: + mov [base_code],0Fh + mov [extended_code],1 + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + cmp al,6 + je lgdt_mem_48bit + cmp al,10 + je lgdt_mem_80bit + or al,al + jnz invalid_operand_size + jmp lgdt_mem_store + lgdt_mem_80bit: + cmp [code_type],64 + jne illegal_instruction + jmp lgdt_mem_store + lgdt_mem_48bit: + cmp [code_type],64 + je illegal_instruction + cmp [postbyte_register],2 + jb lgdt_mem_store + call operand_32bit + lgdt_mem_store: + jmp instruction_ready +lar_instruction: + mov [extended_code],al + mov [base_code],0Fh + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + xor al,al + xchg al,[operand_size] + call operand_autodetect + lods byte [esi] + call get_size_operator + cmp al,10h + je lar_reg_reg + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + or al,al + jz lar_reg_mem + cmp al,2 + jne invalid_operand_size + lar_reg_mem: + jmp instruction_ready + lar_reg_reg: + lods byte [esi] + call convert_register + cmp ah,2 + jne invalid_operand_size + mov bl,al + jmp nomem_instruction_ready +invlpg_instruction: + mov [base_code],0Fh + mov [extended_code],1 + mov [postbyte_register],7 + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + jmp instruction_ready +swapgs_instruction: + cmp [code_type],64 + jne illegal_instruction +rdtscp_instruction: + mov [base_code],0Fh + mov [extended_code],1 + mov [postbyte_register],7 + mov bl,al + jmp nomem_instruction_ready + +basic_486_instruction: + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + je basic_486_reg + cmp al,'[' + jne invalid_operand + call get_address + push edx ebx ecx + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + pop ecx ebx edx + mov al,ah + cmp al,1 + je basic_486_mem_reg_8bit + call operand_autodetect + inc [extended_code] + basic_486_mem_reg_8bit: + jmp instruction_ready + basic_486_reg: + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov bl,[postbyte_register] + mov [postbyte_register],al + mov al,ah + cmp al,1 + je basic_486_reg_reg_8bit + call operand_autodetect + inc [extended_code] + basic_486_reg_reg_8bit: + jmp nomem_instruction_ready +bswap_instruction: + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + test al,1000b + jz bswap_reg_code_ok + or [rex_prefix],41h + and al,111b + bswap_reg_code_ok: + add al,0C8h + mov [extended_code],al + mov [base_code],0Fh + cmp ah,8 + je bswap_reg64 + cmp ah,4 + jne invalid_operand_size + call operand_32bit + call store_instruction_code + jmp instruction_assembled + bswap_reg64: + call operand_64bit + call store_instruction_code + jmp instruction_assembled +cmpxchgx_instruction: + mov [base_code],0Fh + mov [extended_code],0C7h + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + mov ah,1 + xchg [postbyte_register],ah + mov al,[operand_size] + or al,al + jz cmpxchgx_size_ok + cmp al,ah + jne invalid_operand_size + cmpxchgx_size_ok: + cmp ah,16 + jne cmpxchgx_store + call operand_64bit + cmpxchgx_store: + jmp instruction_ready +nop_instruction: + mov ah,[esi] + cmp ah,10h + je extended_nop + cmp ah,11h + je extended_nop + cmp ah,'[' + je extended_nop + stos byte [edi] + jmp instruction_assembled + extended_nop: + mov [base_code],0Fh + mov [extended_code],1Fh + mov [postbyte_register],0 + lods byte [esi] + call get_size_operator + cmp al,10h + je extended_nop_reg + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + or al,al + jz extended_nop_store + call operand_autodetect + extended_nop_store: + jmp instruction_ready + extended_nop_reg: + lods byte [esi] + call convert_register + mov bl,al + mov al,ah + call operand_autodetect + jmp nomem_instruction_ready + +basic_fpu_instruction: + mov [postbyte_register],al + mov [base_code],0D8h + lods byte [esi] + call get_size_operator + cmp al,10h + je basic_fpu_streg + cmp al,'[' + je basic_fpu_mem + dec esi + mov ah,[postbyte_register] + cmp ah,2 + jb invalid_operand + cmp ah,3 + ja invalid_operand + mov bl,1 + jmp nomem_instruction_ready + basic_fpu_mem: + call get_address + mov al,[operand_size] + cmp al,4 + je basic_fpu_mem_32bit + cmp al,8 + je basic_fpu_mem_64bit + or al,al + jnz invalid_operand_size + call recoverable_unknown_size + basic_fpu_mem_32bit: + jmp instruction_ready + basic_fpu_mem_64bit: + mov [base_code],0DCh + jmp instruction_ready + basic_fpu_streg: + lods byte [esi] + call convert_fpu_register + mov bl,al + mov ah,[postbyte_register] + cmp ah,2 + je basic_fpu_single_streg + cmp ah,3 + je basic_fpu_single_streg + or al,al + jz basic_fpu_st0 + test ah,110b + jz basic_fpu_streg_st0 + xor [postbyte_register],1 + basic_fpu_streg_st0: + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_fpu_register + or al,al + jnz invalid_operand + mov [base_code],0DCh + jmp nomem_instruction_ready + basic_fpu_st0: + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_fpu_register + mov bl,al + basic_fpu_single_streg: + mov [base_code],0D8h + jmp nomem_instruction_ready +simple_fpu_instruction: + mov ah,al + or ah,11000000b + mov al,0D9h + stos word [edi] + jmp instruction_assembled +fi_instruction: + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + cmp al,2 + je fi_mem_16bit + cmp al,4 + je fi_mem_32bit + or al,al + jnz invalid_operand_size + call recoverable_unknown_size + fi_mem_32bit: + mov [base_code],0DAh + jmp instruction_ready + fi_mem_16bit: + mov [base_code],0DEh + jmp instruction_ready +fld_instruction: + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,10h + je fld_streg + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + cmp al,4 + je fld_mem_32bit + cmp al,8 + je fld_mem_64bit + cmp al,10 + je fld_mem_80bit + or al,al + jnz invalid_operand_size + call recoverable_unknown_size + fld_mem_32bit: + mov [base_code],0D9h + jmp instruction_ready + fld_mem_64bit: + mov [base_code],0DDh + jmp instruction_ready + fld_mem_80bit: + mov al,[postbyte_register] + cmp al,0 + je fld_mem_80bit_store + dec [postbyte_register] + cmp al,3 + je fld_mem_80bit_store + jmp invalid_operand_size + fld_mem_80bit_store: + add [postbyte_register],5 + mov [base_code],0DBh + jmp instruction_ready + fld_streg: + lods byte [esi] + call convert_fpu_register + mov bl,al + cmp [postbyte_register],2 + jae fst_streg + mov [base_code],0D9h + jmp nomem_instruction_ready + fst_streg: + mov [base_code],0DDh + jmp nomem_instruction_ready +fild_instruction: + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + cmp al,2 + je fild_mem_16bit + cmp al,4 + je fild_mem_32bit + cmp al,8 + je fild_mem_64bit + or al,al + jnz invalid_operand_size + call recoverable_unknown_size + fild_mem_32bit: + mov [base_code],0DBh + jmp instruction_ready + fild_mem_16bit: + mov [base_code],0DFh + jmp instruction_ready + fild_mem_64bit: + mov al,[postbyte_register] + cmp al,1 + je fisttp_64bit_store + jb fild_mem_64bit_store + dec [postbyte_register] + cmp al,3 + je fild_mem_64bit_store + jmp invalid_operand_size + fild_mem_64bit_store: + add [postbyte_register],5 + mov [base_code],0DFh + jmp instruction_ready + fisttp_64bit_store: + mov [base_code],0DDh + jmp instruction_ready +fbld_instruction: + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + or al,al + jz fbld_mem_80bit + cmp al,10 + je fbld_mem_80bit + jmp invalid_operand_size + fbld_mem_80bit: + mov [base_code],0DFh + jmp instruction_ready +faddp_instruction: + mov [postbyte_register],al + mov [base_code],0DEh + mov edx,esi + lods byte [esi] + call get_size_operator + cmp al,10h + je faddp_streg + mov esi,edx + mov bl,1 + jmp nomem_instruction_ready + faddp_streg: + lods byte [esi] + call convert_fpu_register + mov bl,al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_fpu_register + or al,al + jnz invalid_operand + jmp nomem_instruction_ready +fcompp_instruction: + mov ax,0D9DEh + stos word [edi] + jmp instruction_assembled +fucompp_instruction: + mov ax,0E9DAh + stos word [edi] + jmp instruction_assembled +fxch_instruction: + mov dx,01D9h + jmp fpu_single_operand +ffreep_instruction: + mov dx,00DFh + jmp fpu_single_operand +ffree_instruction: + mov dl,0DDh + mov dh,al + fpu_single_operand: + mov ebx,esi + lods byte [esi] + call get_size_operator + cmp al,10h + je fpu_streg + or dh,dh + jz invalid_operand + mov esi,ebx + shl dh,3 + or dh,11000001b + mov ax,dx + stos word [edi] + jmp instruction_assembled + fpu_streg: + lods byte [esi] + call convert_fpu_register + shl dh,3 + or dh,al + or dh,11000000b + mov ax,dx + stos word [edi] + jmp instruction_assembled + +fstenv_instruction: + mov byte [edi],9Bh + inc edi +fldenv_instruction: + mov [base_code],0D9h + jmp fpu_mem +fstenv_instruction_16bit: + mov byte [edi],9Bh + inc edi +fldenv_instruction_16bit: + call operand_16bit + jmp fldenv_instruction +fstenv_instruction_32bit: + mov byte [edi],9Bh + inc edi +fldenv_instruction_32bit: + call operand_32bit + jmp fldenv_instruction +fsave_instruction_32bit: + mov byte [edi],9Bh + inc edi +fnsave_instruction_32bit: + call operand_32bit + jmp fnsave_instruction +fsave_instruction_16bit: + mov byte [edi],9Bh + inc edi +fnsave_instruction_16bit: + call operand_16bit + jmp fnsave_instruction +fsave_instruction: + mov byte [edi],9Bh + inc edi +fnsave_instruction: + mov [base_code],0DDh + fpu_mem: + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + cmp [operand_size],0 + jne invalid_operand_size + jmp instruction_ready +fstcw_instruction: + mov byte [edi],9Bh + inc edi +fldcw_instruction: + mov [postbyte_register],al + mov [base_code],0D9h + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + or al,al + jz fldcw_mem_16bit + cmp al,2 + je fldcw_mem_16bit + jmp invalid_operand_size + fldcw_mem_16bit: + jmp instruction_ready +fstsw_instruction: + mov al,9Bh + stos byte [edi] +fnstsw_instruction: + mov [base_code],0DDh + mov [postbyte_register],7 + lods byte [esi] + call get_size_operator + cmp al,10h + je fstsw_reg + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + or al,al + jz fstsw_mem_16bit + cmp al,2 + je fstsw_mem_16bit + jmp invalid_operand_size + fstsw_mem_16bit: + jmp instruction_ready + fstsw_reg: + lods byte [esi] + call convert_register + cmp ax,0200h + jne invalid_operand + mov ax,0E0DFh + stos word [edi] + jmp instruction_assembled +finit_instruction: + mov byte [edi],9Bh + inc edi +fninit_instruction: + mov ah,al + mov al,0DBh + stos word [edi] + jmp instruction_assembled +fcmov_instruction: + mov dh,0DAh + jmp fcomi_streg +fcomi_instruction: + mov dh,0DBh + jmp fcomi_streg +fcomip_instruction: + mov dh,0DFh + fcomi_streg: + mov dl,al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_fpu_register + mov ah,al + cmp byte [esi],',' + je fcomi_st0_streg + add ah,dl + mov al,dh + stos word [edi] + jmp instruction_assembled + fcomi_st0_streg: + or ah,ah + jnz invalid_operand + inc esi + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_fpu_register + mov ah,al + add ah,dl + mov al,dh + stos word [edi] + jmp instruction_assembled + +basic_mmx_instruction: + mov [base_code],0Fh + mov [extended_code],al + mmx_instruction: + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + call make_mmx_prefix + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je mmx_mmreg_mmreg + cmp al,'[' + jne invalid_operand + mmx_mmreg_mem: + call get_address + jmp instruction_ready + mmx_mmreg_mmreg: + lods byte [esi] + call convert_mmx_register + mov bl,al + jmp nomem_instruction_ready +mmx_bit_shift_instruction: + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + call make_mmx_prefix + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,10h + je mmx_mmreg_mmreg + cmp al,'(' + je mmx_ps_mmreg_imm8 + cmp al,'[' + je mmx_mmreg_mem + jmp invalid_operand + mmx_ps_mmreg_imm8: + call get_byte_value + mov byte [value],al + test [operand_size],not 1 + jnz invalid_value + mov bl,[extended_code] + mov al,bl + shr bl,4 + and al,1111b + add al,70h + mov [extended_code],al + sub bl,0Ch + shl bl,1 + xchg bl,[postbyte_register] + call store_nomem_instruction + mov al,byte [value] + stos byte [edi] + jmp instruction_assembled +pmovmskb_instruction: + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + cmp ah,4 + je pmovmskb_reg_size_ok + cmp [code_type],64 + jne invalid_operand_size + cmp ah,8 + jnz invalid_operand_size + pmovmskb_reg_size_ok: + mov [postbyte_register],al + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + mov bl,al + call make_mmx_prefix + cmp [extended_code],0C5h + je mmx_nomem_imm8 + jmp nomem_instruction_ready + mmx_imm8: + push ebx ecx edx + xor cl,cl + xchg cl,[operand_size] + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + test ah,not 1 + jnz invalid_operand_size + mov [operand_size],cl + cmp al,'(' + jne invalid_operand + call get_byte_value + mov byte [value],al + pop edx ecx ebx + call store_instruction_with_imm8 + jmp instruction_assembled + mmx_nomem_imm8: + call store_nomem_instruction + call append_imm8 + jmp instruction_assembled + append_imm8: + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + test ah,not 1 + jnz invalid_operand_size + cmp al,'(' + jne invalid_operand + call get_byte_value + stosb + ret +pinsrw_instruction: + mov [extended_code],al + mov [base_code],0Fh + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + call make_mmx_prefix + mov [postbyte_register],al + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je pinsrw_mmreg_reg + cmp al,'[' + jne invalid_operand + call get_address + cmp [operand_size],0 + je mmx_imm8 + cmp [operand_size],2 + jne invalid_operand_size + jmp mmx_imm8 + pinsrw_mmreg_reg: + lods byte [esi] + call convert_register + cmp ah,4 + jne invalid_operand_size + mov bl,al + jmp mmx_nomem_imm8 +pshufw_instruction: + mov [mmx_size],8 + mov [opcode_prefix],al + jmp pshuf_instruction +pshufd_instruction: + mov [mmx_size],16 + mov [opcode_prefix],al + pshuf_instruction: + mov [base_code],0Fh + mov [extended_code],70h + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + cmp ah,[mmx_size] + jne invalid_operand_size + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je pshuf_mmreg_mmreg + cmp al,'[' + jne invalid_operand + call get_address + jmp mmx_imm8 + pshuf_mmreg_mmreg: + lods byte [esi] + call convert_mmx_register + mov bl,al + jmp mmx_nomem_imm8 +movd_instruction: + mov [base_code],0Fh + mov [extended_code],7Eh + lods byte [esi] + call get_size_operator + cmp al,10h + je movd_reg + cmp al,'[' + jne invalid_operand + call get_address + test [operand_size],not 4 + jnz invalid_operand_size + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + call make_mmx_prefix + mov [postbyte_register],al + jmp instruction_ready + movd_reg: + lods byte [esi] + cmp al,0B0h + jae movd_mmreg + call convert_register + cmp ah,4 + jne invalid_operand_size + mov [operand_size],0 + mov bl,al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + mov [postbyte_register],al + call make_mmx_prefix + jmp nomem_instruction_ready + movd_mmreg: + mov [extended_code],6Eh + call convert_mmx_register + call make_mmx_prefix + mov [postbyte_register],al + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je movd_mmreg_reg + cmp al,'[' + jne invalid_operand + call get_address + test [operand_size],not 4 + jnz invalid_operand_size + jmp instruction_ready + movd_mmreg_reg: + lods byte [esi] + call convert_register + cmp ah,4 + jne invalid_operand_size + mov bl,al + jmp nomem_instruction_ready + make_mmx_prefix: + cmp [vex_required],0 + jne mmx_prefix_for_vex + cmp [operand_size],16 + jne no_mmx_prefix + mov [operand_prefix],66h + no_mmx_prefix: + ret + mmx_prefix_for_vex: + cmp [operand_size],16 + jne invalid_operand + mov [opcode_prefix],66h + ret +movq_instruction: + mov [base_code],0Fh + lods byte [esi] + call get_size_operator + cmp al,10h + je movq_reg + cmp al,'[' + jne invalid_operand + call get_address + test [operand_size],not 8 + jnz invalid_operand_size + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + mov [postbyte_register],al + cmp ah,16 + je movq_mem_xmmreg + mov [extended_code],7Fh + jmp instruction_ready + movq_mem_xmmreg: + mov [extended_code],0D6h + mov [opcode_prefix],66h + jmp instruction_ready + movq_reg: + lods byte [esi] + cmp al,0B0h + jae movq_mmreg + call convert_register + cmp ah,8 + jne invalid_operand_size + mov bl,al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + call convert_mmx_register + mov [postbyte_register],al + call make_mmx_prefix + mov [extended_code],7Eh + call operand_64bit + jmp nomem_instruction_ready + movq_mmreg: + call convert_mmx_register + mov [postbyte_register],al + mov [extended_code],6Fh + mov [mmx_size],ah + cmp ah,16 + jne movq_mmreg_ + mov [extended_code],7Eh + mov [opcode_prefix],0F3h + movq_mmreg_: + lods byte [esi] + cmp al,',' + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,10h + je movq_mmreg_reg + call get_address + test [operand_size],not 8 + jnz invalid_operand_size + jmp instruction_ready + movq_mmreg_reg: + lods byte [esi] + cmp al,0B0h + jae movq_mmreg_mmreg + mov [operand_size],0 + call convert_register + cmp ah,8 + jne invalid_operand_size + mov [extended_code],6Eh + mov [opcode_prefix],0 + mov bl,al + cmp [mmx_size],16 + jne movq_mmreg_reg_store + mov [opcode_prefix],66h + movq_mmreg_reg_store: + call operand_64bit + jmp nomem_instruction_ready + movq_mmreg_mmreg: + call convert_mmx_register + cmp ah,[mmx_size] + jne invalid_operand_size + mov bl,al + jmp nomem_instruction_ready +movdq_instruction: + mov [opcode_prefix],al + mov [base_code],0Fh + mov [extended_code],6Fh + lods byte [esi] + call get_size_operator + cmp al,10h + je movdq_mmreg + cmp al,'[' + jne invalid_operand + call get_address + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + mov [extended_code],7Fh + jmp instruction_ready + movdq_mmreg: + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je movdq_mmreg_mmreg + cmp al,'[' + jne invalid_operand + call get_address + jmp instruction_ready + movdq_mmreg_mmreg: + lods byte [esi] + call convert_xmm_register + mov bl,al + jmp nomem_instruction_ready +lddqu_instruction: + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + push eax + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + pop eax + mov [postbyte_register],al + mov [opcode_prefix],0F2h + mov [base_code],0Fh + mov [extended_code],0F0h + jmp instruction_ready + +movdq2q_instruction: + mov [opcode_prefix],0F2h + mov [mmx_size],8 + jmp movq2dq_ +movq2dq_instruction: + mov [opcode_prefix],0F3h + mov [mmx_size],16 + movq2dq_: + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + cmp ah,[mmx_size] + jne invalid_operand_size + mov [postbyte_register],al + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + xor [mmx_size],8+16 + cmp ah,[mmx_size] + jne invalid_operand_size + mov bl,al + mov [base_code],0Fh + mov [extended_code],0D6h + jmp nomem_instruction_ready + +sse_ps_instruction_imm8: + mov [immediate_size],1 +sse_ps_instruction: + mov [mmx_size],16 + jmp sse_instruction +sse_pd_instruction_imm8: + mov [immediate_size],1 +sse_pd_instruction: + mov [mmx_size],16 + mov [opcode_prefix],66h + jmp sse_instruction +sse_ss_instruction: + mov [mmx_size],4 + mov [opcode_prefix],0F3h + jmp sse_instruction +sse_sd_instruction: + mov [mmx_size],8 + mov [opcode_prefix],0F2h + jmp sse_instruction +cmp_pd_instruction: + mov [opcode_prefix],66h +cmp_ps_instruction: + mov [mmx_size],16 + mov byte [value],al + mov al,0C2h + jmp sse_instruction +cmp_ss_instruction: + mov [mmx_size],4 + mov [opcode_prefix],0F3h + jmp cmp_sx_instruction +cmpsd_instruction: + mov al,0A7h + mov ah,[esi] + or ah,ah + jz simple_instruction_32bit + cmp ah,0Fh + je simple_instruction_32bit + mov al,-1 +cmp_sd_instruction: + mov [mmx_size],8 + mov [opcode_prefix],0F2h + cmp_sx_instruction: + mov byte [value],al + mov al,0C2h + jmp sse_instruction +comiss_instruction: + mov [mmx_size],4 + jmp sse_instruction +comisd_instruction: + mov [mmx_size],8 + mov [opcode_prefix],66h + jmp sse_instruction +cvtdq2pd_instruction: + mov [opcode_prefix],0F3h +cvtps2pd_instruction: + mov [mmx_size],8 + jmp sse_instruction +cvtpd2dq_instruction: + mov [mmx_size],16 + mov [opcode_prefix],0F2h + jmp sse_instruction +movshdup_instruction: + mov [mmx_size],16 + mov [opcode_prefix],0F3h +sse_instruction: + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + sse_xmmreg: + lods byte [esi] + call convert_xmm_register + sse_reg: + mov [postbyte_register],al + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je sse_xmmreg_xmmreg + sse_reg_mem: + cmp al,'[' + jne invalid_operand + call get_address + cmp [operand_size],0 + je sse_mem_size_ok + mov al,[mmx_size] + cmp [operand_size],al + jne invalid_operand_size + sse_mem_size_ok: + mov al,[extended_code] + mov ah,[supplemental_code] + cmp al,0C2h + je sse_cmp_mem_ok + cmp ax,443Ah + je sse_cmp_mem_ok + cmp [immediate_size],1 + je mmx_imm8 + cmp [immediate_size],-1 + jne sse_ok + call take_additional_xmm0 + mov [immediate_size],0 + sse_ok: + jmp instruction_ready + sse_cmp_mem_ok: + cmp byte [value],-1 + je mmx_imm8 + call store_instruction_with_imm8 + jmp instruction_assembled + sse_xmmreg_xmmreg: + cmp [operand_prefix],66h + jne sse_xmmreg_xmmreg_ok + cmp [extended_code],12h + je invalid_operand + cmp [extended_code],16h + je invalid_operand + sse_xmmreg_xmmreg_ok: + lods byte [esi] + call convert_xmm_register + mov bl,al + mov al,[extended_code] + mov ah,[supplemental_code] + cmp al,0C2h + je sse_cmp_nomem_ok + cmp ax,443Ah + je sse_cmp_nomem_ok + cmp [immediate_size],1 + je mmx_nomem_imm8 + cmp [immediate_size],-1 + jne sse_nomem_ok + call take_additional_xmm0 + mov [immediate_size],0 + sse_nomem_ok: + jmp nomem_instruction_ready + sse_cmp_nomem_ok: + cmp byte [value],-1 + je mmx_nomem_imm8 + call store_nomem_instruction + mov al,byte [value] + stosb + jmp instruction_assembled + take_additional_xmm0: + cmp byte [esi],',' + jne additional_xmm0_ok + inc esi + lods byte [esi] + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + test al,al + jnz invalid_operand + additional_xmm0_ok: + ret + +pslldq_instruction: + mov [postbyte_register],al + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],73h + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov bl,al + jmp mmx_nomem_imm8 +movpd_instruction: + mov [opcode_prefix],66h +movps_instruction: + mov [base_code],0Fh + mov [extended_code],al + mov [mmx_size],16 + jmp sse_mov_instruction +movss_instruction: + mov [mmx_size],4 + mov [opcode_prefix],0F3h + jmp sse_movs +movsd_instruction: + mov al,0A5h + mov ah,[esi] + or ah,ah + jz simple_instruction_32bit + cmp ah,0Fh + je simple_instruction_32bit + mov [mmx_size],8 + mov [opcode_prefix],0F2h + sse_movs: + mov [base_code],0Fh + mov [extended_code],10h + jmp sse_mov_instruction +sse_mov_instruction: + lods byte [esi] + call get_size_operator + cmp al,10h + je sse_xmmreg + sse_mem: + cmp al,'[' + jne invalid_operand + inc [extended_code] + call get_address + cmp [operand_size],0 + je sse_mem_xmmreg + mov al,[mmx_size] + cmp [operand_size],al + jne invalid_operand_size + mov [operand_size],0 + sse_mem_xmmreg: + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + jmp instruction_ready +movlpd_instruction: + mov [opcode_prefix],66h +movlps_instruction: + mov [base_code],0Fh + mov [extended_code],al + mov [mmx_size],8 + lods byte [esi] + call get_size_operator + cmp al,10h + jne sse_mem + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + jmp sse_reg_mem +movhlps_instruction: + mov [base_code],0Fh + mov [extended_code],al + mov [mmx_size],0 + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je sse_xmmreg_xmmreg_ok + jmp invalid_operand +maskmovq_instruction: + mov cl,8 + jmp maskmov_instruction +maskmovdqu_instruction: + mov cl,16 + mov [opcode_prefix],66h + maskmov_instruction: + mov [base_code],0Fh + mov [extended_code],0F7h + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + cmp ah,cl + jne invalid_operand_size + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + mov bl,al + jmp nomem_instruction_ready +movmskpd_instruction: + mov [opcode_prefix],66h +movmskps_instruction: + mov [base_code],0Fh + mov [extended_code],50h + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + cmp ah,4 + je movmskps_reg_ok + cmp ah,8 + jne invalid_operand_size + cmp [code_type],64 + jne invalid_operand + movmskps_reg_ok: + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je sse_xmmreg_xmmreg_ok + jmp invalid_operand + +cvtpi2pd_instruction: + mov [opcode_prefix],66h +cvtpi2ps_instruction: + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je cvtpi_xmmreg_xmmreg + cmp al,'[' + jne invalid_operand + call get_address + cmp [operand_size],0 + je cvtpi_size_ok + cmp [operand_size],8 + jne invalid_operand_size + cvtpi_size_ok: + jmp instruction_ready + cvtpi_xmmreg_xmmreg: + lods byte [esi] + call convert_mmx_register + cmp ah,8 + jne invalid_operand_size + mov bl,al + jmp nomem_instruction_ready +cvtsi2ss_instruction: + mov [opcode_prefix],0F3h + jmp cvtsi_instruction +cvtsi2sd_instruction: + mov [opcode_prefix],0F2h + cvtsi_instruction: + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + cvtsi_xmmreg: + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je cvtsi_xmmreg_reg + cmp al,'[' + jne invalid_operand + call get_address + cmp [operand_size],0 + je cvtsi_size_ok + cmp [operand_size],4 + je cvtsi_size_ok + cmp [operand_size],8 + jne invalid_operand_size + call operand_64bit + cvtsi_size_ok: + jmp instruction_ready + cvtsi_xmmreg_reg: + lods byte [esi] + call convert_register + cmp ah,4 + je cvtsi_xmmreg_reg_store + cmp ah,8 + jne invalid_operand_size + call operand_64bit + cvtsi_xmmreg_reg_store: + mov bl,al + jmp nomem_instruction_ready +cvtps2pi_instruction: + mov [mmx_size],8 + jmp cvtpd_instruction +cvtpd2pi_instruction: + mov [opcode_prefix],66h + mov [mmx_size],16 + cvtpd_instruction: + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + cmp ah,8 + jne invalid_operand_size + mov [operand_size],0 + jmp sse_reg +cvtss2si_instruction: + mov [opcode_prefix],0F3h + mov [mmx_size],4 + jmp cvt2si_instruction +cvtsd2si_instruction: + mov [opcode_prefix],0F2h + mov [mmx_size],8 + cvt2si_instruction: + mov [extended_code],al + mov [base_code],0Fh + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [operand_size],0 + cmp ah,4 + je sse_reg + cmp ah,8 + jne invalid_operand_size + call operand_64bit + jmp sse_reg + +ssse3_instruction: + mov [base_code],0Fh + mov [extended_code],38h + mov [supplemental_code],al + jmp mmx_instruction +palignr_instruction: + mov [base_code],0Fh + mov [extended_code],3Ah + mov [supplemental_code],0Fh + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + call make_mmx_prefix + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je palignr_mmreg_mmreg + cmp al,'[' + jne invalid_operand + call get_address + jmp mmx_imm8 + palignr_mmreg_mmreg: + lods byte [esi] + call convert_mmx_register + mov bl,al + jmp mmx_nomem_imm8 +amd3dnow_instruction: + mov [base_code],0Fh + mov [extended_code],0Fh + mov byte [value],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + cmp ah,8 + jne invalid_operand_size + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je amd3dnow_mmreg_mmreg + cmp al,'[' + jne invalid_operand + call get_address + call store_instruction_with_imm8 + jmp instruction_assembled + amd3dnow_mmreg_mmreg: + lods byte [esi] + call convert_mmx_register + cmp ah,8 + jne invalid_operand_size + mov bl,al + call store_nomem_instruction + mov al,byte [value] + stos byte [edi] + jmp instruction_assembled + +sse4_instruction_38_xmm0: + mov [immediate_size],-1 +sse4_instruction_38: + mov [mmx_size],16 + mov [opcode_prefix],66h + mov [supplemental_code],al + mov al,38h + jmp sse_instruction +sse4_ss_instruction_3a_imm8: + mov [immediate_size],1 + mov [mmx_size],4 + jmp sse4_instruction_3a_setup +sse4_sd_instruction_3a_imm8: + mov [immediate_size],1 + mov [mmx_size],8 + jmp sse4_instruction_3a_setup +sse4_instruction_3a_imm8: + mov [immediate_size],1 + mov [mmx_size],16 + sse4_instruction_3a_setup: + mov [opcode_prefix],66h + mov [supplemental_code],al + mov al,3Ah + jmp sse_instruction +pclmulqdq_instruction: + mov byte [value],al + mov [mmx_size],16 + mov al,44h + jmp sse4_instruction_3a_setup +extractps_instruction: + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],3Ah + mov [supplemental_code],17h + lods byte [esi] + call get_size_operator + cmp al,10h + je extractps_reg + cmp al,'[' + jne invalid_operand + call get_address + cmp [operand_size],4 + je extractps_size_ok + cmp [operand_size],0 + jne invalid_operand_size + extractps_size_ok: + push edx ebx ecx + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + pop ecx ebx edx + jmp mmx_imm8 + extractps_reg: + lods byte [esi] + call convert_register + push eax + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + pop ebx + mov al,bh + cmp al,4 + je mmx_nomem_imm8 + cmp al,8 + jne invalid_operand_size + call operand_64bit + jmp mmx_nomem_imm8 +insertps_instruction: + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + insertps_xmmreg: + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],3Ah + mov [supplemental_code],21h + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je insertps_xmmreg_reg + cmp al,'[' + jne invalid_operand + call get_address + cmp [operand_size],4 + je insertps_size_ok + cmp [operand_size],0 + jne invalid_operand_size + insertps_size_ok: + jmp mmx_imm8 + insertps_xmmreg_reg: + lods byte [esi] + call convert_mmx_register + mov bl,al + jmp mmx_nomem_imm8 +pextrq_instruction: + mov [mmx_size],8 + jmp pextr_instruction +pextrd_instruction: + mov [mmx_size],4 + jmp pextr_instruction +pextrw_instruction: + mov [mmx_size],2 + jmp pextr_instruction +pextrb_instruction: + mov [mmx_size],1 + pextr_instruction: + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],3Ah + mov [supplemental_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + je pextr_reg + cmp al,'[' + jne invalid_operand + call get_address + mov al,[mmx_size] + cmp al,[operand_size] + je pextr_size_ok + cmp [operand_size],0 + jne invalid_operand_size + pextr_size_ok: + cmp al,8 + jne pextr_prefix_ok + call operand_64bit + pextr_prefix_ok: + push edx ebx ecx + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + pop ecx ebx edx + jmp mmx_imm8 + pextr_reg: + lods byte [esi] + call convert_register + cmp [mmx_size],4 + ja pextrq_reg + cmp ah,4 + je pextr_reg_size_ok + cmp [code_type],64 + jne pextr_invalid_size + cmp ah,8 + je pextr_reg_size_ok + pextr_invalid_size: + jmp invalid_operand_size + pextrq_reg: + cmp ah,8 + jne pextr_invalid_size + call operand_64bit + pextr_reg_size_ok: + mov [operand_size],0 + push eax + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + mov ebx,eax + pop eax + mov [postbyte_register],al + mov al,ah + cmp [mmx_size],2 + jne pextr_reg_store + mov [opcode_prefix],0 + mov [extended_code],0C5h + call make_mmx_prefix + jmp mmx_nomem_imm8 + pextr_reg_store: + cmp bh,16 + jne invalid_operand_size + xchg bl,[postbyte_register] + call operand_autodetect + jmp mmx_nomem_imm8 +pinsrb_instruction: + mov [mmx_size],1 + jmp pinsr_instruction +pinsrd_instruction: + mov [mmx_size],4 + jmp pinsr_instruction +pinsrq_instruction: + mov [mmx_size],8 + call operand_64bit + pinsr_instruction: + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],3Ah + mov [supplemental_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + pinsr_xmmreg: + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je pinsr_xmmreg_reg + cmp al,'[' + jne invalid_operand + call get_address + cmp [operand_size],0 + je mmx_imm8 + mov al,[mmx_size] + cmp al,[operand_size] + je mmx_imm8 + jmp invalid_operand_size + pinsr_xmmreg_reg: + lods byte [esi] + call convert_register + mov bl,al + cmp [mmx_size],8 + je pinsrq_xmmreg_reg + cmp ah,4 + je mmx_nomem_imm8 + jmp invalid_operand_size + pinsrq_xmmreg_reg: + cmp ah,8 + je mmx_nomem_imm8 + jmp invalid_operand_size +pmovsxbw_instruction: + mov [mmx_size],8 + jmp pmovsx_instruction +pmovsxbd_instruction: + mov [mmx_size],4 + jmp pmovsx_instruction +pmovsxbq_instruction: + mov [mmx_size],2 + jmp pmovsx_instruction +pmovsxwd_instruction: + mov [mmx_size],8 + jmp pmovsx_instruction +pmovsxwq_instruction: + mov [mmx_size],4 + jmp pmovsx_instruction +pmovsxdq_instruction: + mov [mmx_size],8 + pmovsx_instruction: + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],38h + mov [supplemental_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,10h + je pmovsx_xmmreg_reg + cmp al,'[' + jne invalid_operand + call get_address + cmp [operand_size],0 + je instruction_ready + mov al,[mmx_size] + cmp al,[operand_size] + jne invalid_operand_size + jmp instruction_ready + pmovsx_xmmreg_reg: + lods byte [esi] + call convert_xmm_register + mov bl,al + jmp nomem_instruction_ready + +fxsave_instruction_64bit: + call operand_64bit +fxsave_instruction: + mov [extended_code],0AEh + mov [base_code],0Fh + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + mov ah,[operand_size] + or ah,ah + jz fxsave_size_ok + mov al,[postbyte_register] + cmp al,111b + je clflush_size_check + cmp al,10b + jb invalid_operand_size + cmp al,11b + ja invalid_operand_size + cmp ah,4 + jne invalid_operand_size + jmp fxsave_size_ok + clflush_size_check: + cmp ah,1 + jne invalid_operand_size + fxsave_size_ok: + jmp instruction_ready +prefetch_instruction: + mov [extended_code],18h + prefetch_mem_8bit: + mov [base_code],0Fh + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + or ah,ah + jz prefetch_size_ok + cmp ah,1 + jne invalid_operand_size + prefetch_size_ok: + call get_address + jmp instruction_ready +amd_prefetch_instruction: + mov [extended_code],0Dh + jmp prefetch_mem_8bit +fence_instruction: + mov bl,al + mov ax,0AE0Fh + stos word [edi] + mov al,bl + stos byte [edi] + jmp instruction_assembled +pause_instruction: + mov ax,90F3h + stos word [edi] + jmp instruction_assembled +movntq_instruction: + mov [mmx_size],8 + jmp movnt_instruction +movntpd_instruction: + mov [opcode_prefix],66h +movntps_instruction: + mov [mmx_size],16 + movnt_instruction: + mov [extended_code],al + mov [base_code],0Fh + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_mmx_register + cmp ah,[mmx_size] + jne invalid_operand_size + mov [postbyte_register],al + jmp instruction_ready + +movntsd_instruction: + mov [opcode_prefix],0F2h + mov [mmx_size],8 + jmp movnts_instruction +movntss_instruction: + mov [opcode_prefix],0F3h + mov [mmx_size],4 + movnts_instruction: + mov [extended_code],al + mov [base_code],0Fh + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + cmp al,[mmx_size] + je movnts_size_ok + test al,al + jnz invalid_operand_size + movnts_size_ok: + lods byte [esi] + cmp al,',' + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + jmp instruction_ready + +movnti_instruction: + mov [base_code],0Fh + mov [extended_code],al + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + cmp ah,4 + je movnti_store + cmp ah,8 + jne invalid_operand_size + call operand_64bit + movnti_store: + mov [postbyte_register],al + jmp instruction_ready +monitor_instruction: + mov [postbyte_register],al + cmp byte [esi],0 + je monitor_instruction_store + cmp byte [esi],0Fh + je monitor_instruction_store + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + cmp ax,0400h + jne invalid_operand + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + cmp ax,0401h + jne invalid_operand + cmp [postbyte_register],0C8h + jne monitor_instruction_store + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + cmp ax,0402h + jne invalid_operand + monitor_instruction_store: + mov ax,010Fh + stos word [edi] + mov al,[postbyte_register] + stos byte [edi] + jmp instruction_assembled +movntdqa_instruction: + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],38h + mov [supplemental_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + jmp instruction_ready + +extrq_instruction: + mov [opcode_prefix],66h + mov [base_code],0Fh + mov [extended_code],78h + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je extrq_xmmreg_xmmreg + test ah,not 1 + jnz invalid_operand_size + cmp al,'(' + jne invalid_operand + xor bl,bl + xchg bl,[postbyte_register] + call store_nomem_instruction + call get_byte_value + stosb + call append_imm8 + jmp instruction_assembled + extrq_xmmreg_xmmreg: + inc [extended_code] + lods byte [esi] + call convert_xmm_register + mov bl,al + jmp nomem_instruction_ready +insertq_instruction: + mov [opcode_prefix],0F2h + mov [base_code],0Fh + mov [extended_code],78h + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov [postbyte_register],al + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_xmm_register + mov bl,al + cmp byte [esi],',' + je insertq_with_imm + inc [extended_code] + jmp nomem_instruction_ready + insertq_with_imm: + call store_nomem_instruction + call append_imm8 + call append_imm8 + jmp instruction_assembled + +crc32_instruction: + mov [opcode_prefix],0F2h + mov [base_code],0Fh + mov [extended_code],38h + mov [supplemental_code],0F0h + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + cmp ah,8 + je crc32_reg64 + cmp ah,4 + jne invalid_operand + lods byte [esi] + cmp al,',' + jne invalid_operand + mov [operand_size],0 + lods byte [esi] + call get_size_operator + cmp al,10h + je crc32_reg32_reg + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + test al,al + jz crc32_unknown_size + cmp al,1 + je crc32_reg32_mem_store + cmp al,4 + ja invalid_operand_size + inc [supplemental_code] + call operand_autodetect + crc32_reg32_mem_store: + jmp instruction_ready + crc32_unknown_size: + call recoverable_unknown_size + jmp crc32_reg32_mem_store + crc32_reg32_reg: + lods byte [esi] + call convert_register + mov bl,al + mov al,ah + cmp al,1 + je crc32_reg32_reg_store + cmp al,4 + ja invalid_operand_size + inc [supplemental_code] + call operand_autodetect + crc32_reg32_reg_store: + jmp nomem_instruction_ready + crc32_reg64: + lods byte [esi] + cmp al,',' + jne invalid_operand + mov [operand_size],0 + call operand_64bit + lods byte [esi] + call get_size_operator + cmp al,10h + je crc32_reg64_reg + cmp al,'[' + jne invalid_operand + call get_address + mov ah,[operand_size] + mov al,8 + test ah,ah + jz crc32_unknown_size + cmp ah,1 + je crc32_reg32_mem_store + cmp ah,al + jne invalid_operand_size + inc [supplemental_code] + jmp crc32_reg32_mem_store + crc32_reg64_reg: + lods byte [esi] + call convert_register + mov bl,al + mov al,8 + cmp ah,1 + je crc32_reg32_reg_store + cmp ah,al + jne invalid_operand_size + inc [supplemental_code] + jmp crc32_reg32_reg_store +popcnt_instruction: + mov [opcode_prefix],0F3h + jmp bs_instruction +movbe_instruction: + mov [supplemental_code],al + mov [extended_code],38h + mov [base_code],0Fh + lods byte [esi] + call get_size_operator + cmp al,'[' + je movbe_mem + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_argument + call get_address + mov al,[operand_size] + call operand_autodetect + jmp instruction_ready + movbe_mem: + inc [supplemental_code] + call get_address + push edx ebx ecx + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + pop ecx ebx edx + mov al,[operand_size] + call operand_autodetect + jmp instruction_ready +adx_instruction: + mov [base_code],0Fh + mov [extended_code],38h + mov [supplemental_code],0F6h + mov [operand_prefix],al + call get_reg_mem + jc adx_reg_reg + mov al,[operand_size] + cmp al,4 + je instruction_ready + cmp al,8 + jne invalid_operand_size + call operand_64bit + jmp instruction_ready + adx_reg_reg: + cmp ah,4 + je nomem_instruction_ready + cmp ah,8 + jne invalid_operand_size + call operand_64bit + jmp nomem_instruction_ready + +simple_vmx_instruction: + mov ah,al + mov al,0Fh + stos byte [edi] + mov al,1 + stos word [edi] + jmp instruction_assembled +vmclear_instruction: + mov [opcode_prefix],66h + jmp vmx_instruction +vmxon_instruction: + mov [opcode_prefix],0F3h +vmx_instruction: + mov [postbyte_register],al + mov [extended_code],0C7h + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + or al,al + jz vmx_size_ok + cmp al,8 + jne invalid_operand_size + vmx_size_ok: + mov [base_code],0Fh + jmp instruction_ready +vmread_instruction: + mov [extended_code],78h + lods byte [esi] + call get_size_operator + cmp al,10h + je vmread_nomem + cmp al,'[' + jne invalid_operand + call get_address + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + call vmread_check_size + jmp vmx_size_ok + vmread_nomem: + lods byte [esi] + call convert_register + push eax + call vmread_check_size + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + call vmread_check_size + pop ebx + mov [base_code],0Fh + jmp nomem_instruction_ready + vmread_check_size: + cmp [code_type],64 + je vmread_long + cmp [operand_size],4 + jne invalid_operand_size + ret + vmread_long: + cmp [operand_size],8 + jne invalid_operand_size + ret +vmwrite_instruction: + mov [extended_code],79h + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + je vmwrite_nomem + cmp al,'[' + jne invalid_operand + call get_address + call vmread_check_size + jmp vmx_size_ok + vmwrite_nomem: + lods byte [esi] + call convert_register + mov bl,al + mov [base_code],0Fh + jmp nomem_instruction_ready +vmx_inv_instruction: + mov [opcode_prefix],66h + mov [extended_code],38h + mov [supplemental_code],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov [postbyte_register],al + call vmread_check_size + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,'[' + jne invalid_operand + call get_address + mov al,[operand_size] + or al,al + jz vmx_size_ok + cmp al,16 + jne invalid_operand_size + jmp vmx_size_ok +simple_svm_instruction: + push eax + mov [base_code],0Fh + mov [extended_code],1 + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + or al,al + jnz invalid_operand + simple_svm_detect_size: + cmp ah,2 + je simple_svm_16bit + cmp ah,4 + je simple_svm_32bit + cmp [code_type],64 + jne invalid_operand_size + jmp simple_svm_store + simple_svm_16bit: + cmp [code_type],16 + je simple_svm_store + cmp [code_type],64 + je invalid_operand_size + jmp prefixed_svm_store + simple_svm_32bit: + cmp [code_type],32 + je simple_svm_store + prefixed_svm_store: + mov al,67h + stos byte [edi] + simple_svm_store: + call store_instruction_code + pop eax + stos byte [edi] + jmp instruction_assembled +skinit_instruction: + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + cmp ax,0400h + jne invalid_operand + mov al,0DEh + jmp simple_vmx_instruction +invlpga_instruction: + push eax + mov [base_code],0Fh + mov [extended_code],1 + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + or al,al + jnz invalid_operand + mov bl,ah + mov [operand_size],0 + lods byte [esi] + cmp al,',' + jne invalid_operand + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + cmp ax,0401h + jne invalid_operand + mov ah,bl + jmp simple_svm_detect_size + +rdrand_instruction: + mov [base_code],0Fh + mov [extended_code],0C7h + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov bl,al + mov al,ah + call operand_autodetect + jmp nomem_instruction_ready +rdfsbase_instruction: + cmp [code_type],64 + jne illegal_instruction + mov [opcode_prefix],0F3h + mov [base_code],0Fh + mov [extended_code],0AEh + mov [postbyte_register],al + lods byte [esi] + call get_size_operator + cmp al,10h + jne invalid_operand + lods byte [esi] + call convert_register + mov bl,al + mov al,ah + cmp ah,2 + je invalid_operand_size + call operand_autodetect + jmp nomem_instruction_ready + +xabort_instruction: + lods byte [esi] + call get_size_operator + cmp ah,1 + ja invalid_operand_size + cmp al,'(' + jne invalid_operand + call get_byte_value + mov dl,al + mov ax,0F8C6h + stos word [edi] + mov al,dl + stos byte [edi] + jmp instruction_assembled +xbegin_instruction: + lods byte [esi] + cmp al,'(' + jne invalid_operand + mov al,[code_type] + cmp al,64 + je xbegin_64bit + cmp al,32 + je xbegin_32bit + xbegin_16bit: + call get_address_word_value + add edi,4 + mov ebp,[addressing_space] + call calculate_relative_offset + sub edi,4 + shl eax,16 + mov ax,0F8C7h + stos dword [edi] + jmp instruction_assembled + xbegin_32bit: + call get_address_dword_value + jmp xbegin_address_ok + xbegin_64bit: + call get_address_qword_value + xbegin_address_ok: + add edi,5 + mov ebp,[addressing_space] + call calculate_relative_offset + sub edi,5 + mov edx,eax + cwde + cmp eax,edx + jne xbegin_rel32 + mov al,66h + stos byte [edi] + mov eax,edx + shl eax,16 + mov ax,0F8C7h + stos dword [edi] + jmp instruction_assembled + xbegin_rel32: + sub edx,1 + jno xbegin_rel32_ok + cmp [code_type],64 + je relative_jump_out_of_range + xbegin_rel32_ok: + mov ax,0F8C7h + stos word [edi] + mov eax,edx + stos dword [edi] + jmp instruction_assembled + +convert_register: + mov ah,al + shr ah,4 + and al,0Fh + cmp ah,8 + je match_register_size + cmp ah,4 + ja invalid_operand + cmp ah,1 + ja match_register_size + cmp al,4 + jb match_register_size + or ah,ah + jz high_byte_register + or [rex_prefix],40h + match_register_size: + cmp ah,[operand_size] + je register_size_ok + cmp [operand_size],0 + jne operand_sizes_do_not_match + mov [operand_size],ah + register_size_ok: + ret + high_byte_register: + mov ah,1 + or [rex_prefix],80h + jmp match_register_size +convert_fpu_register: + mov ah,al + shr ah,4 + and al,111b + cmp ah,10 + jne invalid_operand + jmp match_register_size +convert_mmx_register: + mov ah,al + shr ah,4 + cmp ah,0Ch + je xmm_register + ja invalid_operand + and al,111b + cmp ah,0Bh + jne invalid_operand + mov ah,8 + cmp [vex_required],0 + jne invalid_operand + jmp match_register_size + xmm_register: + and al,0Fh + mov ah,16 + cmp al,8 + jb match_register_size + cmp [code_type],64 + jne invalid_operand + jmp match_register_size +convert_xmm_register: + mov ah,al + shr ah,4 + cmp ah,0Ch + je xmm_register + jmp invalid_operand +get_size_operator: + xor ah,ah + cmp al,11h + jne no_size_operator + mov [size_declared],1 + lods word [esi] + xchg al,ah + mov [size_override],1 + cmp ah,[operand_size] + je size_operator_ok + cmp [operand_size],0 + jne operand_sizes_do_not_match + mov [operand_size],ah + size_operator_ok: + ret + no_size_operator: + mov [size_declared],0 + cmp al,'[' + jne size_operator_ok + mov [size_override],0 + ret +get_jump_operator: + mov [jump_type],0 + cmp al,12h + jne jump_operator_ok + lods word [esi] + mov [jump_type],al + mov al,ah + jump_operator_ok: + ret +get_address: + mov [segment_register],0 + mov [address_size],0 + mov [free_address_range],0 + mov al,[code_type] + shr al,3 + mov [value_size],al + mov al,[esi] + and al,11110000b + cmp al,60h + jne get_size_prefix + lods byte [esi] + sub al,60h + mov [segment_register],al + mov al,[esi] + and al,11110000b + get_size_prefix: + cmp al,70h + jne address_size_prefix_ok + lods byte [esi] + sub al,70h + cmp al,2 + jb invalid_address_size + cmp al,8 + ja invalid_address_size + mov [address_size],al + mov [value_size],al + address_size_prefix_ok: + call calculate_address + cmp byte [esi-1],']' + jne invalid_address + mov [address_high],edx + mov edx,eax + cmp [code_type],64 + jne address_ok + or bx,bx + jnz address_ok + test ch,0Fh + jnz address_ok + calculate_relative_address: + mov edx,[address_symbol] + mov [symbol_identifier],edx + mov edx,[address_high] + mov ebp,[addressing_space] + call calculate_relative_offset + mov [address_high],edx + cdq + cmp edx,[address_high] + je address_high_ok + call recoverable_overflow + address_high_ok: + mov edx,eax + ror ecx,16 + mov cl,[value_type] + rol ecx,16 + mov bx,0FF00h + address_ok: + ret +operand_16bit: + cmp [code_type],16 + je size_prefix_ok + mov [operand_prefix],66h + ret +operand_32bit: + cmp [code_type],16 + jne size_prefix_ok + mov [operand_prefix],66h + size_prefix_ok: + ret +operand_64bit: + cmp [code_type],64 + jne illegal_instruction + or [rex_prefix],48h + ret +operand_autodetect: + cmp al,2 + je operand_16bit + cmp al,4 + je operand_32bit + cmp al,8 + je operand_64bit + jmp invalid_operand_size +store_segment_prefix_if_necessary: + mov al,[segment_register] + or al,al + jz segment_prefix_ok + cmp al,4 + ja segment_prefix_386 + cmp [code_type],64 + je segment_prefix_ok + cmp al,3 + je ss_prefix + jb segment_prefix_86 + cmp bl,25h + je segment_prefix_86 + cmp bh,25h + je segment_prefix_86 + cmp bh,45h + je segment_prefix_86 + cmp bh,44h + je segment_prefix_86 + ret + ss_prefix: + cmp bl,25h + je segment_prefix_ok + cmp bh,25h + je segment_prefix_ok + cmp bh,45h + je segment_prefix_ok + cmp bh,44h + je segment_prefix_ok + jmp segment_prefix_86 +store_segment_prefix: + mov al,[segment_register] + or al,al + jz segment_prefix_ok + cmp al,5 + jae segment_prefix_386 + segment_prefix_86: + dec al + shl al,3 + add al,26h + stos byte [edi] + jmp segment_prefix_ok + segment_prefix_386: + add al,64h-5 + stos byte [edi] + segment_prefix_ok: + ret +store_instruction_code: + cmp [vex_required],0 + jne store_vex_instruction_code + mov al,[operand_prefix] + or al,al + jz operand_prefix_ok + stos byte [edi] + operand_prefix_ok: + mov al,[opcode_prefix] + or al,al + jz opcode_prefix_ok + stos byte [edi] + opcode_prefix_ok: + mov al,[rex_prefix] + test al,40h + jz rex_prefix_ok + cmp [code_type],64 + jne invalid_operand + test al,0B0h + jnz disallowed_combination_of_registers + stos byte [edi] + rex_prefix_ok: + mov al,[base_code] + stos byte [edi] + cmp al,0Fh + jne instruction_code_ok + store_extended_code: + mov al,[extended_code] + stos byte [edi] + cmp al,38h + je store_supplemental_code + cmp al,3Ah + je store_supplemental_code + instruction_code_ok: + ret + store_supplemental_code: + mov al,[supplemental_code] + stos byte [edi] + ret +store_nomem_instruction: + test [postbyte_register],1000b + jz nomem_reg_code_ok + or [rex_prefix],44h + and [postbyte_register],111b + nomem_reg_code_ok: + test bl,1000b + jz nomem_rm_code_ok + or [rex_prefix],41h + and bl,111b + nomem_rm_code_ok: + call store_instruction_code + mov al,[postbyte_register] + shl al,3 + or al,bl + or al,11000000b + stos byte [edi] + ret +store_instruction: + mov [current_offset],edi + test [postbyte_register],1000b + jz reg_code_ok + or [rex_prefix],44h + and [postbyte_register],111b + reg_code_ok: + cmp [code_type],64 + jne address_value_ok + xor eax,eax + bt edx,31 + sbb eax,[address_high] + jz address_value_ok + cmp [address_high],0 + jne address_value_out_of_range + test ch,44h + jnz address_value_ok + test bx,8080h + jz address_value_ok + address_value_out_of_range: + call recoverable_overflow + address_value_ok: + call store_segment_prefix_if_necessary + test [vex_required],4 + jnz address_vsib + or bx,bx + jz address_immediate + cmp bx,0F800h + je address_rip_based + cmp bx,0F400h + je address_eip_based + cmp bx,0FF00h + je address_relative + mov al,bl + or al,bh + and al,11110000b + cmp al,80h + je postbyte_64bit + cmp al,40h + je postbyte_32bit + cmp al,20h + jne invalid_address + cmp [code_type],64 + je invalid_address_size + call address_16bit_prefix + call store_instruction_code + cmp bl,bh + jbe determine_16bit_address + xchg bl,bh + determine_16bit_address: + cmp bx,2600h + je address_si + cmp bx,2700h + je address_di + cmp bx,2300h + je address_bx + cmp bx,2500h + je address_bp + cmp bx,2625h + je address_bp_si + cmp bx,2725h + je address_bp_di + cmp bx,2723h + je address_bx_di + cmp bx,2623h + jne invalid_address + address_bx_si: + xor al,al + jmp postbyte_16bit + address_bx_di: + mov al,1 + jmp postbyte_16bit + address_bp_si: + mov al,10b + jmp postbyte_16bit + address_bp_di: + mov al,11b + jmp postbyte_16bit + address_si: + mov al,100b + jmp postbyte_16bit + address_di: + mov al,101b + jmp postbyte_16bit + address_bx: + mov al,111b + jmp postbyte_16bit + address_bp: + mov al,110b + postbyte_16bit: + test ch,22h + jnz address_16bit_value + or ch,ch + jnz address_sizes_do_not_agree + cmp edx,10000h + jge value_out_of_range + cmp edx,-8000h + jl value_out_of_range + or dx,dx + jz address + cmp dx,80h + jb address_8bit_value + cmp dx,-80h + jae address_8bit_value + address_16bit_value: + or al,10000000b + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos byte [edi] + mov eax,edx + stos word [edi] + ret + address_8bit_value: + or al,01000000b + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos byte [edi] + mov al,dl + stos byte [edi] + cmp dx,80h + jge value_out_of_range + cmp dx,-80h + jl value_out_of_range + ret + address: + cmp al,110b + je address_8bit_value + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos byte [edi] + ret + address_vsib: + mov al,bl + shr al,4 + cmp al,0Ch + je vector_index_ok + cmp al,0Dh + jne invalid_address + vector_index_ok: + mov al,bh + shr al,4 + cmp al,4 + je postbyte_32bit + cmp [code_type],64 + je address_prefix_ok + test al,al + jnz invalid_address + postbyte_32bit: + call address_32bit_prefix + jmp address_prefix_ok + postbyte_64bit: + cmp [code_type],64 + jne invalid_address_size + address_prefix_ok: + cmp bl,44h + je invalid_address + cmp bl,84h + je invalid_address + test bh,1000b + jz base_code_ok + or [rex_prefix],41h + base_code_ok: + test bl,1000b + jz index_code_ok + or [rex_prefix],42h + index_code_ok: + call store_instruction_code + or cl,cl + jz only_base_register + base_and_index: + mov al,100b + xor ah,ah + cmp cl,1 + je scale_ok + cmp cl,2 + je scale_1 + cmp cl,4 + je scale_2 + or ah,11000000b + jmp scale_ok + scale_2: + or ah,10000000b + jmp scale_ok + scale_1: + or ah,01000000b + scale_ok: + or bh,bh + jz only_index_register + and bl,111b + shl bl,3 + or ah,bl + and bh,111b + or ah,bh + sib_ready: + test ch,44h + jnz sib_address_32bit_value + test ch,88h + jnz sib_address_32bit_value + or ch,ch + jnz address_sizes_do_not_agree + cmp bh,5 + je address_value + or edx,edx + jz sib_address + address_value: + cmp edx,80h + jb sib_address_8bit_value + cmp edx,-80h + jae sib_address_8bit_value + sib_address_32bit_value: + or al,10000000b + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos word [edi] + jmp store_address_32bit_value + sib_address_8bit_value: + or al,01000000b + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos word [edi] + mov al,dl + stos byte [edi] + cmp edx,80h + jge value_out_of_range + cmp edx,-80h + jl value_out_of_range + ret + sib_address: + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos word [edi] + ret + only_index_register: + or ah,101b + and bl,111b + shl bl,3 + or ah,bl + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos word [edi] + test ch,44h + jnz store_address_32bit_value + test ch,88h + jnz store_address_32bit_value + or ch,ch + jnz invalid_address_size + jmp store_address_32bit_value + zero_index_register: + mov bl,4 + mov cl,1 + jmp base_and_index + only_base_register: + mov al,bh + and al,111b + cmp al,4 + je zero_index_register + test ch,44h + jnz simple_address_32bit_value + test ch,88h + jnz simple_address_32bit_value + or ch,ch + jnz address_sizes_do_not_agree + or edx,edx + jz simple_address + cmp edx,80h + jb simple_address_8bit_value + cmp edx,-80h + jae simple_address_8bit_value + simple_address_32bit_value: + or al,10000000b + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos byte [edi] + jmp store_address_32bit_value + simple_address_8bit_value: + or al,01000000b + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos byte [edi] + mov al,dl + stos byte [edi] + cmp edx,80h + jge value_out_of_range + cmp edx,-80h + jl value_out_of_range + ret + simple_address: + cmp al,5 + je simple_address_8bit_value + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos byte [edi] + ret + address_immediate: + cmp [code_type],64 + je address_immediate_sib + test ch,44h + jnz address_immediate_32bit + test ch,88h + jnz address_immediate_32bit + test ch,22h + jnz address_immediate_16bit + or ch,ch + jnz invalid_address_size + cmp [code_type],16 + je addressing_16bit + address_immediate_32bit: + call address_32bit_prefix + call store_instruction_code + store_immediate_address: + mov al,101b + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos byte [edi] + store_address_32bit_value: + test ch,0F0h + jz address_32bit_relocation_ok + mov eax,ecx + shr eax,16 + cmp al,4 + jne address_32bit_relocation + mov al,2 + address_32bit_relocation: + xchg [value_type],al + mov ebx,[address_symbol] + xchg ebx,[symbol_identifier] + call mark_relocation + mov [value_type],al + mov [symbol_identifier],ebx + address_32bit_relocation_ok: + mov eax,edx + stos dword [edi] + ret + store_address_64bit_value: + test ch,0F0h + jz address_64bit_relocation_ok + mov eax,ecx + shr eax,16 + xchg [value_type],al + mov ebx,[address_symbol] + xchg ebx,[symbol_identifier] + call mark_relocation + mov [value_type],al + mov [symbol_identifier],ebx + address_64bit_relocation_ok: + mov eax,edx + stos dword [edi] + mov eax,[address_high] + stos dword [edi] + ret + address_immediate_sib: + test ch,44h + jnz address_immediate_sib_32bit + test ch,not 88h + jnz invalid_address_size + address_immediate_sib_store: + call store_instruction_code + mov al,100b + mov ah,100101b + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos word [edi] + jmp store_address_32bit_value + address_immediate_sib_32bit: + test ecx,0FF0000h + jnz address_immediate_sib_nosignextend + test edx,80000000h + jz address_immediate_sib_store + address_immediate_sib_nosignextend: + call address_32bit_prefix + jmp address_immediate_sib_store + address_eip_based: + mov al,67h + stos byte [edi] + address_rip_based: + cmp [code_type],64 + jne invalid_address + call store_instruction_code + jmp store_immediate_address + address_relative: + call store_instruction_code + movzx eax,[immediate_size] + add eax,edi + sub eax,[current_offset] + add eax,5 + sub edx,eax + jo value_out_of_range + mov al,101b + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos byte [edi] + shr ecx,16 + xchg [value_type],cl + mov ebx,[address_symbol] + xchg ebx,[symbol_identifier] + mov eax,edx + call mark_relocation + mov [value_type],cl + mov [symbol_identifier],ebx + stos dword [edi] + ret + addressing_16bit: + cmp edx,10000h + jge address_immediate_32bit + cmp edx,-8000h + jl address_immediate_32bit + movzx edx,dx + address_immediate_16bit: + call address_16bit_prefix + call store_instruction_code + mov al,110b + mov cl,[postbyte_register] + shl cl,3 + or al,cl + stos byte [edi] + mov eax,edx + stos word [edi] + cmp edx,10000h + jge value_out_of_range + cmp edx,-8000h + jl value_out_of_range + ret + address_16bit_prefix: + cmp [code_type],16 + je instruction_prefix_ok + mov al,67h + stos byte [edi] + ret + address_32bit_prefix: + cmp [code_type],32 + je instruction_prefix_ok + mov al,67h + stos byte [edi] + instruction_prefix_ok: + ret +store_instruction_with_imm8: + mov [immediate_size],1 + call store_instruction + mov al,byte [value] + stos byte [edi] + ret +store_instruction_with_imm16: + mov [immediate_size],2 + call store_instruction + mov ax,word [value] + call mark_relocation + stos word [edi] + ret +store_instruction_with_imm32: + mov [immediate_size],4 + call store_instruction + mov eax,dword [value] + call mark_relocation + stos dword [edi] + ret diff --git a/samples/BlitzBasic/HalfAndDouble.bb b/samples/BlitzBasic/HalfAndDouble.bb new file mode 100644 index 00000000..6b8aa0d3 --- /dev/null +++ b/samples/BlitzBasic/HalfAndDouble.bb @@ -0,0 +1,147 @@ + +Local bk = CreateBank(8) +PokeFloat bk, 0, -1 +Print Bin(PeekInt(bk, 0)) +Print %1000000000000000 +Print Bin(1 Shl 31) +Print $1f +Print $ff +Print $1f + (127 - 15) +Print Hex(%01111111100000000000000000000000) +Print Hex(~%11111111100000000000000000000000) + +Print Bin(FloatToHalf(-2.5)) +Print HalfToFloat(FloatToHalf(-200000000000.0)) + +Print Bin(FToI(-2.5)) + +WaitKey +End + + +; Half-precision (16-bit) arithmetic library +;============================================ + +Global Half_CBank_ + +Function FToI(f#) + If Half_CBank_ = 0 Then Half_CBank_ = CreateBank(4) + PokeFloat Half_CBank_, 0, f + Return PeekInt(Half_CBank_, 0) +End Function + +Function HalfToFloat#(h) + Local signBit, exponent, fraction, fBits + + signBit = (h And 32768) <> 0 + exponent = (h And %0111110000000000) Shr 10 + fraction = (h And %0000001111111111) + + If exponent = $1F Then exponent = $FF : ElseIf exponent Then exponent = (exponent - 15) + 127 + fBits = (signBit Shl 31) Or (exponent Shl 23) Or (fraction Shl 13) + + If Half_CBank_ = 0 Then Half_CBank_ = CreateBank(4) + PokeInt Half_CBank_, 0, fBits + Return PeekFloat(Half_CBank_, 0) +End Function + +Function FloatToHalf(f#) + Local signBit, exponent, fraction, fBits + + If Half_CBank_ = 0 Then Half_CBank_ = CreateBank(4) + PokeFloat Half_CBank_, 0, f + fBits = PeekInt(Half_CBank_, 0) + + signBit = (fBits And (1 Shl 31)) <> 0 + exponent = (fBits And $7F800000) Shr 23 + fraction = fBits And $007FFFFF + + If exponent + exponent = exponent - 127 + If Abs(exponent) > $1F + If exponent <> ($FF - 127) Then fraction = 0 + exponent = $1F * Sgn(exponent) + Else + exponent = exponent + 15 + EndIf + exponent = exponent And %11111 + EndIf + fraction = fraction Shr 13 + + Return (signBit Shl 15) Or (exponent Shl 10) Or fraction +End Function + +Function HalfAdd(l, r) + +End Function + +Function HalfSub(l, r) + +End Function + +Function HalfMul(l, r) + +End Function + +Function HalfDiv(l, r) + +End Function + +Function HalfLT(l, r) + +End Function + +Function HalfGT(l, r) + +End Function + + +; Double-precision (64-bit) arithmetic library) +;=============================================== + +Global DoubleOut[1], Double_CBank_ + +Function DoubleToFloat#(d[1]) + +End Function + +Function FloatToDouble(f#) + +End Function + +Function IntToDouble(i) + +End Function + +Function SefToDouble(s, e, f) + +End Function + +Function DoubleAdd(l, r) + +End Function + +Function DoubleSub(l, r) + +End Function + +Function DoubleMul(l, r) + +End Function + +Function DoubleDiv(l, r) + +End Function + +Function DoubleLT(l, r) + +End Function + +Function DoubleGT(l, r) + +End Function + + +;~IDEal Editor Parameters: +;~F#1A#20#2F +;~C#Blitz3D \ No newline at end of file diff --git a/samples/BlitzBasic/LList.bb b/samples/BlitzBasic/LList.bb new file mode 100644 index 00000000..49bf4eaa --- /dev/null +++ b/samples/BlitzBasic/LList.bb @@ -0,0 +1,369 @@ + +; Double-linked list container class +;==================================== + +; with thanks to MusicianKool, for concept and issue fixes + + +Type LList + Field head_.ListNode + Field tail_.ListNode +End Type + +Type ListNode + Field pv_.ListNode + Field nx_.ListNode + Field Value +End Type + +Type Iterator + Field Value + Field l_.LList + Field cn_.ListNode, cni_ +End Type + + +;Create a new LList object +Function CreateList.LList() + Local l.LList = New LList + + l\head_ = New ListNode + l\tail_ = New ListNode + + l\head_\nx_ = l\tail_ ;End caps + l\head_\pv_ = l\head_ ;These make it more or less safe to iterate freely + l\head_\Value = 0 + + l\tail_\nx_ = l\tail_ + l\tail_\pv_ = l\head_ + l\tail_\Value = 0 + + Return l +End Function + +;Free a list and all elements (not any values) +Function FreeList(l.LList) + ClearList l + Delete l\head_ + Delete l\tail_ + Delete l +End Function + +;Remove all the elements from a list (does not free values) +Function ClearList(l.LList) + Local n.ListNode = l\head_\nx_ + While n <> l\tail_ + Local nx.ListNode = n\nx_ + Delete n + n = nx + Wend + l\head_\nx_ = l\tail_ + l\tail_\pv_ = l\head_ +End Function + +;Count the number of elements in a list (slow) +Function ListLength(l.LList) + Local i.Iterator = GetIterator(l), elems + While EachIn(i) + elems = elems + 1 + Wend + Return elems +End Function + +;Return True if a list contains a given value +Function ListContains(l.LList, Value) + Return (ListFindNode(l, Value) <> Null) +End Function + +;Create a linked list from the intvalues in a bank (slow) +Function ListFromBank.LList(bank) + Local l.LList = CreateList() + Local size = BankSize(bank), p + + For p = 0 To size - 4 Step 4 + ListAddLast l, PeekInt(bank, p) + Next + + Return l +End Function + +;Create a bank containing all the values in a list (slow) +Function ListToBank(l.LList) + Local size = ListLength(l) * 4 + Local bank = CreateBank(size) + + Local i.Iterator = GetIterator(l), p = 0 + While EachIn(i) + PokeInt bank, p, i\Value + p = p + 4 + Wend + + Return bank +End Function + +;Swap the contents of two list objects +Function SwapLists(l1.LList, l2.LList) + Local tempH.ListNode = l1\head_, tempT.ListNode = l1\tail_ + l1\head_ = l2\head_ + l1\tail_ = l2\tail_ + l2\head_ = tempH + l2\tail_ = tempT +End Function + +;Create a new list containing the same values as the first +Function CopyList.LList(lo.LList) + Local ln.LList = CreateList() + Local i.Iterator = GetIterator(lo) : While EachIn(i) + ListAddLast ln, i\Value + Wend + Return ln +End Function + +;Reverse the order of elements of a list +Function ReverseList(l.LList) + Local n1.ListNode, n2.ListNode, tmp.ListNode + + n1 = l\head_ + n2 = l\head_\nx_ + + While n1 <> l\tail_ + n1\pv_ = n2 + tmp = n2\nx_ + n2\nx_ = n1 + n1 = n2 + n2 = tmp + Wend + + tmp = l\head_ + l\head_ = l\tail_ + l\tail_ = tmp + + l\head_\pv_ = l\head_ + l\tail_\nx_ = l\tail_ +End Function + +;Search a list to retrieve the first node with the given value +Function ListFindNode.ListNode(l.LList, Value) + Local n.ListNode = l\head_\nx_ + + While n <> l\tail_ + If n\Value = Value Then Return n + n = n\nx_ + Wend + + Return Null +End Function + +;Append a value to the end of a list (fast) and return the node +Function ListAddLast.ListNode(l.LList, Value) + Local n.ListNode = New ListNode + + n\pv_ = l\tail_\pv_ + n\nx_ = l\tail_ + n\Value = Value + + l\tail_\pv_ = n + n\pv_\nx_ = n + + Return n +End Function + +;Attach a value to the start of a list (fast) and return the node +Function ListAddFirst.ListNode(l.LList, Value) + Local n.ListNode = New ListNode + + n\pv_ = l\head_ + n\nx_ = l\head_\nx_ + n\Value = Value + + l\head_\nx_ = n + n\nx_\pv_ = n + + Return n +End Function + +;Remove the first occurence of the given value from a list +Function ListRemove(l.LList, Value) + Local n.ListNode = ListFindNode(l, Value) + If n <> Null Then RemoveListNode n +End Function + +;Remove a node from a list +Function RemoveListNode(n.ListNode) + n\pv_\nx_ = n\nx_ + n\nx_\pv_ = n\pv_ + Delete n +End Function + +;Return the value of the element at the given position from the start of the list, +;or backwards from the end of the list for a negative index +Function ValueAtIndex(l.LList, index) + Local n.ListNode = ListNodeAtIndex(l, index) + If n <> Null Then Return n\Value : Else Return 0 +End Function + +;Return the ListNode at the given position from the start of the list, or backwards +;from the end of the list for a negative index, or Null if invalid +Function ListNodeAtIndex.ListNode(l.LList, index) + Local e, n.ListNode + + If index >= 0 + n = l\head_ + For e = 0 To index + n = n\nx_ + Next + If n = l\tail_ Then n = Null ;Beyond the end of the list - not valid + + Else ;Negative index - count backward + n = l\tail_ + For e = 0 To index Step -1 + n = n\pv_ + Next + If n = l\head_ Then n = Null ;Before the start of the list - not valid + + EndIf + + Return n +End Function + +;Replace a value at the given position (added by MusicianKool) +Function ReplaceValueAtIndex(l.LList,index,value) + Local n.ListNode = ListNodeAtIndex(l,index) + If n <> Null Then n\Value = value:Else Return 0 +End Function + +;Remove and return a value at the given position (added by MusicianKool) +Function RemoveNodeAtIndex(l.LList,index) + Local n.ListNode = ListNodeAtIndex(l,index),tval + If n <> Null Then tval = n\Value:RemoveListNode(n):Return tval:Else Return 0 +End Function + +;Retrieve the first value from a list +Function ListFirst(l.LList) + If l\head_\nx_ <> l\tail_ Then Return l\head_\nx_\Value +End Function + +;Retrieve the last value from a list +Function ListLast(l.LList) + If l\tail_\pv_ <> l\head_ Then Return l\tail_\pv_\Value +End Function + +;Remove the first element from a list, and return its value +Function ListRemoveFirst(l.LList) + Local val + If l\head_\nx_ <> l\tail_ + val = l\head_\nx_\Value + RemoveListNode l\head_\nx_ + EndIf + Return val +End Function + +;Remove the last element from a list, and return its value +Function ListRemoveLast(l.LList) + Local val + If l\tail_\pv_ <> l\head_ + val = l\tail_\pv_\Value + RemoveListNode l\tail_\pv_ + EndIf + Return val +End Function + +;Insert a value into a list before the specified node, and return the new node +Function InsertBeforeNode.ListNode(Value, n.ListNode) + Local bef.ListNode = New ListNode + + bef\pv_ = n\pv_ + bef\nx_ = n + bef\Value = Value + + n\pv_ = bef + bef\pv_\nx_ = bef + + Return bef +End Function + +;Insert a value into a list after the specified node, and return then new node +Function InsertAfterNode.ListNode(Value, n.ListNode) + Local aft.ListNode = New ListNode + + aft\nx_ = n\nx_ + aft\pv_ = n + aft\Value = Value + + n\nx_ = aft + aft\nx_\pv_ = aft + + Return aft +End Function + +;Get an iterator object to use with a loop +;This function means that most programs won't have to think about deleting iterators manually +;(in general only a small, constant number will be created) +Function GetIterator.Iterator(l.LList) + Local i.Iterator + + If l = Null Then RuntimeError "Cannot create Iterator for Null" + + For i = Each Iterator ;See if there's an available iterator at the moment + If i\l_ = Null Then Exit + Next + + If i = Null Then i = New Iterator ;If there wasn't, create one + + i\l_ = l + i\cn_ = l\head_ + i\cni_ = -1 + i\Value = 0 ;No especial reason why this has to be anything, but meh + + Return i +End Function + +;Use as the argument to While to iterate over the members of a list +Function EachIn(i.Iterator) + + i\cn_ = i\cn_\nx_ + + If i\cn_ <> i\l_\tail_ ;Still items in the list + i\Value = i\cn_\Value + i\cni_ = i\cni_ + 1 + Return True + + Else + i\l_ = Null ;Disconnect from the list, having reached the end + i\cn_ = Null + i\cni_ = -1 + Return False + + EndIf +End Function + +;Remove from the containing list the element currently pointed to by an iterator +Function IteratorRemove(i.Iterator) + If (i\cn_ <> i\l_\head_) And (i\cn_ <> i\l_\tail_) + Local temp.ListNode = i\cn_ + + i\cn_ = i\cn_\pv_ + i\cni_ = i\cni_ - 1 + i\Value = 0 + + RemoveListNode temp + + Return True + Else + Return False + EndIf +End Function + +;Call this before breaking out of an EachIn loop, to disconnect the iterator from the list +Function IteratorBreak(i.Iterator) + i\l_ = Null + i\cn_ = Null + i\cni_ = -1 + i\Value = 0 +End Function + + +;~IDEal Editor Parameters: +;~F#5#A#10#18#2A#32#3E#47#4C#58#66#6F#78#8F#9B#A9#B7#BD#C5#CC +;~F#E3#E9#EF#F4#F9#103#10D#11B#12B#13F#152#163 +;~C#Blitz3D \ No newline at end of file diff --git a/samples/BlitzBasic/PObj.bb b/samples/BlitzBasic/PObj.bb new file mode 100644 index 00000000..2989f98e --- /dev/null +++ b/samples/BlitzBasic/PObj.bb @@ -0,0 +1,66 @@ + +Local i, start, result + +Local s.Sum3Obj = New Sum3Obj + +For i = 1 To 100000 + s = New Sum3Obj + result = Handle Before s + Delete s +Next + +start = MilliSecs() +For i = 1 To 1000000 + result = Sum3_(MakeSum3Obj(i, i, i)) +Next +start = MilliSecs() - start +Print start + +start = MilliSecs() +For i = 1 To 1000000 + result = Sum3(i, i, i) +Next +start = MilliSecs() - start +Print start + +WaitKey +End + + +Function Sum3(a, b, c) + Return a + b + c +End Function + + +Type Sum3Obj + Field isActive + Field a, b, c +End Type + +Function MakeSum3Obj(a, b, c) + Local s.Sum3Obj = Last Sum3Obj + If s\isActive Then s = New Sum3Obj + s\isActive = True + s\a = a + s\b = b + s\c = c + + Restore label + Read foo + + Return Handle(s) +End Function + +.label +Data (10 + 2), 12, 14 +: +Function Sum3_(a_) + Local a.Sum3Obj = Object.Sum3Obj a_ + Local return_ = a\a + a\b + a\c + Insert a Before First Sum3Obj :: a\isActive = False + Return return_ +End Function + + +;~IDEal Editor Parameters: +;~C#Blitz3D \ No newline at end of file diff --git a/samples/Bluespec/TL.bsv b/samples/Bluespec/TL.bsv new file mode 100644 index 00000000..2d6af5c1 --- /dev/null +++ b/samples/Bluespec/TL.bsv @@ -0,0 +1,167 @@ +package TL; + +interface TL; + method Action ped_button_push(); + + (* always_enabled *) + method Action set_car_state_N(Bool x); + (* always_enabled *) + method Action set_car_state_S(Bool x); + (* always_enabled *) + method Action set_car_state_E(Bool x); + (* always_enabled *) + method Action set_car_state_W(Bool x); + + method Bool lampRedNS(); + method Bool lampAmberNS(); + method Bool lampGreenNS(); + + method Bool lampRedE(); + method Bool lampAmberE(); + method Bool lampGreenE(); + + method Bool lampRedW(); + method Bool lampAmberW(); + method Bool lampGreenW(); + + method Bool lampRedPed(); + method Bool lampAmberPed(); + method Bool lampGreenPed(); +endinterface: TL + +typedef enum { + AllRed, + GreenNS, AmberNS, + GreenE, AmberE, + GreenW, AmberW, + GreenPed, AmberPed} TLstates deriving (Eq, Bits); + +typedef UInt#(5) Time32; +typedef UInt#(20) CtrSize; + +(* synthesize *) +module sysTL(TL); + Time32 allRedDelay = 2; + Time32 amberDelay = 4; + Time32 nsGreenDelay = 20; + Time32 ewGreenDelay = 10; + Time32 pedGreenDelay = 10; + Time32 pedAmberDelay = 6; + + CtrSize clocks_per_sec = 100; + + Reg#(TLstates) state <- mkReg(AllRed); + Reg#(TLstates) next_green <- mkReg(GreenNS); + Reg#(Time32) secs <- mkReg(0); + Reg#(Bool) ped_button_pushed <- mkReg(False); + Reg#(Bool) car_present_N <- mkReg(True); + Reg#(Bool) car_present_S <- mkReg(True); + Reg#(Bool) car_present_E <- mkReg(True); + Reg#(Bool) car_present_W <- mkReg(True); + Bool car_present_NS = car_present_N || car_present_S; + Reg#(CtrSize) cycle_ctr <- mkReg(0); + + rule dec_cycle_ctr (cycle_ctr != 0); + cycle_ctr <= cycle_ctr - 1; + endrule + + Rules low_priority_rule = (rules + rule inc_sec (cycle_ctr == 0); + secs <= secs + 1; + cycle_ctr <= clocks_per_sec; + endrule endrules); + + function Action next_state(TLstates ns); + action + state <= ns; + secs <= 0; + endaction + endfunction: next_state + + function TLstates green_seq(TLstates x); + case (x) + GreenNS: return (GreenE); + GreenE: return (GreenW); + GreenW: return (GreenNS); + endcase + endfunction + + function Bool car_present(TLstates x); + case (x) + GreenNS: return (car_present_NS); + GreenE: return (car_present_E); + GreenW: return (car_present_W); + endcase + endfunction + + function Rules make_from_green_rule(TLstates green_state, Time32 delay, Bool car_is_present, TLstates ns); + return (rules + rule from_green (state == green_state && (secs >= delay || !car_is_present)); + next_state(ns); + endrule endrules); + endfunction: make_from_green_rule + + function Rules make_from_amber_rule(TLstates amber_state, TLstates ng); + return (rules + rule from_amber (state == amber_state && secs >= amberDelay); + next_state(AllRed); + next_green <= ng; + endrule endrules); + endfunction: make_from_amber_rule + + Rules hprs[7]; + + hprs[1] = make_from_green_rule(GreenNS, nsGreenDelay, car_present_NS, AmberNS); + hprs[2] = make_from_amber_rule(AmberNS, GreenE); + hprs[3] = make_from_green_rule(GreenE, ewGreenDelay, car_present_E, AmberE); + hprs[4] = make_from_amber_rule(AmberE, GreenW); + hprs[5] = make_from_green_rule(GreenW, ewGreenDelay, car_present_W, AmberW); + hprs[6] = make_from_amber_rule(AmberW, GreenNS); + + hprs[0] = (rules + rule fromAllRed (state == AllRed && secs >= allRedDelay); + if (ped_button_pushed) action + ped_button_pushed <= False; + next_state(GreenPed); + endaction else if (car_present(next_green)) + next_state(next_green); + else if (car_present(green_seq(next_green))) + next_state(green_seq(next_green)); + else if (car_present(green_seq(green_seq(next_green)))) + next_state(green_seq(green_seq(next_green))); + else + noAction; + endrule: fromAllRed endrules); + + Rules high_priority_rules = hprs[0]; + for (Integer i = 1; i<7; i=i+1) + high_priority_rules = rJoin(hprs[i], high_priority_rules); + + addRules(preempts(high_priority_rules, low_priority_rule)); + + method Action ped_button_push(); + ped_button_pushed <= True; + endmethod: ped_button_push + + method Action set_car_state_N(b) ; car_present_N <= b; endmethod + method Action set_car_state_S(b) ; car_present_S <= b; endmethod + method Action set_car_state_E(b) ; car_present_E <= b; endmethod + method Action set_car_state_W(b) ; car_present_W <= b; endmethod + + method lampRedNS() = (!(state == GreenNS || state == AmberNS)); + method lampAmberNS() = (state == AmberNS); + method lampGreenNS() = (state == GreenNS); + method lampRedE() = (!(state == GreenE || state == AmberE)); + method lampAmberE() = (state == AmberE); + method lampGreenE() = (state == GreenE); + method lampRedW() = (!(state == GreenW || state == AmberW)); + method lampAmberW() = (state == AmberW); + method lampGreenW() = (state == GreenW); + + method lampRedPed() = (!(state == GreenPed || state == AmberPed)); + method lampAmberPed() = (state == AmberPed); + method lampGreenPed() = (state == GreenPed); + +endmodule: sysTL + +endpackage: TL diff --git a/samples/Bluespec/TbTL.bsv b/samples/Bluespec/TbTL.bsv new file mode 100644 index 00000000..d5dbabf0 --- /dev/null +++ b/samples/Bluespec/TbTL.bsv @@ -0,0 +1,109 @@ +package TbTL; + +import TL::*; + +interface Lamp; + method Bool changed; + method Action show_offs; + method Action show_ons; + method Action reset; +endinterface + +module mkLamp#(String name, Bool lamp)(Lamp); + Reg#(Bool) prev <- mkReg(False); + + method changed = (prev != lamp); + + method Action show_offs; + if (prev && !lamp) + $write (name + " off, "); + endmethod + + method Action show_ons; + if (!prev && lamp) + $write (name + " on, "); + endmethod + + method Action reset; + prev <= lamp; + endmethod +endmodule + + +(* synthesize *) +module mkTest(); + let dut <- sysTL; + + Reg#(Bit#(16)) ctr <- mkReg(0); + + Reg#(Bool) carN <- mkReg(False); + Reg#(Bool) carS <- mkReg(False); + Reg#(Bool) carE <- mkReg(False); + Reg#(Bool) carW <- mkReg(False); + + Lamp lamps[12]; + + lamps[0] <- mkLamp("0: NS red ", dut.lampRedNS); + lamps[1] <- mkLamp("1: NS amber", dut.lampAmberNS); + lamps[2] <- mkLamp("2: NS green", dut.lampGreenNS); + lamps[3] <- mkLamp("3: E red ", dut.lampRedE); + lamps[4] <- mkLamp("4: E amber", dut.lampAmberE); + lamps[5] <- mkLamp("5: E green", dut.lampGreenE); + lamps[6] <- mkLamp("6: W red ", dut.lampRedW); + lamps[7] <- mkLamp("7: W amber", dut.lampAmberW); + lamps[8] <- mkLamp("8: W green", dut.lampGreenW); + + lamps[9] <- mkLamp("9: Ped red ", dut.lampRedPed); + lamps[10] <- mkLamp("10: Ped amber", dut.lampAmberPed); + lamps[11] <- mkLamp("11: Ped green", dut.lampGreenPed); + + rule start (ctr == 0); + $dumpvars; + endrule + + rule detect_cars; + dut.set_car_state_N(carN); + dut.set_car_state_S(carS); + dut.set_car_state_E(carE); + dut.set_car_state_W(carW); + endrule + + rule go; + ctr <= ctr + 1; + if (ctr == 5000) carN <= True; + if (ctr == 6500) carN <= False; + if (ctr == 12_000) dut.ped_button_push; + endrule + + rule stop (ctr > 32768); + $display("TESTS FINISHED"); + $finish(0); + endrule + + function do_offs(l) = l.show_offs; + function do_ons(l) = l.show_ons; + function do_reset(l) = l.reset; + + function do_it(f); + action + for (Integer i=0; i<12; i=i+1) + f(lamps[i]); + endaction + endfunction + + function any_changes(); + Bool b = False; + for (Integer i=0; i<12; i=i+1) + b = b || lamps[i].changed; + return b; + endfunction + + rule show (any_changes()); + do_it(do_offs); + do_it(do_ons); + do_it(do_reset); + $display("(at time %d)", $time); + endrule +endmodule + +endpackage diff --git a/samples/Brightscript/SimpleGrid.brs b/samples/Brightscript/SimpleGrid.brs new file mode 100644 index 00000000..b205d69a --- /dev/null +++ b/samples/Brightscript/SimpleGrid.brs @@ -0,0 +1,305 @@ +' ********************************************************* +' ** Simple Grid Screen Demonstration App +' ** Jun 2010 +' ** Copyright (c) 2010 Roku Inc. All Rights Reserved. +' ********************************************************* + +'************************************************************ +'** Application startup +'************************************************************ +Sub Main() + + 'initialize theme attributes like titles, logos and overhang color + initTheme() + + gridstyle = "Flat-Movie" + + 'set to go, time to get started + while gridstyle <> "" + print "starting grid style= ";gridstyle + screen=preShowGridScreen(gridstyle) + gridstyle = showGridScreen(screen, gridstyle) + end while + +End Sub + + +'************************************************************* +'** Set the configurable theme attributes for the application +'** +'** Configure the custom overhang and Logo attributes +'** These attributes affect the branding of the application +'** and are artwork, colors and offsets specific to the app +'************************************************************* + +Sub initTheme() + app = CreateObject("roAppManager") + app.SetTheme(CreateDefaultTheme()) +End Sub + +'****************************************************** +'** @return The default application theme. +'** Screens can make slight adjustments to the default +'** theme by getting it from here and then overriding +'** individual theme attributes. +'****************************************************** +Function CreateDefaultTheme() as Object + theme = CreateObject("roAssociativeArray") + + theme.ThemeType = "generic-dark" + + ' All these are greyscales + theme.GridScreenBackgroundColor = "#363636" + theme.GridScreenMessageColor = "#808080" + theme.GridScreenRetrievingColor = "#CCCCCC" + theme.GridScreenListNameColor = "#FFFFFF" + + ' Color values work here + theme.GridScreenDescriptionTitleColor = "#001090" + theme.GridScreenDescriptionDateColor = "#FF005B" + theme.GridScreenDescriptionRuntimeColor = "#5B005B" + theme.GridScreenDescriptionSynopsisColor = "#606000" + + 'used in the Grid Screen + theme.CounterTextLeft = "#FF0000" + theme.CounterSeparator = "#00FF00" + theme.CounterTextRight = "#0000FF" + + theme.GridScreenLogoHD = "pkg:/images/Overhang_Test_HD.png" + + theme.GridScreenLogoOffsetHD_X = "0" + theme.GridScreenLogoOffsetHD_Y = "0" + theme.GridScreenOverhangHeightHD = "99" + + theme.GridScreenLogoSD = "pkg:/images/Overhang_Test_SD43.png" + theme.GridScreenOverhangHeightSD = "66" + theme.GridScreenLogoOffsetSD_X = "0" + theme.GridScreenLogoOffsetSD_Y = "0" + + ' to use your own focus ring artwork + 'theme.GridScreenFocusBorderSD = "pkg:/images/GridCenter_Border_Movies_SD43.png" + 'theme.GridScreenBorderOffsetSD = "(-26,-25)" + 'theme.GridScreenFocusBorderHD = "pkg:/images/GridCenter_Border_Movies_HD.png" + 'theme.GridScreenBorderOffsetHD = "(-28,-20)" + + ' to use your own description background artwork + 'theme.GridScreenDescriptionImageSD = "pkg:/images/Grid_Description_Background_SD43.png" + 'theme.GridScreenDescriptionOffsetSD = "(125,170)" + 'theme.GridScreenDescriptionImageHD = "pkg:/images/Grid_Description_Background_HD.png" + 'theme.GridScreenDescriptionOffsetHD = "(190,255)" + + + return theme +End Function + +'****************************************************** +'** Perform any startup/initialization stuff prior to +'** initially showing the screen. +'****************************************************** +Function preShowGridScreen(style as string) As Object + + m.port=CreateObject("roMessagePort") + screen = CreateObject("roGridScreen") + screen.SetMessagePort(m.port) +' screen.SetDisplayMode("best-fit") + screen.SetDisplayMode("scale-to-fill") + + screen.SetGridStyle(style) + return screen + +End Function + + +'****************************************************** +'** Display the gird screen and wait for events from +'** the screen. The screen will show retreiving while +'** we fetch and parse the feeds for the show posters +'****************************************************** +Function showGridScreen(screen As Object, gridstyle as string) As string + + print "enter showGridScreen" + + categoryList = getCategoryList() + categoryList[0] = "GridStyle: " + gridstyle + screen.setupLists(categoryList.count()) + screen.SetListNames(categoryList) + StyleButtons = getGridControlButtons() + screen.SetContentList(0, StyleButtons) + for i = 1 to categoryList.count()-1 + screen.SetContentList(i, getShowsForCategoryItem(categoryList[i])) + end for + screen.Show() + + while true + print "Waiting for message" + msg = wait(0, m.port) + 'msg = wait(0, screen.GetMessagePort()) ' getmessageport does not work on gridscreen + print "Got Message:";type(msg) + if type(msg) = "roGridScreenEvent" then + print "msg= "; msg.GetMessage() " , index= "; msg.GetIndex(); " data= "; msg.getData() + if msg.isListItemFocused() then + print"list item focused | current show = "; msg.GetIndex() + else if msg.isListItemSelected() then + row = msg.GetIndex() + selection = msg.getData() + print "list item selected row= "; row; " selection= "; selection + + ' Did we get a selection from the gridstyle selection row? + if (row = 0) + ' yes, return so we can come back with new style + return StyleButtons[selection].Title + endif + + 'm.curShow = displayShowDetailScreen(showList[msg.GetIndex()]) + else if msg.isScreenClosed() then + return "" + end if + end If + end while + + +End Function + +'********************************************************** +'** When a poster on the home screen is selected, we call +'** this function passing an roAssociativeArray with the +'** ContentMetaData for the selected show. This data should +'** be sufficient for the springboard to display +'********************************************************** +Function displayShowDetailScreen(category as Object, showIndex as Integer) As Integer + + 'add code to create springboard, for now we do nothing + return 1 + +End Function + + +'************************************************************** +'** Return the list of categories to display in the filter +'** banner. The result is an roArray containing the names of +'** all of the categories. All just static data for the example. +'*************************************************************** +Function getCategoryList() As Object + + categoryList = [ "GridStyle", "Reality", "History", "News", "Comedy", "Drama"] + return categoryList + +End Function + + +'******************************************************************** +'** Given the category from the filter banner, return an array +'** of ContentMetaData objects (roAssociativeArray's) representing +'** the shows for the category. For this example, we just cheat and +'** create and return a static array with just the minimal items +'** set, but ideally, you'd go to a feed service, fetch and parse +'** this data dynamically, so content for each category is dynamic +'******************************************************************** +Function getShowsForCategoryItem(category As Object) As Object + + print "getting shows for category "; category + + showList = [ + { + Title: category + ": Header", + releaseDate: "1976", + length: 3600-600, + Description:"This row is category " + category, + hdBranded: true, + HDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/4/43/Gold_star_on_blue.gif", + SDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/4/43/Gold_star_on_blue.gif", + Description:"Short Synopsis #1", + Synopsis:"Length", + StarRating:10, + } + { + Title: category + ": Beverly Hillbillies", + releaseDate: "1969", + rating: "PG", + Description:"Come and listen to a story about a man named Jed: Poor mountaineer, barely kept his family fed. Then one day he was shootin at some food, and up through the ground came a bubblin crude. Oil that is, black gold, Texas tea.", + numEpisodes:42, + contentType:"season", + HDPosterUrl:"http://upload.wikimedia.org/wikipedia/en/4/4e/The_Beverly_Hillbillies.jpg", + SDPosterUrl:"http://upload.wikimedia.org/wikipedia/en/4/4e/The_Beverly_Hillbillies.jpg", + StarRating:80, + UserStarRating:40 + } + { + Title: category + ": Babylon 5", + releaseDate: "1996", + rating: "PG", + Description:"The show centers on the Babylon 5 space station: a focal point for politics, diplomacy, and conflict during the years 2257-2262.", + numEpisodes:102, + contentType:"season", + HDPosterUrl:"http://upload.wikimedia.org/wikipedia/en/9/9d/Smb5-s4.jpg", + SDPosterUrl:"http://upload.wikimedia.org/wikipedia/en/9/9d/Smb5-s4.jpg", + StarRating:80, + UserStarRating:40 + } + { + Title: category + ": John F. Kennedy", + releaseDate: "1961", + rating: "PG", + Description:"My fellow citizens of the world: ask not what America will do for you, but what together we can do for the freedom of man.", + HDPosterUrl:"http://upload.wikimedia.org/wikipedia/en/5/52/Jfk_happy_birthday_1.jpg", + SDPosterUrl:"http://upload.wikimedia.org/wikipedia/en/5/52/Jfk_happy_birthday_1.jpg", + StarRating:100 + } + { + Title: category + ": Man on the Moon", + releaseDate: "1969", + rating: "PG", + Description:"That's one small step for a man, one giant leap for mankind.", + HDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/1/1e/Apollo_11_first_step.jpg", + SDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/1/1e/Apollo_11_first_step.jpg", + StarRating:100 + } + { + Title: category + ": I have a Dream", + releaseDate: "1963", + rating: "PG", + Description:"I have a dream that my four little children will one day live in a nation where they will not be judged by the color of their skin, but by the content of their character.", + HDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/8/81/Martin_Luther_King_-_March_on_Washington.jpg", + SDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/8/81/Martin_Luther_King_-_March_on_Washington.jpg", + StarRating:100 + } + ] + + return showList +End Function + +function getGridControlButtons() as object + buttons = [ + { Title: "Flat-Movie" + ReleaseDate: "HD:5x2 SD:5x2" + Description: "Flat-Movie (Netflix) style" + HDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/4/43/Gold_star_on_blue.gif" + SDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/4/43/Gold_star_on_blue.gif" + } + { Title: "Flat-Landscape" + ReleaseDate: "HD:5x3 SD:4x3" + Description: "Channel Store" + HDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/thumb/9/96/Dunkery_Hill.jpg/800px-Dunkery_Hill.jpg", + SDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/thumb/9/96/Dunkery_Hill.jpg/800px-Dunkery_Hill.jpg", + } + { Title: "Flat-Portrait" + ReleaseDate: "HD:5x2 SD:5x2" + Description: "3x4 style posters" + HDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/9/9f/Kane_George_Gurnett.jpg", + SDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/9/9f/Kane_George_Gurnett.jpg", + } + { Title: "Flat-Square" + ReleaseDate: "HD:7x3 SD:6x3" + Description: "1x1 style posters" + HDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/thumb/d/de/SQUARE_SHAPE.svg/536px-SQUARE_SHAPE.svg.png", + SDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/thumb/d/de/SQUARE_SHAPE.svg/536px-SQUARE_SHAPE.svg.png", + } + { Title: "Flat-16x9" + ReleaseDate: "HD:5x3 SD:4x3" + Description: "HD style posters" + HDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/thumb/2/22/%C3%89cran_TV_plat.svg/200px-%C3%89cran_TV_plat.svg.png", + SDPosterUrl:"http://upload.wikimedia.org/wikipedia/commons/thumb/2/22/%C3%89cran_TV_plat.svg/200px-%C3%89cran_TV_plat.svg.png", + } + ] + return buttons +End Function diff --git a/samples/C#/Index.cshtml b/samples/C#/Index.cshtml new file mode 100644 index 00000000..f7aa29c6 --- /dev/null +++ b/samples/C#/Index.cshtml @@ -0,0 +1,45 @@ +@{ + ViewBag.Title = "Home Page"; +} +@section featured { + +} +

We suggest the following:

+
    +
  1. +
    Getting Started
    + ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that + enables a clean separation of concerns and that gives you full control over markup + for enjoyable, agile development. ASP.NET MVC includes many features that enable + fast, TDD-friendly development for creating sophisticated applications that use + the latest web standards. + Learn more… +
  2. + +
  3. +
    Add NuGet packages and jump-start your coding
    + NuGet makes it easy to install and update free libraries and tools. + Learn more… +
  4. + +
  5. +
    Find Web Hosting
    + You can easily find a web hosting company that offers the right mix of features + and price for your applications. + Learn more… +
  6. +
diff --git a/samples/C#/Program.cs b/samples/C#/Program.cs new file mode 100644 index 00000000..20e24850 --- /dev/null +++ b/samples/C#/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LittleSampleApp +{ + /// + /// Just what it says on the tin. A little sample application for Linguist to try out. + /// + /// + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello, I am a little sample application to test GitHub's Linguist module."); + Console.WriteLine("I also include a Razor MVC file just to prove it handles cshtml files now."); + } + } +} diff --git a/samples/C++/CsvStreamer.h b/samples/C++/CsvStreamer.h new file mode 100644 index 00000000..b15e648d --- /dev/null +++ b/samples/C++/CsvStreamer.h @@ -0,0 +1,42 @@ +#pragma once +#include +#include +#include +#include "util.h" + +using namespace std; + + +#define DEFAULT_DELIMITER ',' + + +class CsvStreamer +{ + private: + ofstream file; // File output stream + vector row_buffer; // Buffer which stores a row's data before being flushed/written + int fields; // Number of fields (columns) + long rows; // Number of rows (records) including header row + char delimiter; // Delimiter character; comma by default + string sanitize(string); // Returns a string ready for output into the file + + public: + CsvStreamer(); // Empty CSV streamer... be sure to open the file before writing! + CsvStreamer(string, char); // Same as open(string, char)... + CsvStreamer(string); // Opens an output CSV file given a file path/name + ~CsvStreamer(); // Ensures the output file is closed and saved + void open(string); // Opens an output CSV file given a file path/name (default delimiter) + void open(string, char); // Opens an output CSV file given a file path/name and a delimiting character (default comma) + void add_field(string); // If still on first line, adds a new field to the header row + void save_fields(); // Call this to save the header row; all new writes should be through append() + void append(string); // Appends the current row with this data for the next field; quoted only if needed (leading/trailing spaces are trimmed) + void append(string, bool); // Like append(string) but can specify whether to trim spaces at either end of the data (false to keep spaces) + void append(float); // Appends the current row with this number + void append(double); // Appends the current row with this number + void append(long); // Appends the current row with this number + void append(int); // Appends the current row with this number + void writeln(); // Flushes what was in the row buffer into the file (writes the row) + void close(); // Saves and closes the file + int field_count(); // Gets the number of fields (columns) + long row_count(); // Gets the number of records (rows) -- NOT including the header row +}; diff --git a/samples/C++/Field.h b/samples/C++/Field.h new file mode 100644 index 00000000..201be118 --- /dev/null +++ b/samples/C++/Field.h @@ -0,0 +1,32 @@ +/***************************************************************************** +* Dwarf Mine - The 13-11 Benchmark +* +* Copyright (c) 2013 Bünger, Thomas; Kieschnick, Christian; Kusber, +* Michael; Lohse, Henning; Wuttke, Nikolai; Xylander, Oliver; Yao, Gary; +* Zimmermann, Florian +* +* 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 AUTHORS OR COPYRIGHT HOLDERS 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. +*****************************************************************************/ + +#pragma once + +enum Field { Free, Black, White, Illegal }; + +typedef Field Player; diff --git a/samples/C++/Math.inl b/samples/C++/Math.inl new file mode 100644 index 00000000..194370a3 --- /dev/null +++ b/samples/C++/Math.inl @@ -0,0 +1,530 @@ +/* +=========================================================================== +The Open Game Libraries. +Copyright (C) 2007-2010 Lusito Software + +Author: Santo Pfingsten (TTK-Bandit) +Purpose: Math namespace +----------------------------------------- + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. +=========================================================================== +*/ + +#ifndef __OG_MATH_INL__ +#define __OG_MATH_INL__ + +namespace og { + +/* +============================================================================== + + Math + +============================================================================== +*/ + +/* +================ +Math::Abs +================ +*/ +OG_INLINE int Math::Abs( int i ) { +#if 1 + if ( i & 0x80000000 ) + return 0x80000000 - (i & MASK_SIGNED); + return i; +#else + int y = x >> 31; + return ( ( x ^ y ) - y ); +#endif +} + +/* +================ +Math::Fabs +================ +*/ +OG_INLINE float Math::Fabs( float f ) { +#if 1 + uInt *pf = reinterpret_cast(&f); + *(pf) &= MASK_SIGNED; + return f; +#else + return fabsf( f ); +#endif +} + +/* +================ +Math::Round +================ +*/ +OG_INLINE float Math::Round( float f ) { + return floorf( f + 0.5f ); +} + +/* +================ +Math::Floor +================ +*/ +OG_INLINE float Math::Floor( float f ) { + return floorf( f ); +} + +/* +================ +Math::Ceil +================ +*/ +OG_INLINE float Math::Ceil( float f ) { + return ceilf( f ); +} + +/* +================ +Math::Ftoi + +ok since this is SSE, why should the other ftoi be the faster one ? +and: we might need to add a check for SSE extensions.. +because sse isn't *really* faster (I actually read that GCC does not handle +SSE extensions perfectly. I'll find the link and send it to you when you're online) +================ +*/ +OG_INLINE int Math::Ftoi( float f ) { + //! @todo needs testing + // note: sse function cvttss2si +#if OG_ASM_MSVC + int i; +#if defined(OG_FTOI_USE_SSE) + if( SysInfo::cpu.general.SSE ) { + __asm cvttss2si eax, f + __asm mov i, eax + return i; + } else +#endif + { + __asm fld f + __asm fistp i + //__asm mov eax, i // do we need this ? O_o + } + return i; +#elif OG_ASM_GNU + int i; +#if defined(OG_FTOI_USE_SSE) + if( SysInfo::cpu.general.SSE ) { + __asm__ __volatile__( "cvttss2si %1 \n\t" + : "=m" (i) + : "m" (f) + ); + } else +#endif + { + __asm__ __volatile__( "flds %1 \n\t" + "fistpl %0 \n\t" + : "=m" (i) + : "m" (f) + ); + } + return i; +#else + // we use c++ cast instead of c cast (not sure why id did that) + return static_cast(f); +#endif +} + +/* +================ +Math::FtoiFast +================ +*/ +OG_INLINE int Math::FtoiFast( float f ) { +#if OG_ASM_MSVC + int i; + __asm fld f + __asm fistp i + //__asm mov eax, i // do we need this ? O_o + return i; +#elif OG_ASM_GNU + int i; + __asm__ __volatile__( "flds %1 \n\t" + "fistpl %0 \n\t" + : "=m" (i) + : "m" (f) + ); + return i; +#else + // we use c++ cast instead of c cast (not sure why id did that) + return static_cast(f); +#endif +} + +/* +================ +Math::Ftol +================ +*/ +OG_INLINE long Math::Ftol( float f ) { +#if OG_ASM_MSVC + long i; + __asm fld f + __asm fistp i + //__asm mov eax, i // do we need this ? O_o + return i; +#elif OG_ASM_GNU + long i; + __asm__ __volatile__( "flds %1 \n\t" + "fistpl %0 \n\t" + : "=m" (i) + : "m" (f) + ); + return i; +#else + // we use c++ cast instead of c cast (not sure why id did that) + return static_cast(f); +#endif +} + +/* +================ +Math::Sign +================ +*/ +OG_INLINE float Math::Sign( float f ) { + if ( f > 0.0f ) + return 1.0f; + if ( f < 0.0f ) + return -1.0f; + return 0.0f; +} + +/* +================ +Math::Fmod +================ +*/ +OG_INLINE float Math::Fmod( float numerator, float denominator ) { + return fmodf( numerator, denominator ); +} + +/* +================ +Math::Modf +================ +*/ +OG_INLINE float Math::Modf( float f, float& i ) { + return modff( f, &i ); +} +OG_INLINE float Math::Modf( float f ) { + float i; + return modff( f, &i ); +} + +/* +================ +Math::Sqrt +================ +*/ +OG_INLINE float Math::Sqrt( float f ) { + return sqrtf( f ); +} + +/* +================ +Math::InvSqrt + +Cannot be 0.0f +================ +*/ +OG_INLINE float Math::InvSqrt( float f ) { + OG_ASSERT( f != 0.0f ); + return 1.0f / sqrtf( f ); +} + +/* +================ +Math::RSqrt + +Can be 0.0f +================ +*/ +OG_INLINE float Math::RSqrt( float f ) { + float g = 0.5f * f; + int i = *reinterpret_cast(&f); + + // do a guess + i = 0x5f375a86 - ( i>>1 ); + f = *reinterpret_cast(&i); + + // Newtons calculation + f = f * ( 1.5f - g * f * f ); + return f; +} + +/* +================ +Math::Log/Log2/Log10 + +Log of 0 is bad. +I've also heard you're not really +supposed to do log of negatives, yet +they work fine. +================ +*/ +OG_INLINE float Math::Log( float f ) { + OG_ASSERT( f != 0.0f ); + return logf( f ); +} +OG_INLINE float Math::Log2( float f ) { + OG_ASSERT( f != 0.0f ); + return INV_LN_2 * logf( f ); +} +OG_INLINE float Math::Log10( float f ) { + OG_ASSERT( f != 0.0f ); + return INV_LN_10 * logf( f ); +} + +/* +================ +Math::Pow +================ +*/ +OG_INLINE float Math::Pow( float base, float exp ) { + return powf( base, exp ); +} + +/* +================ +Math::Exp +================ +*/ +OG_INLINE float Math::Exp( float f ) { + return expf( f ); +} + +/* +================ +Math::IsPowerOfTwo +================ +*/ +OG_INLINE bool Math::IsPowerOfTwo( int x ) { + // This is the faster of the two known methods + // with the x > 0 check moved to the beginning + return x > 0 && ( x & ( x - 1 ) ) == 0; +} + +/* +================ +Math::HigherPowerOfTwo +================ +*/ +OG_INLINE int Math::HigherPowerOfTwo( int x ) { + x--; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + return x + 1; +} + +/* +================ +Math::LowerPowerOfTwo +================ +*/ +OG_INLINE int Math::LowerPowerOfTwo( int x ) { + return HigherPowerOfTwo( x ) >> 1; +} + +/* +================ +Math::FloorPowerOfTwo +================ +*/ +OG_INLINE int Math::FloorPowerOfTwo( int x ) { + return IsPowerOfTwo( x ) ? x : LowerPowerOfTwo( x ); +} + +/* +================ +Math::CeilPowerOfTwo +================ +*/ +OG_INLINE int Math::CeilPowerOfTwo( int x ) { + return IsPowerOfTwo( x ) ? x : HigherPowerOfTwo( x ); +} + +/* +================ +Math::ClosestPowerOfTwo +================ +*/ +OG_INLINE int Math::ClosestPowerOfTwo( int x ) { + if ( IsPowerOfTwo( x ) ) + return x; + int high = HigherPowerOfTwo( x ); + int low = high >> 1; + return ((high-x) < (x-low)) ? high : low; +} + +/* +================ +Math::Digits +================ +*/ +OG_INLINE int Math::Digits( int x ) { + int digits = 1; + int step = 10; + while (step <= x) { + digits++; + step *= 10; + } + return digits; +} + +/* +================ +Math::Sin/ASin +================ +*/ +OG_INLINE float Math::Sin( float f ) { + return sinf( f ); +} +OG_INLINE float Math::ASin( float f ) { + if ( f <= -1.0f ) + return -HALF_PI; + if ( f >= 1.0f ) + return HALF_PI; + return asinf( f ); +} + +/* +================ +Math::Cos/ACos +================ +*/ +OG_INLINE float Math::Cos( float f ) { + return cosf( f ); +} +OG_INLINE float Math::ACos( float f ) { + if ( f <= -1.0f ) + return PI; + if ( f >= 1.0f ) + return 0.0f; + return acosf( f ); +} + +/* +================ +Math::Tan/ATan +================ +*/ +OG_INLINE float Math::Tan( float f ) { + return tanf( f ); +} +OG_INLINE float Math::ATan( float f ) { + return atanf( f ); +} +OG_INLINE float Math::ATan( float f1, float f2 ) { + return atan2f( f1, f2 ); +} + +/* +================ +Math::SinCos +================ +*/ +OG_INLINE void Math::SinCos( float f, float &s, float &c ) { +#if OG_ASM_MSVC + // sometimes assembler is just waaayy faster + _asm { + fld f + fsincos + mov ecx, c + mov edx, s + fstp dword ptr [ecx] + fstp dword ptr [edx] + } +#elif OG_ASM_GNU + asm ("fsincos" : "=t" (c), "=u" (s) : "0" (f)); +#else + s = Sin(f); + c = Sqrt( 1.0f - s * s ); // faster than calling Cos(f) +#endif +} + +/* +================ +Math::Deg2Rad +================ +*/ +OG_INLINE float Math::Deg2Rad( float f ) { + return f * DEG_TO_RAD; +} + +/* +================ +Math::Rad2Deg +================ +*/ +OG_INLINE float Math::Rad2Deg( float f ) { + return f * RAD_TO_DEG; +} + +/* +================ +Math::Square +================ +*/ +OG_INLINE float Math::Square( float v ) { + return v * v; +} + +/* +================ +Math::Cube +================ +*/ +OG_INLINE float Math::Cube( float v ) { + return v * v * v; +} + +/* +================ +Math::Sec2Ms +================ +*/ +OG_INLINE int Math::Sec2Ms( int sec ) { + return sec * 1000; +} + +/* +================ +Math::Ms2Sec +================ +*/ +OG_INLINE int Math::Ms2Sec( int ms ) { + return FtoiFast( ms * 0.001f ); +} + +} + +#endif diff --git a/samples/C++/Types.h b/samples/C++/Types.h new file mode 100644 index 00000000..e2675538 --- /dev/null +++ b/samples/C++/Types.h @@ -0,0 +1,32 @@ +/***************************************************************************** +* Dwarf Mine - The 13-11 Benchmark +* +* Copyright (c) 2013 Bünger, Thomas; Kieschnick, Christian; Kusber, +* Michael; Lohse, Henning; Wuttke, Nikolai; Xylander, Oliver; Yao, Gary; +* Zimmermann, Florian +* +* 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 AUTHORS OR COPYRIGHT HOLDERS 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. +*****************************************************************************/ + +#pragma once + +#include + +typedef uint32_t smallPrime_t; diff --git a/samples/C++/bcm2835.h b/samples/C++/bcm2835.h new file mode 100644 index 00000000..e5330933 --- /dev/null +++ b/samples/C++/bcm2835.h @@ -0,0 +1,1129 @@ +// bcm2835.h +// +// C and C++ support for Broadcom BCM 2835 as used in Raspberry Pi +// +// Author: Mike McCauley +// Copyright (C) 2011-2013 Mike McCauley +// $Id: bcm2835.h,v 1.8 2013/02/15 22:06:09 mikem Exp mikem $ +// +/// \mainpage C library for Broadcom BCM 2835 as used in Raspberry Pi +/// +/// This is a C library for Raspberry Pi (RPi). It provides access to +/// GPIO and other IO functions on the Broadcom BCM 2835 chip, +/// allowing access to the GPIO pins on the +/// 26 pin IDE plug on the RPi board so you can control and interface with various external devices. +/// +/// It provides functions for reading digital inputs and setting digital outputs, using SPI and I2C, +/// and for accessing the system timers. +/// Pin event detection is supported by polling (interrupts are not supported). +/// +/// It is C++ compatible, and installs as a header file and non-shared library on +/// any Linux-based distro (but clearly is no use except on Raspberry Pi or another board with +/// BCM 2835). +/// +/// The version of the package that this documentation refers to can be downloaded +/// from http://www.airspayce.com/mikem/bcm2835/bcm2835-1.26.tar.gz +/// You can find the latest version at http://www.airspayce.com/mikem/bcm2835 +/// +/// Several example programs are provided. +/// +/// Based on data in http://elinux.org/RPi_Low-level_peripherals and +/// http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf +/// and http://www.scribd.com/doc/101830961/GPIO-Pads-Control2 +/// +/// You can also find online help and discussion at http://groups.google.com/group/bcm2835 +/// Please use that group for all questions and discussions on this topic. +/// Do not contact the author directly, unless it is to discuss commercial licensing. +/// +/// Tested on debian6-19-04-2012, 2012-07-15-wheezy-raspbian and Occidentalisv01 +/// CAUTION: it has been observed that when detect enables such as bcm2835_gpio_len() +/// are used and the pin is pulled LOW +/// it can cause temporary hangs on 2012-07-15-wheezy-raspbian and Occidentalisv01. +/// Reason for this is not yet determined, but suspect that an interrupt handler is +/// hitting a hard loop on those OSs. +/// If you must use bcm2835_gpio_len() and friends, make sure you disable the pins with +/// bcm2835_gpio_cler_len() and friends after use. +/// +/// \par Installation +/// +/// This library consists of a single non-shared library and header file, which will be +/// installed in the usual places by make install +/// +/// \code +/// # download the latest version of the library, say bcm2835-1.xx.tar.gz, then: +/// tar zxvf bcm2835-1.xx.tar.gz +/// cd bcm2835-1.xx +/// ./configure +/// make +/// sudo make check +/// sudo make install +/// \endcode +/// +/// \par Physical Addresses +/// +/// The functions bcm2835_peri_read(), bcm2835_peri_write() and bcm2835_peri_set_bits() +/// are low level peripheral register access functions. They are designed to use +/// physical addresses as described in section 1.2.3 ARM physical addresses +/// of the BCM2835 ARM Peripherals manual. +/// Physical addresses range from 0x20000000 to 0x20FFFFFF for peripherals. The bus +/// addresses for peripherals are set up to map onto the peripheral bus address range starting at +/// 0x7E000000. Thus a peripheral advertised in the manual at bus address 0x7Ennnnnn is available at +/// physical address 0x20nnnnnn. +/// +/// The base address of the various peripheral registers are available with the following +/// externals: +/// bcm2835_gpio +/// bcm2835_pwm +/// bcm2835_clk +/// bcm2835_pads +/// bcm2835_spio0 +/// bcm2835_st +/// bcm2835_bsc0 +/// bcm2835_bsc1 +/// +/// \par Pin Numbering +/// +/// The GPIO pin numbering as used by RPi is different to and inconsistent with the underlying +/// BCM 2835 chip pin numbering. http://elinux.org/RPi_BCM2835_GPIOs +/// +/// RPi has a 26 pin IDE header that provides access to some of the GPIO pins on the BCM 2835, +/// as well as power and ground pins. Not all GPIO pins on the BCM 2835 are available on the +/// IDE header. +/// +/// RPi Version 2 also has a P5 connector with 4 GPIO pins, 5V, 3.3V and Gnd. +/// +/// The functions in this library are designed to be passed the BCM 2835 GPIO pin number and _not_ +/// the RPi pin number. There are symbolic definitions for each of the available pins +/// that you should use for convenience. See \ref RPiGPIOPin. +/// +/// \par SPI Pins +/// +/// The bcm2835_spi_* functions allow you to control the BCM 2835 SPI0 interface, +/// allowing you to send and received data by SPI (Serial Peripheral Interface). +/// For more information about SPI, see http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus +/// +/// When bcm2835_spi_begin() is called it changes the bahaviour of the SPI interface pins from their +/// default GPIO behaviour in order to support SPI. While SPI is in use, you will not be able +/// to control the state of the SPI pins through the usual bcm2835_spi_gpio_write(). +/// When bcm2835_spi_end() is called, the SPI pins will all revert to inputs, and can then be +/// configured and controled with the usual bcm2835_gpio_* calls. +/// +/// The Raspberry Pi GPIO pins used for SPI are: +/// +/// - P1-19 (MOSI) +/// - P1-21 (MISO) +/// - P1-23 (CLK) +/// - P1-24 (CE0) +/// - P1-26 (CE1) +/// +/// \par I2C Pins +/// +/// The bcm2835_i2c_* functions allow you to control the BCM 2835 BSC interface, +/// allowing you to send and received data by I2C ("eye-squared cee"; generically referred to as "two-wire interface") . +/// For more information about I?C, see http://en.wikipedia.org/wiki/I%C2%B2C +/// +/// The Raspberry Pi V2 GPIO pins used for I2C are: +/// +/// - P1-03 (SDA) +/// - P1-05 (SLC) +/// +/// \par Real Time performance constraints +/// +/// The bcm2835 is a library for user programs (i.e. they run in 'userland'). +/// Such programs are not part of the kernel and are usually +/// subject to paging and swapping by the kernel while it does other things besides running your program. +/// This means that you should not expect to get real-time performance or +/// real-time timing constraints from such programs. In particular, there is no guarantee that the +/// bcm2835_delay() and bcm2835_delayMicroseconds() will return after exactly the time requested. +/// In fact, depending on other activity on the host, IO etc, you might get significantly longer delay times +/// than the one you asked for. So please dont expect to get exactly the time delay you request. +/// +/// Arjan reports that you can prevent swapping on Linux with the following code fragment: +/// +/// \code +/// struct sched_param sp; +/// memset(&sp, 0, sizeof(sp)); +/// sp.sched_priority = sched_get_priority_max(SCHED_FIFO); +/// sched_setscheduler(0, SCHED_FIFO, &sp); +/// mlockall(MCL_CURRENT | MCL_FUTURE); +/// \endcode +/// +/// \par Open Source Licensing GPL V2 +/// +/// This is the appropriate option if you want to share the source code of your +/// application with everyone you distribute it to, and you also want to give them +/// the right to share who uses it. If you wish to use this software under Open +/// Source Licensing, you must contribute all your source code to the open source +/// community in accordance with the GPL Version 2 when your application is +/// distributed. See http://www.gnu.org/copyleft/gpl.html and COPYING +/// +/// \par Acknowledgements +/// +/// Some of this code has been inspired by Dom and Gert. +/// The I2C code has been inspired by Alan Barr. +/// +/// \par Revision History +/// +/// \version 1.0 Initial release +/// \version 1.1 Minor bug fixes +/// \version 1.2 Added support for SPI +/// \version 1.3 Added bcm2835_spi_transfern() +/// \version 1.4 Fixed a problem that prevented SPI CE1 being used. Reported by David Robinson. +/// \version 1.5 Added bcm2835_close() to deinit the library. Suggested by C?sar Ortiz +/// \version 1.6 Document testing on 2012-07-15-wheezy-raspbian and Occidentalisv01 +/// Functions bcm2835_gpio_ren(), bcm2835_gpio_fen(), bcm2835_gpio_hen() +/// bcm2835_gpio_len(), bcm2835_gpio_aren() and bcm2835_gpio_afen() now +/// changes only the pin specified. Other pins that were already previously +/// enabled stay enabled. +/// Added bcm2835_gpio_clr_ren(), bcm2835_gpio_clr_fen(), bcm2835_gpio_clr_hen() +/// bcm2835_gpio_clr_len(), bcm2835_gpio_clr_aren(), bcm2835_gpio_clr_afen() +/// to clear the enable for individual pins, suggested by Andreas Sundstrom. +/// \version 1.7 Added bcm2835_spi_transfernb to support different buffers for read and write. +/// \version 1.8 Improvements to read barrier, as suggested by maddin. +/// \version 1.9 Improvements contributed by mikew: +/// I noticed that it was mallocing memory for the mmaps on /dev/mem. +/// It's not necessary to do that, you can just mmap the file directly, +/// so I've removed the mallocs (and frees). +/// I've also modified delayMicroseconds() to use nanosleep() for long waits, +/// and a busy wait on a high resolution timer for the rest. This is because +/// I've found that calling nanosleep() takes at least 100-200 us. +/// You need to link using '-lrt' using this version. +/// I've added some unsigned casts to the debug prints to silence compiler +/// warnings I was getting, fixed some typos, and changed the value of +/// BCM2835_PAD_HYSTERESIS_ENABLED to 0x08 as per Gert van Loo's doc at +/// http://www.scribd.com/doc/101830961/GPIO-Pads-Control2 +/// Also added a define for the passwrd value that Gert says is needed to +/// change pad control settings. +/// \version 1.10 Changed the names of the delay functions to bcm2835_delay() +/// and bcm2835_delayMicroseconds() to prevent collisions with wiringPi. +/// Macros to map delay()-> bcm2835_delay() and +/// Macros to map delayMicroseconds()-> bcm2835_delayMicroseconds(), which +/// can be disabled by defining BCM2835_NO_DELAY_COMPATIBILITY +/// \version 1.11 Fixed incorrect link to download file +/// \version 1.12 New GPIO pin definitions for RPi version 2 (which has a different GPIO mapping) +/// \version 1.13 New GPIO pin definitions for RPi version 2 plug P5 +/// Hardware base pointers are now available (after initialisation) externally as bcm2835_gpio +/// bcm2835_pwm bcm2835_clk bcm2835_pads bcm2835_spi0. +/// \version 1.14 Now compiles even if CLOCK_MONOTONIC_RAW is not available, uses CLOCK_MONOTONIC instead. +/// Fixed errors in documentation of SPI divider frequencies based on 250MHz clock. +/// Reported by Ben Simpson. +/// \version 1.15 Added bcm2835_close() to end of examples as suggested by Mark Wolfe. +/// \version 1.16 Added bcm2835_gpio_set_multi, bcm2835_gpio_clr_multi and bcm2835_gpio_write_multi +/// to allow a mask of pins to be set all at once. Requested by Sebastian Loncar. +/// \version 1.17 Added bcm2835_gpio_write_mask. Requested by Sebastian Loncar. +/// \version 1.18 Added bcm2835_i2c_* functions. Changes to bcm2835_delayMicroseconds: +/// now uses the RPi system timer counter, instead of clock_gettime, for improved accuracy. +/// No need to link with -lrt now. Contributed by Arjan van Vught. +/// \version 1.19 Removed inlines added by previous patch since they don't seem to work everywhere. +/// Reported by olly. +/// \version 1.20 Patch from Mark Dootson to close /dev/mem after access to the peripherals has been granted. +/// \version 1.21 delayMicroseconds is now not susceptible to 32 bit timer overruns. +/// Patch courtesy Jeremy Mortis. +/// \version 1.22 Fixed incorrect definition of BCM2835_GPFEN0 which broke the ability to set +/// falling edge events. Reported by Mark Dootson. +/// \version 1.23 Added bcm2835_i2c_set_baudrate and bcm2835_i2c_read_register_rs. +/// Improvements to bcm2835_i2c_read and bcm2835_i2c_write functions +/// to fix ocasional reads not completing. Patched by Mark Dootson. +/// \version 1.24 Mark Dootson p[atched a problem with his previously submitted code +/// under high load from other processes. +/// \version 1.25 Updated author and distribution location details to airspayce.com +/// \version 1.26 Added missing unmapmem for pads in bcm2835_close to prevent a memory leak. +/// Reported by Hartmut Henkel. +/// \author Mike McCauley (mikem@airspayce.com) DO NOT CONTACT THE AUTHOR DIRECTLY: USE THE LISTS + + + +// Defines for BCM2835 +#ifndef BCM2835_H +#define BCM2835_H + +#include + +/// \defgroup constants Constants for passing to and from library functions +/// The values here are designed to be passed to various functions in the bcm2835 library. +/// @{ + + +/// This means pin HIGH, true, 3.3volts on a pin. +#define HIGH 0x1 +/// This means pin LOW, false, 0volts on a pin. +#define LOW 0x0 + +/// Speed of the core clock core_clk +#define BCM2835_CORE_CLK_HZ 250000000 ///< 250 MHz + +// Physical addresses for various peripheral register sets +/// Base Physical Address of the BCM 2835 peripheral registers +#define BCM2835_PERI_BASE 0x20000000 +/// Base Physical Address of the System Timer registers +#define BCM2835_ST_BASE (BCM2835_PERI_BASE + 0x3000) +/// Base Physical Address of the Pads registers +#define BCM2835_GPIO_PADS (BCM2835_PERI_BASE + 0x100000) +/// Base Physical Address of the Clock/timer registers +#define BCM2835_CLOCK_BASE (BCM2835_PERI_BASE + 0x101000) +/// Base Physical Address of the GPIO registers +#define BCM2835_GPIO_BASE (BCM2835_PERI_BASE + 0x200000) +/// Base Physical Address of the SPI0 registers +#define BCM2835_SPI0_BASE (BCM2835_PERI_BASE + 0x204000) +/// Base Physical Address of the BSC0 registers +#define BCM2835_BSC0_BASE (BCM2835_PERI_BASE + 0x205000) +/// Base Physical Address of the PWM registers +#define BCM2835_GPIO_PWM (BCM2835_PERI_BASE + 0x20C000) + /// Base Physical Address of the BSC1 registers +#define BCM2835_BSC1_BASE (BCM2835_PERI_BASE + 0x804000) + + +/// Base of the ST (System Timer) registers. +/// Available after bcm2835_init has been called +extern volatile uint32_t *bcm2835_st; + +/// Base of the GPIO registers. +/// Available after bcm2835_init has been called +extern volatile uint32_t *bcm2835_gpio; + +/// Base of the PWM registers. +/// Available after bcm2835_init has been called +extern volatile uint32_t *bcm2835_pwm; + +/// Base of the CLK registers. +/// Available after bcm2835_init has been called +extern volatile uint32_t *bcm2835_clk; + +/// Base of the PADS registers. +/// Available after bcm2835_init has been called +extern volatile uint32_t *bcm2835_pads; + +/// Base of the SPI0 registers. +/// Available after bcm2835_init has been called +extern volatile uint32_t *bcm2835_spi0; + +/// Base of the BSC0 registers. +/// Available after bcm2835_init has been called +extern volatile uint32_t *bcm2835_bsc0; + +/// Base of the BSC1 registers. +/// Available after bcm2835_init has been called +extern volatile uint32_t *bcm2835_bsc1; + +/// Size of memory page on RPi +#define BCM2835_PAGE_SIZE (4*1024) +/// Size of memory block on RPi +#define BCM2835_BLOCK_SIZE (4*1024) + + +// Defines for GPIO +// The BCM2835 has 54 GPIO pins. +// BCM2835 data sheet, Page 90 onwards. +/// GPIO register offsets from BCM2835_GPIO_BASE. Offsets into the GPIO Peripheral block in bytes per 6.1 Register View +#define BCM2835_GPFSEL0 0x0000 ///< GPIO Function Select 0 +#define BCM2835_GPFSEL1 0x0004 ///< GPIO Function Select 1 +#define BCM2835_GPFSEL2 0x0008 ///< GPIO Function Select 2 +#define BCM2835_GPFSEL3 0x000c ///< GPIO Function Select 3 +#define BCM2835_GPFSEL4 0x0010 ///< GPIO Function Select 4 +#define BCM2835_GPFSEL5 0x0014 ///< GPIO Function Select 5 +#define BCM2835_GPSET0 0x001c ///< GPIO Pin Output Set 0 +#define BCM2835_GPSET1 0x0020 ///< GPIO Pin Output Set 1 +#define BCM2835_GPCLR0 0x0028 ///< GPIO Pin Output Clear 0 +#define BCM2835_GPCLR1 0x002c ///< GPIO Pin Output Clear 1 +#define BCM2835_GPLEV0 0x0034 ///< GPIO Pin Level 0 +#define BCM2835_GPLEV1 0x0038 ///< GPIO Pin Level 1 +#define BCM2835_GPEDS0 0x0040 ///< GPIO Pin Event Detect Status 0 +#define BCM2835_GPEDS1 0x0044 ///< GPIO Pin Event Detect Status 1 +#define BCM2835_GPREN0 0x004c ///< GPIO Pin Rising Edge Detect Enable 0 +#define BCM2835_GPREN1 0x0050 ///< GPIO Pin Rising Edge Detect Enable 1 +#define BCM2835_GPFEN0 0x0058 ///< GPIO Pin Falling Edge Detect Enable 0 +#define BCM2835_GPFEN1 0x005c ///< GPIO Pin Falling Edge Detect Enable 1 +#define BCM2835_GPHEN0 0x0064 ///< GPIO Pin High Detect Enable 0 +#define BCM2835_GPHEN1 0x0068 ///< GPIO Pin High Detect Enable 1 +#define BCM2835_GPLEN0 0x0070 ///< GPIO Pin Low Detect Enable 0 +#define BCM2835_GPLEN1 0x0074 ///< GPIO Pin Low Detect Enable 1 +#define BCM2835_GPAREN0 0x007c ///< GPIO Pin Async. Rising Edge Detect 0 +#define BCM2835_GPAREN1 0x0080 ///< GPIO Pin Async. Rising Edge Detect 1 +#define BCM2835_GPAFEN0 0x0088 ///< GPIO Pin Async. Falling Edge Detect 0 +#define BCM2835_GPAFEN1 0x008c ///< GPIO Pin Async. Falling Edge Detect 1 +#define BCM2835_GPPUD 0x0094 ///< GPIO Pin Pull-up/down Enable +#define BCM2835_GPPUDCLK0 0x0098 ///< GPIO Pin Pull-up/down Enable Clock 0 +#define BCM2835_GPPUDCLK1 0x009c ///< GPIO Pin Pull-up/down Enable Clock 1 + +/// \brief bcm2835PortFunction +/// Port function select modes for bcm2835_gpio_fsel() +typedef enum +{ + BCM2835_GPIO_FSEL_INPT = 0b000, ///< Input + BCM2835_GPIO_FSEL_OUTP = 0b001, ///< Output + BCM2835_GPIO_FSEL_ALT0 = 0b100, ///< Alternate function 0 + BCM2835_GPIO_FSEL_ALT1 = 0b101, ///< Alternate function 1 + BCM2835_GPIO_FSEL_ALT2 = 0b110, ///< Alternate function 2 + BCM2835_GPIO_FSEL_ALT3 = 0b111, ///< Alternate function 3 + BCM2835_GPIO_FSEL_ALT4 = 0b011, ///< Alternate function 4 + BCM2835_GPIO_FSEL_ALT5 = 0b010, ///< Alternate function 5 + BCM2835_GPIO_FSEL_MASK = 0b111 ///< Function select bits mask +} bcm2835FunctionSelect; + +/// \brief bcm2835PUDControl +/// Pullup/Pulldown defines for bcm2835_gpio_pud() +typedef enum +{ + BCM2835_GPIO_PUD_OFF = 0b00, ///< Off ? disable pull-up/down + BCM2835_GPIO_PUD_DOWN = 0b01, ///< Enable Pull Down control + BCM2835_GPIO_PUD_UP = 0b10 ///< Enable Pull Up control +} bcm2835PUDControl; + +/// Pad control register offsets from BCM2835_GPIO_PADS +#define BCM2835_PADS_GPIO_0_27 0x002c ///< Pad control register for pads 0 to 27 +#define BCM2835_PADS_GPIO_28_45 0x0030 ///< Pad control register for pads 28 to 45 +#define BCM2835_PADS_GPIO_46_53 0x0034 ///< Pad control register for pads 46 to 53 + +/// Pad Control masks +#define BCM2835_PAD_PASSWRD (0x5A << 24) ///< Password to enable setting pad mask +#define BCM2835_PAD_SLEW_RATE_UNLIMITED 0x10 ///< Slew rate unlimited +#define BCM2835_PAD_HYSTERESIS_ENABLED 0x08 ///< Hysteresis enabled +#define BCM2835_PAD_DRIVE_2mA 0x00 ///< 2mA drive current +#define BCM2835_PAD_DRIVE_4mA 0x01 ///< 4mA drive current +#define BCM2835_PAD_DRIVE_6mA 0x02 ///< 6mA drive current +#define BCM2835_PAD_DRIVE_8mA 0x03 ///< 8mA drive current +#define BCM2835_PAD_DRIVE_10mA 0x04 ///< 10mA drive current +#define BCM2835_PAD_DRIVE_12mA 0x05 ///< 12mA drive current +#define BCM2835_PAD_DRIVE_14mA 0x06 ///< 14mA drive current +#define BCM2835_PAD_DRIVE_16mA 0x07 ///< 16mA drive current + +/// \brief bcm2835PadGroup +/// Pad group specification for bcm2835_gpio_pad() +typedef enum +{ + BCM2835_PAD_GROUP_GPIO_0_27 = 0, ///< Pad group for GPIO pads 0 to 27 + BCM2835_PAD_GROUP_GPIO_28_45 = 1, ///< Pad group for GPIO pads 28 to 45 + BCM2835_PAD_GROUP_GPIO_46_53 = 2 ///< Pad group for GPIO pads 46 to 53 +} bcm2835PadGroup; + +/// \brief GPIO Pin Numbers +/// +/// Here we define Raspberry Pin GPIO pins on P1 in terms of the underlying BCM GPIO pin numbers. +/// These can be passed as a pin number to any function requiring a pin. +/// Not all pins on the RPi 26 bin IDE plug are connected to GPIO pins +/// and some can adopt an alternate function. +/// RPi version 2 has some slightly different pinouts, and these are values RPI_V2_*. +/// At bootup, pins 8 and 10 are set to UART0_TXD, UART0_RXD (ie the alt0 function) respectively +/// When SPI0 is in use (ie after bcm2835_spi_begin()), pins 19, 21, 23, 24, 26 are dedicated to SPI +/// and cant be controlled independently +typedef enum +{ + RPI_GPIO_P1_03 = 0, ///< Version 1, Pin P1-03 + RPI_GPIO_P1_05 = 1, ///< Version 1, Pin P1-05 + RPI_GPIO_P1_07 = 4, ///< Version 1, Pin P1-07 + RPI_GPIO_P1_08 = 14, ///< Version 1, Pin P1-08, defaults to alt function 0 UART0_TXD + RPI_GPIO_P1_10 = 15, ///< Version 1, Pin P1-10, defaults to alt function 0 UART0_RXD + RPI_GPIO_P1_11 = 17, ///< Version 1, Pin P1-11 + RPI_GPIO_P1_12 = 18, ///< Version 1, Pin P1-12 + RPI_GPIO_P1_13 = 21, ///< Version 1, Pin P1-13 + RPI_GPIO_P1_15 = 22, ///< Version 1, Pin P1-15 + RPI_GPIO_P1_16 = 23, ///< Version 1, Pin P1-16 + RPI_GPIO_P1_18 = 24, ///< Version 1, Pin P1-18 + RPI_GPIO_P1_19 = 10, ///< Version 1, Pin P1-19, MOSI when SPI0 in use + RPI_GPIO_P1_21 = 9, ///< Version 1, Pin P1-21, MISO when SPI0 in use + RPI_GPIO_P1_22 = 25, ///< Version 1, Pin P1-22 + RPI_GPIO_P1_23 = 11, ///< Version 1, Pin P1-23, CLK when SPI0 in use + RPI_GPIO_P1_24 = 8, ///< Version 1, Pin P1-24, CE0 when SPI0 in use + RPI_GPIO_P1_26 = 7, ///< Version 1, Pin P1-26, CE1 when SPI0 in use + + // RPi Version 2 + RPI_V2_GPIO_P1_03 = 2, ///< Version 2, Pin P1-03 + RPI_V2_GPIO_P1_05 = 3, ///< Version 2, Pin P1-05 + RPI_V2_GPIO_P1_07 = 4, ///< Version 2, Pin P1-07 + RPI_V2_GPIO_P1_08 = 14, ///< Version 2, Pin P1-08, defaults to alt function 0 UART0_TXD + RPI_V2_GPIO_P1_10 = 15, ///< Version 2, Pin P1-10, defaults to alt function 0 UART0_RXD + RPI_V2_GPIO_P1_11 = 17, ///< Version 2, Pin P1-11 + RPI_V2_GPIO_P1_12 = 18, ///< Version 2, Pin P1-12 + RPI_V2_GPIO_P1_13 = 27, ///< Version 2, Pin P1-13 + RPI_V2_GPIO_P1_15 = 22, ///< Version 2, Pin P1-15 + RPI_V2_GPIO_P1_16 = 23, ///< Version 2, Pin P1-16 + RPI_V2_GPIO_P1_18 = 24, ///< Version 2, Pin P1-18 + RPI_V2_GPIO_P1_19 = 10, ///< Version 2, Pin P1-19, MOSI when SPI0 in use + RPI_V2_GPIO_P1_21 = 9, ///< Version 2, Pin P1-21, MISO when SPI0 in use + RPI_V2_GPIO_P1_22 = 25, ///< Version 2, Pin P1-22 + RPI_V2_GPIO_P1_23 = 11, ///< Version 2, Pin P1-23, CLK when SPI0 in use + RPI_V2_GPIO_P1_24 = 8, ///< Version 2, Pin P1-24, CE0 when SPI0 in use + RPI_V2_GPIO_P1_26 = 7, ///< Version 2, Pin P1-26, CE1 when SPI0 in use + + // RPi Version 2, new plug P5 + RPI_V2_GPIO_P5_03 = 28, ///< Version 2, Pin P5-03 + RPI_V2_GPIO_P5_04 = 29, ///< Version 2, Pin P5-04 + RPI_V2_GPIO_P5_05 = 30, ///< Version 2, Pin P5-05 + RPI_V2_GPIO_P5_06 = 31, ///< Version 2, Pin P5-06 + +} RPiGPIOPin; + +// Defines for SPI +// GPIO register offsets from BCM2835_SPI0_BASE. +// Offsets into the SPI Peripheral block in bytes per 10.5 SPI Register Map +#define BCM2835_SPI0_CS 0x0000 ///< SPI Master Control and Status +#define BCM2835_SPI0_FIFO 0x0004 ///< SPI Master TX and RX FIFOs +#define BCM2835_SPI0_CLK 0x0008 ///< SPI Master Clock Divider +#define BCM2835_SPI0_DLEN 0x000c ///< SPI Master Data Length +#define BCM2835_SPI0_LTOH 0x0010 ///< SPI LOSSI mode TOH +#define BCM2835_SPI0_DC 0x0014 ///< SPI DMA DREQ Controls + +// Register masks for SPI0_CS +#define BCM2835_SPI0_CS_LEN_LONG 0x02000000 ///< Enable Long data word in Lossi mode if DMA_LEN is set +#define BCM2835_SPI0_CS_DMA_LEN 0x01000000 ///< Enable DMA mode in Lossi mode +#define BCM2835_SPI0_CS_CSPOL2 0x00800000 ///< Chip Select 2 Polarity +#define BCM2835_SPI0_CS_CSPOL1 0x00400000 ///< Chip Select 1 Polarity +#define BCM2835_SPI0_CS_CSPOL0 0x00200000 ///< Chip Select 0 Polarity +#define BCM2835_SPI0_CS_RXF 0x00100000 ///< RXF - RX FIFO Full +#define BCM2835_SPI0_CS_RXR 0x00080000 ///< RXR RX FIFO needs Reading ( full) +#define BCM2835_SPI0_CS_TXD 0x00040000 ///< TXD TX FIFO can accept Data +#define BCM2835_SPI0_CS_RXD 0x00020000 ///< RXD RX FIFO contains Data +#define BCM2835_SPI0_CS_DONE 0x00010000 ///< Done transfer Done +#define BCM2835_SPI0_CS_TE_EN 0x00008000 ///< Unused +#define BCM2835_SPI0_CS_LMONO 0x00004000 ///< Unused +#define BCM2835_SPI0_CS_LEN 0x00002000 ///< LEN LoSSI enable +#define BCM2835_SPI0_CS_REN 0x00001000 ///< REN Read Enable +#define BCM2835_SPI0_CS_ADCS 0x00000800 ///< ADCS Automatically Deassert Chip Select +#define BCM2835_SPI0_CS_INTR 0x00000400 ///< INTR Interrupt on RXR +#define BCM2835_SPI0_CS_INTD 0x00000200 ///< INTD Interrupt on Done +#define BCM2835_SPI0_CS_DMAEN 0x00000100 ///< DMAEN DMA Enable +#define BCM2835_SPI0_CS_TA 0x00000080 ///< Transfer Active +#define BCM2835_SPI0_CS_CSPOL 0x00000040 ///< Chip Select Polarity +#define BCM2835_SPI0_CS_CLEAR 0x00000030 ///< Clear FIFO Clear RX and TX +#define BCM2835_SPI0_CS_CLEAR_RX 0x00000020 ///< Clear FIFO Clear RX +#define BCM2835_SPI0_CS_CLEAR_TX 0x00000010 ///< Clear FIFO Clear TX +#define BCM2835_SPI0_CS_CPOL 0x00000008 ///< Clock Polarity +#define BCM2835_SPI0_CS_CPHA 0x00000004 ///< Clock Phase +#define BCM2835_SPI0_CS_CS 0x00000003 ///< Chip Select + +/// \brief bcm2835SPIBitOrder SPI Bit order +/// Specifies the SPI data bit ordering for bcm2835_spi_setBitOrder() +typedef enum +{ + BCM2835_SPI_BIT_ORDER_LSBFIRST = 0, ///< LSB First + BCM2835_SPI_BIT_ORDER_MSBFIRST = 1 ///< MSB First +}bcm2835SPIBitOrder; + +/// \brief SPI Data mode +/// Specify the SPI data mode to be passed to bcm2835_spi_setDataMode() +typedef enum +{ + BCM2835_SPI_MODE0 = 0, ///< CPOL = 0, CPHA = 0 + BCM2835_SPI_MODE1 = 1, ///< CPOL = 0, CPHA = 1 + BCM2835_SPI_MODE2 = 2, ///< CPOL = 1, CPHA = 0 + BCM2835_SPI_MODE3 = 3, ///< CPOL = 1, CPHA = 1 +}bcm2835SPIMode; + +/// \brief bcm2835SPIChipSelect +/// Specify the SPI chip select pin(s) +typedef enum +{ + BCM2835_SPI_CS0 = 0, ///< Chip Select 0 + BCM2835_SPI_CS1 = 1, ///< Chip Select 1 + BCM2835_SPI_CS2 = 2, ///< Chip Select 2 (ie pins CS1 and CS2 are asserted) + BCM2835_SPI_CS_NONE = 3, ///< No CS, control it yourself +} bcm2835SPIChipSelect; + +/// \brief bcm2835SPIClockDivider +/// Specifies the divider used to generate the SPI clock from the system clock. +/// Figures below give the divider, clock period and clock frequency. +/// Clock divided is based on nominal base clock rate of 250MHz +/// It is reported that (contrary to the documentation) any even divider may used. +/// The frequencies shown for each divider have been confirmed by measurement +typedef enum +{ + BCM2835_SPI_CLOCK_DIVIDER_65536 = 0, ///< 65536 = 262.144us = 3.814697260kHz + BCM2835_SPI_CLOCK_DIVIDER_32768 = 32768, ///< 32768 = 131.072us = 7.629394531kHz + BCM2835_SPI_CLOCK_DIVIDER_16384 = 16384, ///< 16384 = 65.536us = 15.25878906kHz + BCM2835_SPI_CLOCK_DIVIDER_8192 = 8192, ///< 8192 = 32.768us = 30/51757813kHz + BCM2835_SPI_CLOCK_DIVIDER_4096 = 4096, ///< 4096 = 16.384us = 61.03515625kHz + BCM2835_SPI_CLOCK_DIVIDER_2048 = 2048, ///< 2048 = 8.192us = 122.0703125kHz + BCM2835_SPI_CLOCK_DIVIDER_1024 = 1024, ///< 1024 = 4.096us = 244.140625kHz + BCM2835_SPI_CLOCK_DIVIDER_512 = 512, ///< 512 = 2.048us = 488.28125kHz + BCM2835_SPI_CLOCK_DIVIDER_256 = 256, ///< 256 = 1.024us = 976.5625MHz + BCM2835_SPI_CLOCK_DIVIDER_128 = 128, ///< 128 = 512ns = = 1.953125MHz + BCM2835_SPI_CLOCK_DIVIDER_64 = 64, ///< 64 = 256ns = 3.90625MHz + BCM2835_SPI_CLOCK_DIVIDER_32 = 32, ///< 32 = 128ns = 7.8125MHz + BCM2835_SPI_CLOCK_DIVIDER_16 = 16, ///< 16 = 64ns = 15.625MHz + BCM2835_SPI_CLOCK_DIVIDER_8 = 8, ///< 8 = 32ns = 31.25MHz + BCM2835_SPI_CLOCK_DIVIDER_4 = 4, ///< 4 = 16ns = 62.5MHz + BCM2835_SPI_CLOCK_DIVIDER_2 = 2, ///< 2 = 8ns = 125MHz, fastest you can get + BCM2835_SPI_CLOCK_DIVIDER_1 = 1, ///< 0 = 262.144us = 3.814697260kHz, same as 0/65536 +} bcm2835SPIClockDivider; + +// Defines for I2C +// GPIO register offsets from BCM2835_BSC*_BASE. +// Offsets into the BSC Peripheral block in bytes per 3.1 BSC Register Map +#define BCM2835_BSC_C 0x0000 ///< BSC Master Control +#define BCM2835_BSC_S 0x0004 ///< BSC Master Status +#define BCM2835_BSC_DLEN 0x0008 ///< BSC Master Data Length +#define BCM2835_BSC_A 0x000c ///< BSC Master Slave Address +#define BCM2835_BSC_FIFO 0x0010 ///< BSC Master Data FIFO +#define BCM2835_BSC_DIV 0x0014 ///< BSC Master Clock Divider +#define BCM2835_BSC_DEL 0x0018 ///< BSC Master Data Delay +#define BCM2835_BSC_CLKT 0x001c ///< BSC Master Clock Stretch Timeout + +// Register masks for BSC_C +#define BCM2835_BSC_C_I2CEN 0x00008000 ///< I2C Enable, 0 = disabled, 1 = enabled +#define BCM2835_BSC_C_INTR 0x00000400 ///< Interrupt on RX +#define BCM2835_BSC_C_INTT 0x00000200 ///< Interrupt on TX +#define BCM2835_BSC_C_INTD 0x00000100 ///< Interrupt on DONE +#define BCM2835_BSC_C_ST 0x00000080 ///< Start transfer, 1 = Start a new transfer +#define BCM2835_BSC_C_CLEAR_1 0x00000020 ///< Clear FIFO Clear +#define BCM2835_BSC_C_CLEAR_2 0x00000010 ///< Clear FIFO Clear +#define BCM2835_BSC_C_READ 0x00000001 ///< Read transfer + +// Register masks for BSC_S +#define BCM2835_BSC_S_CLKT 0x00000200 ///< Clock stretch timeout +#define BCM2835_BSC_S_ERR 0x00000100 ///< ACK error +#define BCM2835_BSC_S_RXF 0x00000080 ///< RXF FIFO full, 0 = FIFO is not full, 1 = FIFO is full +#define BCM2835_BSC_S_TXE 0x00000040 ///< TXE FIFO full, 0 = FIFO is not full, 1 = FIFO is full +#define BCM2835_BSC_S_RXD 0x00000020 ///< RXD FIFO contains data +#define BCM2835_BSC_S_TXD 0x00000010 ///< TXD FIFO can accept data +#define BCM2835_BSC_S_RXR 0x00000008 ///< RXR FIFO needs reading (full) +#define BCM2835_BSC_S_TXW 0x00000004 ///< TXW FIFO needs writing (full) +#define BCM2835_BSC_S_DONE 0x00000002 ///< Transfer DONE +#define BCM2835_BSC_S_TA 0x00000001 ///< Transfer Active + +#define BCM2835_BSC_FIFO_SIZE 16 ///< BSC FIFO size + +/// \brief bcm2835I2CClockDivider +/// Specifies the divider used to generate the I2C clock from the system clock. +/// Clock divided is based on nominal base clock rate of 250MHz +typedef enum +{ + BCM2835_I2C_CLOCK_DIVIDER_2500 = 2500, ///< 2500 = 10us = 100 kHz + BCM2835_I2C_CLOCK_DIVIDER_626 = 626, ///< 622 = 2.504us = 399.3610 kHz + BCM2835_I2C_CLOCK_DIVIDER_150 = 150, ///< 150 = 60ns = 1.666 MHz (default at reset) + BCM2835_I2C_CLOCK_DIVIDER_148 = 148, ///< 148 = 59ns = 1.689 MHz +} bcm2835I2CClockDivider; + +/// \brief bcm2835I2CReasonCodes +/// Specifies the reason codes for the bcm2835_i2c_write and bcm2835_i2c_read functions. +typedef enum +{ + BCM2835_I2C_REASON_OK = 0x00, ///< Success + BCM2835_I2C_REASON_ERROR_NACK = 0x01, ///< Received a NACK + BCM2835_I2C_REASON_ERROR_CLKT = 0x02, ///< Received Clock Stretch Timeout + BCM2835_I2C_REASON_ERROR_DATA = 0x04, ///< Not all data is sent / received +} bcm2835I2CReasonCodes; + +// Defines for ST +// GPIO register offsets from BCM2835_ST_BASE. +// Offsets into the ST Peripheral block in bytes per 12.1 System Timer Registers +// The System Timer peripheral provides four 32-bit timer channels and a single 64-bit free running counter. +// BCM2835_ST_CLO is the System Timer Counter Lower bits register. +// The system timer free-running counter lower register is a read-only register that returns the current value +// of the lower 32-bits of the free running counter. +// BCM2835_ST_CHI is the System Timer Counter Upper bits register. +// The system timer free-running counter upper register is a read-only register that returns the current value +// of the upper 32-bits of the free running counter. +#define BCM2835_ST_CS 0x0000 ///< System Timer Control/Status +#define BCM2835_ST_CLO 0x0004 ///< System Timer Counter Lower 32 bits +#define BCM2835_ST_CHI 0x0008 ///< System Timer Counter Upper 32 bits + +/// @} + + +// Defines for PWM +#define BCM2835_PWM_CONTROL 0 +#define BCM2835_PWM_STATUS 1 +#define BCM2835_PWM0_RANGE 4 +#define BCM2835_PWM0_DATA 5 +#define BCM2835_PWM1_RANGE 8 +#define BCM2835_PWM1_DATA 9 + +#define BCM2835_PWMCLK_CNTL 40 +#define BCM2835_PWMCLK_DIV 41 + +#define BCM2835_PWM1_MS_MODE 0x8000 /// Run in MS mode +#define BCM2835_PWM1_USEFIFO 0x2000 /// Data from FIFO +#define BCM2835_PWM1_REVPOLAR 0x1000 /// Reverse polarity +#define BCM2835_PWM1_OFFSTATE 0x0800 /// Ouput Off state +#define BCM2835_PWM1_REPEATFF 0x0400 /// Repeat last value if FIFO empty +#define BCM2835_PWM1_SERIAL 0x0200 /// Run in serial mode +#define BCM2835_PWM1_ENABLE 0x0100 /// Channel Enable + +#define BCM2835_PWM0_MS_MODE 0x0080 /// Run in MS mode +#define BCM2835_PWM0_USEFIFO 0x0020 /// Data from FIFO +#define BCM2835_PWM0_REVPOLAR 0x0010 /// Reverse polarity +#define BCM2835_PWM0_OFFSTATE 0x0008 /// Ouput Off state +#define BCM2835_PWM0_REPEATFF 0x0004 /// Repeat last value if FIFO empty +#define BCM2835_PWM0_SERIAL 0x0002 /// Run in serial mode +#define BCM2835_PWM0_ENABLE 0x0001 /// Channel Enable + +// Historical name compatibility +#ifndef BCM2835_NO_DELAY_COMPATIBILITY +#define delay(x) bcm2835_delay(x) +#define delayMicroseconds(x) bcm2835_delayMicroseconds(x) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + /// \defgroup init Library initialisation and management + /// These functions allow you to intialise and control the bcm2835 library + /// @{ + + /// Initialise the library by opening /dev/mem and getting pointers to the + /// internal memory for BCM 2835 device registers. You must call this (successfully) + /// before calling any other + /// functions in this library (except bcm2835_set_debug). + /// If bcm2835_init() fails by returning 0, + /// calling any other function may result in crashes or other failures. + /// Prints messages to stderr in case of errors. + /// \return 1 if successful else 0 + extern int bcm2835_init(void); + + /// Close the library, deallocating any allocated memory and closing /dev/mem + /// \return 1 if successful else 0 + extern int bcm2835_close(void); + + /// Sets the debug level of the library. + /// A value of 1 prevents mapping to /dev/mem, and makes the library print out + /// what it would do, rather than accessing the GPIO registers. + /// A value of 0, the default, causes normal operation. + /// Call this before calling bcm2835_init(); + /// \param[in] debug The new debug level. 1 means debug + extern void bcm2835_set_debug(uint8_t debug); + + /// @} // end of init + + /// \defgroup lowlevel Low level register access + /// These functions provide low level register access, and should not generally + /// need to be used + /// + /// @{ + + /// Reads 32 bit value from a peripheral address + /// The read is done twice, and is therefore always safe in terms of + /// manual section 1.3 Peripheral access precautions for correct memory ordering + /// \param[in] paddr Physical address to read from. See BCM2835_GPIO_BASE etc. + /// \return the value read from the 32 bit register + /// \sa Physical Addresses + extern uint32_t bcm2835_peri_read(volatile uint32_t* paddr); + + + /// Reads 32 bit value from a peripheral address without the read barrier + /// You should only use this when your code has previously called bcm2835_peri_read() + /// within the same peripheral, and no other peripheral access has occurred since. + /// \param[in] paddr Physical address to read from. See BCM2835_GPIO_BASE etc. + /// \return the value read from the 32 bit register + /// \sa Physical Addresses + extern uint32_t bcm2835_peri_read_nb(volatile uint32_t* paddr); + + + /// Writes 32 bit value from a peripheral address + /// The write is done twice, and is therefore always safe in terms of + /// manual section 1.3 Peripheral access precautions for correct memory ordering + /// \param[in] paddr Physical address to read from. See BCM2835_GPIO_BASE etc. + /// \param[in] value The 32 bit value to write + /// \sa Physical Addresses + extern void bcm2835_peri_write(volatile uint32_t* paddr, uint32_t value); + + /// Writes 32 bit value from a peripheral address without the write barrier + /// You should only use this when your code has previously called bcm2835_peri_write() + /// within the same peripheral, and no other peripheral access has occurred since. + /// \param[in] paddr Physical address to read from. See BCM2835_GPIO_BASE etc. + /// \param[in] value The 32 bit value to write + /// \sa Physical Addresses + extern void bcm2835_peri_write_nb(volatile uint32_t* paddr, uint32_t value); + + /// Alters a number of bits in a 32 peripheral regsiter. + /// It reads the current valu and then alters the bits deines as 1 in mask, + /// according to the bit value in value. + /// All other bits that are 0 in the mask are unaffected. + /// Use this to alter a subset of the bits in a register. + /// The write is done twice, and is therefore always safe in terms of + /// manual section 1.3 Peripheral access precautions for correct memory ordering + /// \param[in] paddr Physical address to read from. See BCM2835_GPIO_BASE etc. + /// \param[in] value The 32 bit value to write, masked in by mask. + /// \param[in] mask Bitmask that defines the bits that will be altered in the register. + /// \sa Physical Addresses + extern void bcm2835_peri_set_bits(volatile uint32_t* paddr, uint32_t value, uint32_t mask); + /// @} // end of lowlevel + + /// \defgroup gpio GPIO register access + /// These functions allow you to control the GPIO interface. You can set the + /// function of each GPIO pin, read the input state and set the output state. + /// @{ + + /// Sets the Function Select register for the given pin, which configures + /// the pin as Input, Output or one of the 6 alternate functions. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from RPiGPIOPin. + /// \param[in] mode Mode to set the pin to, one of BCM2835_GPIO_FSEL_* from \ref bcm2835FunctionSelect + extern void bcm2835_gpio_fsel(uint8_t pin, uint8_t mode); + + /// Sets the specified pin output to + /// HIGH. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + /// \sa bcm2835_gpio_write() + extern void bcm2835_gpio_set(uint8_t pin); + + /// Sets the specified pin output to + /// LOW. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + /// \sa bcm2835_gpio_write() + extern void bcm2835_gpio_clr(uint8_t pin); + + /// Sets any of the first 32 GPIO output pins specified in the mask to + /// HIGH. + /// \param[in] mask Mask of pins to affect. Use eg: (1 << RPI_GPIO_P1_03) | (1 << RPI_GPIO_P1_05) + /// \sa bcm2835_gpio_write_multi() + extern void bcm2835_gpio_set_multi(uint32_t mask); + + /// Sets any of the first 32 GPIO output pins specified in the mask to + /// LOW. + /// \param[in] mask Mask of pins to affect. Use eg: (1 << RPI_GPIO_P1_03) | (1 << RPI_GPIO_P1_05) + /// \sa bcm2835_gpio_write_multi() + extern void bcm2835_gpio_clr_multi(uint32_t mask); + + /// Reads the current level on the specified + /// pin and returns either HIGH or LOW. Works whether or not the pin + /// is an input or an output. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + /// \return the current level either HIGH or LOW + extern uint8_t bcm2835_gpio_lev(uint8_t pin); + + /// Event Detect Status. + /// Tests whether the specified pin has detected a level or edge + /// as requested by bcm2835_gpio_ren(), bcm2835_gpio_fen(), bcm2835_gpio_hen(), + /// bcm2835_gpio_len(), bcm2835_gpio_aren(), bcm2835_gpio_afen(). + /// Clear the flag for a given pin by calling bcm2835_gpio_set_eds(pin); + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + /// \return HIGH if the event detect status for th given pin is true. + extern uint8_t bcm2835_gpio_eds(uint8_t pin); + + /// Sets the Event Detect Status register for a given pin to 1, + /// which has the effect of clearing the flag. Use this afer seeing + /// an Event Detect Status on the pin. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_set_eds(uint8_t pin); + + /// Enable Rising Edge Detect Enable for the specified pin. + /// When a rising edge is detected, sets the appropriate pin in Event Detect Status. + /// The GPRENn registers use + /// synchronous edge detection. This means the input signal is sampled using the + /// system clock and then it is looking for a ?011? pattern on the sampled signal. This + /// has the effect of suppressing glitches. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_ren(uint8_t pin); + + /// Disable Rising Edge Detect Enable for the specified pin. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_clr_ren(uint8_t pin); + + /// Enable Falling Edge Detect Enable for the specified pin. + /// When a falling edge is detected, sets the appropriate pin in Event Detect Status. + /// The GPRENn registers use + /// synchronous edge detection. This means the input signal is sampled using the + /// system clock and then it is looking for a ?100? pattern on the sampled signal. This + /// has the effect of suppressing glitches. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_fen(uint8_t pin); + + /// Disable Falling Edge Detect Enable for the specified pin. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_clr_fen(uint8_t pin); + + /// Enable High Detect Enable for the specified pin. + /// When a HIGH level is detected on the pin, sets the appropriate pin in Event Detect Status. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_hen(uint8_t pin); + + /// Disable High Detect Enable for the specified pin. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_clr_hen(uint8_t pin); + + /// Enable Low Detect Enable for the specified pin. + /// When a LOW level is detected on the pin, sets the appropriate pin in Event Detect Status. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_len(uint8_t pin); + + /// Disable Low Detect Enable for the specified pin. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_clr_len(uint8_t pin); + + /// Enable Asynchronous Rising Edge Detect Enable for the specified pin. + /// When a rising edge is detected, sets the appropriate pin in Event Detect Status. + /// Asynchronous means the incoming signal is not sampled by the system clock. As such + /// rising edges of very short duration can be detected. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_aren(uint8_t pin); + + /// Disable Asynchronous Rising Edge Detect Enable for the specified pin. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_clr_aren(uint8_t pin); + + /// Enable Asynchronous Falling Edge Detect Enable for the specified pin. + /// When a falling edge is detected, sets the appropriate pin in Event Detect Status. + /// Asynchronous means the incoming signal is not sampled by the system clock. As such + /// falling edges of very short duration can be detected. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_afen(uint8_t pin); + + /// Disable Asynchronous Falling Edge Detect Enable for the specified pin. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + extern void bcm2835_gpio_clr_afen(uint8_t pin); + + /// Sets the Pull-up/down register for the given pin. This is + /// used with bcm2835_gpio_pudclk() to set the Pull-up/down resistor for the given pin. + /// However, it is usually more convenient to use bcm2835_gpio_set_pud(). + /// \param[in] pud The desired Pull-up/down mode. One of BCM2835_GPIO_PUD_* from bcm2835PUDControl + /// \sa bcm2835_gpio_set_pud() + extern void bcm2835_gpio_pud(uint8_t pud); + + /// Clocks the Pull-up/down value set earlier by bcm2835_gpio_pud() into the pin. + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + /// \param[in] on HIGH to clock the value from bcm2835_gpio_pud() into the pin. + /// LOW to remove the clock. + /// \sa bcm2835_gpio_set_pud() + extern void bcm2835_gpio_pudclk(uint8_t pin, uint8_t on); + + /// Reads and returns the Pad Control for the given GPIO group. + /// \param[in] group The GPIO pad group number, one of BCM2835_PAD_GROUP_GPIO_* + /// \return Mask of bits from BCM2835_PAD_* from \ref bcm2835PadGroup + extern uint32_t bcm2835_gpio_pad(uint8_t group); + + /// Sets the Pad Control for the given GPIO group. + /// \param[in] group The GPIO pad group number, one of BCM2835_PAD_GROUP_GPIO_* + /// \param[in] control Mask of bits from BCM2835_PAD_* from \ref bcm2835PadGroup + extern void bcm2835_gpio_set_pad(uint8_t group, uint32_t control); + + /// Delays for the specified number of milliseconds. + /// Uses nanosleep(), and therefore does not use CPU until the time is up. + /// However, you are at the mercy of nanosleep(). From the manual for nanosleep(): + /// If the interval specified in req is not an exact multiple of the granularity + /// underlying clock (see time(7)), then the interval will be + /// rounded up to the next multiple. Furthermore, after the sleep completes, + /// there may still be a delay before the CPU becomes free to once + /// again execute the calling thread. + /// \param[in] millis Delay in milliseconds + extern void bcm2835_delay (unsigned int millis); + + /// Delays for the specified number of microseconds. + /// Uses a combination of nanosleep() and a busy wait loop on the BCM2835 system timers, + /// However, you are at the mercy of nanosleep(). From the manual for nanosleep(): + /// If the interval specified in req is not an exact multiple of the granularity + /// underlying clock (see time(7)), then the interval will be + /// rounded up to the next multiple. Furthermore, after the sleep completes, + /// there may still be a delay before the CPU becomes free to once + /// again execute the calling thread. + /// For times less than about 450 microseconds, uses a busy wait on the System Timer. + /// It is reported that a delay of 0 microseconds on RaspberryPi will in fact + /// result in a delay of about 80 microseconds. Your mileage may vary. + /// \param[in] micros Delay in microseconds + extern void bcm2835_delayMicroseconds (uint64_t micros); + + /// Sets the output state of the specified pin + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + /// \param[in] on HIGH sets the output to HIGH and LOW to LOW. + extern void bcm2835_gpio_write(uint8_t pin, uint8_t on); + + /// Sets any of the first 32 GPIO output pins specified in the mask to the state given by on + /// \param[in] mask Mask of pins to affect. Use eg: (1 << RPI_GPIO_P1_03) | (1 << RPI_GPIO_P1_05) + /// \param[in] on HIGH sets the output to HIGH and LOW to LOW. + extern void bcm2835_gpio_write_multi(uint32_t mask, uint8_t on); + + /// Sets the first 32 GPIO output pins specified in the mask to the value given by value + /// \param[in] value values required for each bit masked in by mask, eg: (1 << RPI_GPIO_P1_03) | (1 << RPI_GPIO_P1_05) + /// \param[in] mask Mask of pins to affect. Use eg: (1 << RPI_GPIO_P1_03) | (1 << RPI_GPIO_P1_05) + extern void bcm2835_gpio_write_mask(uint32_t value, uint32_t mask); + + /// Sets the Pull-up/down mode for the specified pin. This is more convenient than + /// clocking the mode in with bcm2835_gpio_pud() and bcm2835_gpio_pudclk(). + /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin. + /// \param[in] pud The desired Pull-up/down mode. One of BCM2835_GPIO_PUD_* from bcm2835PUDControl + extern void bcm2835_gpio_set_pud(uint8_t pin, uint8_t pud); + + /// @} + + /// \defgroup spi SPI access + /// These functions let you use SPI0 (Serial Peripheral Interface) to + /// interface with an external SPI device. + /// @{ + + /// Start SPI operations. + /// Forces RPi SPI0 pins P1-19 (MOSI), P1-21 (MISO), P1-23 (CLK), P1-24 (CE0) and P1-26 (CE1) + /// to alternate function ALT0, which enables those pins for SPI interface. + /// You should call bcm2835_spi_end() when all SPI funcitons are complete to return the pins to + /// their default functions + /// \sa bcm2835_spi_end() + extern void bcm2835_spi_begin(void); + + /// End SPI operations. + /// SPI0 pins P1-19 (MOSI), P1-21 (MISO), P1-23 (CLK), P1-24 (CE0) and P1-26 (CE1) + /// are returned to their default INPUT behaviour. + extern void bcm2835_spi_end(void); + + /// Sets the SPI bit order + /// NOTE: has no effect. Not supported by SPI0. + /// Defaults to + /// \param[in] order The desired bit order, one of BCM2835_SPI_BIT_ORDER_*, + /// see \ref bcm2835SPIBitOrder + extern void bcm2835_spi_setBitOrder(uint8_t order); + + /// Sets the SPI clock divider and therefore the + /// SPI clock speed. + /// \param[in] divider The desired SPI clock divider, one of BCM2835_SPI_CLOCK_DIVIDER_*, + /// see \ref bcm2835SPIClockDivider + extern void bcm2835_spi_setClockDivider(uint16_t divider); + + /// Sets the SPI data mode + /// Sets the clock polariy and phase + /// \param[in] mode The desired data mode, one of BCM2835_SPI_MODE*, + /// see \ref bcm2835SPIMode + extern void bcm2835_spi_setDataMode(uint8_t mode); + + /// Sets the chip select pin(s) + /// When an bcm2835_spi_transfer() is made, the selected pin(s) will be asserted during the + /// transfer. + /// \param[in] cs Specifies the CS pins(s) that are used to activate the desired slave. + /// One of BCM2835_SPI_CS*, see \ref bcm2835SPIChipSelect + extern void bcm2835_spi_chipSelect(uint8_t cs); + + /// Sets the chip select pin polarity for a given pin + /// When an bcm2835_spi_transfer() occurs, the currently selected chip select pin(s) + /// will be asserted to the + /// value given by active. When transfers are not happening, the chip select pin(s) + /// return to the complement (inactive) value. + /// \param[in] cs The chip select pin to affect + /// \param[in] active Whether the chip select pin is to be active HIGH + extern void bcm2835_spi_setChipSelectPolarity(uint8_t cs, uint8_t active); + + /// Transfers one byte to and from the currently selected SPI slave. + /// Asserts the currently selected CS pins (as previously set by bcm2835_spi_chipSelect) + /// during the transfer. + /// Clocks the 8 bit value out on MOSI, and simultaneously clocks in data from MISO. + /// Returns the read data byte from the slave. + /// Uses polled transfer as per section 10.6.1 of the BCM 2835 ARM Peripherls manual + /// \param[in] value The 8 bit data byte to write to MOSI + /// \return The 8 bit byte simultaneously read from MISO + /// \sa bcm2835_spi_transfern() + extern uint8_t bcm2835_spi_transfer(uint8_t value); + + /// Transfers any number of bytes to and from the currently selected SPI slave. + /// Asserts the currently selected CS pins (as previously set by bcm2835_spi_chipSelect) + /// during the transfer. + /// Clocks the len 8 bit bytes out on MOSI, and simultaneously clocks in data from MISO. + /// The data read read from the slave is placed into rbuf. rbuf must be at least len bytes long + /// Uses polled transfer as per section 10.6.1 of the BCM 2835 ARM Peripherls manual + /// \param[in] tbuf Buffer of bytes to send. + /// \param[out] rbuf Received bytes will by put in this buffer + /// \param[in] len Number of bytes in the tbuf buffer, and the number of bytes to send/received + /// \sa bcm2835_spi_transfer() + extern void bcm2835_spi_transfernb(char* tbuf, char* rbuf, uint32_t len); + + /// Transfers any number of bytes to and from the currently selected SPI slave + /// using bcm2835_spi_transfernb. + /// The returned data from the slave replaces the transmitted data in the buffer. + /// \param[in,out] buf Buffer of bytes to send. Received bytes will replace the contents + /// \param[in] len Number of bytes int eh buffer, and the number of bytes to send/received + /// \sa bcm2835_spi_transfer() + extern void bcm2835_spi_transfern(char* buf, uint32_t len); + + /// Transfers any number of bytes to the currently selected SPI slave. + /// Asserts the currently selected CS pins (as previously set by bcm2835_spi_chipSelect) + /// during the transfer. + /// \param[in] buf Buffer of bytes to send. + /// \param[in] len Number of bytes in the tbuf buffer, and the number of bytes to send + extern void bcm2835_spi_writenb(char* buf, uint32_t len); + + /// @} + + /// \defgroup i2c I2C access + /// These functions let you use I2C (The Broadcom Serial Control bus with the Philips + /// I2C bus/interface version 2.1 January 2000.) to interface with an external I2C device. + /// @{ + + /// Start I2C operations. + /// Forces RPi I2C pins P1-03 (SDA) and P1-05 (SCL) + /// to alternate function ALT0, which enables those pins for I2C interface. + /// You should call bcm2835_i2c_end() when all I2C functions are complete to return the pins to + /// their default functions + /// \sa bcm2835_i2c_end() + extern void bcm2835_i2c_begin(void); + + /// End I2C operations. + /// I2C pins P1-03 (SDA) and P1-05 (SCL) + /// are returned to their default INPUT behaviour. + extern void bcm2835_i2c_end(void); + + /// Sets the I2C slave address. + /// \param[in] addr The I2C slave address. + extern void bcm2835_i2c_setSlaveAddress(uint8_t addr); + + /// Sets the I2C clock divider and therefore the I2C clock speed. + /// \param[in] divider The desired I2C clock divider, one of BCM2835_I2C_CLOCK_DIVIDER_*, + /// see \ref bcm2835I2CClockDivider + extern void bcm2835_i2c_setClockDivider(uint16_t divider); + + /// Sets the I2C clock divider by converting the baudrate parameter to + /// the equivalent I2C clock divider. ( see \sa bcm2835_i2c_setClockDivider) + /// For the I2C standard 100khz you would set baudrate to 100000 + /// The use of baudrate corresponds to its use in the I2C kernel device + /// driver. (Of course, bcm2835 has nothing to do with the kernel driver) + extern void bcm2835_i2c_set_baudrate(uint32_t baudrate); + + /// Transfers any number of bytes to the currently selected I2C slave. + /// (as previously set by \sa bcm2835_i2c_setSlaveAddress) + /// \param[in] buf Buffer of bytes to send. + /// \param[in] len Number of bytes in the buf buffer, and the number of bytes to send. + /// \return reason see \ref bcm2835I2CReasonCodes + extern uint8_t bcm2835_i2c_write(const char * buf, uint32_t len); + + /// Transfers any number of bytes from the currently selected I2C slave. + /// (as previously set by \sa bcm2835_i2c_setSlaveAddress) + /// \param[in] buf Buffer of bytes to receive. + /// \param[in] len Number of bytes in the buf buffer, and the number of bytes to received. + /// \return reason see \ref bcm2835I2CReasonCodes + extern uint8_t bcm2835_i2c_read(char* buf, uint32_t len); + + /// Allows reading from I2C slaves that require a repeated start (without any prior stop) + /// to read after the required slave register has been set. For example, the popular + /// MPL3115A2 pressure and temperature sensor. Note that your device must support or + /// require this mode. If your device does not require this mode then the standard + /// combined: + /// \sa bcm2835_i2c_write + /// \sa bcm2835_i2c_read + /// are a better choice. + /// Will read from the slave previously set by \sa bcm2835_i2c_setSlaveAddress + /// \param[in] regaddr Buffer containing the slave register you wish to read from. + /// \param[in] buf Buffer of bytes to receive. + /// \param[in] len Number of bytes in the buf buffer, and the number of bytes to received. + /// \return reason see \ref bcm2835I2CReasonCodes + extern uint8_t bcm2835_i2c_read_register_rs(char* regaddr, char* buf, uint32_t len); + + /// @} + + /// \defgroup st System Timer access + /// Allows access to and delays using the System Timer Counter. + /// @{ + + /// Read the System Timer Counter register. + /// \return the value read from the System Timer Counter Lower 32 bits register + uint64_t bcm2835_st_read(void); + + /// Delays for the specified number of microseconds with offset. + /// \param[in] offset_micros Offset in microseconds + /// \param[in] micros Delay in microseconds + extern void bcm2835_st_delay(uint64_t offset_micros, uint64_t micros); + + /// @} + +#ifdef __cplusplus +} +#endif + +#endif // BCM2835_H + +/// @example blink.c +/// Blinks RPi GPIO pin 11 on and off + +/// @example input.c +/// Reads the state of an RPi input pin + +/// @example event.c +/// Shows how to use event detection on an input pin + +/// @example spi.c +/// Shows how to use SPI interface to transfer a byte to and from an SPI device + +/// @example spin.c +/// Shows how to use SPI interface to transfer a number of bytes to and from an SPI device diff --git a/samples/C++/cuda.cu b/samples/C++/cuda.cu deleted file mode 100644 index ddef40cd..00000000 --- a/samples/C++/cuda.cu +++ /dev/null @@ -1,39 +0,0 @@ -void foo() -{ - cudaArray* cu_array; - texture tex; - - // Allocate array - cudaChannelFormatDesc description = cudaCreateChannelDesc(); - cudaMallocArray(&cu_array, &description, width, height); - - // Copy image data to array - cudaMemcpyToArray(cu_array, image, width*height*sizeof(float), cudaMemcpyHostToDevice); - - // Set texture parameters (default) - tex.addressMode[0] = cudaAddressModeClamp; - tex.addressMode[1] = cudaAddressModeClamp; - tex.filterMode = cudaFilterModePoint; - tex.normalized = false; // do not normalize coordinates - - // Bind the array to the texture - cudaBindTextureToArray(tex, cu_array); - - // Run kernel - dim3 blockDim(16, 16, 1); - dim3 gridDim((width + blockDim.x - 1)/ blockDim.x, (height + blockDim.y - 1) / blockDim.y, 1); - kernel<<< gridDim, blockDim, 0 >>>(d_data, height, width); - - // Unbind the array from the texture - cudaUnbindTexture(tex); -} //end foo() - -__global__ void kernel(float* odata, int height, int width) -{ - unsigned int x = blockIdx.x*blockDim.x + threadIdx.x; - unsigned int y = blockIdx.y*blockDim.y + threadIdx.y; - if (x < width && y < height) { - float c = tex2D(tex, x, y); - odata[y*width+x] = c; - } -} diff --git a/samples/C++/epoll_reactor.ipp b/samples/C++/epoll_reactor.ipp new file mode 100644 index 00000000..5d592aff --- /dev/null +++ b/samples/C++/epoll_reactor.ipp @@ -0,0 +1,664 @@ +// +// detail/impl/epoll_reactor.ipp +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// +// Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_IPP +#define BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_IPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include + +#if defined(BOOST_ASIO_HAS_EPOLL) + +#include +#include +#include +#include +#include + +#if defined(BOOST_ASIO_HAS_TIMERFD) +# include +#endif // defined(BOOST_ASIO_HAS_TIMERFD) + +#include + +namespace boost { +namespace asio { +namespace detail { + +epoll_reactor::epoll_reactor(boost::asio::io_service& io_service) + : boost::asio::detail::service_base(io_service), + io_service_(use_service(io_service)), + mutex_(), + interrupter_(), + epoll_fd_(do_epoll_create()), + timer_fd_(do_timerfd_create()), + shutdown_(false) +{ + // Add the interrupter's descriptor to epoll. + epoll_event ev = { 0, { 0 } }; + ev.events = EPOLLIN | EPOLLERR | EPOLLET; + ev.data.ptr = &interrupter_; + epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, interrupter_.read_descriptor(), &ev); + interrupter_.interrupt(); + + // Add the timer descriptor to epoll. + if (timer_fd_ != -1) + { + ev.events = EPOLLIN | EPOLLERR; + ev.data.ptr = &timer_fd_; + epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, timer_fd_, &ev); + } +} + +epoll_reactor::~epoll_reactor() +{ + if (epoll_fd_ != -1) + close(epoll_fd_); + if (timer_fd_ != -1) + close(timer_fd_); +} + +void epoll_reactor::shutdown_service() +{ + mutex::scoped_lock lock(mutex_); + shutdown_ = true; + lock.unlock(); + + op_queue ops; + + while (descriptor_state* state = registered_descriptors_.first()) + { + for (int i = 0; i < max_ops; ++i) + ops.push(state->op_queue_[i]); + state->shutdown_ = true; + registered_descriptors_.free(state); + } + + timer_queues_.get_all_timers(ops); + + io_service_.abandon_operations(ops); +} + +void epoll_reactor::fork_service(boost::asio::io_service::fork_event fork_ev) +{ + if (fork_ev == boost::asio::io_service::fork_child) + { + if (epoll_fd_ != -1) + ::close(epoll_fd_); + epoll_fd_ = -1; + epoll_fd_ = do_epoll_create(); + + if (timer_fd_ != -1) + ::close(timer_fd_); + timer_fd_ = -1; + timer_fd_ = do_timerfd_create(); + + interrupter_.recreate(); + + // Add the interrupter's descriptor to epoll. + epoll_event ev = { 0, { 0 } }; + ev.events = EPOLLIN | EPOLLERR | EPOLLET; + ev.data.ptr = &interrupter_; + epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, interrupter_.read_descriptor(), &ev); + interrupter_.interrupt(); + + // Add the timer descriptor to epoll. + if (timer_fd_ != -1) + { + ev.events = EPOLLIN | EPOLLERR; + ev.data.ptr = &timer_fd_; + epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, timer_fd_, &ev); + } + + update_timeout(); + + // Re-register all descriptors with epoll. + mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_); + for (descriptor_state* state = registered_descriptors_.first(); + state != 0; state = state->next_) + { + ev.events = state->registered_events_; + ev.data.ptr = state; + int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, state->descriptor_, &ev); + if (result != 0) + { + boost::system::error_code ec(errno, + boost::asio::error::get_system_category()); + boost::asio::detail::throw_error(ec, "epoll re-registration"); + } + } + } +} + +void epoll_reactor::init_task() +{ + io_service_.init_task(); +} + +int epoll_reactor::register_descriptor(socket_type descriptor, + epoll_reactor::per_descriptor_data& descriptor_data) +{ + descriptor_data = allocate_descriptor_state(); + + { + mutex::scoped_lock descriptor_lock(descriptor_data->mutex_); + + descriptor_data->reactor_ = this; + descriptor_data->descriptor_ = descriptor; + descriptor_data->shutdown_ = false; + } + + epoll_event ev = { 0, { 0 } }; + ev.events = EPOLLIN | EPOLLERR | EPOLLHUP | EPOLLPRI | EPOLLET; + descriptor_data->registered_events_ = ev.events; + ev.data.ptr = descriptor_data; + int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, descriptor, &ev); + if (result != 0) + return errno; + + return 0; +} + +int epoll_reactor::register_internal_descriptor( + int op_type, socket_type descriptor, + epoll_reactor::per_descriptor_data& descriptor_data, reactor_op* op) +{ + descriptor_data = allocate_descriptor_state(); + + { + mutex::scoped_lock descriptor_lock(descriptor_data->mutex_); + + descriptor_data->reactor_ = this; + descriptor_data->descriptor_ = descriptor; + descriptor_data->shutdown_ = false; + descriptor_data->op_queue_[op_type].push(op); + } + + epoll_event ev = { 0, { 0 } }; + ev.events = EPOLLIN | EPOLLERR | EPOLLHUP | EPOLLPRI | EPOLLET; + descriptor_data->registered_events_ = ev.events; + ev.data.ptr = descriptor_data; + int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, descriptor, &ev); + if (result != 0) + return errno; + + return 0; +} + +void epoll_reactor::move_descriptor(socket_type, + epoll_reactor::per_descriptor_data& target_descriptor_data, + epoll_reactor::per_descriptor_data& source_descriptor_data) +{ + target_descriptor_data = source_descriptor_data; + source_descriptor_data = 0; +} + +void epoll_reactor::start_op(int op_type, socket_type descriptor, + epoll_reactor::per_descriptor_data& descriptor_data, reactor_op* op, + bool is_continuation, bool allow_speculative) +{ + if (!descriptor_data) + { + op->ec_ = boost::asio::error::bad_descriptor; + post_immediate_completion(op, is_continuation); + return; + } + + mutex::scoped_lock descriptor_lock(descriptor_data->mutex_); + + if (descriptor_data->shutdown_) + { + post_immediate_completion(op, is_continuation); + return; + } + + if (descriptor_data->op_queue_[op_type].empty()) + { + if (allow_speculative + && (op_type != read_op + || descriptor_data->op_queue_[except_op].empty())) + { + if (op->perform()) + { + descriptor_lock.unlock(); + io_service_.post_immediate_completion(op, is_continuation); + return; + } + + if (op_type == write_op) + { + if ((descriptor_data->registered_events_ & EPOLLOUT) == 0) + { + epoll_event ev = { 0, { 0 } }; + ev.events = descriptor_data->registered_events_ | EPOLLOUT; + ev.data.ptr = descriptor_data; + if (epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev) == 0) + { + descriptor_data->registered_events_ |= ev.events; + } + else + { + op->ec_ = boost::system::error_code(errno, + boost::asio::error::get_system_category()); + io_service_.post_immediate_completion(op, is_continuation); + return; + } + } + } + } + else + { + if (op_type == write_op) + { + descriptor_data->registered_events_ |= EPOLLOUT; + } + + epoll_event ev = { 0, { 0 } }; + ev.events = descriptor_data->registered_events_; + ev.data.ptr = descriptor_data; + epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev); + } + } + + descriptor_data->op_queue_[op_type].push(op); + io_service_.work_started(); +} + +void epoll_reactor::cancel_ops(socket_type, + epoll_reactor::per_descriptor_data& descriptor_data) +{ + if (!descriptor_data) + return; + + mutex::scoped_lock descriptor_lock(descriptor_data->mutex_); + + op_queue ops; + for (int i = 0; i < max_ops; ++i) + { + while (reactor_op* op = descriptor_data->op_queue_[i].front()) + { + op->ec_ = boost::asio::error::operation_aborted; + descriptor_data->op_queue_[i].pop(); + ops.push(op); + } + } + + descriptor_lock.unlock(); + + io_service_.post_deferred_completions(ops); +} + +void epoll_reactor::deregister_descriptor(socket_type descriptor, + epoll_reactor::per_descriptor_data& descriptor_data, bool closing) +{ + if (!descriptor_data) + return; + + mutex::scoped_lock descriptor_lock(descriptor_data->mutex_); + + if (!descriptor_data->shutdown_) + { + if (closing) + { + // The descriptor will be automatically removed from the epoll set when + // it is closed. + } + else + { + epoll_event ev = { 0, { 0 } }; + epoll_ctl(epoll_fd_, EPOLL_CTL_DEL, descriptor, &ev); + } + + op_queue ops; + for (int i = 0; i < max_ops; ++i) + { + while (reactor_op* op = descriptor_data->op_queue_[i].front()) + { + op->ec_ = boost::asio::error::operation_aborted; + descriptor_data->op_queue_[i].pop(); + ops.push(op); + } + } + + descriptor_data->descriptor_ = -1; + descriptor_data->shutdown_ = true; + + descriptor_lock.unlock(); + + free_descriptor_state(descriptor_data); + descriptor_data = 0; + + io_service_.post_deferred_completions(ops); + } +} + +void epoll_reactor::deregister_internal_descriptor(socket_type descriptor, + epoll_reactor::per_descriptor_data& descriptor_data) +{ + if (!descriptor_data) + return; + + mutex::scoped_lock descriptor_lock(descriptor_data->mutex_); + + if (!descriptor_data->shutdown_) + { + epoll_event ev = { 0, { 0 } }; + epoll_ctl(epoll_fd_, EPOLL_CTL_DEL, descriptor, &ev); + + op_queue ops; + for (int i = 0; i < max_ops; ++i) + ops.push(descriptor_data->op_queue_[i]); + + descriptor_data->descriptor_ = -1; + descriptor_data->shutdown_ = true; + + descriptor_lock.unlock(); + + free_descriptor_state(descriptor_data); + descriptor_data = 0; + } +} + +void epoll_reactor::run(bool block, op_queue& ops) +{ + // This code relies on the fact that the task_io_service queues the reactor + // task behind all descriptor operations generated by this function. This + // means, that by the time we reach this point, any previously returned + // descriptor operations have already been dequeued. Therefore it is now safe + // for us to reuse and return them for the task_io_service to queue again. + + // Calculate a timeout only if timerfd is not used. + int timeout; + if (timer_fd_ != -1) + timeout = block ? -1 : 0; + else + { + mutex::scoped_lock lock(mutex_); + timeout = block ? get_timeout() : 0; + } + + // Block on the epoll descriptor. + epoll_event events[128]; + int num_events = epoll_wait(epoll_fd_, events, 128, timeout); + +#if defined(BOOST_ASIO_HAS_TIMERFD) + bool check_timers = (timer_fd_ == -1); +#else // defined(BOOST_ASIO_HAS_TIMERFD) + bool check_timers = true; +#endif // defined(BOOST_ASIO_HAS_TIMERFD) + + // Dispatch the waiting events. + for (int i = 0; i < num_events; ++i) + { + void* ptr = events[i].data.ptr; + if (ptr == &interrupter_) + { + // No need to reset the interrupter since we're leaving the descriptor + // in a ready-to-read state and relying on edge-triggered notifications + // to make it so that we only get woken up when the descriptor's epoll + // registration is updated. + +#if defined(BOOST_ASIO_HAS_TIMERFD) + if (timer_fd_ == -1) + check_timers = true; +#else // defined(BOOST_ASIO_HAS_TIMERFD) + check_timers = true; +#endif // defined(BOOST_ASIO_HAS_TIMERFD) + } +#if defined(BOOST_ASIO_HAS_TIMERFD) + else if (ptr == &timer_fd_) + { + check_timers = true; + } +#endif // defined(BOOST_ASIO_HAS_TIMERFD) + else + { + // The descriptor operation doesn't count as work in and of itself, so we + // don't call work_started() here. This still allows the io_service to + // stop if the only remaining operations are descriptor operations. + descriptor_state* descriptor_data = static_cast(ptr); + descriptor_data->set_ready_events(events[i].events); + ops.push(descriptor_data); + } + } + + if (check_timers) + { + mutex::scoped_lock common_lock(mutex_); + timer_queues_.get_ready_timers(ops); + +#if defined(BOOST_ASIO_HAS_TIMERFD) + if (timer_fd_ != -1) + { + itimerspec new_timeout; + itimerspec old_timeout; + int flags = get_timeout(new_timeout); + timerfd_settime(timer_fd_, flags, &new_timeout, &old_timeout); + } +#endif // defined(BOOST_ASIO_HAS_TIMERFD) + } +} + +void epoll_reactor::interrupt() +{ + epoll_event ev = { 0, { 0 } }; + ev.events = EPOLLIN | EPOLLERR | EPOLLET; + ev.data.ptr = &interrupter_; + epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, interrupter_.read_descriptor(), &ev); +} + +int epoll_reactor::do_epoll_create() +{ +#if defined(EPOLL_CLOEXEC) + int fd = epoll_create1(EPOLL_CLOEXEC); +#else // defined(EPOLL_CLOEXEC) + int fd = -1; + errno = EINVAL; +#endif // defined(EPOLL_CLOEXEC) + + if (fd == -1 && (errno == EINVAL || errno == ENOSYS)) + { + fd = epoll_create(epoll_size); + if (fd != -1) + ::fcntl(fd, F_SETFD, FD_CLOEXEC); + } + + if (fd == -1) + { + boost::system::error_code ec(errno, + boost::asio::error::get_system_category()); + boost::asio::detail::throw_error(ec, "epoll"); + } + + return fd; +} + +int epoll_reactor::do_timerfd_create() +{ +#if defined(BOOST_ASIO_HAS_TIMERFD) +# if defined(TFD_CLOEXEC) + int fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC); +# else // defined(TFD_CLOEXEC) + int fd = -1; + errno = EINVAL; +# endif // defined(TFD_CLOEXEC) + + if (fd == -1 && errno == EINVAL) + { + fd = timerfd_create(CLOCK_MONOTONIC, 0); + if (fd != -1) + ::fcntl(fd, F_SETFD, FD_CLOEXEC); + } + + return fd; +#else // defined(BOOST_ASIO_HAS_TIMERFD) + return -1; +#endif // defined(BOOST_ASIO_HAS_TIMERFD) +} + +epoll_reactor::descriptor_state* epoll_reactor::allocate_descriptor_state() +{ + mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_); + return registered_descriptors_.alloc(); +} + +void epoll_reactor::free_descriptor_state(epoll_reactor::descriptor_state* s) +{ + mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_); + registered_descriptors_.free(s); +} + +void epoll_reactor::do_add_timer_queue(timer_queue_base& queue) +{ + mutex::scoped_lock lock(mutex_); + timer_queues_.insert(&queue); +} + +void epoll_reactor::do_remove_timer_queue(timer_queue_base& queue) +{ + mutex::scoped_lock lock(mutex_); + timer_queues_.erase(&queue); +} + +void epoll_reactor::update_timeout() +{ +#if defined(BOOST_ASIO_HAS_TIMERFD) + if (timer_fd_ != -1) + { + itimerspec new_timeout; + itimerspec old_timeout; + int flags = get_timeout(new_timeout); + timerfd_settime(timer_fd_, flags, &new_timeout, &old_timeout); + return; + } +#endif // defined(BOOST_ASIO_HAS_TIMERFD) + interrupt(); +} + +int epoll_reactor::get_timeout() +{ + // By default we will wait no longer than 5 minutes. This will ensure that + // any changes to the system clock are detected after no longer than this. + return timer_queues_.wait_duration_msec(5 * 60 * 1000); +} + +#if defined(BOOST_ASIO_HAS_TIMERFD) +int epoll_reactor::get_timeout(itimerspec& ts) +{ + ts.it_interval.tv_sec = 0; + ts.it_interval.tv_nsec = 0; + + long usec = timer_queues_.wait_duration_usec(5 * 60 * 1000 * 1000); + ts.it_value.tv_sec = usec / 1000000; + ts.it_value.tv_nsec = usec ? (usec % 1000000) * 1000 : 1; + + return usec ? 0 : TFD_TIMER_ABSTIME; +} +#endif // defined(BOOST_ASIO_HAS_TIMERFD) + +struct epoll_reactor::perform_io_cleanup_on_block_exit +{ + explicit perform_io_cleanup_on_block_exit(epoll_reactor* r) + : reactor_(r), first_op_(0) + { + } + + ~perform_io_cleanup_on_block_exit() + { + if (first_op_) + { + // Post the remaining completed operations for invocation. + if (!ops_.empty()) + reactor_->io_service_.post_deferred_completions(ops_); + + // A user-initiated operation has completed, but there's no need to + // explicitly call work_finished() here. Instead, we'll take advantage of + // the fact that the task_io_service will call work_finished() once we + // return. + } + else + { + // No user-initiated operations have completed, so we need to compensate + // for the work_finished() call that the task_io_service will make once + // this operation returns. + reactor_->io_service_.work_started(); + } + } + + epoll_reactor* reactor_; + op_queue ops_; + operation* first_op_; +}; + +epoll_reactor::descriptor_state::descriptor_state() + : operation(&epoll_reactor::descriptor_state::do_complete) +{ +} + +operation* epoll_reactor::descriptor_state::perform_io(uint32_t events) +{ + mutex_.lock(); + perform_io_cleanup_on_block_exit io_cleanup(reactor_); + mutex::scoped_lock descriptor_lock(mutex_, mutex::scoped_lock::adopt_lock); + + // Exception operations must be processed first to ensure that any + // out-of-band data is read before normal data. + static const int flag[max_ops] = { EPOLLIN, EPOLLOUT, EPOLLPRI }; + for (int j = max_ops - 1; j >= 0; --j) + { + if (events & (flag[j] | EPOLLERR | EPOLLHUP)) + { + while (reactor_op* op = op_queue_[j].front()) + { + if (op->perform()) + { + op_queue_[j].pop(); + io_cleanup.ops_.push(op); + } + else + break; + } + } + } + + // The first operation will be returned for completion now. The others will + // be posted for later by the io_cleanup object's destructor. + io_cleanup.first_op_ = io_cleanup.ops_.front(); + io_cleanup.ops_.pop(); + return io_cleanup.first_op_; +} + +void epoll_reactor::descriptor_state::do_complete( + io_service_impl* owner, operation* base, + const boost::system::error_code& ec, std::size_t bytes_transferred) +{ + if (owner) + { + descriptor_state* descriptor_data = static_cast(base); + uint32_t events = static_cast(bytes_transferred); + if (operation* op = descriptor_data->perform_io(events)) + { + op->complete(*owner, ec, 0); + } + } +} + +} // namespace detail +} // namespace asio +} // namespace boost + +#include + +#endif // defined(BOOST_ASIO_HAS_EPOLL) + +#endif // BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_IPP diff --git a/samples/C++/libcanister.h b/samples/C++/libcanister.h new file mode 100644 index 00000000..b7d82a52 --- /dev/null +++ b/samples/C++/libcanister.h @@ -0,0 +1,138 @@ +#ifndef LIBCANIH +#define LIBCANIH +#include +#include +#include +#include + +#define int64 unsigned long long +//#define DEBUG + +#ifdef DEBUG +#define dout cout +#else +#define dout if (0) cerr +#endif + +using namespace std; + +namespace libcanister +{ + + //the canmem object is a generic memory container used commonly + //throughout the canister framework to hold memory of uncertain + //length which may or may not contain null bytes. + class canmem + { + public: + char* data; //the raw memory block + int size; //the absolute length of the block + canmem(); //creates an unallocated canmem + canmem(int allocsize); //creates an allocated, blank canmem of size + canmem(char* strdata); //automates the creation of zero-limited canmems + ~canmem(); //cleans up the canmem + void zeromem(); //overwrites this canmem + void fragmem(); //overwrites this canmem with fragment notation + void countlen(); //counts length of zero-limited strings and stores it in size + void trim(); //removes any nulls from the end of the string + static canmem null(); //returns a singleton null canmem + + }; + + //contains information about the canister + class caninfo + { + public: + canmem path; //physical path + canmem internalname; //a name for the canister + int numfiles; //the number of files in the canister + }; + + //necessary for the use of this class as a type in canfile + class canister; + + //this object holds the definition of a 'file' within the + //canister 'filesystem.' + class canfile + { + public: + libcanister::canister* parent; //the canister that holds this file + canmem path; //internal path ('filename') + canmem data; //the file's decompressed contents + int isfrag; //0 = probably not fragment, 1 = definitely a fragment (ignore) + int cfid; //'canfile id' -- a unique ID for this file + int64 dsize; //ondisk size (compressed form size) + int cachestate; //0 = not in memory, 1 = in memory, 2 = in memory and needs flush + //-1 = error, check the data for the message + void cache(); //pull the file from disk and cache it in memory + void cachedump(); //deletes the contents of this file from the memory cache after assuring the on disk copy is up to date + void cachedumpfinal(fstream& infile); //same as cachedump, but more efficient during closing procedures + void flush(); //updates the on disk copy, but retains the memory cache + }; + + //the primary class + //this defines and controls a single canister + class canister + { + //table of contents + //absolutely worthless to the control code in the canister + //but quite useful to programs using the API, as they may + //desire to enumerate the files in a canister for a user's + //use or for their own. + //contains a newline-delimited list of files in the container. + canfile TOC; + public: + caninfo info; //the general info about this canister + + //the raw canfiles -- recommended that programs do not modify + //these files directly, but not enforced. + canfile* files; + bool readonly; //if true then no write routines will do anything + + //maximum number of files to have in memory at any given + //time, change this to whatever suits your application. + int cachemax; + int cachecnt; //number of files in the cache (should not be modified) + + //both initialize the canister from a physical location + canister (canmem fspath); + canister (char* fspath); + + //destroys the canister (after flushing the modded buffers, of course) + ~canister(); + + //open the fspath + //does it exist? + // | --- yes --- opening it (return 1) + // | --- yes --- file is corrupted, halting (return -1) + // | --- no --- making a new one (return 0) + int open(); + + //close the canister, flush all buffers, clean up + int close(); + + //deletes the file at path inside this canister + int delFile(canmem path); + + //pulls the contents of the file from disk or memory and returns it as a file + canfile getFile(canmem path); + + //creates a file if it does not exist, otherwise overwrites + //returns whether operation succeeded + bool writeFile(canmem path, canmem data); + bool writeFile(canfile file); + + //get the 'table of contents', a file containing a newline delimited + //list of the file paths in the container which have contents + canfile getTOC(); + + //brings the cache back within the cachemax limit + //important: sCFID is the safe CFID + //(the CFID of the file we want to avoid uncaching) + //really just used internally, but it can't do any harm. + void cacheclean(int sCFID, bool dFlush = false); + }; + +} + +#endif \ No newline at end of file diff --git a/samples/C++/metrics.h b/samples/C++/metrics.h new file mode 100644 index 00000000..b6da859d --- /dev/null +++ b/samples/C++/metrics.h @@ -0,0 +1,92 @@ +// Copyright 2011 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef NINJA_METRICS_H_ +#define NINJA_METRICS_H_ + +#include +#include +using namespace std; + +#include "util.h" // For int64_t. + +/// The Metrics module is used for the debug mode that dumps timing stats of +/// various actions. To use, see METRIC_RECORD below. + +/// A single metrics we're tracking, like "depfile load time". +struct Metric { + string name; + /// Number of times we've hit the code path. + int count; + /// Total time (in micros) we've spent on the code path. + int64_t sum; +}; + + +/// A scoped object for recording a metric across the body of a function. +/// Used by the METRIC_RECORD macro. +struct ScopedMetric { + explicit ScopedMetric(Metric* metric); + ~ScopedMetric(); + +private: + Metric* metric_; + /// Timestamp when the measurement started. + /// Value is platform-dependent. + int64_t start_; +}; + +/// The singleton that stores metrics and prints the report. +struct Metrics { + Metric* NewMetric(const string& name); + + /// Print a summary report to stdout. + void Report(); + +private: + vector metrics_; +}; + +/// Get the current time as relative to some epoch. +/// Epoch varies between platforms; only useful for measuring elapsed time. +int64_t GetTimeMillis(); + +/// A simple stopwatch which returns the time +/// in seconds since Restart() was called. +struct Stopwatch { + public: + Stopwatch() : started_(0) {} + + /// Seconds since Restart() call. + double Elapsed() const { + return 1e-6 * static_cast(Now() - started_); + } + + void Restart() { started_ = Now(); } + + private: + uint64_t started_; + uint64_t Now() const; +}; + +/// The primary interface to metrics. Use METRIC_RECORD("foobar") at the top +/// of a function to get timing stats recorded for each call of the function. +#define METRIC_RECORD(name) \ + static Metric* metrics_h_metric = \ + g_metrics ? g_metrics->NewMetric(name) : NULL; \ + ScopedMetric metrics_h_scoped(metrics_h_metric); + +extern Metrics* g_metrics; + +#endif // NINJA_METRICS_H_ diff --git a/samples/C++/render_adapter.cpp b/samples/C++/render_adapter.cpp new file mode 100644 index 00000000..4a18f6f6 --- /dev/null +++ b/samples/C++/render_adapter.cpp @@ -0,0 +1,6 @@ +#include + +namespace Gui +{ + +} diff --git a/samples/C++/rpc.h b/samples/C++/rpc.h new file mode 100644 index 00000000..ce810992 --- /dev/null +++ b/samples/C++/rpc.h @@ -0,0 +1,26 @@ +// Copyright (C) 2013 Simon Que +// +// This file is part of DuinoCube. +// +// DuinoCube is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// DuinoCube is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with DuinoCube. If not, see . + +// DuinoCube remote procedure call functions. + +#include + +// Initializes RPC system. +void rpc_init(); + +// Runs the RPC server loop forever. +void rpc_server_loop(); diff --git a/samples/C/bootstrap.h b/samples/C/bootstrap.h new file mode 100644 index 00000000..8c29de82 --- /dev/null +++ b/samples/C/bootstrap.h @@ -0,0 +1,102 @@ +#ifndef BOOTSTRAP_H +#define BOOTSTRAP_H + +#include +#include "cxrs.h" + +/* If we're not using GNU C, elide __attribute__ */ +#ifndef __GNUC__ +# define __attribute__(x) /*NOTHING*/ +#endif + +typedef struct object object; + +object *true; +object *false; +object *eof; +object *empty_list; +object *global_enviroment; + +enum obj_type { + scm_bool, + scm_empty_list, + scm_eof, + scm_char, + scm_int, + scm_pair, + scm_symbol, + scm_prim_fun, + scm_lambda, + scm_str, + scm_file +}; + +typedef object *(*prim_proc)(object *args); + +object *read(FILE *in); +object *eval(object *code, object *env); +void print(FILE *out, object *obj, int display); + +int check_type(enum obj_type type, object *obj, int err_on_false); + +static inline int is_true(object *obj) +{ + return obj != false; +} + +object *make_int(int value); +int obj2int(object *i); + +object *make_bool(int value); +int obj2bool(object *b); + +object *make_char(char c); +char obj2char(object *ch); + +object *make_str(char *str); +char *obj2str(object *str); + +object *cons(object *car, object *cdr); +object *car(object *pair); +object *cdr(object *pair); +void set_car(object *pair, object *new); +void set_cdr(object *pair, object *new); + +object *make_symbol(char *name); +char *sym2str(object *sym); +object *get_symbol(char *name) __attribute__((pure)); + +object *make_prim_fun(prim_proc fun); +prim_proc obj2prim_proc(object *proc); + +object *make_lambda(object *args, object *code, object *env); +object *lambda_code(object *lambda); +object *lambda_args(object *lambda); + +object *make_port(FILE *handle, int direction); +int port_direction(object *port); +FILE *port_handle(object *port); +void set_port_handle_to_null(object *port); + +/*both of these should never be called*/ +object *apply_proc(object *); +object *eval_proc(object *); + + +object *maybe_add_begin(object *code); + +void init_enviroment(object *env); + + +void eval_err(char *msg, object *code) __attribute__((noreturn)); + +void define_var(object *var, object *val, object *env); +void set_var(object *var, object *val, object *env); +object *get_var(object *var, object *env); + +object *cond2nested_if(object *cond); +object *let2lambda(object *let); +object *and2nested_if(object *and); +object *or2nested_if(object *or); + +#endif /*include guard*/ diff --git a/samples/C/dynarray.cats b/samples/C/dynarray.cats new file mode 100644 index 00000000..95ee54ba --- /dev/null +++ b/samples/C/dynarray.cats @@ -0,0 +1,56 @@ +/* ******************************************************************* */ +/* */ +/* Applied Type System */ +/* */ +/* ******************************************************************* */ + +/* +** ATS/Postiats - Unleashing the Potential of Types! +** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc. +** All rights reserved +** +** ATS is free software; you can redistribute it and/or modify it under +** the terms of the GNU GENERAL PUBLIC LICENSE (GPL) as published by the +** Free Software Foundation; either version 3, or (at your option) any +** later version. +** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY +** WARRANTY; without even the implied warranty of MERCHANTABILITY or +** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +** for more details. +** +** You should have received a copy of the GNU General Public License +** along with ATS; see the file COPYING. If not, please write to the +** Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +** 02110-1301, USA. +*/ + +/* ****** ****** */ + +/* +(* Author: Hongwei Xi *) +(* Authoremail: hwxi AT cs DOT bu DOT edu *) +(* Start time: March, 2013 *) +*/ + +/* ****** ****** */ + +#ifndef ATSHOME_LIBATS_DYNARRAY_CATS +#define ATSHOME_LIBATS_DYNARRAY_CATS + +/* ****** ****** */ + +#include + +/* ****** ****** */ + +#define atslib_dynarray_memcpy memcpy +#define atslib_dynarray_memmove memmove + +/* ****** ****** */ + +#endif // ifndef ATSHOME_LIBATS_DYNARRAY_CATS + +/* ****** ****** */ + +/* end of [dynarray.cats] */ diff --git a/samples/C/jni_layer.h b/samples/C/jni_layer.h new file mode 100644 index 00000000..ededf805 --- /dev/null +++ b/samples/C/jni_layer.h @@ -0,0 +1,61 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class jni_JniLayer */ + +#ifndef _Included_jni_JniLayer +#define _Included_jni_JniLayer +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: jni_JniLayer + * Method: jni_layer_initialize + * Signature: ([II)J + */ +JNIEXPORT jlong JNICALL Java_jni_JniLayer_jni_1layer_1initialize + (JNIEnv *, jobject, jintArray, jint, jint); + +/* + * Class: jni_JniLayer + * Method: jni_layer_mainloop + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_jni_JniLayer_jni_1layer_1mainloop + (JNIEnv *, jobject, jlong); + +/* + * Class: jni_JniLayer + * Method: jni_layer_set_button + * Signature: (JII)V + */ +JNIEXPORT void JNICALL Java_jni_JniLayer_jni_1layer_1set_1button + (JNIEnv *, jobject, jlong, jint, jint); + +/* + * Class: jni_JniLayer + * Method: jni_layer_set_analog + * Signature: (JIIF)V + */ +JNIEXPORT void JNICALL Java_jni_JniLayer_jni_1layer_1set_1analog + (JNIEnv *, jobject, jlong, jint, jint, jfloat); + +/* + * Class: jni_JniLayer + * Method: jni_layer_report_analog_chg + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_jni_JniLayer_jni_1layer_1report_1analog_1chg + (JNIEnv *, jobject, jlong, jint); + +/* + * Class: jni_JniLayer + * Method: jni_layer_kill + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_jni_JniLayer_jni_1layer_1kill + (JNIEnv *, jobject, jlong); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/samples/C/readline.cats b/samples/C/readline.cats new file mode 100644 index 00000000..3fad326b --- /dev/null +++ b/samples/C/readline.cats @@ -0,0 +1,47 @@ +/* +** API in ATS for GNU-readline +*/ + +/* ****** ****** */ + +/* +** Permission to use, copy, modify, and distribute this software for any +** purpose with or without fee is hereby granted, provided that the above +** copyright notice and this permission notice appear in all copies. +** +** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +** WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +** MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +** ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +** WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +** ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +** OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ + +/* ****** ****** */ + +#ifndef READLINE_READLINE_CATS +#define READLINE_READLINE_CATS + +/* ****** ****** */ + +#include + +/* ****** ****** */ +// +#define \ +atscntrb_readline_rl_library_version() ((char*)rl_library_version) +// +#define atscntrb_readline_rl_readline_version() (rl_readline_version) +// +/* ****** ****** */ + +#define atscntrb_readline_readline readline + +/* ****** ****** */ + +#endif // ifndef READLINE_READLINE_CATS + +/* ****** ****** */ + +/* end of [readline.cats] */ diff --git a/samples/C/syscalldefs.h b/samples/C/syscalldefs.h new file mode 100644 index 00000000..a29c867e --- /dev/null +++ b/samples/C/syscalldefs.h @@ -0,0 +1,5 @@ +static const syscalldef syscalldefs[] = { + [SYSCALL_OR_NUM(0, SYS_restart_syscall)] = MAKE_UINT16(0, 1), + [SYSCALL_OR_NUM(1, SYS_exit)] = MAKE_UINT16(1, 17), + [SYSCALL_OR_NUM(2, SYS_fork)] = MAKE_UINT16(0, 22), +}; diff --git a/samples/Cirru/array.cirru b/samples/Cirru/array.cirru new file mode 100644 index 00000000..9375c650 --- /dev/null +++ b/samples/Cirru/array.cirru @@ -0,0 +1,12 @@ + +print $ array + int 1 + string 2 + +print $ array + int 1 + array + int 2 + string 3 + array + string 4 \ No newline at end of file diff --git a/samples/Cirru/block.cirru b/samples/Cirru/block.cirru new file mode 100644 index 00000000..a9bf0c83 --- /dev/null +++ b/samples/Cirru/block.cirru @@ -0,0 +1,7 @@ + +set f $ block (a b c) + print a b c + +call f (int 1) (int 2) (int 3) + +f (int 1) (int 2) (int 3) \ No newline at end of file diff --git a/samples/Cirru/bool.cirru b/samples/Cirru/bool.cirru new file mode 100644 index 00000000..686d132e --- /dev/null +++ b/samples/Cirru/bool.cirru @@ -0,0 +1,7 @@ + +print $ bool true +print $ bool false +print $ bool yes +print $ bool no +print $ bool 1 +print $ bool 0 \ No newline at end of file diff --git a/samples/Cirru/map.cirru b/samples/Cirru/map.cirru new file mode 100644 index 00000000..5f445668 --- /dev/null +++ b/samples/Cirru/map.cirru @@ -0,0 +1,14 @@ + +print $ map + a $ int 5 + b $ array (int 1) (int 2) + c $ map + int 1 + array (int 4) + +set m $ map + a $ int 1 + +set m b $ int 2 + +print m \ No newline at end of file diff --git a/samples/Cirru/number.cirru b/samples/Cirru/number.cirru new file mode 100644 index 00000000..56e0ac7d --- /dev/null +++ b/samples/Cirru/number.cirru @@ -0,0 +1,3 @@ + +print $ int 1 +print $ float 1.2 \ No newline at end of file diff --git a/samples/Cirru/require.cirru b/samples/Cirru/require.cirru new file mode 100644 index 00000000..53283468 --- /dev/null +++ b/samples/Cirru/require.cirru @@ -0,0 +1,2 @@ + +require ./stdio.cr diff --git a/samples/Cirru/scope.cirru b/samples/Cirru/scope.cirru new file mode 100644 index 00000000..9a6512c9 --- /dev/null +++ b/samples/Cirru/scope.cirru @@ -0,0 +1,23 @@ + +set a (int 2) + +print (self) + +set c (child) + +under c + under parent + print a + +print $ get c a + +set c x (int 3) +print $ get c x + +set just-print $ code + print a + +print just-print + +eval (self) just-print +eval just-print \ No newline at end of file diff --git a/samples/Cirru/stdio.cirru b/samples/Cirru/stdio.cirru new file mode 100644 index 00000000..ef5400e6 --- /dev/null +++ b/samples/Cirru/stdio.cirru @@ -0,0 +1,55 @@ + +set a $ string 1 +print a + +print (string 1) + +print nothing + +print + map + a (int 4) + b $ map + a $ int 5 + b $ int 6 + c $ map + int 7 + +print + array + int 1 + int 2 + array + int 3 + int 4 + +print + array + int 1 + map + a $ int 2 + b $ array + int 3 + +print + int 1 + int 2 + +print $ code + set a 1 + print (get a) + print $ array + int a + array + int a + +set container (map) +set container code $ code + set a 1 + print (get a) + print $ array + int a + array + int a + +print container \ No newline at end of file diff --git a/samples/Cirru/string.cirru b/samples/Cirru/string.cirru new file mode 100644 index 00000000..d4c4331b --- /dev/null +++ b/samples/Cirru/string.cirru @@ -0,0 +1,3 @@ + +print $ string a +print $ string "a b" \ No newline at end of file diff --git a/samples/Clojure/for.clj b/samples/Clojure/for.clj new file mode 100644 index 00000000..725f7b2d --- /dev/null +++ b/samples/Clojure/for.clj @@ -0,0 +1,17 @@ +(defn prime? [n] + (not-any? zero? (map #(rem n %) (range 2 n)))) + +(range 3 33 2) +'(3 5 7 9 11 13 15 17 19 21 23 25 27 29 31) + +;; :when continues through the collection even if some have the +;; condition evaluate to false, like filter +(for [x (range 3 33 2) :when (prime? x)] + x) +'(3 5 7 11 13 17 19 23 29 31) + +;; :while stops at the first collection element that evaluates to +;; false, like take-while +(for [x (range 3 33 2) :while (prime? x)] + x) +'(3 5 7) diff --git a/samples/Clojure/hiccup.hic b/samples/Clojure/hiccup.hic new file mode 100644 index 00000000..318f03da --- /dev/null +++ b/samples/Clojure/hiccup.hic @@ -0,0 +1,8 @@ +[:html + [:head + [:meta {:charset "utf-8"}] + [:link {:rel "stylesheet" :href "css/bootstrap.min.css"}] + [:script {:src "app.js"}]] + [:body + [:div.nav + [:p "Hello world!"]]]] diff --git a/samples/Clojure/into-array.cljc b/samples/Clojure/into-array.cljc new file mode 100644 index 00000000..a1c9fa29 --- /dev/null +++ b/samples/Clojure/into-array.cljc @@ -0,0 +1,13 @@ +(defn into-array + ([aseq] + (into-array nil aseq)) + ([type aseq] + (let [n (count aseq) + a (make-array n)] + (loop [aseq (seq aseq) + i 0] + (if (< i n) + (do + (aset a i (first aseq)) + (recur (next aseq) (inc i))) + a))))) diff --git a/samples/Clojure/protocol.cljs b/samples/Clojure/protocol.cljs new file mode 100644 index 00000000..5496ac0c --- /dev/null +++ b/samples/Clojure/protocol.cljs @@ -0,0 +1,15 @@ +(defprotocol ISound (sound [])) + +(deftype Cat [] + ISound + (sound [_] "Meow!")) + +(deftype Dog [] + ISound + (sound [_] "Woof!")) + +(extend-type default + ISound + (sound [_] "... silence ...")) + +(sound 1) ;; => "... silence ..." diff --git a/samples/Clojure/rand.cljscm b/samples/Clojure/rand.cljscm new file mode 100644 index 00000000..ca07579d --- /dev/null +++ b/samples/Clojure/rand.cljscm @@ -0,0 +1,5 @@ +(defn rand + "Returns a random floating point number between 0 (inclusive) and + n (default 1) (exclusive)." + ([] (scm* [n] (random-real))) + ([n] (* (rand) n))) \ No newline at end of file diff --git a/samples/Clojure/svg.cljx b/samples/Clojure/svg.cljx new file mode 100644 index 00000000..dd2206d4 --- /dev/null +++ b/samples/Clojure/svg.cljx @@ -0,0 +1,20 @@ +^:clj (ns c2.svg + (:use [c2.core :only [unify]] + [c2.maths :only [Pi Tau radians-per-degree + sin cos mean]])) + +^:cljs (ns c2.svg + (:use [c2.core :only [unify]] + [c2.maths :only [Pi Tau radians-per-degree + sin cos mean]]) + (:require [c2.dom :as dom])) + +;;Stub for float fn, which does not exist on cljs runtime +^:cljs (def float identity) + +(defn ->xy + "Convert coordinates (potentially map of `{:x :y}`) to 2-vector." + [coordinates] + (cond + (and (vector? coordinates) (= 2 (count coordinates))) coordinates + (map? coordinates) [(:x coordinates) (:y coordinates)])) diff --git a/samples/Clojure/unit-test.cl2 b/samples/Clojure/unit-test.cl2 new file mode 100644 index 00000000..bac21586 --- /dev/null +++ b/samples/Clojure/unit-test.cl2 @@ -0,0 +1,20 @@ +(deftest function-tests + (is (= 3 + (count [1 2 3]))) + (is (= false + (not true))) + (is (= true + (contains? {:foo 1 :bar 2} :foo))) + + (is (= {"foo" 1, "baz" 3} + (select-keys {:foo 1 :bar 2 :baz 3} [:foo :baz]))) + + (is (= [1 2 3] + (vals {:foo 1 :bar 2 :baz 3}))) + + (is (= ["foo" "bar" "baz"] + (keys {:foo 1 :bar 2 :baz 3}))) + + (is (= [2 4 6] + (filter (fn [x] (=== (rem x 2) 0)) [1 2 3 4 5 6])))) + diff --git a/samples/Common Lisp/macros-advanced.cl b/samples/Common Lisp/macros-advanced.cl new file mode 100644 index 00000000..b746d769 --- /dev/null +++ b/samples/Common Lisp/macros-advanced.cl @@ -0,0 +1,82 @@ +;; @file macros-advanced.cl +;; +;; @breif Advanced macro practices - defining your own macros +;; +;; Macro definition skeleton: +;; (defmacro name (parameter*) +;; "Optional documentation string" +;; body-form*) +;; +;; Note that backquote expression is most often used in the `body-form` +;; + +; `primep` test a number for prime +(defun primep (n) + "test a number for prime" + (if (< n 2) (return-from primep)) + (do ((i 2 (1+ i)) (p t (not (zerop (mod n i))))) + ((> i (sqrt n)) p) + (when (not p) (return)))) +; `next-prime` return the next prime bigger than the specified number +(defun next-prime (n) + "return the next prime bigger than the speicified number" + (do ((i (1+ n) (1+ i))) + ((primep i) i))) +; +; The recommended procedures to writting a new macro are as follows: +; 1. Write a sample call to the macro and the code it should expand into +(do-primes (p 0 19) + (format t "~d " p)) +; Expected expanded codes +(do ((p (next-prime (- 0 1)) (next-prime p))) + ((> p 19)) + (format t "~d " p)) +; 2. Write code that generate the hardwritten expansion from the arguments in +; the sample call +(defmacro do-primes (var-and-range &rest body) + (let ((var (first var-and-range)) + (start (second var-and-range)) + (end (third var-and-range))) + `(do ((,var (next-prime (- ,start 1)) (next-prime ,var))) + ((> ,var ,end)) + ,@body))) +; 2-1. More concise implementations with the 'parameter list destructuring' and +; '&body' synonym, it also emits more friendly messages on incorrent input. +(defmacro do-primes ((var start end) &body body) + `(do ((,var (next-prime (- ,start 1)) (next-prime ,var))) + ((> ,var ,end)) + ,@body)) +; 2-2. Test the result of macro expansion with the `macroexpand-1` function +(macroexpand-1 '(do-primes (p 0 19) (format t "~d " p))) +; 3. Make sure the macro abstraction does not "leak" +(defmacro do-primes ((var start end) &body body) + (let ((end-value-name (gensym))) + `(do ((,var (next-prime (- ,start 1)) (next-prime ,var)) + (,end-value-name ,end)) + ((> ,var ,end-value-name)) + ,@body))) +; 3-1. Rules to observe to avoid common and possible leaks +; a. include any subforms in the expansion in positions that will be evaluated +; in the same order as the subforms appear in the macro call +; b. make sure subforms are evaluated only once by creating a variable in the +; expansion to hold the value of evaluating the argument form, and then +; using that variable anywhere else the value is needed in the expansion +; c. use `gensym` at macro expansion time to create variable names used in the +; expansion +; +; Appendix I. Macro-writting macros, 'with-gensyms', to guranttee that rule c +; gets observed. +; Example usage of `with-gensyms` +(defmacro do-primes-a ((var start end) &body body) + "do-primes implementation with macro-writting macro 'with-gensyms'" + (with-gensyms (end-value-name) + `(do ((,var (next-prime (- ,start 1)) (next-prime ,var)) + (,end-value-name ,end)) + ((> ,var ,end-value-name)) + ,@body))) +; Define the macro, note how comma is used to interpolate the value of the loop +; expression +(defmacro with-gensyms ((&rest names) &body body) + `(let ,(loop for n in names collect `(,n (gensym))) + ,@body) +) \ No newline at end of file diff --git a/samples/Common Lisp/motor-inferencia.cl b/samples/Common Lisp/motor-inferencia.cl new file mode 100644 index 00000000..6a2a97ea --- /dev/null +++ b/samples/Common Lisp/motor-inferencia.cl @@ -0,0 +1,475 @@ +#| +ESCUELA POLITECNICA SUPERIOR - UNIVERSIDAD AUTONOMA DE MADRID +INTELIGENCIA ARTIFICIAL + +Motor de inferencia +Basado en parte en "Paradigms of AI Programming: Case Studies +in Common Lisp", de Peter Norvig, 1992 +|# + + +;;;;;;;;;;;;;;;;;;;;; +;;;; Global variables +;;;;;;;;;;;;;;;;;;;;; + + +(defvar *hypothesis-list*) +(defvar *rule-list*) +(defvar *fact-list*) + +;;;;;;;;;;;;;;;;;;;;; +;;;; Constants +;;;;;;;;;;;;;;;;;;;;; + +(defconstant +fail+ nil "Indicates unification failure") + +(defconstant +no-bindings+ '((nil)) + "Indicates unification success, with no variables.") + +(defconstant *mundo-abierto* nil) + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; Functions for the user +;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +;; Resets *fact-list* to NIL +(defun erase-facts () (setq *fact-list* nil)) + +(defun set-hypothesis-list (h) (setq *hypothesis-list* h)) + + +;; Returns a list of solutions, each one satisfying all the hypothesis contained +;; in *hypothesis-list* +(defun motor-inferencia () + (consulta *hypothesis-list*)) + + + +;;;;;;;;;;;;;;;;;;;;;;;; +;;;; Auxiliary functions +;;;;;;;;;;;;;;;;;;;;;;;; + +#|____________________________________________________________________________ +FUNCTION: CONSULTA + +COMMENTS: +CONSULTA receives a list of hypothesis (variable ), and returns +a list of binding lists (each binding list being a solution). + +EXAMPLES: +hypotheses is: +((brothers ?x ?y) (neighbours juan ?x)). + +That is, we are searching the brothers of the possible neighbors of Juan. + +The function can return in this case: + +(((?x . sergio) (?y . javier)) ((?x . julian) (?y . mario)) ((?x . julian) (?y . pedro))). +That is, the neighbors of Juan (Sergio and Julian) have 3 brothers in total(Javier, Mario, Pedro) +____________________________________________________________________________|# + +(defun consulta (hypotheses) + (if (null hypotheses) (list +no-bindings+) + (mapcan #'(lambda (b) + (mapcar #'(lambda (x) (une-bindings-con-bindings b x)) + (consulta (subst-bindings b (rest hypotheses))))) + (find-hypothesis-value (first hypotheses))))) + + + +#|____________________________________________________________________________ +FUNCTION: FIND-HYPOTHESIS-VALUE + +COMMENTS: +This function manages the query a single query (only one hypothesis) given a binding list. +It tries (in the following order) to: +- Answer the query from *fact-list* +- Answer the query from the rules in *rule-list* +- Ask the user + +The function returns a list of solutions (list of binding lists). + +EXAMPLES: +If hypothesis is (brothers ?x ?y) +and the function returns: +(((?x . sergio) (?y . javier)) ((?x . julian) (?y . maria)) ((?x . alberto) (?y . pedro))). + +Means that Sergio and Javier and brothers, Julian and Mario are brothers, and Alberto and Pedro are brothers. +____________________________________________________________________________|# + +(defun find-hypothesis-value (hypothesis) + (let (rules) + (cond + ((equality? hypothesis) + (value-from-equality hypothesis)) + ((value-from-facts hypothesis)) + ((setq good-rules (find-rules hypothesis)) + (value-from-rules hypothesis good-rules)) + (t (ask-user hypothesis))))) + + + +; une-bindings-con-bindings takes two binding lists and returns a binding list +; Assumes that b1 and b2 are not +fail+ +(defun une-bindings-con-bindings (b1 b2) + (cond + ((equal b1 +no-bindings+) b2) + ((equal b2 +no-bindings+) b1) + (T (append b1 b2)))) + + + +#|____________________________________________________________________________ +FUNCTION: VALUE-FROM-FACTS + +COMMENTS: +Returns all the solutions of obtained directly from *fact-list* + +EXAMPLES: +> (setf *fact-list* '((man luis) (man pedro)(woman mart)(man daniel)(woman laura))) + +> (value-from-facts '(man ?x)) +returns: + +(((?X . LUIS)) ((?X . PEDRO)) ((?X . DANIEL))) +____________________________________________________________________________|# + +(defun value-from-facts (hypothesis) + (mapcan #'(lambda(x) (let ((aux (unify hypothesis x))) + (when aux (list aux)))) *fact-list*)) + + + + +#|____________________________________________________________________________ +FUNCTION: FIND-RULES + +COMMENTS: +Returns the rules in *rule-list* whose THENs unify with the term given in +The variables in the rules that satisfy this requirement are renamed. + +EXAMPLES: +> (setq *rule-list* + '((R1 (pertenece ?E (?E . ?_))) + (R2 (pertenece ?E (?_ . ?Xs)) :- ((pertenece ?E ?Xs))))) + +Then: +> (FIND-RULES (PERTENECE 1 (2 5))) +returns: +((R2 (PERTENECE ?E.1 (?_ . ?XS.2)) :- ((PERTENECE ?E.1 ?XS.2)))) +That is, only the THEN of rule R2 unify with + +However, +> (FIND-RULES (PERTENECE 1 (1 6 7))) + +returns: +((R1 (PERTENECE ?E.6 (?E.6 . ?_))) + (R2 (PERTENECE ?E.7 (?_ . ?XS.8)) :- ((PERTENECE ?E.7 ?XS.8)))) +So the THEN of both rules unify with +____________________________________________________________________________|# + +(defun find-rules (hypothesis) + (mapcan #'(lambda(b) (let ((renamed-rule (rename-variables b))) + (when (in-then? hypothesis renamed-rule) + (list renamed-rule)))) *rule-list*)) + +(defun in-then? (hypothesis rule) + (unless (null (rule-then rule)) + (not (equal +fail+ (unify hypothesis (rule-then rule)))))) + + + +#|____________________________________________________________________________ +FUNCTION: VALUE-FROM-RULES + +COMMENTS: +Returns all the solutions to found using all the rules given in +the list . Note that a single rule can have multiple solutions. +____________________________________________________________________________|# +(defun value-from-rules (hypothesis rules) + (mapcan #'(lambda (r) (eval-rule hypothesis r)) rules)) + +(defun limpia-vinculos (termino bindings) + (unify termino (subst-bindings bindings termino))) + + +#|____________________________________________________________________________ +FUNCTION: EVAL-RULE + +COMMENTS: +Returns all the solutions found using the rule given as input argument. + +EXAMPLES: +> (setq *rule-list* + '((R1 (pertenece ?E (?E . ?_))) + (R2 (pertenece ?E (?_ . ?Xs)) :- ((pertenece ?E ?Xs))))) +Then: +> (EVAL-RULE + (PERTENECE 1 (1 6 7)) + (R1 (PERTENECE ?E.42 (?E.42 . ?_)))) +returns: +(((NIL))) +That is, the query (PERTENECE 1 (1 6 7)) can be proven from the given rule, and +no binding in the variables in the query is necessary (in fact, the query has no variables). +On the other hand: +> (EVAL-RULE + (PERTENECE 1 (7)) + (R2 (PERTENECE ?E.49 (?_ . ?XS.50)) :- ((PERTENECE ?E.49 ?XS.50)))) +returns: +NIL +That is, the query can not be proven from the rule R2. +____________________________________________________________________________|# + +(defun eval-rule (hypothesis rule) + (let ((bindings-then + (unify (rule-then rule) hypothesis))) + (unless (equal +fail+ bindings-then) + (if (rule-ifs rule) + (mapcar #'(lambda(b) (limpia-vinculos hypothesis (append bindings-then b))) + (consulta (subst-bindings bindings-then (rule-ifs rule)))) + (list (limpia-vinculos hypothesis bindings-then)))))) + + +(defun ask-user (hypothesis) + (let ((question hypothesis)) + (cond + ((variables-in question) +fail+) + ((not-in-fact-list? question) +fail+) + (*mundo-abierto* + (format t "~%Es cierto el hecho ~S? (T/nil)" question) + (cond + ((read) (add-fact question) +no-bindings+) + (T (add-fact (list 'NOT question)) +fail+))) + (T +fail+)))) + + +; value-from-equality: +(defun value-from-equality (hypothesis) + (let ((new-bindings (unify (second hypothesis) (third hypothesis)))) + (if (not (equal +fail+ new-bindings)) + (list new-bindings)))) + + + +#|____________________________________________________________________________ +FUNCTION: UNIFY + +COMMENTS: +Finds the most general unifier of two input expressions, taking into account the +bindings specified in the input +In case the two expressions can unify, the function returns the total bindings necessary +for that unification. Otherwise, returns +fail+ + +EXAMPLES: +> (unify '1 '1) +((NIL)) ;; which is the constant +no-bindings+ +> (unify 1 '2) +nil ;; which is the constant +fail+ +> (unify '?x 1) +((?x . 1)) +> (unify '(1 1) ?x) +((? x 1 1)) +> (unify '?_ '?x) +((NIL)) +> (unify '(p ?x 1 2) '(p ?y ?_ ?_)) +((?x . ?y)) +> (unify '(?a . ?_) '(1 2 3)) +((?a . 1)) +> (unify '(?_ ?_) '(1 2)) +((nil)) +> (unify '(?a . ?b) '(1 2 3)) +((?b 2 3) (?a . 1)) +> (unify '(?a . ?b) '(?v . ?d)) +((?b . ?d) (?a . ?v)) +> (unify '(?eval (+ 1 1)) '1) +nil +> (unify '(?eval (+ 1 1)) '2) +(nil)) +____________________________________________________________________________|# + +(defun unify (x y &optional (bindings +no-bindings+)) + "See if x and y match with given bindings. If they do, + return a binding list that would make them equal [p 303]." + (cond ((eq bindings +fail+) +fail+) + ((eql x y) bindings) + ((eval? x) (unify-eval x y bindings)) + ((eval? y) (unify-eval y x bindings)) + ((variable? x) (unify-var x y bindings)) + ((variable? y) (unify-var y x bindings)) + ((and (consp x) (consp y)) + (unify (rest x) (rest y) + (unify (first x) (first y) bindings))) + (t +fail+))) + + +;; rename-variables: renombra ?X por ?X.1, ?Y por ?Y.2 etc. salvo ?_ que no se renombra +(defun rename-variables (x) + "Replace all variables in x with new ones. Excepto ?_" + (sublis (mapcar #'(lambda (var) + (if (anonymous-var? var) + (make-binding var var) + (make-binding var (new-variable var)))) + (variables-in x)) + x)) + + + +;;;; Auxiliary Functions + +(defun unify-var (var x bindings) + "Unify var with x, using (and maybe extending) bindings [p 303]." + (cond ((or (anonymous-var? var)(anonymous-var? x)) bindings) + ((get-binding var bindings) + (unify (lookup var bindings) x bindings)) + ((and (variable? x) (get-binding x bindings)) + (unify var (lookup x bindings) bindings)) + ((occurs-in? var x bindings) + +fail+) + (t (extend-bindings var x bindings)))) + +(defun variable? (x) + "Is x a variable (a symbol starting with ?)?" + (and (symbolp x) (eql (char (symbol-name x) 0) #\?))) + +(defun get-binding (var bindings) + "Find a (variable . value) pair in a binding list." + (assoc var bindings)) + +(defun binding-var (binding) + "Get the variable part of a single binding." + (car binding)) + +(defun binding-val (binding) + "Get the value part of a single binding." + (cdr binding)) + +(defun make-binding (var val) (cons var val)) + +(defun lookup (var bindings) + "Get the value part (for var) from a binding list." + (binding-val (get-binding var bindings))) + +(defun extend-bindings (var val bindings) + "Add a (var . value) pair to a binding list." + (append + (unless (eq bindings +no-bindings+) bindings) + (list (make-binding var val)))) + +(defun occurs-in? (var x bindings) + "Does var occur anywhere inside x?" + (cond ((eq var x) t) + ((and (variable? x) (get-binding x bindings)) + (occurs-in? var (lookup x bindings) bindings)) + ((consp x) (or (occurs-in? var (first x) bindings) + (occurs-in? var (rest x) bindings))) + (t nil))) + +(defun subst-bindings (bindings x) + "Substitute the value of variables in bindings into x, + taking recursively bound variables into account." + (cond ((eq bindings +fail+) +fail+) + ((eq bindings +no-bindings+) x) + ((and (listp x) (eq '?eval (car x))) + (subst-bindings-quote bindings x)) + ((and (variable? x) (get-binding x bindings)) + (subst-bindings bindings (lookup x bindings))) + ((atom x) x) + (t (cons (subst-bindings bindings (car x)) ;; s/reuse-cons/cons + (subst-bindings bindings (cdr x)))))) + +(defun unifier (x y) + "Return something that unifies with both x and y (or fail)." + (subst-bindings (unify x y) x)) + +(defun variables-in (exp) + "Return a list of all the variables in EXP." + (unique-find-anywhere-if #'variable? exp)) + +(defun unique-find-anywhere-if (predicate tree &optional found-so-far) + "Return a list of leaves of tree satisfying predicate, + with duplicates removed." + (if (atom tree) + (if (funcall predicate tree) + (pushnew tree found-so-far) + found-so-far) + (unique-find-anywhere-if + predicate + (first tree) + (unique-find-anywhere-if predicate (rest tree) + found-so-far)))) + +(defun find-anywhere-if (predicate tree) + "Does predicate apply to any atom in the tree?" + (if (atom tree) + (funcall predicate tree) + (or (find-anywhere-if predicate (first tree)) + (find-anywhere-if predicate (rest tree))))) + +(defun new-variable (var) + "Create a new variable. Assumes user never types variables of form ?X.9" + (gentemp (format nil "~S." var))) +; (gentemp "?") ) +;;; + +(defun anonymous-var? (x) + (eq x '?_)) + +(defun subst-bindings-quote (bindings x) + "Substitute the value of variables in bindings into x, + taking recursively bound variables into account." + (cond ((eq bindings +fail+) +fail+) + ((eq bindings +no-bindings+) x) + ((and (variable? x) (get-binding x bindings)) + (if (variable? (lookup x bindings)) + (subst-bindings-quote bindings (lookup x bindings)) + (subst-bindings-quote bindings (list 'quote (lookup x bindings))) + ) + ) + ((atom x) x) + (t (cons (subst-bindings-quote bindings (car x)) ;; s/reuse-cons/cons + (subst-bindings-quote bindings (cdr x)))))) + +(defun eval? (x) + (and (consp x) (eq (first x) '?eval))) + +(defun unify-eval (x y bindings) + (let ((exp (subst-bindings-quote bindings (second x)))) + (if (variables-in exp) + +fail+ + (unify (eval exp) y bindings)))) + + + +(defun rule-ifs (rule) (fourth rule)) +(defun rule-then (rule) (second rule)) + + +(defun equality? (term) + (and (consp term) (eql (first term) '?=))) + + +(defun in-fact-list? (expresion) + (some #'(lambda(x) (equal x expresion)) *fact-list*)) + +(defun not-in-fact-list? (expresion) + (if (eq (car expresion) 'NOT) + (in-fact-list? (second expresion)) + (in-fact-list? (list 'NOT expresion)))) + + +;; add-fact: + +(defun add-fact (fact) + (setq *fact-list* (cons fact *fact-list*))) + + +(defun variable? (x) + "Is x a variable (a symbol starting with ?) except ?eval and ?=" + (and (not (equal x '?eval)) (not (equal x '?=)) + (symbolp x) (eql (char (symbol-name x) 0) #\?))) + + +;; EOF \ No newline at end of file diff --git a/samples/Common Lisp/sample.lisp b/samples/Common Lisp/sample.lisp new file mode 100644 index 00000000..9bef6781 --- /dev/null +++ b/samples/Common Lisp/sample.lisp @@ -0,0 +1,21 @@ +;;;; -*- lisp -*- + +(in-package :foo) + +;;; Header comment. +(defvar *foo*) + +(eval-when (:execute :compile-toplevel :load-toplevel) + (defun add (x &optional y &key z) + (declare (ignore z)) + ;; Inline comment. + (+ x (or y 1)))) + +#| +Multi-line comment. +|# + +(defmacro foo (x &body b) + (if x + `(1+ ,x) ;After-line comment. + 42)) diff --git a/samples/Component Pascal/Example.cp b/samples/Component Pascal/Example.cp new file mode 100644 index 00000000..5bace2c4 --- /dev/null +++ b/samples/Component Pascal/Example.cp @@ -0,0 +1,130 @@ +MODULE ObxControls; +(** + project = "BlackBox" + organization = "www.oberon.ch" + contributors = "Oberon microsystems" + version = "System/Rsrc/About" + copyright = "System/Rsrc/About" + license = "Docu/BB-License" + changes = "" + issues = "" + +**) + +IMPORT Dialog, Ports, Properties, Views; + +CONST beginner = 0; advanced = 1; expert = 2; guru = 3; (* user classes *) + +TYPE + View = POINTER TO RECORD (Views.View) + size: INTEGER (* border size in mm *) + END; + +VAR + data*: RECORD + class*: INTEGER; (* current user class *) + list*: Dialog.List; (* list of currently available sizes, derived from class *) + width*: INTEGER (* width of next view to be opened. Derived from + class, or entered through a text entry field *) + END; + + predef: ARRAY 6 OF INTEGER; (* table of predefined sizes *) + + +PROCEDURE SetList; +BEGIN + IF data.class = beginner THEN + data.list.SetLen(1); + data.list.SetItem(0, "default") + ELSIF data.class = advanced THEN + data.list.SetLen(4); + data.list.SetItem(0, "default"); + data.list.SetItem(1, "small"); + data.list.SetItem(2, "medium"); + data.list.SetItem(3, "large"); + ELSE + data.list.SetLen(6); + data.list.SetItem(0, "default"); + data.list.SetItem(1, "small"); + data.list.SetItem(2, "medium"); + data.list.SetItem(3, "large"); + data.list.SetItem(4, "tiny"); + data.list.SetItem(5, "huge"); + END +END SetList; + +(* View *) + +PROCEDURE (v: View) CopyFromSimpleView (source: Views.View); +BEGIN + v.size := source(View).size +END CopyFromSimpleView; + +PROCEDURE (v: View) Restore (f: Views.Frame; l, t, r, b: INTEGER); +BEGIN (* fill view with a red square of size v.size *) + IF v.size = 0 THEN v.size := predef[0] END; (* lazy initialization of size *) + f.DrawRect(0, 0, v.size, v.size, Ports.fill, Ports.red) +END Restore; + +PROCEDURE (v: View) HandlePropMsg (VAR msg: Views.PropMessage); +BEGIN + WITH msg: Properties.SizePref DO + IF v.size = 0 THEN v.size := predef[0] END; (* lazy initialization of size *) + msg.w := v.size; msg.h := v.size (* tell environment about desired width and height *) + ELSE (* ignore other messages *) + END +END HandlePropMsg; + +(* notifiers *) + +PROCEDURE ClassNotify* (op, from, to: INTEGER); +BEGIN (* react to change in data.class *) + IF op = Dialog.changed THEN + IF (to = beginner) OR (to = advanced) & (data.list.index > 3) THEN + (* if class is reduced, make sure that selection contains legal elements *) + data.list.index := 0; data.width := predef[0]; (* modify interactor *) + Dialog.Update(data) (* redraw controls where necessary *) + END; + SetList; + Dialog.UpdateList(data.list) (* reconstruct list box contents *) + END +END ClassNotify; + +PROCEDURE ListNotify* (op, from, to: INTEGER); +BEGIN (* reacto to change in data.list (index to was selected) *) + IF op = Dialog.changed THEN + data.width := predef[to]; (* modify interactor *) + Dialog.Update(data) (* redraw controls where necessary *) + END +END ListNotify; + +(* guards *) + +PROCEDURE ListGuard* (VAR par: Dialog.Par); +BEGIN (* disable list box for a beginner *) + par.disabled := data.class = beginner +END ListGuard; + +PROCEDURE WidthGuard* (VAR par: Dialog.Par); +BEGIN (* make text entry field read-only if user is not guru *) + par.readOnly := data.class # guru +END WidthGuard; + +(* commands *) + +PROCEDURE Open*; + VAR v: View; +BEGIN + NEW(v); (* create and initialize a new view *) + v.size := data.width * Ports.mm; (* define view's size in function of class *) + Views.OpenAux(v, "Example") (* open the view in a window *) +END Open; + +BEGIN (* initialization of global variables *) + predef[0] := 40; predef[1] := 30; predef[2] := 50; (* predefined sizes *) + predef[3] := 70; predef[4] := 20; predef[5] := 100; + data.class := beginner; (* default values *) + data.list.index := 0; + data.width := predef[0]; + SetList +END ObxControls. diff --git a/samples/Component Pascal/Example2.cps b/samples/Component Pascal/Example2.cps new file mode 100644 index 00000000..4c4b3930 --- /dev/null +++ b/samples/Component Pascal/Example2.cps @@ -0,0 +1,71 @@ +MODULE ObxFact; +(** + project = "BlackBox" + organization = "www.oberon.ch" + contributors = "Oberon microsystems" + version = "System/Rsrc/About" + copyright = "System/Rsrc/About" + license = "Docu/BB-License" + changes = "" + issues = "" + +**) + +IMPORT + Stores, Models, TextModels, TextControllers, Integers; + +PROCEDURE Read(r: TextModels.Reader; VAR x: Integers.Integer); + VAR i, len, beg: INTEGER; ch: CHAR; buf: POINTER TO ARRAY OF CHAR; +BEGIN + r.ReadChar(ch); + WHILE ~r.eot & (ch <= " ") DO r.ReadChar(ch) END; + ASSERT(~r.eot & (((ch >= "0") & (ch <= "9")) OR (ch = "-"))); + beg := r.Pos() - 1; len := 0; + REPEAT INC(len); r.ReadChar(ch) UNTIL r.eot OR (ch < "0") OR (ch > "9"); + NEW(buf, len + 1); + i := 0; r.SetPos(beg); + REPEAT r.ReadChar(buf[i]); INC(i) UNTIL i = len; + buf[i] := 0X; + Integers.ConvertFromString(buf^, x) +END Read; + +PROCEDURE Write(w: TextModels.Writer; x: Integers.Integer); + VAR i: INTEGER; +BEGIN + IF Integers.Sign(x) < 0 THEN w.WriteChar("-") END; + i := Integers.Digits10Of(x); + IF i # 0 THEN + REPEAT DEC(i); w.WriteChar(Integers.ThisDigit10(x, i)) UNTIL i = 0 + ELSE w.WriteChar("0") + END +END Write; + +PROCEDURE Compute*; + VAR beg, end, i, n: INTEGER; ch: CHAR; + s: Stores.Operation; + r: TextModels.Reader; w: TextModels.Writer; attr: TextModels.Attributes; + c: TextControllers.Controller; + x: Integers.Integer; +BEGIN + c := TextControllers.Focus(); + IF (c # NIL) & c.HasSelection() THEN + c.GetSelection(beg, end); + r := c.text.NewReader(NIL); r.SetPos(beg); r.ReadChar(ch); + WHILE ~r.eot & (beg < end) & (ch <= " ") DO r.ReadChar(ch); INC(beg) END; + IF ~r.eot & (beg < end) THEN + r.ReadPrev; Read(r, x); + end := r.Pos(); r.ReadPrev; attr :=r.attr; + IF (Integers.Sign(x) > 0) & (Integers.Compare(x, Integers.Long(MAX(LONGINT))) <= 0) THEN + n := SHORT(Integers.Short(x)); i := 2; x := Integers.Long(1); + WHILE i <= n DO x := Integers.Product(x, Integers.Long(i)); INC(i) END; + Models.BeginScript(c.text, "computation", s); + c.text.Delete(beg, end); + w := c.text.NewWriter(NIL); w.SetPos(beg); w.SetAttr(attr); + Write(w, x); + Models.EndScript(c.text, s) + END + END + END +END Compute; + +END ObxFact. \ No newline at end of file diff --git a/samples/Creole/creole.creole b/samples/Creole/creole.creole new file mode 100644 index 00000000..7e3b8bef --- /dev/null +++ b/samples/Creole/creole.creole @@ -0,0 +1,47 @@ += Creole + +Creole is a Creole-to-HTML converter for Creole, the lightweight markup +language (http://wikicreole.org/). Github uses this converter to render *.creole files. + +Project page on github: + +* http://github.com/minad/creole + +Travis-CI: + +* https://travis-ci.org/minad/creole + +RDOC: + +* http://rdoc.info/projects/minad/creole + +== INSTALLATION + +{{{ +gem install creole +}}} + +== SYNOPSIS + +{{{ +require 'creole' +html = Creole.creolize('== Creole text') +}}} + +== BUGS + +If you found a bug, please report it at the Creole project's tracker +on GitHub: + +http://github.com/minad/creole/issues + +== AUTHORS + +* Lars Christensen (larsch) +* Daniel Mendler (minad) + +== LICENSE + +Creole is Copyright (c) 2008 - 2013 Lars Christensen, Daniel Mendler. It is free software, and +may be redistributed under the terms specified in the README file of +the Ruby distribution. diff --git a/samples/Crystal/const_spec.cr b/samples/Crystal/const_spec.cr new file mode 100644 index 00000000..3ab20f14 --- /dev/null +++ b/samples/Crystal/const_spec.cr @@ -0,0 +1,169 @@ +#!/usr/bin/env bin/crystal --run +require "../../spec_helper" + +describe "Codegen: const" do + it "define a constant" do + run("A = 1; A").to_i.should eq(1) + end + + it "support nested constant" do + run("class B; A = 1; end; B::A").to_i.should eq(1) + end + + it "support constant inside a def" do + run(" + class Foo + A = 1 + + def foo + A + end + end + + Foo.new.foo + ").to_i.should eq(1) + end + + it "finds nearest constant first" do + run(" + A = 1 + + class Foo + A = 2.5_f32 + + def foo + A + end + end + + Foo.new.foo + ").to_f32.should eq(2.5) + end + + it "allows constants with same name" do + run(" + A = 1 + + class Foo + A = 2.5_f32 + + def foo + A + end + end + + A + Foo.new.foo + ").to_f32.should eq(2.5) + end + + it "constants with expression" do + run(" + A = 1 + 1 + A + ").to_i.should eq(2) + end + + it "finds global constant" do + run(" + A = 1 + + class Foo + def foo + A + end + end + + Foo.new.foo + ").to_i.should eq(1) + end + + it "define a constant in lib" do + run("lib Foo; A = 1; end; Foo::A").to_i.should eq(1) + end + + it "invokes block in const" do + run("require \"prelude\"; A = [\"1\"].map { |x| x.to_i }; A[0]").to_i.should eq(1) + end + + it "declare constants in right order" do + run("A = 1 + 1; B = true ? A : 0; B").to_i.should eq(2) + end + + it "uses correct types lookup" do + run(" + module A + class B + def foo + 1 + end + end + + C = B.new; + end + + def foo + A::C.foo + end + + foo + ").to_i.should eq(1) + end + + it "codegens variable assignment in const" do + run(" + class Foo + def initialize(@x) + end + + def x + @x + end + end + + A = begin + f = Foo.new(1) + f + end + + def foo + A.x + end + + foo + ").to_i.should eq(1) + end + + it "declaring var" do + run(" + BAR = begin + a = 1 + while 1 == 2 + b = 2 + end + a + end + class Foo + def compile + BAR + end + end + + Foo.new.compile + ").to_i.should eq(1) + end + + it "initialize const that might raise an exception" do + run(" + require \"prelude\" + CONST = (raise \"OH NO\" if 1 == 2) + + def doit + CONST + rescue + end + + doit.nil? + ").to_b.should be_true + end +end diff --git a/samples/Crystal/declare_var_spec.cr b/samples/Crystal/declare_var_spec.cr new file mode 100644 index 00000000..c6a44127 --- /dev/null +++ b/samples/Crystal/declare_var_spec.cr @@ -0,0 +1,79 @@ +#!/usr/bin/env bin/crystal --run +require "../../spec_helper" + +describe "Type inference: declare var" do + it "types declare var" do + assert_type("a :: Int32") { int32 } + end + + it "types declare var and reads it" do + assert_type("a :: Int32; a") { int32 } + end + + it "types declare var and changes its type" do + assert_type("a :: Int32; while 1 == 2; a = 'a'; end; a") { union_of(int32, char) } + end + + it "declares instance var which appears in initialize" do + result = assert_type(" + class Foo + @x :: Int32 + end + + Foo.new") { types["Foo"] } + + mod = result.program + + foo = mod.types["Foo"] as NonGenericClassType + foo.instance_vars["@x"].type.should eq(mod.int32) + end + + it "declares instance var of generic class" do + result = assert_type(" + class Foo(T) + @x :: T + end + + Foo(Int32).new") do + foo = types["Foo"] as GenericClassType + foo_i32 = foo.instantiate([int32] of Type | ASTNode) + foo_i32.lookup_instance_var("@x").type.should eq(int32) + foo_i32 + end + end + + it "declares instance var of generic class after reopen" do + result = assert_type(" + class Foo(T) + end + + f = Foo(Int32).new + + class Foo(T) + @x :: T + end + + f") do + foo = types["Foo"] as GenericClassType + foo_i32 = foo.instantiate([int32] of Type | ASTNode) + foo_i32.lookup_instance_var("@x").type.should eq(int32) + foo_i32 + end + end + + it "declares an instance variable in initialize" do + assert_type(" + class Foo + def initialize + @x :: Int32 + end + + def x + @x + end + end + + Foo.new.x + ") { int32 } + end +end diff --git a/samples/Crystal/transformer.cr b/samples/Crystal/transformer.cr new file mode 100644 index 00000000..8bb78fbe --- /dev/null +++ b/samples/Crystal/transformer.cr @@ -0,0 +1,515 @@ +module Crystal + class ASTNode + def transform(transformer) + transformer.before_transform self + node = transformer.transform self + transformer.after_transform self + node + end + end + + class Transformer + def before_transform(node) + end + + def after_transform(node) + end + + def transform(node : Expressions) + exps = [] of ASTNode + node.expressions.each do |exp| + new_exp = exp.transform(self) + if new_exp + if new_exp.is_a?(Expressions) + exps.concat new_exp.expressions + else + exps << new_exp + end + end + end + + if exps.length == 1 + exps[0] + else + node.expressions = exps + node + end + end + + def transform(node : Call) + if node_obj = node.obj + node.obj = node_obj.transform(self) + end + transform_many node.args + + if node_block = node.block + node.block = node_block.transform(self) + end + + if node_block_arg = node.block_arg + node.block_arg = node_block_arg.transform(self) + end + + node + end + + def transform(node : And) + node.left = node.left.transform(self) + node.right = node.right.transform(self) + node + end + + def transform(node : Or) + node.left = node.left.transform(self) + node.right = node.right.transform(self) + node + end + + def transform(node : StringInterpolation) + transform_many node.expressions + node + end + + def transform(node : ArrayLiteral) + transform_many node.elements + + if node_of = node.of + node.of = node_of.transform(self) + end + + node + end + + def transform(node : HashLiteral) + transform_many node.keys + transform_many node.values + + if of_key = node.of_key + node.of_key = of_key.transform(self) + end + + if of_value = node.of_value + node.of_value = of_value.transform(self) + end + + node + end + + def transform(node : If) + node.cond = node.cond.transform(self) + node.then = node.then.transform(self) + node.else = node.else.transform(self) + node + end + + def transform(node : Unless) + node.cond = node.cond.transform(self) + node.then = node.then.transform(self) + node.else = node.else.transform(self) + node + end + + def transform(node : IfDef) + node.cond = node.cond.transform(self) + node.then = node.then.transform(self) + node.else = node.else.transform(self) + node + end + + def transform(node : MultiAssign) + transform_many node.targets + transform_many node.values + node + end + + def transform(node : SimpleOr) + node.left = node.left.transform(self) + node.right = node.right.transform(self) + node + end + + def transform(node : Def) + transform_many node.args + node.body = node.body.transform(self) + + if receiver = node.receiver + node.receiver = receiver.transform(self) + end + + if block_arg = node.block_arg + node.block_arg = block_arg.transform(self) + end + + node + end + + def transform(node : Macro) + transform_many node.args + node.body = node.body.transform(self) + + if receiver = node.receiver + node.receiver = receiver.transform(self) + end + + if block_arg = node.block_arg + node.block_arg = block_arg.transform(self) + end + + node + end + + def transform(node : PointerOf) + node.exp = node.exp.transform(self) + node + end + + def transform(node : SizeOf) + node.exp = node.exp.transform(self) + node + end + + def transform(node : InstanceSizeOf) + node.exp = node.exp.transform(self) + node + end + + def transform(node : IsA) + node.obj = node.obj.transform(self) + node.const = node.const.transform(self) + node + end + + def transform(node : RespondsTo) + node.obj = node.obj.transform(self) + node + end + + def transform(node : Case) + node.cond = node.cond.transform(self) + transform_many node.whens + + if node_else = node.else + node.else = node_else.transform(self) + end + + node + end + + def transform(node : When) + transform_many node.conds + node.body = node.body.transform(self) + node + end + + def transform(node : ImplicitObj) + node + end + + def transform(node : ClassDef) + node.body = node.body.transform(self) + + if superclass = node.superclass + node.superclass = superclass.transform(self) + end + + node + end + + def transform(node : ModuleDef) + node.body = node.body.transform(self) + node + end + + def transform(node : While) + node.cond = node.cond.transform(self) + node.body = node.body.transform(self) + node + end + + def transform(node : Generic) + node.name = node.name.transform(self) + transform_many node.type_vars + node + end + + def transform(node : ExceptionHandler) + node.body = node.body.transform(self) + transform_many node.rescues + + if node_ensure = node.ensure + node.ensure = node_ensure.transform(self) + end + + node + end + + def transform(node : Rescue) + node.body = node.body.transform(self) + transform_many node.types + node + end + + def transform(node : Union) + transform_many node.types + node + end + + def transform(node : Hierarchy) + node.name = node.name.transform(self) + node + end + + def transform(node : Metaclass) + node.name = node.name.transform(self) + node + end + + def transform(node : Arg) + if default_value = node.default_value + node.default_value = default_value.transform(self) + end + + if restriction = node.restriction + node.restriction = restriction.transform(self) + end + + node + end + + def transform(node : BlockArg) + node.fun = node.fun.transform(self) + node + end + + def transform(node : Fun) + transform_many node.inputs + + if output = node.output + node.output = output.transform(self) + end + + node + end + + def transform(node : Block) + node.args.map! { |exp| exp.transform(self) as Var } + node.body = node.body.transform(self) + node + end + + def transform(node : FunLiteral) + node.def.body = node.def.body.transform(self) + node + end + + def transform(node : FunPointer) + if obj = node.obj + node.obj = obj.transform(self) + end + node + end + + def transform(node : Return) + transform_many node.exps + node + end + + def transform(node : Break) + transform_many node.exps + node + end + + def transform(node : Next) + transform_many node.exps + node + end + + def transform(node : Yield) + if scope = node.scope + node.scope = scope.transform(self) + end + transform_many node.exps + node + end + + def transform(node : Include) + node.name = node.name.transform(self) + node + end + + def transform(node : Extend) + node.name = node.name.transform(self) + node + end + + def transform(node : RangeLiteral) + node.from = node.from.transform(self) + node.to = node.to.transform(self) + node + end + + def transform(node : Assign) + node.target = node.target.transform(self) + node.value = node.value.transform(self) + node + end + + def transform(node : Nop) + node + end + + def transform(node : NilLiteral) + node + end + + def transform(node : BoolLiteral) + node + end + + def transform(node : NumberLiteral) + node + end + + def transform(node : CharLiteral) + node + end + + def transform(node : StringLiteral) + node + end + + def transform(node : SymbolLiteral) + node + end + + def transform(node : RegexLiteral) + node + end + + def transform(node : Var) + node + end + + def transform(node : MetaVar) + node + end + + def transform(node : InstanceVar) + node + end + + def transform(node : ClassVar) + node + end + + def transform(node : Global) + node + end + + def transform(node : Require) + node + end + + def transform(node : Path) + node + end + + def transform(node : Self) + node + end + + def transform(node : LibDef) + node.body = node.body.transform(self) + node + end + + def transform(node : FunDef) + if body = node.body + node.body = body.transform(self) + end + node + end + + def transform(node : TypeDef) + node + end + + def transform(node : StructDef) + node + end + + def transform(node : UnionDef) + node + end + + def transform(node : EnumDef) + node + end + + def transform(node : ExternalVar) + node + end + + def transform(node : IndirectRead) + node.obj = node.obj.transform(self) + node + end + + def transform(node : IndirectWrite) + node.obj = node.obj.transform(self) + node.value = node.value.transform(self) + node + end + + def transform(node : TypeOf) + transform_many node.expressions + node + end + + def transform(node : Primitive) + node + end + + def transform(node : Not) + node + end + + def transform(node : TypeFilteredNode) + node + end + + def transform(node : TupleLiteral) + transform_many node.exps + node + end + + def transform(node : Cast) + node.obj = node.obj.transform(self) + node.to = node.to.transform(self) + node + end + + def transform(node : DeclareVar) + node.var = node.var.transform(self) + node.declared_type = node.declared_type.transform(self) + node + end + + def transform(node : Alias) + node.value = node.value.transform(self) + node + end + + def transform(node : TupleIndexer) + node + end + + def transform(node : Attribute) + node + end + + def transform_many(exps) + exps.map! { |exp| exp.transform(self) } if exps + end + end +end diff --git a/samples/Cuda/scalarProd_kernel.cuh b/samples/Cuda/scalarProd_kernel.cuh new file mode 100644 index 00000000..7622c597 --- /dev/null +++ b/samples/Cuda/scalarProd_kernel.cuh @@ -0,0 +1,52 @@ +__global__ void scalarProdGPU( + float *d_C, + float *d_A, + float *d_B, + int vectorN, + int elementN +) +{ + //Accumulators cache + __shared__ float accumResult[ACCUM_N]; + + //////////////////////////////////////////////////////////////////////////// + // Cycle through every pair of vectors, + // taking into account that vector counts can be different + // from total number of thread blocks + //////////////////////////////////////////////////////////////////////////// + for (int vec = blockIdx.x; vec < vectorN; vec += gridDim.x) + { + int vectorBase = IMUL(elementN, vec); + int vectorEnd = vectorBase + elementN; + + //////////////////////////////////////////////////////////////////////// + // Each accumulator cycles through vectors with + // stride equal to number of total number of accumulators ACCUM_N + // At this stage ACCUM_N is only preferred be a multiple of warp size + // to meet memory coalescing alignment constraints. + //////////////////////////////////////////////////////////////////////// + for (int iAccum = threadIdx.x; iAccum < ACCUM_N; iAccum += blockDim.x) + { + float sum = 0; + + for (int pos = vectorBase + iAccum; pos < vectorEnd; pos += ACCUM_N) + sum += d_A[pos] * d_B[pos]; + + accumResult[iAccum] = sum; + } + + //////////////////////////////////////////////////////////////////////// + // Perform tree-like reduction of accumulators' results. + // ACCUM_N has to be power of two at this stage + //////////////////////////////////////////////////////////////////////// + for (int stride = ACCUM_N / 2; stride > 0; stride >>= 1) + { + __syncthreads(); + + for (int iAccum = threadIdx.x; iAccum < stride; iAccum += blockDim.x) + accumResult[iAccum] += accumResult[stride + iAccum]; + } + + if (threadIdx.x == 0) d_C[vec] = accumResult[0]; + } +} \ No newline at end of file diff --git a/samples/Cuda/vectorAdd.cu b/samples/Cuda/vectorAdd.cu new file mode 100644 index 00000000..cdc21dff --- /dev/null +++ b/samples/Cuda/vectorAdd.cu @@ -0,0 +1,46 @@ +#include +#include + +/** + * CUDA Kernel Device code + * + * Computes the vector addition of A and B into C. The 3 vectors have the same + * number of elements numElements. + */ +__global__ void +vectorAdd(const float *A, const float *B, float *C, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + C[i] = A[i] + B[i]; + } +} + +/** + * Host main routine + */ +int +main(void) +{ + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 256; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + vectorAdd<<>>(d_A, d_B, d_C, numElements); + err = cudaGetLastError(); + + if (err != cudaSuccess) + { + fprintf(stderr, "Failed to launch vectorAdd kernel (error code %s)!\n", cudaGetErrorString(err)); + exit(EXIT_FAILURE); + } + + // Reset the device and exit + err = cudaDeviceReset(); + + return 0; +} \ No newline at end of file diff --git a/samples/DM/example.dm b/samples/DM/example.dm new file mode 100644 index 00000000..b8f1fad4 --- /dev/null +++ b/samples/DM/example.dm @@ -0,0 +1,87 @@ +// This is a single line comment. +/* + This is a multi-line comment +*/ + +// Pre-processor keywords + +#define PI 3.1415 + +#if PI == 4 + +#define G 5 + +#elif PI == 3 + +#define I 6 + +#else + +#define K 7 + +#endif + + +var/GlobalCounter = 0 +var/const/CONST_VARIABLE = 2 +var/list/MyList = list("anything", 1, new /datum/entity) +var/list/EmptyList[99] // creates a list of 99 null entries +var/list/NullList = null + +/* + Entity Class +*/ + +/datum/entity + var/name = "Entity" + var/number = 0 + +/datum/entity/proc/myFunction() + world.log << "Entity has called myFunction" + +/datum/entity/New() + number = GlobalCounter++ + +/* + Unit Class, Extends from Entity +*/ + +/datum/entity/unit + name = "Unit" + +/datum/entity/unit/New() + ..() // calls the parent's proc; equal to super() and base() in other languages + number = rand(1, 99) + +/datum/entity/unit/myFunction() + world.log << "Unit has overriden and called myFunction" + +// Global Function +/proc/ReverseList(var/list/input) + var/list/output = list() + for(var/i = input.len; i >= 1; i--) // IMPORTANT: List Arrays count from 1. + output += input[i] // "+= x" is ".Add(x)" + return output + +// Bitflags +/proc/DoStuff() + var/bitflag = 0 + bitflag |= 8 + return bitflag + +/proc/DoOtherStuff() + var/bitflag = 65535 // 16 bits is the maximum amount + bitflag &= ~8 + return bitflag + +// Logic +/proc/DoNothing() + var/pi = PI + if(pi == 4) + world.log << "PI is 4" + else if(pi == CONST_VARIABLE) + world.log << "PI is [CONST_VARIABLE]!" + else + world.log << "PI is approximety [pi]" + +#undef PI // Undefine PI \ No newline at end of file diff --git a/samples/Dart/point.dart b/samples/Dart/point.dart index 5bb74b29..ee91239b 100644 --- a/samples/Dart/point.dart +++ b/samples/Dart/point.dart @@ -1,15 +1,19 @@ +import 'dart:math' as math; + class Point { + num x, y; + Point(this.x, this.y); - distanceTo(Point other) { + + num distanceTo(Point other) { var dx = x - other.x; var dy = y - other.y; - return Math.sqrt(dx * dx + dy * dy); + return math.sqrt(dx * dx + dy * dy); } - var x, y; } -main() { - Point p = new Point(2, 3); - Point q = new Point(3, 4); +void main() { + var p = new Point(2, 3); + var q = new Point(3, 4); print('distance from p to q = ${p.distanceTo(q)}'); } diff --git a/samples/Dogescript/example.djs b/samples/Dogescript/example.djs new file mode 100644 index 00000000..6903cc5a --- /dev/null +++ b/samples/Dogescript/example.djs @@ -0,0 +1,16 @@ +quiet + wow + such language + very syntax + github recognized wow +loud + +such language much friendly + rly friendly is true + plz console.loge with 'such friend, very inclusive' + but + plz console.loge with 'no love for doge' + wow +wow + +module.exports is language \ No newline at end of file diff --git a/samples/E/Extends.E b/samples/E/Extends.E new file mode 100644 index 00000000..002a9105 --- /dev/null +++ b/samples/E/Extends.E @@ -0,0 +1,31 @@ +# from +# http://wiki.erights.org/wiki/Walnut/Ordinary_Programming/Objects_and_Functions +def makeVehicle(self) { + def vehicle { + to milesTillEmpty() { + return self.milesPerGallon() * self.getFuelRemaining() + } + } + return vehicle +} + +def makeCar() { + var fuelRemaining := 20 + def car extends makeVehicle(car) { + to milesPerGallon() {return 19} + to getFuelRemaining() {return fuelRemaining} + } + return car +} + +def makeJet() { + var fuelRemaining := 2000 + def jet extends makeVehicle(jet) { + to milesPerGallon() {return 2} + to getFuelRemaining() {return fuelRemaining} + } + return jet +} + +def car := makeCar() +println(`The car can go ${car.milesTillEmpty()} miles.`) diff --git a/samples/E/Functions.E b/samples/E/Functions.E new file mode 100644 index 00000000..086e4f7a --- /dev/null +++ b/samples/E/Functions.E @@ -0,0 +1,21 @@ +# from +# http://wiki.erights.org/wiki/Walnut/Ordinary_Programming/Objects_and_Functions +def makeCar(var name) { + var x := 0 + var y := 0 + def car { + to moveTo(newX,newY) { + x := newX + y := newY + } + to getX() {return x} + to getY() {return y} + to setName(newName) {name := newName} + to getName() {return name} + } + return car +} +# Now use the makeCar function to make a car, which we will move and print +def sportsCar := makeCar("Ferrari") +sportsCar.moveTo(10,20) +println(`The car ${sportsCar.getName()} is at X location ${sportsCar.getX()}`) diff --git a/samples/E/Guards.E b/samples/E/Guards.E new file mode 100644 index 00000000..e3e841ae --- /dev/null +++ b/samples/E/Guards.E @@ -0,0 +1,69 @@ +# from +# http://wiki.erights.org/wiki/Walnut/Advanced_Topics/Build_your_Own_Guards +def makeVOCPair(brandName :String) :near { + + var myTempContents := def none {} + + def brand { + to __printOn(out :TextWriter) :void { + out.print(brandName) + } + } + + def ProveAuth { + to __printOn(out :TextWriter) :void { + out.print(`<$brandName prover>`) + } + to getBrand() :near { return brand } + to coerce(specimen, optEjector) :near { + def sealedBox { + to getBrand() :near { return brand } + to offerContent() :void { + myTempContents := specimen + } + } + return sealedBox + } + } + def CheckAuth { + to __printOn(out :TextWriter) :void { + out.print(`<$brandName checker template>`) + } + to getBrand() :near { return brand } + match [`get`, authList :any[]] { + def checker { + to __printOn(out :TextWriter) :void { + out.print(`<$brandName checker>`) + } + to getBrand() :near { return brand } + to coerce(specimenBox, optEjector) :any { + myTempContents := null + if (specimenBox.__respondsTo("offerContent", 0)) { + # XXX Using __respondsTo/2 here is a kludge + specimenBox.offerContent() + } else { + myTempContents := specimenBox + } + for auth in authList { + if (auth == myTempContents) { + return auth + } + } + myTempContents := none + throw.eject(optEjector, + `Unmatched $brandName authorization`) + } + } + } + match [`__respondsTo`, [`get`, _]] { + true + } + match [`__respondsTo`, [_, _]] { + false + } + match [`__getAllegedType`, []] { + null.__getAllegedType() + } + } + return [ProveAuth, CheckAuth] +} diff --git a/samples/E/IO.E b/samples/E/IO.E new file mode 100644 index 00000000..e96e41ad --- /dev/null +++ b/samples/E/IO.E @@ -0,0 +1,14 @@ +# E sample from +# http://wiki.erights.org/wiki/Walnut/Ordinary_Programming/InputOutput +#File objects for hardwired files: +def file1 := +def file2 := + +#Using a variable for a file name: +def filePath := "c:\\docs\\myFile.txt" +def file3 := [filePath] + +#Using a single character to specify a Windows drive +def file4 := +def file5 := +def file6 := diff --git a/samples/E/Promises.E b/samples/E/Promises.E new file mode 100644 index 00000000..ae03c6ec --- /dev/null +++ b/samples/E/Promises.E @@ -0,0 +1,9 @@ +# E snippet from +# http://wiki.erights.org/wiki/Walnut/Distributed_Computing/Promises +when (tempVow) -> { + #...use tempVow +} catch prob { + #.... report problem +} finally { + #....log event +} diff --git a/samples/E/minChat.E b/samples/E/minChat.E new file mode 100644 index 00000000..b422a71e --- /dev/null +++ b/samples/E/minChat.E @@ -0,0 +1,18 @@ +# from +# http://wiki.erights.org/wiki/Walnut/Secure_Distributed_Computing/Auditing_minChat +pragma.syntax("0.9") +to send(message) { + when (friend<-receive(message)) -> { + chatUI.showMessage("self", message) + } catch prob {chatUI.showMessage("system", "connection lost")} +} +to receive(message) {chatUI.showMessage("friend", message)} +to receiveFriend(friendRcvr) { + bind friend := friendRcvr + chatUI.showMessage("system", "friend has arrived") +} +to save(file) {file.setText(makeURIFromObject(chatController))} +to load(file) { + bind friend := getObjectFromURI(file.getText()) + friend <- receiveFriend(chatController) +} diff --git a/samples/Ecl/sample.ecl b/samples/ECL/sample.ecl similarity index 100% rename from samples/Ecl/sample.ecl rename to samples/ECL/sample.ecl diff --git a/samples/Eagle/Eagle.brd b/samples/Eagle/Eagle.brd new file mode 100644 index 00000000..27f3cbdd --- /dev/null +++ b/samples/Eagle/Eagle.brd @@ -0,0 +1,1396 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<b>Resistors, Capacitors, Inductors</b><p> +Based on the previous libraries: +<ul> +<li>r.lbr +<li>cap.lbr +<li>cap-fe.lbr +<li>captant.lbr +<li>polcap.lbr +<li>ipc-smd.lbr +</ul> +All SMD packages are defined according to the IPC specifications and CECC<p> +<author>Created by librarian@cadsoft.de</author><p> +<p> +for Electrolyt Capacitors see also :<p> +www.bccomponents.com <p> +www.panasonic.com<p> +www.kemet.com<p> +http://www.secc.co.jp/pdf/os_e/2004/e_os_all.pdf <b>(SANYO)</b> +<p> +for trimmer refence see : <u>www.electrospec-inc.com/cross_references/trimpotcrossref.asp</u><p> + +<table border=0 cellspacing=0 cellpadding=0 width="100%" cellpaddding=0> +<tr valign="top"> + +<! <td width="10">&nbsp;</td> +<td width="90%"> + +<b><font color="#0000FF" size="4">TRIM-POT CROSS REFERENCE</font></b> +<P> +<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2> + <TR> + <TD COLSPAN=8> + <FONT SIZE=3 FACE=ARIAL><B>RECTANGULAR MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">BOURNS</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">BI&nbsp;TECH</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">DALE-VISHAY</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">PHILIPS/MEPCO</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">MURATA</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">PANASONIC</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">SPECTROL</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">MILSPEC</FONT> + </B> + </TD><TD>&nbsp;</TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3 > + 3005P<BR> + 3006P<BR> + 3006W<BR> + 3006Y<BR> + 3009P<BR> + 3009W<BR> + 3009Y<BR> + 3057J<BR> + 3057L<BR> + 3057P<BR> + 3057Y<BR> + 3059J<BR> + 3059L<BR> + 3059P<BR> + 3059Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 89P<BR> + 89W<BR> + 89X<BR> + 89PH<BR> + 76P<BR> + 89XH<BR> + 78SLT<BR> + 78L&nbsp;ALT<BR> + 56P&nbsp;ALT<BR> + 78P&nbsp;ALT<BR> + T8S<BR> + 78L<BR> + 56P<BR> + 78P<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + T18/784<BR> + 783<BR> + 781<BR> + -<BR> + -<BR> + -<BR> + 2199<BR> + 1697/1897<BR> + 1680/1880<BR> + 2187<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 8035EKP/CT20/RJ-20P<BR> + -<BR> + RJ-20X<BR> + -<BR> + -<BR> + -<BR> + 1211L<BR> + 8012EKQ&nbsp;ALT<BR> + 8012EKR&nbsp;ALT<BR> + 1211P<BR> + 8012EKJ<BR> + 8012EKL<BR> + 8012EKQ<BR> + 8012EKR<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 2101P<BR> + 2101W<BR> + 2101Y<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 2102L<BR> + 2102S<BR> + 2102Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + EVMCOG<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 43P<BR> + 43W<BR> + 43Y<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 40L<BR> + 40P<BR> + 40Y<BR> + 70Y-T602<BR> + 70L<BR> + 70P<BR> + 70Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + RT/RTR12<BR> + RT/RTR12<BR> + RT/RTR12<BR> + -<BR> + RJ/RJR12<BR> + RJ/RJR12<BR> + RJ/RJR12<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=8>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=8> + <FONT SIZE=4 FACE=ARIAL><B>SQUARE MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3250L<BR> + 3250P<BR> + 3250W<BR> + 3250X<BR> + 3252P<BR> + 3252W<BR> + 3252X<BR> + 3260P<BR> + 3260W<BR> + 3260X<BR> + 3262P<BR> + 3262W<BR> + 3262X<BR> + 3266P<BR> + 3266W<BR> + 3266X<BR> + 3290H<BR> + 3290P<BR> + 3290W<BR> + 3292P<BR> + 3292W<BR> + 3292X<BR> + 3296P<BR> + 3296W<BR> + 3296X<BR> + 3296Y<BR> + 3296Z<BR> + 3299P<BR> + 3299W<BR> + 3299X<BR> + 3299Y<BR> + 3299Z<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66X&nbsp;ALT<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66X&nbsp;ALT<BR> + -<BR> + 64W&nbsp;ALT<BR> + -<BR> + 64P&nbsp;ALT<BR> + 64W&nbsp;ALT<BR> + 64X&nbsp;ALT<BR> + 64P<BR> + 64W<BR> + 64X<BR> + 66X&nbsp;ALT<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66P<BR> + 66W<BR> + 66X<BR> + 67P<BR> + 67W<BR> + 67X<BR> + 67Y<BR> + 67Z<BR> + 68P<BR> + 68W<BR> + 68X<BR> + 67Y&nbsp;ALT<BR> + 67Z&nbsp;ALT<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 5050<BR> + 5091<BR> + 5080<BR> + 5087<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + T63YB<BR> + T63XB<BR> + -<BR> + -<BR> + -<BR> + 5887<BR> + 5891<BR> + 5880<BR> + -<BR> + -<BR> + -<BR> + T93Z<BR> + T93YA<BR> + T93XA<BR> + T93YB<BR> + T93XB<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 8026EKP<BR> + 8026EKW<BR> + 8026EKM<BR> + 8026EKP<BR> + 8026EKB<BR> + 8026EKM<BR> + 1309X<BR> + 1309P<BR> + 1309W<BR> + 8024EKP<BR> + 8024EKW<BR> + 8024EKN<BR> + RJ-9P/CT9P<BR> + RJ-9W<BR> + RJ-9X<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3103P<BR> + 3103Y<BR> + 3103Z<BR> + 3103P<BR> + 3103Y<BR> + 3103Z<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3105P/3106P<BR> + 3105W/3106W<BR> + 3105X/3106X<BR> + 3105Y/3106Y<BR> + 3105Z/3105Z<BR> + 3102P<BR> + 3102W<BR> + 3102X<BR> + 3102Y<BR> + 3102Z<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + EVMCBG<BR> + EVMCCG<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 55-1-X<BR> + 55-4-X<BR> + 55-3-X<BR> + 55-2-X<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 50-2-X<BR> + 50-4-X<BR> + 50-3-X<BR> + -<BR> + -<BR> + -<BR> + 64P<BR> + 64W<BR> + 64X<BR> + 64Y<BR> + 64Z<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + RT/RTR22<BR> + RT/RTR22<BR> + RT/RTR22<BR> + RT/RTR22<BR> + RJ/RJR22<BR> + RJ/RJR22<BR> + RJ/RJR22<BR> + RT/RTR26<BR> + RT/RTR26<BR> + RT/RTR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RT/RTR24<BR> + RT/RTR24<BR> + RT/RTR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=8>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=8> + <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3323P<BR> + 3323S<BR> + 3323W<BR> + 3329H<BR> + 3329P<BR> + 3329W<BR> + 3339H<BR> + 3339P<BR> + 3339W<BR> + 3352E<BR> + 3352H<BR> + 3352K<BR> + 3352P<BR> + 3352T<BR> + 3352V<BR> + 3352W<BR> + 3362H<BR> + 3362M<BR> + 3362P<BR> + 3362R<BR> + 3362S<BR> + 3362U<BR> + 3362W<BR> + 3362X<BR> + 3386B<BR> + 3386C<BR> + 3386F<BR> + 3386H<BR> + 3386K<BR> + 3386M<BR> + 3386P<BR> + 3386S<BR> + 3386W<BR> + 3386X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 25P<BR> + 25S<BR> + 25RX<BR> + 82P<BR> + 82M<BR> + 82PA<BR> + -<BR> + -<BR> + -<BR> + 91E<BR> + 91X<BR> + 91T<BR> + 91B<BR> + 91A<BR> + 91V<BR> + 91W<BR> + 25W<BR> + 25V<BR> + 25P<BR> + -<BR> + 25S<BR> + 25U<BR> + 25RX<BR> + 25X<BR> + 72XW<BR> + 72XL<BR> + 72PM<BR> + 72RX<BR> + -<BR> + 72PX<BR> + 72P<BR> + 72RXW<BR> + 72RXL<BR> + 72X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + T7YB<BR> + T7YA<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + TXD<BR> + TYA<BR> + TYP<BR> + -<BR> + TYD<BR> + TX<BR> + -<BR> + 150SX<BR> + 100SX<BR> + 102T<BR> + 101S<BR> + 190T<BR> + 150TX<BR> + 101<BR> + -<BR> + -<BR> + 101SX<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ET6P<BR> + ET6S<BR> + ET6X<BR> + RJ-6W/8014EMW<BR> + RJ-6P/8014EMP<BR> + RJ-6X/8014EMX<BR> + TM7W<BR> + TM7P<BR> + TM7X<BR> + -<BR> + 8017SMS<BR> + -<BR> + 8017SMB<BR> + 8017SMA<BR> + -<BR> + -<BR> + CT-6W<BR> + CT-6H<BR> + CT-6P<BR> + CT-6R<BR> + -<BR> + CT-6V<BR> + CT-6X<BR> + -<BR> + -<BR> + 8038EKV<BR> + -<BR> + 8038EKX<BR> + -<BR> + -<BR> + 8038EKP<BR> + 8038EKZ<BR> + 8038EKW<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + 3321H<BR> + 3321P<BR> + 3321N<BR> + 1102H<BR> + 1102P<BR> + 1102T<BR> + RVA0911V304A<BR> + -<BR> + RVA0911H413A<BR> + RVG0707V100A<BR> + RVA0607V(H)306A<BR> + RVA1214H213A<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3104B<BR> + 3104C<BR> + 3104F<BR> + 3104H<BR> + -<BR> + 3104M<BR> + 3104P<BR> + 3104S<BR> + 3104W<BR> + 3104X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + EVMQ0G<BR> + EVMQIG<BR> + EVMQ3G<BR> + EVMS0G<BR> + EVMQ0G<BR> + EVMG0G<BR> + -<BR> + -<BR> + -<BR> + EVMK4GA00B<BR> + EVM30GA00B<BR> + EVMK0GA00B<BR> + EVM38GA00B<BR> + EVMB6<BR> + EVLQ0<BR> + -<BR> + EVMMSG<BR> + EVMMBG<BR> + EVMMAG<BR> + -<BR> + -<BR> + EVMMCS<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + EVMM1<BR> + -<BR> + -<BR> + EVMM0<BR> + -<BR> + -<BR> + EVMM3<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + 62-3-1<BR> + 62-1-2<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 67R<BR> + -<BR> + 67P<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 67X<BR> + 63V<BR> + 63S<BR> + 63M<BR> + -<BR> + -<BR> + 63H<BR> + 63P<BR> + -<BR> + -<BR> + 63X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + RJ/RJR50<BR> + RJ/RJR50<BR> + RJ/RJR50<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> +</TABLE> +<P>&nbsp;<P> +<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3> + <TR> + <TD COLSPAN=7> + <FONT color="#0000FF" SIZE=4 FACE=ARIAL><B>SMD TRIM-POT CROSS REFERENCE</B></FONT> + <P> + <FONT SIZE=4 FACE=ARIAL><B>MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3224G<BR> + 3224J<BR> + 3224W<BR> + 3269P<BR> + 3269W<BR> + 3269X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 44G<BR> + 44J<BR> + 44W<BR> + 84P<BR> + 84W<BR> + 84X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + ST63Z<BR> + ST63Y<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + ST5P<BR> + ST5W<BR> + ST5X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=7>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=7> + <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> + </TD> + </TR> + <TR> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3314G<BR> + 3314J<BR> + 3364A/B<BR> + 3364C/D<BR> + 3364W/X<BR> + 3313G<BR> + 3313J<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 23B<BR> + 23A<BR> + 21X<BR> + 21W<BR> + -<BR> + 22B<BR> + 22A<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ST5YL/ST53YL<BR> + ST5YJ/5T53YJ<BR> + ST-23A<BR> + ST-22B<BR> + ST-22<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ST-4B<BR> + ST-4A<BR> + -<BR> + -<BR> + -<BR> + ST-3B<BR> + ST-3A<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + EVM-6YS<BR> + EVM-1E<BR> + EVM-1G<BR> + EVM-1D<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + G4B<BR> + G4A<BR> + TR04-3S1<BR> + TRG04-2S1<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + DVR-43A<BR> + CVR-42C<BR> + CVR-42A/C<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> +</TABLE> +<P> +<FONT SIZE=4 FACE=ARIAL><B>ALT =&nbsp;ALTERNATE</B></FONT> +<P> + +&nbsp; +<P> +</td> +</tr> +</table> + + +<b>RESISTOR</b><p> + + + + + + + + +>NAME +>VALUE + + + + + + + +<b>Pin Header Connectors</b><p> +<author>Created by librarian@cadsoft.de</author> + + +<b>PIN HEADER</b> + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + +<b>EAGLE Design Rules</b> +<p> +Die Standard-Design-Rules sind so gewählt, dass sie für +die meisten Anwendungen passen. Sollte ihre Platine +besondere Anforderungen haben, treffen Sie die erforderlichen +Einstellungen hier und speichern die Design Rules unter +einem neuen Namen ab. +<b>EAGLE Design Rules</b> +<p> +The default Design Rules have been set to cover +a wide range of applications. Your particular design +may have different requirements, so please make the +necessary adjustments and save your customized +design rules under a new name. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/Eagle/Eagle.sch b/samples/Eagle/Eagle.sch new file mode 100644 index 00000000..5a72a868 --- /dev/null +++ b/samples/Eagle/Eagle.sch @@ -0,0 +1,3612 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<b>Frames for Sheet and Layout</b> + + + + + + + + + + + + + + + + + + + + +>DRAWING_NAME +>LAST_DATE_TIME +>SHEET +Sheet: + + + + + +<b>FRAME</b><p> +DIN A4, landscape with location and doc. field + + + + + + + + + + + + + + +<b>Resistors, Capacitors, Inductors</b><p> +Based on the previous libraries: +<ul> +<li>r.lbr +<li>cap.lbr +<li>cap-fe.lbr +<li>captant.lbr +<li>polcap.lbr +<li>ipc-smd.lbr +</ul> +All SMD packages are defined according to the IPC specifications and CECC<p> +<author>Created by librarian@cadsoft.de</author><p> +<p> +for Electrolyt Capacitors see also :<p> +www.bccomponents.com <p> +www.panasonic.com<p> +www.kemet.com<p> +http://www.secc.co.jp/pdf/os_e/2004/e_os_all.pdf <b>(SANYO)</b> +<p> +for trimmer refence see : <u>www.electrospec-inc.com/cross_references/trimpotcrossref.asp</u><p> + +<table border=0 cellspacing=0 cellpadding=0 width="100%" cellpaddding=0> +<tr valign="top"> + +<! <td width="10">&nbsp;</td> +<td width="90%"> + +<b><font color="#0000FF" size="4">TRIM-POT CROSS REFERENCE</font></b> +<P> +<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2> + <TR> + <TD COLSPAN=8> + <FONT SIZE=3 FACE=ARIAL><B>RECTANGULAR MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">BOURNS</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">BI&nbsp;TECH</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">DALE-VISHAY</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">PHILIPS/MEPCO</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">MURATA</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">PANASONIC</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">SPECTROL</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">MILSPEC</FONT> + </B> + </TD><TD>&nbsp;</TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3 > + 3005P<BR> + 3006P<BR> + 3006W<BR> + 3006Y<BR> + 3009P<BR> + 3009W<BR> + 3009Y<BR> + 3057J<BR> + 3057L<BR> + 3057P<BR> + 3057Y<BR> + 3059J<BR> + 3059L<BR> + 3059P<BR> + 3059Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 89P<BR> + 89W<BR> + 89X<BR> + 89PH<BR> + 76P<BR> + 89XH<BR> + 78SLT<BR> + 78L&nbsp;ALT<BR> + 56P&nbsp;ALT<BR> + 78P&nbsp;ALT<BR> + T8S<BR> + 78L<BR> + 56P<BR> + 78P<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + T18/784<BR> + 783<BR> + 781<BR> + -<BR> + -<BR> + -<BR> + 2199<BR> + 1697/1897<BR> + 1680/1880<BR> + 2187<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 8035EKP/CT20/RJ-20P<BR> + -<BR> + RJ-20X<BR> + -<BR> + -<BR> + -<BR> + 1211L<BR> + 8012EKQ&nbsp;ALT<BR> + 8012EKR&nbsp;ALT<BR> + 1211P<BR> + 8012EKJ<BR> + 8012EKL<BR> + 8012EKQ<BR> + 8012EKR<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 2101P<BR> + 2101W<BR> + 2101Y<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 2102L<BR> + 2102S<BR> + 2102Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + EVMCOG<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 43P<BR> + 43W<BR> + 43Y<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 40L<BR> + 40P<BR> + 40Y<BR> + 70Y-T602<BR> + 70L<BR> + 70P<BR> + 70Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + RT/RTR12<BR> + RT/RTR12<BR> + RT/RTR12<BR> + -<BR> + RJ/RJR12<BR> + RJ/RJR12<BR> + RJ/RJR12<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=8>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=8> + <FONT SIZE=4 FACE=ARIAL><B>SQUARE MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3250L<BR> + 3250P<BR> + 3250W<BR> + 3250X<BR> + 3252P<BR> + 3252W<BR> + 3252X<BR> + 3260P<BR> + 3260W<BR> + 3260X<BR> + 3262P<BR> + 3262W<BR> + 3262X<BR> + 3266P<BR> + 3266W<BR> + 3266X<BR> + 3290H<BR> + 3290P<BR> + 3290W<BR> + 3292P<BR> + 3292W<BR> + 3292X<BR> + 3296P<BR> + 3296W<BR> + 3296X<BR> + 3296Y<BR> + 3296Z<BR> + 3299P<BR> + 3299W<BR> + 3299X<BR> + 3299Y<BR> + 3299Z<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66X&nbsp;ALT<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66X&nbsp;ALT<BR> + -<BR> + 64W&nbsp;ALT<BR> + -<BR> + 64P&nbsp;ALT<BR> + 64W&nbsp;ALT<BR> + 64X&nbsp;ALT<BR> + 64P<BR> + 64W<BR> + 64X<BR> + 66X&nbsp;ALT<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66P<BR> + 66W<BR> + 66X<BR> + 67P<BR> + 67W<BR> + 67X<BR> + 67Y<BR> + 67Z<BR> + 68P<BR> + 68W<BR> + 68X<BR> + 67Y&nbsp;ALT<BR> + 67Z&nbsp;ALT<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 5050<BR> + 5091<BR> + 5080<BR> + 5087<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + T63YB<BR> + T63XB<BR> + -<BR> + -<BR> + -<BR> + 5887<BR> + 5891<BR> + 5880<BR> + -<BR> + -<BR> + -<BR> + T93Z<BR> + T93YA<BR> + T93XA<BR> + T93YB<BR> + T93XB<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 8026EKP<BR> + 8026EKW<BR> + 8026EKM<BR> + 8026EKP<BR> + 8026EKB<BR> + 8026EKM<BR> + 1309X<BR> + 1309P<BR> + 1309W<BR> + 8024EKP<BR> + 8024EKW<BR> + 8024EKN<BR> + RJ-9P/CT9P<BR> + RJ-9W<BR> + RJ-9X<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3103P<BR> + 3103Y<BR> + 3103Z<BR> + 3103P<BR> + 3103Y<BR> + 3103Z<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3105P/3106P<BR> + 3105W/3106W<BR> + 3105X/3106X<BR> + 3105Y/3106Y<BR> + 3105Z/3105Z<BR> + 3102P<BR> + 3102W<BR> + 3102X<BR> + 3102Y<BR> + 3102Z<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + EVMCBG<BR> + EVMCCG<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 55-1-X<BR> + 55-4-X<BR> + 55-3-X<BR> + 55-2-X<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 50-2-X<BR> + 50-4-X<BR> + 50-3-X<BR> + -<BR> + -<BR> + -<BR> + 64P<BR> + 64W<BR> + 64X<BR> + 64Y<BR> + 64Z<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + RT/RTR22<BR> + RT/RTR22<BR> + RT/RTR22<BR> + RT/RTR22<BR> + RJ/RJR22<BR> + RJ/RJR22<BR> + RJ/RJR22<BR> + RT/RTR26<BR> + RT/RTR26<BR> + RT/RTR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RT/RTR24<BR> + RT/RTR24<BR> + RT/RTR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=8>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=8> + <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3323P<BR> + 3323S<BR> + 3323W<BR> + 3329H<BR> + 3329P<BR> + 3329W<BR> + 3339H<BR> + 3339P<BR> + 3339W<BR> + 3352E<BR> + 3352H<BR> + 3352K<BR> + 3352P<BR> + 3352T<BR> + 3352V<BR> + 3352W<BR> + 3362H<BR> + 3362M<BR> + 3362P<BR> + 3362R<BR> + 3362S<BR> + 3362U<BR> + 3362W<BR> + 3362X<BR> + 3386B<BR> + 3386C<BR> + 3386F<BR> + 3386H<BR> + 3386K<BR> + 3386M<BR> + 3386P<BR> + 3386S<BR> + 3386W<BR> + 3386X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 25P<BR> + 25S<BR> + 25RX<BR> + 82P<BR> + 82M<BR> + 82PA<BR> + -<BR> + -<BR> + -<BR> + 91E<BR> + 91X<BR> + 91T<BR> + 91B<BR> + 91A<BR> + 91V<BR> + 91W<BR> + 25W<BR> + 25V<BR> + 25P<BR> + -<BR> + 25S<BR> + 25U<BR> + 25RX<BR> + 25X<BR> + 72XW<BR> + 72XL<BR> + 72PM<BR> + 72RX<BR> + -<BR> + 72PX<BR> + 72P<BR> + 72RXW<BR> + 72RXL<BR> + 72X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + T7YB<BR> + T7YA<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + TXD<BR> + TYA<BR> + TYP<BR> + -<BR> + TYD<BR> + TX<BR> + -<BR> + 150SX<BR> + 100SX<BR> + 102T<BR> + 101S<BR> + 190T<BR> + 150TX<BR> + 101<BR> + -<BR> + -<BR> + 101SX<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ET6P<BR> + ET6S<BR> + ET6X<BR> + RJ-6W/8014EMW<BR> + RJ-6P/8014EMP<BR> + RJ-6X/8014EMX<BR> + TM7W<BR> + TM7P<BR> + TM7X<BR> + -<BR> + 8017SMS<BR> + -<BR> + 8017SMB<BR> + 8017SMA<BR> + -<BR> + -<BR> + CT-6W<BR> + CT-6H<BR> + CT-6P<BR> + CT-6R<BR> + -<BR> + CT-6V<BR> + CT-6X<BR> + -<BR> + -<BR> + 8038EKV<BR> + -<BR> + 8038EKX<BR> + -<BR> + -<BR> + 8038EKP<BR> + 8038EKZ<BR> + 8038EKW<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + 3321H<BR> + 3321P<BR> + 3321N<BR> + 1102H<BR> + 1102P<BR> + 1102T<BR> + RVA0911V304A<BR> + -<BR> + RVA0911H413A<BR> + RVG0707V100A<BR> + RVA0607V(H)306A<BR> + RVA1214H213A<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3104B<BR> + 3104C<BR> + 3104F<BR> + 3104H<BR> + -<BR> + 3104M<BR> + 3104P<BR> + 3104S<BR> + 3104W<BR> + 3104X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + EVMQ0G<BR> + EVMQIG<BR> + EVMQ3G<BR> + EVMS0G<BR> + EVMQ0G<BR> + EVMG0G<BR> + -<BR> + -<BR> + -<BR> + EVMK4GA00B<BR> + EVM30GA00B<BR> + EVMK0GA00B<BR> + EVM38GA00B<BR> + EVMB6<BR> + EVLQ0<BR> + -<BR> + EVMMSG<BR> + EVMMBG<BR> + EVMMAG<BR> + -<BR> + -<BR> + EVMMCS<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + EVMM1<BR> + -<BR> + -<BR> + EVMM0<BR> + -<BR> + -<BR> + EVMM3<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + 62-3-1<BR> + 62-1-2<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 67R<BR> + -<BR> + 67P<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 67X<BR> + 63V<BR> + 63S<BR> + 63M<BR> + -<BR> + -<BR> + 63H<BR> + 63P<BR> + -<BR> + -<BR> + 63X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + RJ/RJR50<BR> + RJ/RJR50<BR> + RJ/RJR50<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> +</TABLE> +<P>&nbsp;<P> +<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3> + <TR> + <TD COLSPAN=7> + <FONT color="#0000FF" SIZE=4 FACE=ARIAL><B>SMD TRIM-POT CROSS REFERENCE</B></FONT> + <P> + <FONT SIZE=4 FACE=ARIAL><B>MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3224G<BR> + 3224J<BR> + 3224W<BR> + 3269P<BR> + 3269W<BR> + 3269X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 44G<BR> + 44J<BR> + 44W<BR> + 84P<BR> + 84W<BR> + 84X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + ST63Z<BR> + ST63Y<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + ST5P<BR> + ST5W<BR> + ST5X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=7>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=7> + <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> + </TD> + </TR> + <TR> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3314G<BR> + 3314J<BR> + 3364A/B<BR> + 3364C/D<BR> + 3364W/X<BR> + 3313G<BR> + 3313J<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 23B<BR> + 23A<BR> + 21X<BR> + 21W<BR> + -<BR> + 22B<BR> + 22A<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ST5YL/ST53YL<BR> + ST5YJ/5T53YJ<BR> + ST-23A<BR> + ST-22B<BR> + ST-22<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ST-4B<BR> + ST-4A<BR> + -<BR> + -<BR> + -<BR> + ST-3B<BR> + ST-3A<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + EVM-6YS<BR> + EVM-1E<BR> + EVM-1G<BR> + EVM-1D<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + G4B<BR> + G4A<BR> + TR04-3S1<BR> + TRG04-2S1<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + DVR-43A<BR> + CVR-42C<BR> + CVR-42A/C<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> +</TABLE> +<P> +<FONT SIZE=4 FACE=ARIAL><B>ALT =&nbsp;ALTERNATE</B></FONT> +<P> + +&nbsp; +<P> +</td> +</tr> +</table> + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> wave soldering<p> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +Source: http://download.siliconexpert.com/pdfs/2005/02/24/Semi_Ap/2/VSH/Resistor/dcrcwfre.pdf + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> wave soldering<p> +Source: http://download.siliconexpert.com/pdfs/2005/02/24/Semi_Ap/2/VSH/Resistor/dcrcwfre.pdf + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.10 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.25 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.12 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.10 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.25 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.25 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.12 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.25 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +type 0204, grid 5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0204, grid 7.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0207, grid 10 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0207, grid 12 mm + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + +<b>RESISTOR</b><p> +type 0207, grid 15mm + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + +<b>RESISTOR</b><p> +type 0207, grid 2.5 mm + + + + + + + +>NAME +>VALUE + + +<b>RESISTOR</b><p> +type 0207, grid 5 mm + + + + + + + +>NAME +>VALUE + + +<b>RESISTOR</b><p> +type 0207, grid 7.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0309, grid 10mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0309, grid 12.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0411, grid 12.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0411, grid 15 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0411, grid 3.81 mm + + + + + + +>NAME +>VALUE + + + +<b>RESISTOR</b><p> +type 0414, grid 15 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0414, grid 5 mm + + + + + + +>NAME +>VALUE + + + +<b>RESISTOR</b><p> +type 0617, grid 17.5 mm + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0617, grid 22.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0617, grid 5 mm + + + + + + +>NAME +>VALUE + + + +<b>RESISTOR</b><p> +type 0922, grid 22.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + +<b>RESISTOR</b><p> +type 0613, grid 5 mm + + + + + + +>NAME +>VALUE + + + +<b>RESISTOR</b><p> +type 0613, grid 15 mm + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0817, grid 22.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE +0817 + + + + +<b>RESISTOR</b><p> +type 0817, grid 6.35 mm + + + + + + +>NAME +>VALUE +0817 + + + +<b>RESISTOR</b><p> +type V234, grid 12.5 mm + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type V235, grid 17.78 mm + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type V526-0, grid 2.5 mm + + + + + + + + + + +>NAME +>VALUE + + +<b>Mini MELF 0102 Axial</b> + + + + +>NAME +>VALUE + + + +<b>RESISTOR</b><p> +type 0922, grid 7.5 mm + + + + + + +>NAME +>VALUE +0922 + + + +<b>CECC Size RC2211</b> Reflow Soldering<p> +source Beyschlag + + + + + + +>NAME +>VALUE + + +<b>CECC Size RC2211</b> Wave Soldering<p> +source Beyschlag + + + + + + +>NAME +>VALUE + + +<b>CECC Size RC3715</b> Reflow Soldering<p> +source Beyschlag + + + + + + + + +>NAME +>VALUE + + +<b>CECC Size RC3715</b> Wave Soldering<p> +source Beyschlag + + + + + + + + +>NAME +>VALUE + + +<b>CECC Size RC6123</b> Reflow Soldering<p> +source Beyschlag + + + + + + + + +>NAME +>VALUE + + +<b>CECC Size RC6123</b> Wave Soldering<p> +source Beyschlag + + + + + + + + +>NAME +>VALUE + + +<b>RESISTOR</b><p> +type RDH, grid 15 mm + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE +RDH + + + + +<b>RESISTOR</b><p> +type 0204, grid 2.5 mm + + + + + + +>NAME +>VALUE + + +<b>RESISTOR</b><p> +type 0309, grid 2.5 mm + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> chip<p> +Source: http://www.vishay.com/docs/20008/dcrcw.pdf + + +>NAME +>VALUE + + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RNC55<br> +Source: VISHAY .. vta56.pdf + + + + + + + + +>NAME +>VALUE + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RNC60<br> +Source: VISHAY .. vta56.pdf + + + + + + + + +>NAME +>VALUE + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RBR52<br> +Source: VISHAY .. vta56.pdf + + + + + + + + + + +>NAME +>VALUE + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RBR53<br> +Source: VISHAY .. vta56.pdf + + + + + + + + + + +>NAME +>VALUE + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RBR54<br> +Source: VISHAY .. vta56.pdf + + + + + + + + + + +>NAME +>VALUE + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RBR55<br> +Source: VISHAY .. vta56.pdf + + + + + + + + + + +>NAME +>VALUE + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RBR56<br> +Source: VISHAY .. vta56.pdf + + + + + + + + + + +>NAME +>VALUE + + + + +<b>Package 4527</b><p> +Source: http://www.vishay.com/docs/31059/wsrhigh.pdf + + + + + + +>NAME +>VALUE + + +<b>Wirewound Resistors, Precision Power</b><p> +Source: VISHAY wscwsn.pdf + + + + + + + + + + +>NAME +>VALUE + + +<b>Wirewound Resistors, Precision Power</b><p> +Source: VISHAY wscwsn.pdf + + + + + + +>NAME +>VALUE + + +<b>Wirewound Resistors, Precision Power</b><p> +Source: VISHAY wscwsn.pdf + + + + + + + + + + +>NAME +>VALUE + + +<b>Wirewound Resistors, Precision Power</b><p> +Source: VISHAY wscwsn.pdf + + + + + + + + + + +>NAME +>VALUE + + +<b>Wirewound Resistors, Precision Power</b><p> +Source: VISHAY wscwsn.pdf + + + + + + +>NAME +>VALUE + + +<b>Wirewound Resistors, Precision Power</b><p> +Source: VISHAY wscwsn.pdf + + + + + + +>NAME +>VALUE + + +<b>CRCW1218 Thick Film, Rectangular Chip Resistors</b><p> +Source: http://www.vishay.com .. dcrcw.pdf + + + + +>NAME +>VALUE + + + + +<b>Chip Monolithic Ceramic Capacitors</b> Medium Voltage High Capacitance for General Use<p> +Source: http://www.murata.com .. GRM43DR72E224KW01.pdf + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + +<B>RESISTOR</B>, American symbol + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<b>Pin Header Connectors</b><p> +<author>Created by librarian@cadsoft.de</author> + + +<b>PIN HEADER</b> + + + + + + + + + +>NAME +>VALUE + + + + + + + + + +>NAME +>VALUE + + + + + +<b>PIN HEADER</b> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/Frege/CommandLineClock.fr b/samples/Frege/CommandLineClock.fr new file mode 100644 index 00000000..5bdde621 --- /dev/null +++ b/samples/Frege/CommandLineClock.fr @@ -0,0 +1,44 @@ +{-- + This program displays the + current time on stdandard output + every other second. + -} + +module examples.CommandLineClock where + +data Date = native java.util.Date where + native new :: () -> IO (MutableIO Date) -- new Date() + native toString :: Mutable s Date -> ST s String -- d.toString() + +--- 'IO' action to give us the current time as 'String' +current :: IO String +current = do + d <- Date.new () + d.toString + +{- + "java.lang.Thread.sleep" takes a "long" and + returns nothing, but may throw an InterruptedException. + This is without doubt an IO action. + + public static void sleep(long millis) + throws InterruptedException + + Encoded in Frege: + - argument type long Long + - result void () + - does IO IO () + - throws ... throws .... + +-} +-- .... defined in frege.java.Lang +-- native sleep java.lang.Thread.sleep :: Long -> IO () throws InterruptedException + + +main args = + forever do + current >>= print + print "\r" + stdout.flush + Thread.sleep 999 + \ No newline at end of file diff --git a/samples/Frege/Concurrent.fr b/samples/Frege/Concurrent.fr new file mode 100644 index 00000000..5f9df994 --- /dev/null +++ b/samples/Frege/Concurrent.fr @@ -0,0 +1,147 @@ +module examples.Concurrent where + +import System.Random +import Java.Net (URL) +import Control.Concurrent as C + +main2 args = do + m <- newEmptyMVar + forkIO do + m.put 'x' + m.put 'y' + m.put 'z' + replicateM_ 3 do + c <- m.take + print "got: " + println c + + +example1 = do + forkIO (replicateM_ 100000 (putChar 'a')) + replicateM_ 100000 (putChar 'b') + +example2 = do + s <- getLine + case s.long of + Right n -> forkIO (setReminder n) >> example2 + Left _ -> println ("exiting ...") + +setReminder :: Long -> IO () +setReminder n = do + println ("Ok, I remind you in " ++ show n ++ " seconds") + Thread.sleep (1000L*n) + println (show n ++ " seconds is up!") + +table = "table" + +mainPhil _ = do + [fork1,fork2,fork3,fork4,fork5] <- mapM MVar.new [1..5] + forkIO (philosopher "Kant" fork5 fork1) + forkIO (philosopher "Locke" fork1 fork2) + forkIO (philosopher "Wittgenstein" fork2 fork3) + forkIO (philosopher "Nozick" fork3 fork4) + forkIO (philosopher "Mises" fork4 fork5) + return () + +philosopher :: String -> MVar Int -> MVar Int -> IO () +philosopher me left right = do + g <- Random.newStdGen + let phil g = do + let (tT,g1) = Random.randomR (60L, 120L) g + (eT, g2) = Random.randomR (80L, 160L) g1 + thinkTime = 300L * tT + eatTime = 300L * eT + + println(me ++ " is going to the dining room and takes his seat.") + fl <- left.take + println (me ++ " takes up left fork (" ++ show fl ++ ")") + rFork <- right.poll + case rFork of + Just fr -> do + println (me ++ " takes up right fork. (" ++ show fr ++ ")") + println (me ++ " is going to eat for " ++ show eatTime ++ "ms") + Thread.sleep eatTime + println (me ++ " finished eating.") + right.put fr + println (me ++ " took down right fork.") + left.put fl + println (me ++ " took down left fork.") + table.notifyAll + println(me ++ " is going to think for " ++ show thinkTime ++ "ms.") + Thread.sleep thinkTime + phil g2 + Nothing -> do + println (me ++ " finds right fork is already in use.") + left.put fl + println (me ++ " took down left fork.") + table.notifyAll + println (me ++ " is going to the bar to await notifications from table.") + table.wait + println (me ++ " got notice that something changed at the table.") + phil g2 + + inter :: InterruptedException -> IO () + inter _ = return () + + phil g `catch` inter + + +getURL xx = do + url <- URL.new xx + con <- url.openConnection + con.connect + is <- con.getInputStream + typ <- con.getContentType + -- stderr.println ("content-type is " ++ show typ) + ir <- InputStreamReader.new is (fromMaybe "UTF-8" (charset typ)) + `catch` unsupportedEncoding is + br <- BufferedReader.new ir + br.getLines + where + unsupportedEncoding :: InputStream -> UnsupportedEncodingException -> IO InputStreamReader + unsupportedEncoding is x = do + stderr.println x.catched + InputStreamReader.new is "UTF-8" + + charset ctyp = do + typ <- ctyp + case typ of + m~´charset=(\S+)´ -> m.group 1 + _ -> Nothing + + +type SomeException = Throwable + +main ["dining"] = mainPhil [] + +main _ = do + m1 <- MVar.newEmpty + m2 <- MVar.newEmpty + m3 <- MVar.newEmpty + + forkIO do + r <- (catchAll . getURL) "http://www.wikipedia.org/wiki/Haskell" + m1.put r + + forkIO do + r <- (catchAll . getURL) "htto://www.wikipedia.org/wiki/Java" + m2.put r + + forkIO do + r <- (catchAll . getURL) "http://www.wikipedia.org/wiki/Frege" + m3.put r + + r1 <- m1.take + r2 <- m2.take + r3 <- m3.take + println (result r1, result r2, result r3) + -- case r3 of + -- Right ss -> mapM_ putStrLn ss + -- Left _ -> return () + where + result :: (SomeException|[String]) -> (String|Int) + result (Left x) = Left x.getClass.getName + result (Right y) = (Right . sum . map length) y + -- mapM_ putStrLn r2 + + \ No newline at end of file diff --git a/samples/Frege/Sudoku.fr b/samples/Frege/Sudoku.fr new file mode 100644 index 00000000..88bfd966 --- /dev/null +++ b/samples/Frege/Sudoku.fr @@ -0,0 +1,561 @@ +package examples.Sudoku where + +import Data.TreeMap (Tree, keys) +import Data.List as DL hiding (find, union) + + +type Element = Int -- 1,2,3,4,5,6,7,8,9 +type Zelle = [Element] -- set of candidates +type Position = Int -- 0..80 +type Feld = (Position, Zelle) +type Brett = [Feld] + +--- data type for assumptions and conclusions +data Assumption = + !ISNOT Position Element + | !IS Position Element + + +derive Eq Assumption +derive Ord Assumption +instance Show Assumption where + show (IS p e) = pname p ++ "=" ++ e.show + show (ISNOT p e) = pname p ++ "/" ++ e.show + +showcs cs = joined " " (map Assumption.show cs) + +elements :: [Element] -- all possible elements +elements = [1 .. 9] + +{- + a b c d e f g h i + 0 1 2 | 3 4 5 | 6 7 8 1 + 9 10 11 |12 13 14 |15 16 17 2 + 18 19 20 |21 22 23 |24 25 26 3 + ---------|---------|-------- + 27 28 29 |30 31 32 |33 34 35 4 + 36 37 38 |39 40 41 |42 43 44 5 + 45 46 47 |48 49 50 |51 52 53 6 + ---------|---------|-------- + 54 55 56 |57 58 59 |60 61 62 7 + 63 64 65 |66 67 68 |69 70 71 8 + 72 73 74 |75 76 77 |78 79 80 9 +-} + +positions :: [Position] -- all possible positions +positions = [0..80] +rowstarts :: [Position] -- all positions where a row is starting +rowstarts = [0,9,18,27,36,45,54,63,72] +colstarts :: [Position] -- all positions where a column is starting +colstarts = [0,1,2,3,4,5,6,7,8] +boxstarts :: [Position] -- all positions where a box is starting +boxstarts = [0,3,6,27,30,33,54,57,60] +boxmuster :: [Position] -- pattern for a box, by adding upper left position results in real box +boxmuster = [0,1,2,9,10,11,18,19,20] + + +--- extract field for position +getf :: Brett -> Position -> Feld +getf (f:fs) p + | fst f == p = f + | otherwise = getf fs p +getf [] p = (p,[]) + + +--- extract cell for position +getc :: Brett -> Position -> Zelle +getc b p = snd (getf b p) + +--- compute the list of all positions that belong to the same row as a given position +row :: Position -> [Position] +row p = [z..(z+8)] where z = (p `quot` 9) * 9 + +--- compute the list of all positions that belong to the same col as a given position +col :: Position -> [Position] +col p = map (c+) rowstarts where c = p `mod` 9 + +--- compute the list of all positions that belong to the same box as a given position +box :: Position -> [Position] +box p = map (z+) boxmuster where + ri = p `div` 27 * 27 -- 0, 27 or 54, depending on row + ci = p `mod` 9 -- column index 0..8, 0,1,2 is left, 3,4,5 is middle, 6,7,8 is right + cs = ci `div` 3 * 3 -- 0, 3 or 6 + z = ri + cs + +--- check if candidate set has exactly one member, i.e. field has been solved +single :: Zelle -> Bool +single [_] = true +single _ = false + +unsolved :: Zelle -> Bool +unsolved [_] = false +unsolved _ = true + +-- list of rows, cols, boxes +allrows = map row rowstarts +allcols = map col colstarts +allboxs = map box boxstarts +allrcb = zip (repeat "row") allrows + ++ zip (repeat "col") allcols + ++ zip (repeat "box") allboxs + + +containers :: [(Position -> [Position], String)] +containers = [(row, "row"), (col, "col"), (box, "box")] + +-- ----------------- PRINTING ------------------------------------ +-- printable coordinate of field, upper left is a1, lower right is i9 +pname p = packed [chr (ord 'a' + p `mod` 9), chr (ord '1' + p `div` 9)] + +-- print board +printb b = mapM_ p1line allrows >> println "" + where + p1line row = do + print (joined "" (map pfld line)) + where line = map (getc b) row + +-- print field (brief) +-- ? = no candidate +-- 5 = field is 5 +-- . = some candidates +pfld [] = "?" +pfld [x] = show x +pfld zs = "0" + +-- print initial/final board +result msg b = do + println ("Result: " ++ msg) + print ("Board: ") + printb b + return b + +res012 b = case concatMap (getc b) [0,1,2] of + [a,b,c] -> a*100+b*10+c + _ -> 9999999 + +-- -------------------------- BOARD ALTERATION ACTIONS --------------------------------- +-- print a message about what is done to the board and return the new board +turnoff1 :: Position -> Zelle -> Brett -> IO Brett +turnoff1 i off b + | single nc = do + -- print (pname i) + -- print ": set to " + -- print (head nc) + -- println " (naked single)" + return newb + | otherwise = return newb + where + cell = getc b i + nc = filter (`notElem` off) cell + newb = (i, nc) : [ f | f <- b, fst f != i ] + +turnoff :: Int -> Zelle -> String -> Brett -> IO Brett +turnoff i off msg b = do + -- print (pname i) + -- print ": set to " + -- print nc + -- print " by clearing " + -- print off + -- print " " + -- println msg + return newb + where + cell = getc b i + nc = filter (`notElem` off) cell + newb = (i, nc) : [ f | f <- b, fst f != i ] + +turnoffh ps off msg b = foldM toh b ps + where + toh b p = turnoff p off msg b + +setto :: Position -> Element -> String -> Brett -> IO Brett +setto i n cname b = do + -- print (pname i) + -- print ": set to " + -- print n + -- print " (hidden single in " + -- print cname + -- println ")" + return newb + where + nf = [n] + newb = (i, nf) : [ f | f <- b, fst f != i ] + + +-- ----------------------------- SOLVING STRATEGIES --------------------------------------------- +-- reduce candidate sets that contains numbers already in same row, col or box +-- This finds (and logs) NAKED SINGLEs in passing. +reduce b = [ turnoff1 p sss | (p,cell) <- b, -- for each field + unsolved cell, -- with more than 1 candidate + -- single fields in containers that are candidates of that field + sss = [ s | (rcb, _) <- containers, [s] <- map (getc b) (rcb p), s `elem` cell], + sss != [] ] -- collect field index, elements to remove from candidate set + +-- look for a number that appears in exactly 1 candidate set of a container +-- this number can go in no other place (HIDDEN SINGLE) +hiddenSingle b = [ setto i n cname | -- select index, number, containername + (cname, rcb) <- allrcb, -- FOR rcb IN allrcb + n <- elements, -- FOR n IN elements + fs = filter (unsolved • snd) (map (getf b) rcb), + occurs = filter ((n `elem`) • snd) fs, + length occurs == 1, + (i, _) <- occurs ] + +-- look for NAKED PAIRS, TRIPLES, QUADS +nakedPair n b = [ turnoff p t ("(naked tuple in " ++ nm ++ ")") | -- SELECT pos, tuple, name + -- n <- [2,3,4], // FOR n IN [2,3,4] + (nm, rcb) <- allrcb, -- FOR rcb IN containers + fs = map (getf b) rcb, -- let fs = fields for rcb positions + u = (fold union [] . filter unsolved . map snd) fs, -- let u = union of non single candidates + t <- n `outof` u, -- FOR t IN n-tuples + hit = (filter ((`subset` t) . snd) . filter (unsolved . snd)) fs, + length hit == n, + (p, cell) <- fs, + p `notElem` map fst hit, + any (`elem` cell) t + ] + +-- look for HIDDEN PAIRS, TRIPLES or QUADS +hiddenPair n b = [ turnoff p off ("(hidden " ++ show t ++ " in " ++ nm ++ ")") | -- SELECT pos, tuple, name + -- n <- [2,3,4], // FOR n IN [2,3,4] + (nm, rcb) <- allrcb, -- FOR rcb IN containers + fs = map (getf b) rcb, -- let fs = fields for rcb positions + u = (fold union [] . filter ((>1) . length) . map snd) fs, -- let u = union of non single candidates + t <- n `outof` u, -- FOR t IN n-tuples + hit = (filter (any ( `elem` t) . snd) . filter (unsolved . snd)) fs, + length hit == n, + off = (fold union [] . map snd) hit `minus` t, + off != [], + (p, cell) <- hit, + ! (cell `subset` t) + ] + +a `subset` b = all (`elem` b) a +a `union` b = uniq (sort (a ++ b)) +a `minus` b = filter (`notElem` b) a +a `common` b = filter (`elem` b) a +n `outof` as + | length as < n = [] + | [] <- as = [] + | 1 >= n = map (:[]) as + | (a:bs) <- as = map (a:) ((n-1) `outof` bs) ++ (n `outof` bs) + | otherwise = undefined -- cannot happen because either as is empty or not + +same f a b = b `elem` f a + +intersectionlist = [(allboxs, row, "box/row intersection"), (allboxs, col, "box/col intersection"), + (allrows ++ allcols, box, "line/box intersection")] +intersections b = [ + turnoff pos [c] reason | -- SELECT position, candidate, reson + (from, container, reason) <- intersectionlist, + rcb <- from, + fs = (filter (unsolved . snd) . map (getf b)) rcb, -- fs = fields in from with more than 1 candidate + c <- (fold union [] • map snd) fs, -- FOR c IN union of candidates + cpos = (map fst • filter ((c `elem`) • snd)) fs, -- cpos = positions where c occurs + cpos != [], -- WHERE cpos is not empty + all (same container (head cpos)) (tail cpos), -- WHERE all positions are in the intersection + -- we can remove all occurences of c that are in container, but not in from + (pos, cell) <- map (getf b) (container (head cpos)), + c `elem` cell, + pos `notElem` rcb ] + + +-- look for an XY Wing +-- - there exists a cell A with candidates X and Y +-- - there exists a cell B with candidates X and Z that shares a container with A +-- - there exists a cell C with candidates Y and Z that shares a container with A +-- reasoning +-- - if A is X, B will be Z +-- - if A is Y, C will be Z +-- - since A will indeed be X or Y -> B or C will be Z +-- - thus, no cell that can see B and C can be Z +xyWing board = [ turnoff p [z] ("xy wing " ++ pname b ++ " " ++ pname c ++ " because of " ++ pname a) | + (a, [x,y]) <- board, -- there exists a cell a with candidates x and y + rcba = map (getf board) (row a ++ col a ++ box a), -- rcba = all fields that share a container with a + (b, [b1, b2]) <- rcba, + b != a, + b1 == x && b2 != y || b2 == x && b1 != y, -- there exists a cell B with candidates x and z + z = if b1 == x then b2 else b1, + (c, [c1, c2]) <- rcba, + c != a, c!= b, + c1 == y && c2 == z || c1 == z && c2 == y, -- there exists a cell C with candidates y and z + ps = (uniq . sort) ((row b ++ col b ++ box b) `common` (row c ++ col c ++ box c)), + -- remove z in ps + (p, cs) <- map (getf board) ps, + p != b, p != c, + z `elem` cs ] + +-- look for a N-Fish (2: X-Wing, 3: Swordfish, 4: Jellyfish) +-- When all candidates for a particular digit in N rows are located +-- in only N columns, we can eliminate all candidates from those N columns +-- which are not located on those N rows +fish n board = fish "row" allrows row col ++ fish "col" allcols col row where + fishname 2 = "X-Wing" + fishname 3 = "Swordfish" + fishname 4 = "Jellyfish" + fishname _ = "unknown fish" + fish nm allrows row col = [ turnoff p [x] (fishname n ++ " in " ++ nm ++ " " ++ show (map (pname . head) rset)) | + rset <- n `outof` allrows, -- take n rows (or cols) + x <- elements, -- look for certain number + rflds = map (filter ((>1) . length . snd) . map (getf board)) rset, -- unsolved fields in the rowset + colss = (map (map (head . col . fst) . filter ((x `elem`) . snd)) rflds), -- where x occurs in candidates + all ((>1) . length) colss, -- x must appear in at least 2 cols + cols = fold union [] colss, + length cols == n, + cstart <- cols, + (p, cell) <- map (getf board) (col cstart), + x `elem` cell, + all (p `notElem`) rset] + + +-- compute immediate consequences of an assumption of the form (p `IS` e) or (p `ISNOT` e) +conseq board (IS p e) = uniq (sort ([ p `ISNOT` x | x <- getc board p, x != e ] ++ + [ a `ISNOT` e | + (a,cs) <- map (getf board) (row p ++ col p ++ box p), + a != p, + e `elem` cs + ])) +conseq board (ISNOT p e) = uniq (sort ([ p `IS` x | cs = getc board p, length cs == 2, x <- cs, x != e ] ++ + [ a `IS` e | + cp <- [row p, box p, col p], + as = (filter ((e `elem`) . getc board) . filter (p!=)) cp, + length as == 1, + a = head as + ])) + +-- check if two assumptions contradict each other +contradicts (IS a x) (IS b y) = a==b && x!=y +contradicts (IS a x) (ISNOT b y) = a==b && x==y +contradicts (ISNOT a x) (IS b y) = a==b && x==y +contradicts (ISNOT _ _) (ISNOT _ _) = false + +-- get the Position of an Assumption +aPos (IS p _) = p +aPos (ISNOT p _) = p + +-- get List of elements that must be turned off when assumption is true/false +toClear board true (IS p x) = filter (x!=) (getc board p) +toClear board false (IS p x) = [x] +toClear board true (ISNOT p x) = [x] +toClear board false (ISNOT p x) = filter (x!=) (getc board p) + + +-- look for assumptions whose implications contradict themself +chain board paths = [ solution a (head cs) (reverse cs) | + (a, css) <- paths, + cs <- take 1 [ cs | cs <- css, contradicts a (head cs) ] + ] + where + solution a c cs = turnoff (aPos a) (toClear board false a) reason where + reason = "Assumption " ++ show a ++ " implies " ++ show c ++ "\n\t" + ++ showcs cs ++ "\n\t" + ++ "Therefore, " ++ show a ++ " must be false." + +-- look for an assumption that yields to contradictory implications +-- this assumption must be false +chainContra board paths = [ solution a (reverse pro) (reverse contra) | + (a, css) <- paths, -- FOR ALL assumptions "a" with list of conlusions "css" + (pro, contra) <- take 1 [ (pro, contra) | + pro <- (uniqBy (using head) . sortBy (comparing head)) css, -- FOR ALL conslusion chains "pro" + c = head pro, -- LET "c" BE the final conclusion + contra <- take 1 (filter ((contradicts c) . head) css) -- THE FIRST conclusion that contradicts c + ] + ] + where + solution a pro con = turnoff (aPos a) (toClear board false a) reason where + reason = ("assumption " ++ show a ++ " leads to contradictory conclusions\n\t" + ++ showcs pro ++ "\n\t" ++ showcs con) + + + +-- look for a common implication c of some assumptions ai, where at least 1 ai is true +-- so that (a0 OR a1 OR a2 OR ...) IMPLIES c +-- For all cells pi in same container that have x as candidate, we can construct (p0==x OR p1==x OR ... OR pi==x) +-- For a cell p with candidates ci, we can construct (p==c0 OR p==c1) +cellRegionChain board paths = [ solution b as (map head os) | + as <- cellas ++ regionas, -- one of as must be true + iss = filter ((`elem` as) . fst) paths, -- the implications for as + (a, ass) <- take 1 iss, -- implications for first assumption + fs <- (uniqBy (using head) . sortBy (comparing head)) ass, + b = head fs, -- final conclusions of first assumption + os = [fs] : map (take 1 . filter ((b==) . head) . snd) (tail iss), -- look for implications with same conclusion + all ([]!=) os] + where + cellas = [ map (p `IS`) candidates | (p, candidates@(_:_:_)) <- board ] + regionas = [ map (`IS` e) ps | + region <- map (map (getf board)) (allrows ++ allcols ++ allboxs), + e <- elements, + ps = map fst (filter ((e `elem`) . snd) region), + length ps > 1 ] + solution b as oss = turnoff (aPos b) (toClear board true b) reason where + reason = "all of the assumptions " ++ joined ", " (map show as) ++ " imply " ++ show b ++ "\n\t" + ++ joined "\n\t" (map (showcs . reverse) oss) ++ "\n\t" + ++ "One of them must be true, so " ++ show b ++ " must be true." + + +{- + Wir brauchen für einige Funktionen eine Datenstruktur wie + [ (Assumption, [[Assumption]]) ] + d.i. eine Liste von möglichen Annahmen samt aller Schlußketten. + Idealerweise sollte die Schlußkette in umgekehrter Reihenfolge vorliegen, + dann kann man einfach finden: + - Annahmen, die zum Selbstwiderspruch führen. + - alles, was aus einer bestimmten Annahme folgt (map (map head) [[a]]) + -... +-} +--- Liste aller Annahmen für ein bestimmtes Brett +assumptions :: Brett -> [Assumption] +assumptions board = [ a | + (p, cs) <- board, + !(single cs), + a <- map (ISNOT p) cs ++ map (IS p) cs ] + +consequences :: Brett -> [Assumption] -> [[Assumption]] +consequences board as = map (conseq board) as + +acstree :: Brett -> Tree Assumption [Assumption] +acstree board = Tree.fromList (zip as cs) + where + as = assumptions board + cs = consequences board as + +-- bypass maybe on tree lookup +find :: Tree Assumption [Assumption] -> Assumption -> [Assumption] +find t a + | Just cs <- t.lookup a = cs + | otherwise = error ("no consequences for " ++ show a) + +-- for performance resons, we confine ourselves to implication chains of length 20 per assumption +mkPaths :: Tree Assumption [Assumption] -> [ (Assumption, [[Assumption]]) ] +mkPaths acst = map impl (keys acst) -- {[a1], [a2], [a3] ] + where + -- [Assumption] -> [(a, [chains, ordered by length] + impl a = (a, impls [[a]]) + impls ns = (take 1000 • concat • takeUntil null • iterate expandchain) ns + -- expandchain :: [[Assumption]] -> [[Assumption]] + expandchain css = [ (n:a:as) | + (a : as) <- css, -- list of assumptions + n <- find acst a, -- consequences of a + n `notElem` as -- avoid loops + ] + -- uni (a:as) = a : uni (filter ((head a !=) • head) as) + -- uni [] = empty + -- empty = [] + + +-- ------------------ SOLVE A SUDOKU -------------------------- +-- Apply all available strategies until nothing changes anymore +-- Strategy functions are supposed to return a list of +-- functions, which, when applied to a board, give a changed board. +-- When a strategy does not find anything to alter, +-- it returns [], and the next strategy can be tried. +solve b + | all (single . snd) b = result "Solved" b + | any (([]==) . snd) b = result "not solvable" b + | res@(_:_) <- reduce b = apply b res >>=solve -- compute smallest candidate sets + -- comment "candidate sets are up to date" = () + | res@(_:_) <- hiddenSingle b = apply b res >>= solve -- find HIDDEN SINGLES + -- comment "no more hidden singles" = () + | res@(_:_) <- intersections b = apply b res >>= solve -- find locked candidates + -- comment "no more intersections" = () + | res@(_:_) <- nakedPair 2 b = apply b res >>= solve -- find NAKED PAIRS, TRIPLES or QUADRUPELS + -- comment "no more naked pairs" = () + | res@(_:_) <- hiddenPair 2 b = apply b res >>= solve -- find HIDDEN PAIRS, TRIPLES or QUADRUPELS + -- comment "no more hidden pairs" = () + -- res@(_:_) <- nakedPair 3 b = apply b res >>= solve // find NAKED PAIRS, TRIPLES or QUADRUPELS + -- | comment "no more naked triples" = () + -- res@(_:_) <- hiddenPair 3 b = apply b res >>= solve // find HIDDEN PAIRS, TRIPLES or QUADRUPELS + -- | comment "no more hidden triples" = () + -- res@(_:_) <- nakedPair 4 b = apply b res >>=solve // find NAKED PAIRS, TRIPLES or QUADRUPELS + -- | comment "no more naked quadruples" = () + -- res@(_:_) <- hiddenPair 4 b = apply b res >>=solve // find HIDDEN PAIRS, TRIPLES or QUADRUPELS + -- | comment "no more hidden quadruples" = () + | res@(_:_) <- xyWing b = apply b res >>=solve -- find XY WINGS + -- comment "no more xy wings" = () + | res@(_:_) <- fish 2 b = apply b res >>=solve -- find 2-FISH + -- comment "no more x-wings" = () + -- res@(_:_) <- fish 3 b = apply b res >>=solve // find 3-FISH + -- | comment "no more swordfish" = () + -- res@(_:_) <- fish 4 b = apply b res >>=solve // find 4-FISH + -- | comment "no more jellyfish" = () + -- | comment pcomment = () + | res@(_:_) <- chain b paths = apply b (take 9 res) >>= solve -- find forcing chains + | res@(_:_) <- cellRegionChain b paths = apply b (take 9 res) >>= solve -- find common conclusion for true assumption + | res@(_:_) <- chainContra b paths = apply b (take 9 res) >>= solve -- find assumptions that allow to infer both a and !a + -- comment "consistent conclusions only" = () + + | otherwise = result "ambiguous" b + where + apply brd fs = foldM (\b\f -> f b) brd fs + paths = mkPaths (acstree b) + -- pcomment = show (length paths) ++ " assumptions with " ++ show (fold (+) 0 (map (length <~ snd) paths)) + -- ++ " implication chains" + +-- comment com = do stderr << com << "\n" for false +-- log com = do stderr << com << "\n" for true + +--- turn a string into a row +mkrow :: String -> [Zelle] +mkrow s = mkrow1 xs + where + xs = s ++ "---------" -- make sure at least 9 elements + mkrow1 xs = (take 9 • filter ([]!=) • map f • unpacked) xs + f x | x >= '1' && x <= '9' = [ord x - ord '0'] + | x == ' ' = [] -- ignored + | otherwise = elements + +main ["-h"] = main [] +main ["-help"] = main [] +main [] = do + mapM_ stderr.println [ + "usage: java Sudoku file ...", + " java Sudoku position", + "where position is a 81 char string consisting of digits", + "One can get such a string by going to", + "http://www.sudokuoftheday.com/pages/s-o-t-d.php", + "Right click on the puzzle and open it in new tab", + "Copy the 81 digits from the URL in the address field of your browser.", + "", + "There is also a file with hard sudokus in examples/top95.txt\n"] + return () + + +main [s@#^[0-9\W]{81}$#] = solve board >> return () + where + board = zip positions felder + felder = decode s + +main files = forM_ files sudoku + where + sudoku file = do + br <- openReader file + lines <- BufferedReader.getLines br + bs <- process lines + ss <- mapM (\b -> print "Puzzle: " >> printb b >> solve b) bs + println ("Euler: " ++ show (sum (map res012 ss))) + return () + +-- "--3-" => [1..9, 1..9, [3], 1..9] +decode s = map candi (unpacked s) where + candi c | c >= '1' && c <= '9' = [(ord c - ord '0')] + | otherwise = elements +process [] = return [] +process (s:ss) + | length s == 81 = consider b1 + | length s == 9, + length acht == 8, + all ((9==) • length) acht = consider b2 + | otherwise = do + stderr.println ("skipped line: " ++ s) + process ss + where + acht = take 8 ss + neun = fold (++) "" (s:acht) + b1 = zip positions (decode s) + b2 = zip positions (decode neun) + consider b = do + -- print "Puzzle: " + -- printb b + bs <- process ss + return (b:bs) + diff --git a/samples/Frege/SwingExamples.fr b/samples/Frege/SwingExamples.fr new file mode 100644 index 00000000..73569546 --- /dev/null +++ b/samples/Frege/SwingExamples.fr @@ -0,0 +1,79 @@ +package examples.SwingExamples where + +import Java.Awt (ActionListener) +import Java.Swing + + +main _ = do + rs <- mapM Runnable.new [helloWorldGUI, buttonDemoGUI, celsiusConverterGUI] + mapM_ invokeLater rs + println "Hit enter to end ...." + s <- getLine + return () + +celsiusConverterGUI = do + tempTextField <- JTextField.new() + celsiusLabel <- JLabel.new () + convertButton <- JButton.new () + fahrenheitLabel <- JLabel.new () + frame <- JFrame.new () + frame.setDefaultCloseOperation JFrame.dispose_on_close + frame.setTitle "Celsius Converter" + celsiusLabel.setText "Celsius" + convertButton.setText "Convert" + let convertButtonActionPerformed _ = do + celsius <- tempTextField.getText + case celsius.double of + Left _ -> fahrenheitLabel.setText ("not a valid number: " ++ celsius) + Right c -> fahrenheitLabel.setText (show (c*1.8 + 32.0).long ++ " Fahrenheit") + return () + ActionListener.new convertButtonActionPerformed >>= convertButton.addActionListener + fahrenheitLabel.setText "Fahrenheit" + contentPane <- frame.getContentPane + layout <- GroupLayout.new contentPane + contentPane.setLayout layout + -- TODO continue + -- http://docs.oracle.com/javase/tutorial/displayCode.html?code=http://docs.oracle.com/javase/tutorial/uiswing/examples/learn/CelsiusConverterProject/src/learn/CelsiusConverterGUI.java + frame.pack + frame.setVisible true + +helloWorldGUI = do + frame <- JFrame.new "Hello World Frege" + frame.setDefaultCloseOperation(JFrame.dispose_on_close) + label <- JLabel.new "Hello World!" + cp <- frame.getContentPane + cp.add label + frame.pack + frame.setVisible true + +buttonDemoGUI = do + frame <- JFrame.new "Button Demo" + frame.setDefaultCloseOperation(JFrame.dispose_on_close) + newContentPane <- JPanel.new () + b1::JButton <- JButton.new "Disable middle button" + b1.setVerticalTextPosition SwingConstants.center + b1.setHorizontalTextPosition SwingConstants.leading + b2::JButton <- JButton.new "Middle button" + b2.setVerticalTextPosition SwingConstants.center + b2.setHorizontalTextPosition SwingConstants.leading + b3::JButton <- JButton.new "Enable middle button" + b3.setVerticalTextPosition SwingConstants.center + b3.setHorizontalTextPosition SwingConstants.leading + b3.setEnabled false + let action1 _ = do + b2.setEnabled false + b1.setEnabled false + b3.setEnabled true + action3 _ = do + b2.setEnabled true + b1.setEnabled true + b3.setEnabled false + ActionListener.new action1 >>= b1.addActionListener + ActionListener.new action3 >>= b3.addActionListener + newContentPane.add b1 + newContentPane.add b2 + newContentPane.add b3 + newContentPane.setOpaque true + frame.setContentPane newContentPane + frame.pack + frame.setVisible true diff --git a/samples/GAMS/transport.gms b/samples/GAMS/transport.gms new file mode 100644 index 00000000..fb6ccbc9 --- /dev/null +++ b/samples/GAMS/transport.gms @@ -0,0 +1,76 @@ +*Basic example of transport model from GAMS model library + +$Title A Transportation Problem (TRNSPORT,SEQ=1) +$Ontext + +This problem finds a least cost shipping schedule that meets +requirements at markets and supplies at factories. + + +Dantzig, G B, Chapter 3.3. In Linear Programming and Extensions. +Princeton University Press, Princeton, New Jersey, 1963. + +This formulation is described in detail in: +Rosenthal, R E, Chapter 2: A GAMS Tutorial. In GAMS: A User's Guide. +The Scientific Press, Redwood City, California, 1988. + +The line numbers will not match those in the book because of these +comments. + +$Offtext + + + Sets + i canning plants / seattle, san-diego / + j markets / new-york, chicago, topeka / ; + Parameters + a(i) capacity of plant i in cases + / seattle 350 + san-diego 600 / + b(j) demand at market j in cases + / new-york 325 + chicago 300 + topeka 275 / ; + Table d(i,j) distance in thousands of miles + new-york chicago topeka + seattle 2.5 1.7 1.8 + san-diego 2.5 1.8 1.4 ; + Scalar f freight in dollars per case per thousand miles /90/ ; + Parameter c(i,j) transport cost in thousands of dollars per case ; + c(i,j) = f * d(i,j) / 1000 ; + Variables + x(i,j) shipment quantities in cases + z total transportation costs in thousands of dollars ; + + Positive Variable x ; + + Equations + cost define objective function + supply(i) observe supply limit at plant i + demand(j) satisfy demand at market j ; + + cost .. z =e= sum((i,j), c(i,j)*x(i,j)) ; + + supply(i) .. sum(j, x(i,j)) =l= a(i) ; + + demand(j) .. sum(i, x(i,j)) =g= b(j) ; + + Model transport /all/ ; + + Solve transport using lp minimizing z ; + + Display x.l, x.m ; + +$ontext +#user model library stuff +Main topic Basic GAMS +Featured item 1 Trnsport model +Featured item 2 +Featured item 3 +Featured item 4 +Description +Basic example of transport model from GAMS model library + + + +$offtext \ No newline at end of file diff --git a/samples/GAP/Magic.gd b/samples/GAP/Magic.gd new file mode 100644 index 00000000..cdd8baec --- /dev/null +++ b/samples/GAP/Magic.gd @@ -0,0 +1,307 @@ +############################################################################# +## +## Magic.gd AutoDoc package +## +## Copyright 2013, Max Horn, JLU Giessen +## Sebastian Gutsche, University of Kaiserslautern +## +############################################################################# + + +#! @Description +#! This is the main function of the &AutoDoc; package. It can perform +#! any combination of the following three tasks: +#! +#! +#! It can (re)generate a scaffold for your package manual. +#! That is, it can produce two XML files in &GAPDoc; format to be used as part +#! of your manual: First, a file named doc/PACKAGENAME.xml +#! (with your package's name substituted) which is used as +#! main file for the package manual, i.e. this file sets the +#! XML DOCTYPE and defines various XML entities, includes +#! other XML files (both those generated by &AutoDoc; as well +#! as additional files created by other means), tells &GAPDoc; +#! to generate a table of content and an index, and more. +#! Secondly, it creates a file doc/title.xml containing a title +#! page for your documentation, with information about your package +#! (name, description, version), its authors and more, based +#! on the data in your PackageInfo.g. +#! +#! +#! It can scan your package for &AutoDoc; based documentation (by using &AutoDoc; +#! tags and the Autodoc command. +#! This will +#! produce further XML files to be used as part of the package manual. +#! +#! +#! It can use &GAPDoc; to generate PDF, text and HTML (with +#! MathJaX enabled) documentation from the &GAPDoc; XML files it +#! generated as well as additional such files provided by you. For +#! this, it invokes +#! to convert the XML sources, and it also instructs &GAPDoc; to copy +#! supplementary files (such as CSS style files) into your doc directory +#! (see ). +#! +#! +#! For more information and some examples, please refer to Chapter . +#!

+#! The parameters have the following meanings: +#! +#! +#! package_name +#! +#! The name of the package whose documentation should be(re)generated. +#! +#! +#! +#! option_record +#! +#! option_record can be a record with some additional options. +#! The following are currently supported: +#! +#! dir +#! +#! This should be a string containing a (relative) path or a +#! Directory() object specifying where the package documentation +#! (i.e. the &GAPDoc; XML files) are stored. +#!
+#! Default value: "doc/". +#!
+#! scaffold +#! +#! This controls whether and how to generate scaffold XML files +#! for the main and title page of the package's documentation. +#!

+#! The value should be either true, false or a +#! record. If it is a record or true (the latter is +#! equivalent to specifying an empty record), then this feature is +#! enabled. It is also enabled if opt.scaffold is missing but the +#! package's info record in PackageInfo.g has an AutoDoc entry. +#! In all other cases (in particular if opt.scaffold is +#! false), scaffolding is disabled. +#!

+#! +#! If opt.scaffold is a record, it may contain the following entries. +#! +#### TODO: mention merging with PackageInfo.AutoDoc! +#! +#! +#! includes +#! +#! A list of XML files to be included in the body of the main XML file. +#! If you specify this list and also are using &AutoDoc; to document +#! your operations with &AutoDoc; comments, +#! you can add AutoDocMainFile.xml to this list +#! to control at which point the documentation produced by &AutoDoc; +#! is inserted. If you do not do this, it will be added after the last +#! of your own XML files. +#! +#! +#! appendix +#! +#! This entry is similar to opt.scaffold.includes but is used +#! to specify files to include after the main body of the manual, +#! i.e. typically appendices. +#! +#! +#! bib +#! +#! The name of a bibliography file, in Bibtex or XML format. +#! If this key is not set, but there is a file doc/PACKAGENAME.bib +#! then it is assumed that you want to use this as your bibliography. +#! +#! +#### TODO: The 'entities' param is a bit strange. We should probably change it to be a bit more +#### general, as one might want to define other entities... For now, we do not document it +#### to leave us the choice of revising how it works. +#### +#### entities +#### +#### A list of package names or other entities which are used to define corresponding XML entities. +#### For example, if set to a list containing the string SomePackage, +#### then the following is added to the XML preamble: +####

SomePackage'>]]> +#### This allows you to write &SomePackage; in your documentation +#### to reference that package. If another type of entity is desired, one can simply add, +#### instead of a string, add a two entry list a to the list. It will be handled as +#### a[ 2 ]'>]]>, +#### so please be careful. +####
": 1, + "class=": 7, + "
": 1, + "
": 1, + "

": 1, + "@ViewData": 2, + ".": 3, + "

": 1, + "

": 1, + "

": 1, + "
": 1, + "

": 1, + "To": 1, + "learn": 1, + "more": 4, + "about": 2, + "ASP.NET": 5, + "MVC": 4, + "visit": 2, + "": 5, + "href=": 5, + "title=": 2, + "http": 1, + "//asp.net/mvc": 1, + "": 5, + "The": 1, + "page": 1, + "features": 3, + "": 1, + "videos": 1, + "tutorials": 1, + "and": 6, + "samples": 1, + "": 1, + "help": 1, + "you": 4, + "get": 1, + "most": 1, + "MVC.": 1, + "have": 1, + "any": 1, + "questions": 1, + "our": 1, + "forums": 1, + "

": 1, + "
": 1, + "
+#! +#! TitlePage +#! +#! A record whose entries are used to embellish the generated titlepage +#! for the package manual with extra information, such as a copyright +#! statement or acknowledgments. To this end, the names of the record +#! components are used as XML element names, and the values of the +#! components are outputted as content of these XML elements. For +#! example, you could pass the following record to set a custom +#! acknowledgements text: +#! +#! For a list of valid entries in the titlepage, please refer to the +#! &GAPDoc; manual, specifically section +#! and following. +#! +#! document_class +#! +#! Sets the document class of the resulting pdf. The value can either be a string +#! which has to be the name of the new document class, a list containing this string, or +#! a list of two strings. Then the first one has to be the document class name, the second one +#! the option string ( contained in [ ] ) in LaTeX. +#! +#! latex_header_file +#! +#! Replaces the standard header from &GAPDoc; completely with the header in this LaTeX file. +#! Please be careful here, and look at GAPDoc's latexheader.tex file for an example. +#! +#! gapdoc_latex_options +#! +#! Must be a record with entries which can be understood by SetGapDocLaTeXOptions. Each entry can be a string, which +#! will be given to &GAPDoc; directly, or a list containing of two entries: The first one must be the string "file", +#! the second one a filename. This file will be read and then its content is passed to &GAPDoc; as option with the name +#! of the entry. +#! +#! +#!
+#!
+#! +#! +#! autodoc +#! +#! This controls whether and how to generate addition XML documentation files +#! by scanning for &AutoDoc; documentation comments. +#!

+#! The value should be either true, false or a +#! record. If it is a record or true (the latter is +#! equivalent to specifying an empty record), then this feature is +#! enabled. It is also enabled if opt.autodoc is missing but the +#! package depends (directly) on the &AutoDoc; package. +#! In all other cases (in particular if opt.autodoc is +#! false), this feature is disabled. +#!

+#! +#! If opt.autodoc is a record, it may contain the following entries. +#! +#! +#! +#! files +#! +#! A list of files (given by paths relative to the package directory) +#! to be scanned for &AutoDoc; documentation comments. +#! Usually it is more convenient to use autodoc.scan_dirs, see below. +#! +#! +#! scan_dirs +#! +#! A list of subdirectories of the package directory (given as relative paths) +#! which &AutoDoc; then scans for .gi, .gd and .g files; all of these files +#! are then scanned for &AutoDoc; documentation comments. +#!
+#! Default value: [ "gap", "lib", "examples", "examples/doc" ]. +#!
+#! +#! level +#! +#! This defines the level of the created documentation. The default value is 0. +#! When parts of the manual are declared with a higher value +#! they will not be printed into the manual. +#! +#! +#### TODO: Document section_intros later on. +#### However, note that thanks to the new AutoDoc comment syntax, the only remaining +#### use for this seems to be the ability to specify the order of chapters and +#### sections. +#### section_intros +#### +#### TODO. +#### +#! +#!
+#! +#! +#! +#! gapdoc +#! +#! This controls whether and how to invoke &GAPDoc; to create HTML, PDF and text +#! files from your various XML files. +#!

+#! The value should be either true, false or a +#! record. If it is a record or true (the latter is +#! equivalent to specifying an empty record), then this feature is +#! enabled. It is also enabled if opt.gapdoc is missing. +#! In all other cases (in particular if opt.gapdoc is +#! false), this feature is disabled. +#!

+#! +#! If opt.gapdoc is a record, it may contain the following entries. +#! +#! +#! +#! +#### Note: 'main' is strictly speaking also used for the scaffold. +#### However, if one uses the scaffolding mechanism, then it is not +#### really necessary to specify a custom name for the main XML file. +#### Thus, the purpose of this parameter is to cater for packages +#### that have existing documentation using a different XML name, +#### and which do not wish to use scaffolding. +#### +#### This explain why we only allow specifying gapdoc.main. +#### The scaffolding code will still honor it, though, just in case. +#! main +#! +#! The name of the main XML file of the package manual. +#! This exists primarily to support packages with existing manual +#! which use a filename here which differs from the default. +#! In particular, specifying this is unnecessary when using scaffolding. +#!
+#! Default value: PACKAGENAME.xml. +#!
+#! +#! files +#! +#! A list of files (given by paths relative to the package directory) +#! to be scanned for &GAPDoc; documentation comments. +#! Usually it is more convenient to use gapdoc.scan_dirs, see below. +#! +#! +#! scan_dirs +#! +#! A list of subdirectories of the package directory (given as relative paths) +#! which &AutoDoc; then scans for .gi, .gd and .g files; all of these files +#! are then scanned for &GAPDoc; documentation comments. +#!
+#! Default value: [ "gap", "lib", "examples", "examples/doc" ]. +#!
+#! +#!
+#! +## This is the maketest part. Still under construction. +#! maketest +#! +#! The maketest item can be true or a record. When it is true, +#! a simple maketest.g is created in the main package directory, +#! which can be used to test the examples from the manual. As a record, +#! the entry can have the following entries itself, to specify some options. +#! +#! filename +#! +#! Sets the name of the test file. +#! +#! commands +#! +#! A list of strings, each one a command, which +#! will be executed at the beginning of the test file. +#! +#! +#! +#! +#! +#! +#! +#! +#! @Returns nothing +#! @Arguments package_name[, option_record ] +#! @ChapterInfo AutoDoc, The AutoDoc() function +DeclareGlobalFunction( "AutoDoc" ); + diff --git a/samples/GAP/Magic.gi b/samples/GAP/Magic.gi new file mode 100644 index 00000000..5202a1de --- /dev/null +++ b/samples/GAP/Magic.gi @@ -0,0 +1,534 @@ +############################################################################# +## +## Magic.gi AutoDoc package +## +## Copyright 2013, Max Horn, JLU Giessen +## Sebastian Gutsche, University of Kaiserslautern +## +############################################################################# + +# Check if a string has the given suffix or not. Another +# name for this would "StringEndsWithOtherString". +# For example, AUTODOC_HasSuffix("file.gi", ".gi") returns +# true while AUTODOC_HasSuffix("file.txt", ".gi") returns false. +BindGlobal( "AUTODOC_HasSuffix", +function(str, suffix) + local n, m; + n := Length(str); + m := Length(suffix); + return n >= m and str{[n-m+1..n]} = suffix; +end ); + +# Given a string containing a ".", , return its suffix, +# i.e. the bit after the last ".". For example, given "test.txt", +# it returns "txt". +BindGlobal( "AUTODOC_GetSuffix", +function(str) + local i; + i := Length(str); + while i > 0 and str[i] <> '.' do i := i - 1; od; + if i < 0 then return ""; fi; + return str{[i+1..Length(str)]}; +end ); + +# Check whether the given directory exists, and if not, attempt +# to create it. +BindGlobal( "AUTODOC_CreateDirIfMissing", +function(d) + local tmp; + if not IsDirectoryPath(d) then + tmp := CreateDir(d); # Note: CreateDir is currently undocumented + if tmp = fail then + Error("Cannot create directory ", d, "\n", + "Error message: ", LastSystemError().message, "\n"); + return false; + fi; + fi; + return true; +end ); + + +# Scan the given (by name) subdirs of a package dir for +# files with one of the given extensions, and return the corresponding +# filenames, as relative paths (relative to the package dir). +# +# For example, the invocation +# AUTODOC_FindMatchingFiles("AutoDoc", [ "gap/" ], [ "gi", "gd" ]); +# might return a list looking like +# [ "gap/AutoDocMainFunction.gd", "gap/AutoDocMainFunction.gi", ... ] +BindGlobal( "AUTODOC_FindMatchingFiles", +function (pkg, subdirs, extensions) + local d_rel, d, tmp, files, result; + + result := []; + + for d_rel in subdirs do + # Get the absolute path to the directory in side the package... + d := DirectoriesPackageLibrary( pkg, d_rel ); + if IsEmpty( d ) then + continue; + fi; + d := d[1]; + # ... but also keep the relative path (such as "gap") + d_rel := Directory( d_rel ); + + files := DirectoryContents( d ); + Sort( files ); + for tmp in files do + if not AUTODOC_GetSuffix( tmp ) in [ "g", "gi", "gd", "autodoc" ] then + continue; + fi; + if not IsReadableFile( Filename( d, tmp ) ) then + continue; + fi; + Add( result, Filename( d_rel, tmp ) ); + od; + od; + return result; +end ); + + +# AutoDoc(pkg[, opt]) +# +## Make this function callable with the package_name AutoDocWorksheet. +## Which will then create a worksheet! +InstallGlobalFunction( AutoDoc, +function( arg ) + local pkg, package_info, opt, scaffold, gapdoc, maketest, + autodoc, pkg_dir, doc_dir, doc_dir_rel, d, tmp, + title_page, tree, is_worksheet, position_document_class, i, gapdoc_latex_option_record; + + pkg := arg[1]; + + if LowercaseString( pkg ) = "autodocworksheet" then + is_worksheet := true; + package_info := rec( ); + pkg_dir := DirectoryCurrent( ); + else + is_worksheet := false; + package_info := PackageInfo( pkg )[ 1 ]; + pkg_dir := DirectoriesPackageLibrary( pkg, "" )[1]; + fi; + + if Length(arg) >= 2 then + opt := arg[2]; + else + opt := rec(); + fi; + + # Check for certain user supplied options, and if present, add them + # to the opt record. + tmp := function( key ) + local val; + val := ValueOption( key ); + if val <> fail then + opt.(key) := val; + fi; + end; + + tmp( "dir" ); + tmp( "scaffold" ); + tmp( "autodoc" ); + tmp( "gapdoc" ); + tmp( "maketest" ); + + # + # Setup the output directory + # + if not IsBound( opt.dir ) then + doc_dir := "doc"; + elif IsString( opt.dir ) or IsDirectory( opt.dir ) then + doc_dir := opt.dir; + else + Error( "opt.dir must be a string containing a path, or a directory object" ); + fi; + + if IsString( doc_dir ) then + # Record the relative version of the path + doc_dir_rel := Directory( doc_dir ); + + # We intentionally do not use + # DirectoriesPackageLibrary( pkg, "doc" ) + # because it returns an empty list if the subdirectory is missing. + # But we want to handle that case by creating the directory. + doc_dir := Filename(pkg_dir, doc_dir); + doc_dir := Directory(doc_dir); + + else + # TODO: doc_dir_rel = ... ? + fi; + + # Ensure the output directory exists, create it if necessary + AUTODOC_CreateDirIfMissing(Filename(doc_dir, "")); + + # Let the developer know where we are generating the documentation. + # This helps diagnose problems where multiple instances of a package + # are visible to GAP and the wrong one is used for generating the + # documentation. + # TODO: Using Info() instead of Print? + Print( "Generating documentation in ", doc_dir, "\n" ); + + # + # Extract scaffolding settings, which can be controlled via + # opt.scaffold or package_info.AutoDoc. The former has precedence. + # + if not IsBound(opt.scaffold) then + # Default: enable scaffolding if and only if package_info.AutoDoc is present + if IsBound( package_info.AutoDoc ) then + scaffold := rec( ); + fi; + elif IsRecord(opt.scaffold) then + scaffold := opt.scaffold; + elif IsBool(opt.scaffold) then + if opt.scaffold = true then + scaffold := rec(); + fi; + else + Error("opt.scaffold must be a bool or a record"); + fi; + + # Merge package_info.AutoDoc into scaffold + if IsBound(scaffold) and IsBound( package_info.AutoDoc ) then + AUTODOC_APPEND_RECORD_WRITEONCE( scaffold, package_info.AutoDoc ); + fi; + + if IsBound( scaffold ) then + AUTODOC_WriteOnce( scaffold, "TitlePage", true ); + AUTODOC_WriteOnce( scaffold, "MainPage", true ); + fi; + + + # + # Extract AutoDoc settings + # + if not IsBound(opt.autodoc) and not is_worksheet then + # Enable AutoDoc support if the package depends on AutoDoc. + tmp := Concatenation( package_info.Dependencies.NeededOtherPackages, + package_info.Dependencies.SuggestedOtherPackages ); + if ForAny( tmp, x -> LowercaseString(x[1]) = "autodoc" ) then + autodoc := rec(); + fi; + elif IsRecord(opt.autodoc) then + autodoc := opt.autodoc; + elif IsBool(opt.autodoc) and opt.autodoc = true then + autodoc := rec(); + fi; + + if IsBound(autodoc) then + if not IsBound( autodoc.files ) then + autodoc.files := [ ]; + fi; + + if not IsBound( autodoc.scan_dirs ) and not is_worksheet then + autodoc.scan_dirs := [ "gap", "lib", "examples", "examples/doc" ]; + elif not IsBound( autodoc.scan_dirs ) and is_worksheet then + autodoc.scan_dirs := [ ]; + fi; + + if not IsBound( autodoc.level ) then + autodoc.level := 0; + fi; + + PushOptions( rec( level_value := autodoc.level ) ); + + if not is_worksheet then + Append( autodoc.files, AUTODOC_FindMatchingFiles(pkg, autodoc.scan_dirs, [ "g", "gi", "gd" ]) ); + fi; + fi; + + # + # Extract GAPDoc settings + # + if not IsBound( opt.gapdoc ) then + # Enable GAPDoc support by default + gapdoc := rec(); + elif IsRecord( opt.gapdoc ) then + gapdoc := opt.gapdoc; + elif IsBool( opt.gapdoc ) and opt.gapdoc = true then + gapdoc := rec(); + fi; + + # + # Extract test settings + # + + if IsBound( opt.maketest ) then + if IsRecord( opt.maketest ) then + maketest := opt.maketest; + elif opt.maketest = true then + maketest := rec( ); + fi; + fi; + + if IsBound( gapdoc ) then + + if not IsBound( gapdoc.main ) then + gapdoc.main := pkg; + fi; + + # FIXME: the following may break if a package uses more than one book + if IsBound( package_info.PackageDoc ) and IsBound( package_info.PackageDoc[1].BookName ) then + gapdoc.bookname := package_info.PackageDoc[1].BookName; + elif not is_worksheet then + # Default: book name = package name + gapdoc.bookname := pkg; + + Print("\n"); + Print("WARNING: PackageInfo.g is missing a PackageDoc entry!\n"); + Print("Without this, your package manual will not be recognized by the GAP help system.\n"); + Print("You can correct this by adding the following to your PackageInfo.g:\n"); + Print("PackageDoc := rec(\n"); + Print(" BookName := ~.PackageName,\n"); + #Print(" BookName := \"", pkg, "\",\n"); + Print(" ArchiveURLSubset := [\"doc\"],\n"); + Print(" HTMLStart := \"doc/chap0.html\",\n"); + Print(" PDFFile := \"doc/manual.pdf\",\n"); + Print(" SixFile := \"doc/manual.six\",\n"); + Print(" LongTitle := ~.Subtitle,\n"); + Print("),\n"); + Print("\n"); + fi; + + if not IsBound( gapdoc.files ) then + gapdoc.files := []; + fi; + + if not IsBound( gapdoc.scan_dirs ) and not is_worksheet then + gapdoc.scan_dirs := [ "gap", "lib", "examples", "examples/doc" ]; + fi; + + if not is_worksheet then + Append( gapdoc.files, AUTODOC_FindMatchingFiles(pkg, gapdoc.scan_dirs, [ "g", "gi", "gd" ]) ); + fi; + + # Attempt to weed out duplicates as they may confuse GAPDoc (this + # won't work if there are any non-normalized paths in the list). + gapdoc.files := Set( gapdoc.files ); + + # Convert the file paths in gapdoc.files, which are relative to + # the package directory, to paths which are relative to the doc directory. + # For this, we assume that doc_dir_rel is normalized (e.g. + # it does not contains '//') and relative. + d := Number( Filename( doc_dir_rel, "" ), x -> x = '/' ); + d := Concatenation( ListWithIdenticalEntries(d, "../") ); + gapdoc.files := List( gapdoc.files, f -> Concatenation( d, f ) ); + fi; + + + # read tree + # FIXME: shouldn't tree be declared inside of an 'if IsBound(autodoc)' section? + tree := DocumentationTree( ); + + if IsBound( autodoc ) then + if IsBound( autodoc.section_intros ) then + AUTODOC_PROCESS_INTRO_STRINGS( autodoc.section_intros : Tree := tree ); + fi; + + AutoDocScanFiles( autodoc.files : PackageName := pkg, Tree := tree ); + fi; + + if is_worksheet then + # FIXME: We use scaffold and autodoc here without checking whether + # they are bound. Does that mean worksheets always use them? + if IsRecord( scaffold.TitlePage ) and IsBound( scaffold.TitlePage.Title ) then + pkg := scaffold.TitlePage.Title; + + elif IsBound( tree!.TitlePage.Title ) then + pkg := tree!.TitlePage.Title; + + elif IsBound( autodoc.files ) and Length( autodoc.files ) > 0 then + pkg := autodoc.files[ 1 ]; + + while Position( pkg, '/' ) <> fail do + Remove( pkg, 1 ); + od; + + while Position( pkg, '.' ) <> fail do + Remove( pkg, Length( pkg ) ); + od; + + else + Error( "could not figure out a title." ); + fi; + + if not IsString( pkg ) then + pkg := JoinStringsWithSeparator( pkg, " " ); + fi; + + gapdoc.main := ReplacedString( pkg, " ", "_" ); + gapdoc.bookname := ReplacedString( pkg, " ", "_" ); + fi; + + # + # Generate scaffold + # + gapdoc_latex_option_record := rec( ); + + if IsBound( scaffold ) then + ## Syntax is [ "class", [ "options" ] ] + if IsBound( scaffold.document_class ) then + position_document_class := PositionSublist( GAPDoc2LaTeXProcs.Head, "documentclass" ); + + if IsString( scaffold.document_class ) then + scaffold.document_class := [ scaffold.document_class ]; + fi; + + if position_document_class = fail then + Error( "something is wrong with the LaTeX header" ); + fi; + + GAPDoc2LaTeXProcs.Head := Concatenation( + GAPDoc2LaTeXProcs.Head{[ 1 .. PositionSublist( GAPDoc2LaTeXProcs.Head, "{", position_document_class ) ]}, + scaffold.document_class[ 1 ], + GAPDoc2LaTeXProcs.Head{[ PositionSublist( GAPDoc2LaTeXProcs.Head, "}", position_document_class ) .. Length( GAPDoc2LaTeXProcs.Head ) ]} ); + + if Length( scaffold.document_class ) = 2 then + + GAPDoc2LaTeXProcs.Head := Concatenation( + GAPDoc2LaTeXProcs.Head{[ 1 .. PositionSublist( GAPDoc2LaTeXProcs.Head, "[", position_document_class ) ]}, + scaffold.document_class[ 2 ], + GAPDoc2LaTeXProcs.Head{[ PositionSublist( GAPDoc2LaTeXProcs.Head, "]", position_document_class ) .. Length( GAPDoc2LaTeXProcs.Head ) ]} ); + fi; + fi; + + if IsBound( scaffold.latex_header_file ) then + GAPDoc2LaTeXProcs.Head := StringFile( scaffold.latex_header_file ); + fi; + + if IsBound( scaffold.gapdoc_latex_options ) then + if IsRecord( scaffold.gapdoc_latex_options ) then + for i in RecNames( scaffold.gapdoc_latex_options ) do + if not IsString( scaffold.gapdoc_latex_options.( i ) ) + and IsList( scaffold.gapdoc_latex_options.( i ) ) + and LowercaseString( scaffold.gapdoc_latex_options.( i )[ 1 ] ) = "file" then + scaffold.gapdoc_latex_options.( i ) := StringFile( scaffold.gapdoc_latex_options.( i )[ 2 ] ); + fi; + od; + + gapdoc_latex_option_record := scaffold.gapdoc_latex_options; + fi; + fi; + + if not IsBound( scaffold.includes ) then + scaffold.includes := [ ]; + fi; + + if IsBound( autodoc ) then + # If scaffold.includes is already set, then we add + # AutoDocMainFile.xml to it, but *only* if it not already + # there. This way, package authors can control where + # it is put in their includes list. + if not "AutoDocMainFile.xml" in scaffold.includes then + Add( scaffold.includes, "AutoDocMainFile.xml" ); + fi; + fi; + + if IsBound( scaffold.bib ) and IsBool( scaffold.bib ) then + if scaffold.bib = true then + scaffold.bib := Concatenation( pkg, ".bib" ); + else + Unbind( scaffold.bib ); + fi; + elif not IsBound( scaffold.bib ) then + # If there is a doc/PKG.bib file, assume that we want to reference it in the scaffold. + if IsReadableFile( Filename( doc_dir, Concatenation( pkg, ".bib" ) ) ) then + scaffold.bib := Concatenation( pkg, ".bib" ); + fi; + fi; + + AUTODOC_WriteOnce( scaffold, "index", true ); + + if IsBound( gapdoc ) then + if AUTODOC_GetSuffix( gapdoc.main ) = "xml" then + scaffold.main_xml_file := gapdoc.main; + else + scaffold.main_xml_file := Concatenation( gapdoc.main, ".xml" ); + fi; + fi; + + # TODO: It should be possible to only rebuild the title page. (Perhaps also only the main page? but this is less important) + if IsBound( scaffold.TitlePage ) then + if IsRecord( scaffold.TitlePage ) then + title_page := scaffold.TitlePage; + else + title_page := rec( ); + fi; + + AUTODOC_WriteOnce( title_page, "dir", doc_dir ); + AUTODOC_APPEND_RECORD_WRITEONCE( title_page, tree!.TitlePage ); + + if not is_worksheet then + AUTODOC_APPEND_RECORD_WRITEONCE( title_page, ExtractTitleInfoFromPackageInfo( pkg ) ); + fi; + + CreateTitlePage( title_page ); + fi; + + if IsBound( scaffold.MainPage ) and scaffold.MainPage <> false then + scaffold.dir := doc_dir; + scaffold.book_name := pkg; + CreateMainPage( scaffold ); + fi; + fi; + + # + # Run AutoDoc + # + if IsBound( autodoc ) then + WriteDocumentation( tree, doc_dir ); + fi; + + + # + # Run GAPDoc + # + if IsBound( gapdoc ) then + + # Ask GAPDoc to use UTF-8 as input encoding for LaTeX, as the XML files + # of the documentation are also in UTF-8 encoding, and may contain characters + # not contained in the default Latin 1 encoding. + SetGapDocLaTeXOptions( "utf8", gapdoc_latex_option_record ); + + MakeGAPDocDoc( doc_dir, gapdoc.main, gapdoc.files, gapdoc.bookname, "MathJax" ); + + CopyHTMLStyleFiles( Filename( doc_dir, "" ) ); + + # The following (undocumented) API is there for compatibility + # with old-style gapmacro.tex based package manuals. It + # produces a manual.lab file which those packages can use if + # they wish to link to things in the manual we are currently + # generating. This can probably be removed eventually, but for + # now, doing it does not hurt. + + # FIXME: It seems that this command does not work if pdflatex + # is not present. Maybe we should remove it. + + if not is_worksheet then + GAPDocManualLab( pkg ); + fi; + + fi; + + if IsBound( maketest ) then + + AUTODOC_WriteOnce( maketest, "filename", "maketest.g" ); + AUTODOC_WriteOnce( maketest, "folder", pkg_dir ); + AUTODOC_WriteOnce( maketest, "scan_dir", doc_dir ); + AUTODOC_WriteOnce( maketest, "files_to_scan", gapdoc.files ); + + if IsString( maketest.folder ) then + maketest.folder := Directory( maketest.folder ); + fi; + + if IsString( maketest.scan_dir ) then + maketest.scan_dir := Directory( maketest.scan_dir ); + fi; + + AUTODOC_WriteOnce( maketest, "commands", [ ] ); + AUTODOC_WriteOnce( maketest, "book_name", gapdoc.main ); + + CreateMakeTest( maketest ); + fi; + + return true; +end ); diff --git a/samples/GAP/PackageInfo.g b/samples/GAP/PackageInfo.g new file mode 100644 index 00000000..68e5ecdb --- /dev/null +++ b/samples/GAP/PackageInfo.g @@ -0,0 +1,115 @@ +############################################################################# +## +## PackageInfo.g for the package `cvec' Max Neunhoeffer +## +## (created from Frank Lübeck's PackageInfo.g template file) +## + +SetPackageInfo( rec( + +PackageName := "cvec", +Subtitle := "Compact vectors over finite fields", +Version := "2.5.1", +Date := "04/04/2014", # dd/mm/yyyy format + +## Information about authors and maintainers. +Persons := [ + rec( + LastName := "Neunhoeffer", + FirstNames := "Max", + IsAuthor := true, + IsMaintainer := false, + Email := "neunhoef@mcs.st-and.ac.uk", + WWWHome := "http://www-groups.mcs.st-and.ac.uk/~neunhoef/", + PostalAddress := Concatenation( [ + "School of Mathematics and Statistics\n", + "University of St Andrews\n", + "Mathematical Institute\n", + "North Haugh\n", + "St Andrews, Fife KY16 9SS\n", + "Scotland, UK" ] ), + Place := "St Andrews", + Institution := "University of St Andrews" + ), +], + +## Status information. Currently the following cases are recognized: +## "accepted" for successfully refereed packages +## "deposited" for packages for which the GAP developers agreed +## to distribute them with the core GAP system +## "dev" for development versions of packages +## "other" for all other packages +## +# Status := "accepted", +Status := "deposited", + +## You must provide the next two entries if and only if the status is +## "accepted" because is was successfully refereed: +# format: 'name (place)' +# CommunicatedBy := "Mike Atkinson (St. Andrews)", +#CommunicatedBy := "", +# format: mm/yyyy +# AcceptDate := "08/1999", +#AcceptDate := "", + +PackageWWWHome := "http://neunhoef.github.io/cvec/", +README_URL := Concatenation(~.PackageWWWHome, "README"), +PackageInfoURL := Concatenation(~.PackageWWWHome, "PackageInfo.g"), +ArchiveURL := Concatenation("https://github.com/neunhoef/cvec/", + "releases/download/v", ~.Version, + "/cvec-", ~.Version), +ArchiveFormats := ".tar.gz .tar.bz2", + +## Here you must provide a short abstract explaining the package content +## in HTML format (used on the package overview Web page) and an URL +## for a Webpage with more detailed information about the package +## (not more than a few lines, less is ok): +## Please, use 'GAP' and +## 'MyPKG' for specifing package names. +## +AbstractHTML := + "This package provides an implementation of compact vectors over finite\ + fields. Contrary to earlier implementations no table lookups are used\ + but only word-based processor arithmetic. This allows for bigger finite\ + fields and higher speed.", + +PackageDoc := rec( + BookName := "cvec", + ArchiveURLSubset := ["doc"], + HTMLStart := "doc/chap0.html", + PDFFile := "doc/manual.pdf", + SixFile := "doc/manual.six", + LongTitle := "Compact vectors over finite fields", +), + +Dependencies := rec( + GAP := ">=4.5.5", + NeededOtherPackages := [ + ["GAPDoc", ">= 1.2"], + ["IO", ">= 4.1"], + ["orb", ">= 4.2"], + ], + SuggestedOtherPackages := [], + ExternalConditions := [] +), + +AvailabilityTest := function() + if not "cvec" in SHOW_STAT() and + Filename(DirectoriesPackagePrograms("cvec"), "cvec.so") = fail then + #Info(InfoWarning, 1, "cvec: kernel cvec functions not available."); + return fail; + fi; + return true; +end, + +## *Optional*, but recommended: path relative to package root to a file which +## contains as many tests of the package functionality as sensible. +#TestFile := "tst/testall.g", + +## *Optional*: Here you can list some keyword related to the topic +## of the package. +Keywords := [] + +)); + + diff --git a/samples/GAP/example.gd b/samples/GAP/example.gd new file mode 100644 index 00000000..c285ea32 --- /dev/null +++ b/samples/GAP/example.gd @@ -0,0 +1,23 @@ +############################################################################# +## +#W example.gd +## +## This file contains a sample of a GAP declaration file. +## +DeclareProperty( "SomeProperty", IsLeftModule ); +DeclareGlobalFunction( "SomeGlobalFunction" ); + + +############################################################################# +## +#C IsQuuxFrobnicator() +## +## +## +## +## +## Tests whether R is a quux frobnicator. +## +## +## +DeclareSynonym( "IsQuuxFrobnicator", IsField and IsGroup ); diff --git a/samples/GAP/example.gi b/samples/GAP/example.gi new file mode 100644 index 00000000..c9c5e55d --- /dev/null +++ b/samples/GAP/example.gi @@ -0,0 +1,64 @@ +############################################################################# +## +#W example.gd +## +## This file contains a sample of a GAP implementation file. +## + + +############################################################################# +## +#M SomeOperation( ) +## +## performs some operation on +## +InstallMethod( SomeProperty, + "for left modules", + [ IsLeftModule ], 0, + function( M ) + if IsFreeLeftModule( M ) and not IsTrivial( M ) then + return true; + fi; + TryNextMethod(); + end ); + + + +############################################################################# +## +#F SomeGlobalFunction( ) +## +## A global variadic funfion. +## +InstallGlobalFunction( SomeGlobalFunction, function( arg ) + if Length( arg ) = 3 then + return arg[1] + arg[2] * arg[3]; + elif Length( arg ) = 2 then + return arg[1] - arg[2] + else + Error( "usage: SomeGlobalFunction( , [, ] )" ); + fi; + end ); + + +# +# A plain function. +# +SomeFunc := function(x, y) + local z, func, tmp, j; + z := x * 1.0; + y := 17^17 - y; + func := a -> a mod 5; + tmp := List( [1..50], func ); + while y > 0 do + for j in tmp do + Print(j, "\n"); + od; + repeat + y := y - 1; + until 0 < 1; + y := y -1; + od; + return z; +end; + \ No newline at end of file diff --git a/samples/GAP/vspc.gd b/samples/GAP/vspc.gd new file mode 100644 index 00000000..d381e6f1 --- /dev/null +++ b/samples/GAP/vspc.gd @@ -0,0 +1,822 @@ +############################################################################# +## +#W vspc.gd GAP library Thomas Breuer +## +## +#Y Copyright (C) 1997, Lehrstuhl D für Mathematik, RWTH Aachen, Germany +#Y (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland +#Y Copyright (C) 2002 The GAP Group +## +## This file declares the operations for vector spaces. +## +## The operations for bases of free left modules can be found in the file +## lib/basis.gd. +## + + +############################################################################# +## +#C IsLeftOperatorRing() +## +## +## +## +## +## +## +## +DeclareSynonym( "IsLeftOperatorRing", + IsLeftOperatorAdditiveGroup and IsRing and IsAssociativeLOpDProd ); +#T really? + + +############################################################################# +## +#C IsLeftOperatorRingWithOne() +## +## +## +## +## +## +## +## +DeclareSynonym( "IsLeftOperatorRingWithOne", + IsLeftOperatorAdditiveGroup and IsRingWithOne + and IsAssociativeLOpDProd ); +#T really? + + +############################################################################# +## +#C IsLeftVectorSpace( ) +#C IsVectorSpace( ) +## +## <#GAPDoc Label="IsLeftVectorSpace"> +## +## +## +## +## +## A vector space in &GAP; is a free left module +## (see ) over a division ring +## (see Chapter ). +##

+## Whenever we talk about an F-vector space V then V is +## an additive group (see ) on which the +## division ring F acts via multiplication from the left such that +## this action and the addition in V are left and right distributive. +## The division ring F can be accessed as value of the attribute +## . +##

+## Vector spaces in &GAP; are always left vector spaces, +## and are +## synonyms. +## +## +## <#/GAPDoc> +## +DeclareSynonym( "IsLeftVectorSpace", + IsLeftModule and IsLeftActedOnByDivisionRing ); + +DeclareSynonym( "IsVectorSpace", IsLeftVectorSpace ); + +InstallTrueMethod( IsFreeLeftModule, + IsLeftModule and IsLeftActedOnByDivisionRing ); + + +############################################################################# +## +#F IsGaussianSpace( ) +## +## <#GAPDoc Label="IsGaussianSpace"> +## +## +## +## +## The filter (see ) +## for the row space (see ) +## or matrix space (see ) V +## over the field F, say, +## indicates that the entries of all row vectors or matrices in V, +## respectively, are all contained in F. +## In this case, V is called a Gaussian vector space. +## Bases for Gaussian spaces can be computed using Gaussian elimination for +## a given list of vector space generators. +## mats:= [ [[1,1],[2,2]], [[3,4],[0,1]] ];; +## gap> V:= VectorSpace( Rationals, mats );; +## gap> IsGaussianSpace( V ); +## true +## gap> mats[1][1][1]:= E(4);; # an element in an extension field +## gap> V:= VectorSpace( Rationals, mats );; +## gap> IsGaussianSpace( V ); +## false +## gap> V:= VectorSpace( Field( Rationals, [ E(4) ] ), mats );; +## gap> IsGaussianSpace( V ); +## true +## ]]> +## +## +## <#/GAPDoc> +## +DeclareFilter( "IsGaussianSpace", IsVectorSpace ); + +InstallTrueMethod( IsGaussianSpace, + IsVectorSpace and IsFullMatrixModule ); + +InstallTrueMethod( IsGaussianSpace, + IsVectorSpace and IsFullRowModule ); + + +############################################################################# +## +#C IsDivisionRing( ) +## +## <#GAPDoc Label="IsDivisionRing"> +## +## +## +## +## A division ring in &GAP; is a nontrivial associative algebra +## D with a multiplicative inverse for each nonzero element. +## In &GAP; every division ring is a vector space over a division ring +## (possibly over itself). +## Note that being a division ring is thus not a property that a ring can +## get, because a ring is usually not represented as a vector space. +##

+## The field of coefficients is stored as the value of the attribute +## of D. +## +## +## <#/GAPDoc> +## +DeclareSynonymAttr( "IsDivisionRing", + IsMagmaWithInversesIfNonzero + and IsLeftOperatorRingWithOne + and IsLeftVectorSpace + and IsNonTrivial + and IsAssociative + and IsEuclideanRing ); + + +############################################################################# +## +#A GeneratorsOfLeftVectorSpace( ) +#A GeneratorsOfVectorSpace( ) +## +## <#GAPDoc Label="GeneratorsOfLeftVectorSpace"> +## +## +## +## +## +## For an F-vector space V, +## returns a list of vectors in +## V that generate V as an F-vector space. +## GeneratorsOfVectorSpace( FullRowSpace( Rationals, 3 ) ); +## [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] +## ]]> +## +## +## <#/GAPDoc> +## +DeclareSynonymAttr( "GeneratorsOfLeftVectorSpace", + GeneratorsOfLeftOperatorAdditiveGroup ); + +DeclareSynonymAttr( "GeneratorsOfVectorSpace", + GeneratorsOfLeftOperatorAdditiveGroup ); + + +############################################################################# +## +#A CanonicalBasis( ) +## +## <#GAPDoc Label="CanonicalBasis"> +## +## +## +## +## If the vector space V supports a canonical basis then +## returns this basis, +## otherwise fail is returned. +##

+## The defining property of a canonical basis is that its vectors are +## uniquely determined by the vector space. +## If canonical bases exist for two vector spaces over the same left acting +## domain (see ) then the equality of +## these vector spaces can be decided by comparing the canonical bases. +##

+## The exact meaning of a canonical basis depends on the type of V. +## Canonical bases are defined for example for Gaussian row and matrix +## spaces (see ). +##

+## If one designs a new kind of vector spaces +## (see ) and +## defines a canonical basis for these spaces then the +## method one installs +## (see ) +## must not call . +## On the other hand, one probably should install a +## method that simply calls , +## the value of the method +## (see  and +## ) +## being CANONICAL_BASIS_FLAGS. +## vecs:= [ [ 1, 2, 3 ], [ 1, 1, 1 ], [ 1, 1, 1 ] ];; +## gap> V:= VectorSpace( Rationals, vecs );; +## gap> B:= CanonicalBasis( V ); +## CanonicalBasis( ) +## gap> BasisVectors( B ); +## [ [ 1, 0, -1 ], [ 0, 1, 2 ] ] +## ]]> +## +## +## <#/GAPDoc> +## +DeclareAttribute( "CanonicalBasis", IsFreeLeftModule ); + + +############################################################################# +## +#F IsRowSpace( ) +## +## <#GAPDoc Label="IsRowSpace"> +## +## +## +## +## A row space in &GAP; is a vector space that consists of +## row vectors (see Chapter ). +## +## +## <#/GAPDoc> +## +DeclareSynonym( "IsRowSpace", IsRowModule and IsVectorSpace ); + + +############################################################################# +## +#F IsGaussianRowSpace( ) +## +## +## +## +## +## A row space is Gaussian if the left acting domain contains all +## scalars that occur in the vectors. +## Thus one can use Gaussian elimination in the calculations. +##

+## (Otherwise the space is non-Gaussian. +## We will need a flag for this to write down methods that delegate from +## non-Gaussian spaces to Gaussian ones.) +## +## +## +## +DeclareSynonym( "IsGaussianRowSpace", IsGaussianSpace and IsRowSpace ); + + +############################################################################# +## +#F IsNonGaussianRowSpace( ) +## +## +## +## +## +## If an F-vector space V is in the filter +## then this expresses that V +## consists of row vectors (see ) such +## that not all entries in these row vectors are contained in F +## (so Gaussian elimination cannot be used to compute an F-basis +## from a list of vector space generators), +## and that V is handled via the mechanism of nice bases +## (see ) in the following way. +## Let K be the field spanned by the entries of all vectors in +## V. +## Then the value of V is +## a basis B of the field extension K / ( K \cap F ), +## and the value of v \in V +## is defined by replacing each entry of v by the list of its +## B-coefficients, and then forming the concatenation. +##

+## So the associated nice vector space is a Gaussian row space +## (see ). +## +## +## +DeclareHandlingByNiceBasis( "IsNonGaussianRowSpace", + "for non-Gaussian row spaces" ); + + +############################################################################# +## +#F IsMatrixSpace( ) +## +## <#GAPDoc Label="IsMatrixSpace"> +## +## +## +## +## A matrix space in &GAP; is a vector space that consists of matrices +## (see Chapter ). +## +## +## <#/GAPDoc> +## +DeclareSynonym( "IsMatrixSpace", IsMatrixModule and IsVectorSpace ); + + +############################################################################# +## +#F IsGaussianMatrixSpace( ) +## +## +## +## +## +## A matrix space is Gaussian if the left acting domain contains all +## scalars that occur in the vectors. +## Thus one can use Gaussian elimination in the calculations. +##

+## (Otherwise the space is non-Gaussian. +## We will need a flag for this to write down methods that delegate from +## non-Gaussian spaces to Gaussian ones.) +## +## +## +DeclareSynonym( "IsGaussianMatrixSpace", IsGaussianSpace and IsMatrixSpace ); + + +############################################################################# +## +#F IsNonGaussianMatrixSpace( ) +## +## +## +## +## +## If an F-vector space V is in the filter +## +## then this expresses that V consists of matrices +## (see ) +## such that not all entries in these matrices are contained in F +## (so Gaussian elimination cannot be used to compute an F-basis +## from a list of vector space generators), +## and that V is handled via the mechanism of nice bases +## (see ) in the following way. +## Let K be the field spanned by the entries of all vectors in V. +## The value of V is irrelevant, +## and the value of v \in V +## is defined as the concatenation of the rows of v. +##

+## So the associated nice vector space is a (not necessarily Gaussian) +## row space (see ). +## +## +## +DeclareHandlingByNiceBasis( "IsNonGaussianMatrixSpace", + "for non-Gaussian matrix spaces" ); + + +############################################################################# +## +#A NormedRowVectors( ) . . . normed vectors in a Gaussian row space +## +## <#GAPDoc Label="NormedRowVectors"> +## +## +## +## +## For a finite Gaussian row space V +## (see , ), +## returns a list of those nonzero +## vectors in V that have a one in the first nonzero component. +##

+## The result list can be used as action domain for the action of a matrix +## group via , which yields the natural action on +## one-dimensional subspaces of V +## (see also ). +## vecs:= NormedRowVectors( GF(3)^2 ); +## [ [ 0*Z(3), Z(3)^0 ], [ Z(3)^0, 0*Z(3) ], [ Z(3)^0, Z(3)^0 ], +## [ Z(3)^0, Z(3) ] ] +## gap> Action( GL(2,3), vecs, OnLines ); +## Group([ (3,4), (1,2,4) ]) +## ]]> +## +## +## <#/GAPDoc> +## +DeclareAttribute( "NormedRowVectors", IsGaussianSpace ); + + +############################################################################# +## +#A TrivialSubspace( ) +## +## <#GAPDoc Label="TrivialSubspace"> +## +## +## +## +## For a vector space V, returns the +## subspace of V that consists of the zero vector in V. +## V:= GF(3)^3;; +## gap> triv:= TrivialSubspace( V ); +## +## gap> AsSet( triv ); +## [ [ 0*Z(3), 0*Z(3), 0*Z(3) ] ] +## ]]> +## +## +## <#/GAPDoc> +## +DeclareSynonymAttr( "TrivialSubspace", TrivialSubmodule ); + + +############################################################################# +## +#F VectorSpace( , [, ][, "basis"] ) +## +## <#GAPDoc Label="VectorSpace"> +## +## +## +## +## For a field F and a collection gens of vectors, +## returns the F-vector space spanned by +## the elements in gens. +##

+## The optional argument zero can be used to specify the zero element +## of the space; zero must be given if gens is empty. +## The optional string "basis" indicates that gens is known to +## be linearly independent over F, in particular the dimension of the +## vector space is immediately set; +## note that need not return the basis formed by +## gens if the string "basis" is given as an argument. +## +## V:= VectorSpace( Rationals, [ [ 1, 2, 3 ], [ 1, 1, 1 ] ] ); +## +## ]]> +## +## +## <#/GAPDoc> +## +DeclareGlobalFunction( "VectorSpace" ); + + +############################################################################# +## +#F Subspace( , [, "basis"] ) . subspace of generated by +#F SubspaceNC( , [, "basis"] ) +## +## <#GAPDoc Label="Subspace"> +## +## +## +## +## +## For an F-vector space V and a list or collection +## gens that is a subset of V, +## returns the F-vector space spanned by +## gens; if gens is empty then the trivial subspace +## (see ) of V is returned. +## The parent (see ) of the returned vector space +## is set to V. +##

+## does the same as , +## except that it omits the check whether gens is a subset of +## V. +##

+## The optional string "basis" indicates that gens is known to +## be linearly independent over F. +## In this case the dimension of the subspace is immediately set, +## and both and do +## not check whether gens really is linearly independent and +## whether gens is a subset of V. +## +## V:= VectorSpace( Rationals, [ [ 1, 2, 3 ], [ 1, 1, 1 ] ] );; +## gap> W:= Subspace( V, [ [ 0, 1, 2 ] ] ); +## +## ]]> +## +## +## <#/GAPDoc> +## +DeclareSynonym( "Subspace", Submodule ); + +DeclareSynonym( "SubspaceNC", SubmoduleNC ); + + +############################################################################# +## +#O AsVectorSpace( , ) . . . . . . . . . view as -vector space +## +## <#GAPDoc Label="AsVectorSpace"> +## +## +## +## +## Let F be a division ring and D a domain. +## If the elements in D form an F-vector space then +## returns this F-vector space, +## otherwise fail is returned. +##

+## can be used for example to view a given +## vector space as a vector space over a smaller or larger division ring. +## V:= FullRowSpace( GF( 27 ), 3 ); +## ( GF(3^3)^3 ) +## gap> Dimension( V ); LeftActingDomain( V ); +## 3 +## GF(3^3) +## gap> W:= AsVectorSpace( GF( 3 ), V ); +## +## gap> Dimension( W ); LeftActingDomain( W ); +## 9 +## GF(3) +## gap> AsVectorSpace( GF( 9 ), V ); +## fail +## ]]> +## +## +## <#/GAPDoc> +## +DeclareSynonym( "AsVectorSpace", AsLeftModule ); + + +############################################################################# +## +#O AsSubspace( , ) . . . . . . . . . . . view as subspace of +## +## <#GAPDoc Label="AsSubspace"> +## +## +## +## +## Let V be an F-vector space, and U a collection. +## If U is a subset of V such that the elements of U +## form an F-vector space then returns this +## vector space, with parent set to V +## (see ). +## Otherwise fail is returned. +## V:= VectorSpace( Rationals, [ [ 1, 2, 3 ], [ 1, 1, 1 ] ] );; +## gap> W:= VectorSpace( Rationals, [ [ 1/2, 1/2, 1/2 ] ] );; +## gap> U:= AsSubspace( V, W ); +## +## gap> Parent( U ) = V; +## true +## gap> AsSubspace( V, [ [ 1, 1, 1 ] ] ); +## fail +## ]]> +## +## +## <#/GAPDoc> +## +DeclareOperation( "AsSubspace", [ IsVectorSpace, IsCollection ] ); + + +############################################################################# +## +#F Intersection2Spaces( , , ) +## +## +## +## +## +## is a function that takes two arguments V and W which must +## be finite dimensional vector spaces, +## and returns the intersection of V and W. +##

+## If the left acting domains are different then let F be their +## intersection. +## The intersection of V and W is computed as intersection of +## AsStruct( F, V ) and +## AsStruct( F, V ). +##

+## If the left acting domains are equal to F then the intersection of +## V and W is returned either as F-Substruct +## with the common parent of V and W or as +## F-Struct, in both cases with known basis. +##

+## This function is used to handle the intersections of two vector spaces, +## two algebras, two algebras-with-one, two left ideals, two right ideals, +## two two-sided ideals. +## +## +## +DeclareGlobalFunction( "Intersection2Spaces" ); + + +############################################################################# +## +#F FullRowSpace( , ) +## +## <#GAPDoc Label="FullRowSpace"> +## +## +## +## +## +## For a field F and a nonnegative integer n, +## returns the F-vector space that +## consists of all row vectors (see ) of +## length n with entries in F. +##

+## An alternative to construct this vector space is via +## F^n. +## FullRowSpace( GF( 9 ), 3 ); +## ( GF(3^2)^3 ) +## gap> GF(9)^3; # the same as above +## ( GF(3^2)^3 ) +## ]]> +## +## +## <#/GAPDoc> +## +DeclareSynonym( "FullRowSpace", FullRowModule ); +DeclareSynonym( "RowSpace", FullRowModule ); + + +############################################################################# +## +#F FullMatrixSpace( , , ) +## +## <#GAPDoc Label="FullMatrixSpace"> +## +## +## +## +## +## For a field F and two positive integers m and n, +## returns the F-vector space that +## consists of all m by n matrices +## (see ) with entries in F. +##

+## If m = n then the result is in fact an algebra +## (see ). +##

+## An alternative to construct this vector space is via +## F^[m,n]. +## FullMatrixSpace( GF(2), 4, 5 ); +## ( GF(2)^[ 4, 5 ] ) +## gap> GF(2)^[ 4, 5 ]; # the same as above +## ( GF(2)^[ 4, 5 ] ) +## ]]> +## +## +## <#/GAPDoc> +## +DeclareSynonym( "FullMatrixSpace", FullMatrixModule ); +DeclareSynonym( "MatrixSpace", FullMatrixModule ); +DeclareSynonym( "MatSpace", FullMatrixModule ); + + +############################################################################# +## +#C IsSubspacesVectorSpace( ) +## +## <#GAPDoc Label="IsSubspacesVectorSpace"> +## +## +## +## +## The domain of all subspaces of a (finite) vector space or of all +## subspaces of fixed dimension, as returned by +## (see ) lies in the category +## . +## D:= Subspaces( GF(3)^3 ); +## Subspaces( ( GF(3)^3 ) ) +## gap> Size( D ); +## 28 +## gap> iter:= Iterator( D );; +## gap> NextIterator( iter ); +## +## gap> NextIterator( iter ); +## +## gap> IsSubspacesVectorSpace( D ); +## true +## ]]> +## +## +## <#/GAPDoc> +## +DeclareCategory( "IsSubspacesVectorSpace", IsDomain ); + + +############################################################################# +## +#M IsFinite( ) . . . . . . . . . . . . . . . . . for a subspaces domain +## +## Returns `true' if is finite. +## We allow subspaces domains in `IsSubspacesVectorSpace' only for finite +## vector spaces. +## +InstallTrueMethod( IsFinite, IsSubspacesVectorSpace ); + + +############################################################################# +## +#A Subspaces( [, ] ) +## +## <#GAPDoc Label="Subspaces"> +## +## +## +## +## Called with a finite vector space v, +## returns the domain of all subspaces of V. +##

+## Called with V and a nonnegative integer k, +## returns the domain of all k-dimensional +## subspaces of V. +##

+## Special and methods are +## provided for these domains. +## +## +## +## <#/GAPDoc> +## +DeclareAttribute( "Subspaces", IsLeftModule ); +DeclareOperation( "Subspaces", [ IsLeftModule, IsInt ] ); + + +############################################################################# +## +#F IsSubspace( , ) +## +## +## +## +## +## check that U is a vector space that is contained in V +## +## +## +## +DeclareGlobalFunction( "IsSubspace" ); + + +############################################################################# +## +#A OrthogonalSpaceInFullRowSpace( ) +## +## +## +## +## +## For a Gaussian row space U over F, +## +## returns a complement of U in the full row space of same vector +## dimension as U over F. +## +## +## +DeclareAttribute( "OrthogonalSpaceInFullRowSpace", IsGaussianSpace ); + + +############################################################################# +## +#P IsVectorSpaceHomomorphism( ) +## +## +## +## +## +## A mapping f is a vector space homomorphism (or linear mapping) +## if the source and range are vector spaces +## (see ) +## over the same division ring D +## (see ), +## and if f( a + b ) = f(a) + f(b) and f( s * a ) = s * f(a) +## hold for all elements a, b in the source of f and +## s \in D. +## +## +## +DeclareProperty( "IsVectorSpaceHomomorphism", IsGeneralMapping ); + + +############################################################################# +## +#E + diff --git a/samples/GAP/vspc.gi b/samples/GAP/vspc.gi new file mode 100644 index 00000000..b7a88871 --- /dev/null +++ b/samples/GAP/vspc.gi @@ -0,0 +1,651 @@ +############################################################################# +## +#W vspc.gi GAP library Thomas Breuer +## +## +#Y Copyright (C) 1997, Lehrstuhl D für Mathematik, RWTH Aachen, Germany +#Y (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland +#Y Copyright (C) 2002 The GAP Group +## +## This file contains generic methods for vector spaces. +## + + +############################################################################# +## +#M SetLeftActingDomain( , ) +## +## check whether the left acting domain of the external left set +## knows that it is a division ring. +## This is used, e.g., to tell a free module over a division ring +## that it is a vector space. +## +InstallOtherMethod( SetLeftActingDomain, + "method to set also 'IsLeftActedOnByDivisionRing'", + [ IsAttributeStoringRep and IsLeftActedOnByRing, IsObject ],0, + function( extL, D ) + if HasIsDivisionRing( D ) and IsDivisionRing( D ) then + SetIsLeftActedOnByDivisionRing( extL, true ); + fi; + TryNextMethod(); + end ); + + +############################################################################# +## +#M IsLeftActedOnByDivisionRing( ) +## +InstallMethod( IsLeftActedOnByDivisionRing, + "method for external left set that is left acted on by a ring", + [ IsExtLSet and IsLeftActedOnByRing ], + function( M ) + if IsIdenticalObj( M, LeftActingDomain( M ) ) then + TryNextMethod(); + else + return IsDivisionRing( LeftActingDomain( M ) ); + fi; + end ); + + +############################################################################# +## +#F VectorSpace( , [, ][, "basis"] ) +## +## The only difference between `VectorSpace' and `FreeLeftModule' shall be +## that the left acting domain of a vector space must be a division ring. +## +InstallGlobalFunction( VectorSpace, function( arg ) + if Length( arg ) = 0 or not IsDivisionRing( arg[1] ) then + Error( "usage: VectorSpace( , [, ][, \"basis\"] )" ); + fi; + return CallFuncList( FreeLeftModule, arg ); + end ); + + +############################################################################# +## +#M AsSubspace( , ) . . . . . . . for a vector space and a collection +## +InstallMethod( AsSubspace, + "for a vector space and a collection", + [ IsVectorSpace, IsCollection ], + function( V, C ) + local newC; + + if not IsSubset( V, C ) then + return fail; + fi; + newC:= AsVectorSpace( LeftActingDomain( V ), C ); + if newC = fail then + return fail; + fi; + SetParent( newC, V ); + UseIsomorphismRelation( C, newC ); + UseSubsetRelation( C, newC ); + + return newC; + end ); + + +############################################################################# +## +#M AsLeftModule( , ) . . . . . . for division ring and vector space +## +## View the vector space as a vector space over the division ring . +## +InstallMethod( AsLeftModule, + "method for a division ring and a vector space", + [ IsDivisionRing, IsVectorSpace ], + function( F, V ) + + local W, # the space, result + base, # basis vectors of field extension + gen, # loop over generators of 'V' + b, # loop over 'base' + gens, # generators of 'V' + newgens; # extended list of generators + + if Characteristic( F ) <> Characteristic( LeftActingDomain( V ) ) then + + # This is impossible. + return fail; + + elif F = LeftActingDomain( V ) then + + # No change of the left acting domain is necessary. + return V; + + elif IsSubset( F, LeftActingDomain( V ) ) then + + # Check whether 'V' is really a space over the bigger field, + # that is, whether the set of elements does not change. + base:= BasisVectors( Basis( AsField( LeftActingDomain( V ), F ) ) ); + for gen in GeneratorsOfLeftModule( V ) do + for b in base do + if not b * gen in V then + + # The field extension would change the set of elements. + return fail; + + fi; + od; + od; + + # Construct the space. + W:= LeftModuleByGenerators( F, GeneratorsOfLeftModule(V), Zero(V) ); + + elif IsSubset( LeftActingDomain( V ), F ) then + + # View 'V' as a space over a smaller field. + # For that, the list of generators must be extended. + gens:= GeneratorsOfLeftModule( V ); + if IsEmpty( gens ) then + W:= LeftModuleByGenerators( F, [], Zero( V ) ); + else + + base:= BasisVectors( Basis( AsField( F, LeftActingDomain( V ) ) ) ); + newgens:= []; + for b in base do + for gen in gens do + Add( newgens, b * gen ); + od; + od; + W:= LeftModuleByGenerators( F, newgens ); + + fi; + + else + + # View 'V' first as space over the intersection of fields, + # and then over the desired field. + return AsLeftModule( F, + AsLeftModule( Intersection( F, + LeftActingDomain( V ) ), V ) ); + + fi; + + UseIsomorphismRelation( V, W ); + UseSubsetRelation( V, W ); + return W; + end ); + + +############################################################################# +## +#M ViewObj( ) . . . . . . . . . . . . . . . . . . . view a vector space +## +## print left acting domain, if known also dimension or no. of generators +## +InstallMethod( ViewObj, + "for vector space with known generators", + [ IsVectorSpace and HasGeneratorsOfLeftModule ], + function( V ) + Print( "" ); + end ); + +InstallMethod( ViewObj, + "for vector space with known dimension", + [ IsVectorSpace and HasDimension ], + 1, # override method for known generators + function( V ) + Print( "" ); + end ); + +InstallMethod( ViewObj, + "for vector space", + [ IsVectorSpace ], + function( V ) + Print( "" ); + end ); + + +############################################################################# +## +#M PrintObj( ) . . . . . . . . . . . . . . . . . . . for a vector space +## +InstallMethod( PrintObj, + "method for vector space with left module generators", + [ IsVectorSpace and HasGeneratorsOfLeftModule ], + function( V ) + Print( "VectorSpace( ", LeftActingDomain( V ), ", ", + GeneratorsOfLeftModule( V ) ); + if IsEmpty( GeneratorsOfLeftModule( V ) ) and HasZero( V ) then + Print( ", ", Zero( V ), " )" ); + else + Print( " )" ); + fi; + end ); + +InstallMethod( PrintObj, + "method for vector space", + [ IsVectorSpace ], + function( V ) + Print( "VectorSpace( ", LeftActingDomain( V ), ", ... )" ); + end ); + + +############################################################################# +## +#M \/( , ) . . . . . . . . . factor of a vector space by a subspace +#M \/( , ) . . . . . . factor of a vector space by a subspace +## +InstallOtherMethod( \/, + "method for vector space and collection", + IsIdenticalObj, + [ IsVectorSpace, IsCollection ], + function( V, vectors ) + if IsVectorSpace( vectors ) then + TryNextMethod(); + else + return V / Subspace( V, vectors ); + fi; + end ); + +InstallOtherMethod( \/, + "generic method for two vector spaces", + IsIdenticalObj, + [ IsVectorSpace, IsVectorSpace ], + function( V, W ) + return ImagesSource( NaturalHomomorphismBySubspace( V, W ) ); + end ); + + +############################################################################# +## +#M Intersection2Spaces( , , ) +## +InstallGlobalFunction( Intersection2Spaces, + function( AsStructure, Substructure, Structure ) + return function( V, W ) + local inters, # intersection, result + F, # coefficients field + gensV, # list of generators of 'V' + gensW, # list of generators of 'W' + VW, # sum of 'V' and 'W' + B; # basis of 'VW' + + if LeftActingDomain( V ) <> LeftActingDomain( W ) then + + # Compute the intersection as vector space over the intersection + # of the coefficients fields. + # (Note that the characteristic is the same.) + F:= Intersection2( LeftActingDomain( V ), LeftActingDomain( W ) ); + return Intersection2( AsStructure( F, V ), AsStructure( F, W ) ); + + elif IsFiniteDimensional( V ) and IsFiniteDimensional( W ) then + + # Compute the intersection of two spaces over the same field. + gensV:= GeneratorsOfLeftModule( V ); + gensW:= GeneratorsOfLeftModule( W ); + if IsEmpty( gensV ) then + if Zero( V ) in W then + inters:= V; + else + inters:= []; + fi; + elif IsEmpty( gensW ) then + if Zero( V ) in W then + inters:= W; + else + inters:= []; + fi; + else + # Compute a common coefficient space. + VW:= LeftModuleByGenerators( LeftActingDomain( V ), + Concatenation( gensV, gensW ) ); + B:= Basis( VW ); + + # Construct the coefficient subspaces corresponding to 'V' and 'W'. + gensV:= List( gensV, x -> Coefficients( B, x ) ); + gensW:= List( gensW, x -> Coefficients( B, x ) ); + + # Construct the intersection of row spaces, and carry back to VW. + inters:= List( SumIntersectionMat( gensV, gensW )[2], + x -> LinearCombination( B, x ) ); + + # Construct the intersection space, if possible with a parent. + if HasParent( V ) and HasParent( W ) + and IsIdenticalObj( Parent( V ), Parent( W ) ) then + inters:= Substructure( Parent( V ), inters, "basis" ); + elif IsEmpty( inters ) then + inters:= Substructure( V, inters, "basis" ); + SetIsTrivial( inters, true ); + else + inters:= Structure( LeftActingDomain( V ), inters, "basis" ); + fi; + + # Run implications by the subset relation. + UseSubsetRelation( V, inters ); + UseSubsetRelation( W, inters ); + fi; + + # Return the result. + return inters; + + else + TryNextMethod(); + fi; + end; +end ); + + +############################################################################# +## +#M Intersection2( , ) . . . . . . . . . . . . . for two vector spaces +## +InstallMethod( Intersection2, + "method for two vector spaces", + IsIdenticalObj, + [ IsVectorSpace, IsVectorSpace ], + Intersection2Spaces( AsLeftModule, SubspaceNC, VectorSpace ) ); + + +############################################################################# +## +#M ClosureLeftModule( , ) . . . . . . . . . closure of a vector space +## +InstallMethod( ClosureLeftModule, + "method for a vector space with basis, and a vector", + IsCollsElms, + [ IsVectorSpace and HasBasis, IsVector ], + function( V, w ) + local B; # basis of 'V' + + # We can test membership easily. + B:= Basis( V ); +#T why easily? + if Coefficients( B, w ) = fail then + + # In the case of a vector space, we know a basis of the closure. + B:= Concatenation( BasisVectors( B ), [ w ] ); + V:= LeftModuleByGenerators( LeftActingDomain( V ), B ); + UseBasis( V, B ); + + fi; + return V; + end ); + + +############################################################################# +## +## Methods for collections of subspaces of a vector space +## + + +############################################################################# +## +#R IsSubspacesVectorSpaceDefaultRep( ) +## +## is the representation of domains of subspaces of a vector space , +## with the components 'structure' (with value ) and 'dimension' +## (with value either the dimension of the subspaces in the domain +## or the string '\"all\"', which means that the domain contains all +## subspaces of ). +## +DeclareRepresentation( + "IsSubspacesVectorSpaceDefaultRep", + IsComponentObjectRep, + [ "dimension", "structure" ] ); +#T not IsAttributeStoringRep? + + +############################################################################# +## +#M PrintObj( ) . . . . . . . . . . . . . . . . . for a subspaces domain +## +InstallMethod( PrintObj, + "method for a subspaces domain", + [ IsSubspacesVectorSpace and IsSubspacesVectorSpaceDefaultRep ], + function( D ) + if IsInt( D!.dimension ) then + Print( "Subspaces( ", D!.structure, ", ", D!.dimension, " )" ); + else + Print( "Subspaces( ", D!.structure, " )" ); + fi; + end ); + + +############################################################################# +## +#M Size( ) . . . . . . . . . . . . . . . . . . . for a subspaces domain +## +## The number of $k$-dimensional subspaces in a $n$-dimensional space over +## the field with $q$ elements is +## $$ +## a(n,k) = \prod_{i=0}^{k-1} \frac{q^n-q^i}{q^k-q^i} = +## \prod_{i=0}^{k-1} \frac{q^{n-i}-1}{q^{k-i}-1}. +## $$ +## We have the recursion +## $$ +## a(n,k+1) = a(n,k) \frac{q^{n-i}-1}{q^{i+1}-1}. +## $$ +## +## (The number of all subspaces is $\sum_{k=0}^n a(n,k)$.) +## +InstallMethod( Size, + "method for a subspaces domain", + [ IsSubspacesVectorSpace and IsSubspacesVectorSpaceDefaultRep ], + function( D ) + + local k, + n, + q, + size, + qn, + qd, + ank, + i; + + if D!.dimension = "all" then + + # all subspaces of the space + n:= Dimension( D!.structure ); + + q:= Size( LeftActingDomain( D!.structure ) ); + size:= 1; + qn:= q^n; + qd:= q; + + # $a(n,0)$ + ank:= 1; + + for k in [ 1 .. Int( (n-1)/2 ) ] do + + # Compute $a(n,k)$. + ank:= ank * ( qn - 1 ) / ( qd - 1 ); + qn:= qn / q; + qd:= qd * q; + + size:= size + ank; + + od; + + size:= 2 * size; + + if n mod 2 = 0 then + + # Add the number of spaces of dimension $n/2$. + size:= size + ank * ( qn - 1 ) / ( qd - 1 ); + fi; + + else + + # number of spaces of dimension 'k' only + n:= Dimension( D!.structure ); + if D!.dimension < 0 or + n < D!.dimension then + return 0; + elif n / 2 < D!.dimension then + k:= n - D!.dimension; + else + k:= D!.dimension; + fi; + + q:= Size( LeftActingDomain( D!.structure ) ); + size:= 1; + + qn:= q^n; + qd:= q; + for i in [ 1 .. k ] do + size:= size * ( qn - 1 ) / ( qd - 1 ); + qn:= qn / q; + qd:= qd * q; + od; + + fi; + + # Return the result. + return size; + end ); + + +############################################################################# +## +#M Enumerator( ) . . . . . . . . . . . . . . . . for a subspaces domain +## +## Use the iterator to compute the elements list. +#T This is not allowed! +## +InstallMethod( Enumerator, + "method for a subspaces domain", + [ IsSubspacesVectorSpace and IsSubspacesVectorSpaceDefaultRep ], + function( D ) + local iter, # iterator for 'D' + elms; # elements list, result + + iter:= Iterator( D ); + elms:= []; + while not IsDoneIterator( iter ) do + Add( elms, NextIterator( iter ) ); + od; + return elms; + end ); +#T necessary? + + +############################################################################# +## +#M Iterator( ) . . . . . . . . . . . . . . . . . for a subspaces domain +## +## uses the subspaces iterator for full row spaces and the mechanism of +## associated row spaces. +## +BindGlobal( "IsDoneIterator_Subspaces", + iter -> IsDoneIterator( iter!.associatedIterator ) ); + +BindGlobal( "NextIterator_Subspaces", function( iter ) + local next; + next:= NextIterator( iter!.associatedIterator ); + next:= List( GeneratorsOfLeftModule( next ), + x -> LinearCombination( iter!.basis, x ) ); + return Subspace( iter!.structure, next, "basis" ); + end ); + +BindGlobal( "ShallowCopy_Subspaces", + iter -> rec( structure := iter!.structure, + basis := iter!.basis, + associatedIterator := ShallowCopy( + iter!.associatedIterator ) ) ); + +InstallMethod( Iterator, + "for a subspaces domain", + [ IsSubspacesVectorSpace and IsSubspacesVectorSpaceDefaultRep ], + function( D ) + local V; # the vector space + + V:= D!.structure; + return IteratorByFunctions( rec( + IsDoneIterator := IsDoneIterator_Subspaces, + NextIterator := NextIterator_Subspaces, + ShallowCopy := ShallowCopy_Subspaces, + structure := V, + basis := Basis( V ), + associatedIterator := Iterator( + Subspaces( FullRowSpace( LeftActingDomain( V ), + Dimension( V ) ), + D!.dimension ) ) ) ); + end ); + + +############################################################################# +## +#M Subspaces( , ) +## +InstallMethod( Subspaces, + "for a vector space, and an integer", + [ IsVectorSpace, IsInt ], + function( V, dim ) + if IsFinite( V ) then + return Objectify( NewType( CollectionsFamily( FamilyObj( V ) ), + IsSubspacesVectorSpace + and IsSubspacesVectorSpaceDefaultRep ), + rec( + structure := V, + dimension := dim + ) + ); + else + TryNextMethod(); + fi; + end ); + + +############################################################################# +## +#M Subspaces( ) +## +InstallMethod( Subspaces, + "for a vector space", + [ IsVectorSpace ], + function( V ) + if IsFinite( V ) then + return Objectify( NewType( CollectionsFamily( FamilyObj( V ) ), + IsSubspacesVectorSpace + and IsSubspacesVectorSpaceDefaultRep ), + rec( + structure := V, + dimension := "all" + ) + ); + else + TryNextMethod(); + fi; + end ); + + +############################################################################# +## +#F IsSubspace( , ) . . . . . . . . . . . . . . . . . check <= +## +InstallGlobalFunction( IsSubspace, function( V, U ) + return IsVectorSpace( U ) and IsSubset( V, U ); +end ); + + +############################################################################# +## +#M IsVectorSpaceHomomorphism( ) +## +InstallMethod( IsVectorSpaceHomomorphism, + [ IsGeneralMapping ], + function( map ) + local S, R, F; + S:= Source( map ); + if not IsVectorSpace( S ) then + return false; + fi; + R:= Range( map ); + if not IsVectorSpace( R ) then + return false; + fi; + F:= LeftActingDomain( S ); + return ( F = LeftActingDomain( R ) ) and IsLinearMapping( F, map ); + end ); + + +############################################################################# +## +#E + diff --git a/samples/GLSL/SimpleLighting.gl2.frag b/samples/GLSL/SimpleLighting.gl2.frag new file mode 100644 index 00000000..bb851f86 --- /dev/null +++ b/samples/GLSL/SimpleLighting.gl2.frag @@ -0,0 +1,9 @@ +static const char* SimpleFragmentShader = STRINGIFY( + +varying vec4 FrontColor; + +void main(void) +{ + gl_FragColor = FrontColor; +} +); diff --git a/samples/GLSL/recurse1.frag b/samples/GLSL/recurse1.frag new file mode 100644 index 00000000..66b4c3fe --- /dev/null +++ b/samples/GLSL/recurse1.frag @@ -0,0 +1,48 @@ +#version 330 core + +// cross-unit recursion + +void main() {} + +// two-level recursion + +float cbar(int); + +void cfoo(float) +{ + cbar(2); +} + +// four-level, out of order + +void CB(); +void CD(); +void CA() { CB(); } +void CC() { CD(); } + +// high degree + +void CBT(); +void CDT(); +void CAT() { CBT(); CBT(); CBT(); } +void CCT() { CDT(); CDT(); CBT(); } + +// not recursive + +void norA() {} +void norB() { norA(); } +void norC() { norA(); } +void norD() { norA(); } +void norE() { norB(); } +void norF() { norB(); } +void norG() { norE(); } +void norH() { norE(); } +void norI() { norE(); } + +// not recursive, but with a call leading into a cycle if ignoring direction + +void norcA() { } +void norcB() { norcA(); } +void norcC() { norcB(); } +void norcD() { norcC(); norcB(); } // head of cycle +void norcE() { norcD(); } // lead into cycle diff --git a/samples/Game Maker Language/ClientBeginStep.gml b/samples/Game Maker Language/ClientBeginStep.gml new file mode 100644 index 00000000..64d14110 --- /dev/null +++ b/samples/Game Maker Language/ClientBeginStep.gml @@ -0,0 +1,642 @@ +/* + Originally from /Source/gg2/Scripts/Client/ClientBeginStep.gml in Gang Garrison 2 + + Copyright (C) 2008-2013 Faucet Software + http://www.ganggarrison.com + + This program is free software; + you can redistribute it and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 3 of the License, or (at your option) + any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License along with this program; if not, + see . + + Additional permission under GNU GPL version 3 section 7 + If you modify this Program, or any covered work, by linking or combining it with the Game Maker runtime library, + the 39dll library/extension, Hobbel's Download Manager DLL, or modified versions of these libraries, + the licensors of this Program grant you additional permission to convey the resulting work. +*/ + +// receive and interpret the server's message(s) +var i, playerObject, playerID, player, otherPlayerID, otherPlayer, sameVersion, buffer, plugins, pluginsRequired, usePlugins; + +if(tcp_eof(global.serverSocket)) { + if(gotServerHello) + show_message("You have been disconnected from the server."); + else + show_message("Unable to connect to the server."); + instance_destroy(); + exit; +} + +if(room == DownloadRoom and keyboard_check(vk_escape)) +{ + instance_destroy(); + exit; +} + +if(downloadingMap) +{ + while(tcp_receive(global.serverSocket, min(1024, downloadMapBytes-buffer_size(downloadMapBuffer)))) + { + write_buffer(downloadMapBuffer, global.serverSocket); + if(buffer_size(downloadMapBuffer) == downloadMapBytes) + { + write_buffer_to_file(downloadMapBuffer, "Maps/" + downloadMapName + ".png"); + downloadingMap = false; + buffer_destroy(downloadMapBuffer); + downloadMapBuffer = -1; + exit; + } + } + exit; +} + +roomchange = false; +do { + if(tcp_receive(global.serverSocket,1)) { + switch(read_ubyte(global.serverSocket)) { + case HELLO: + gotServerHello = true; + global.joinedServerName = receivestring(global.serverSocket, 1); + downloadMapName = receivestring(global.serverSocket, 1); + advertisedMapMd5 = receivestring(global.serverSocket, 1); + receiveCompleteMessage(global.serverSocket, 1, global.tempBuffer); + pluginsRequired = read_ubyte(global.tempBuffer); + plugins = receivestring(global.serverSocket, 1); + if(string_pos("/", downloadMapName) != 0 or string_pos("\", downloadMapName) != 0) + { + show_message("Server sent illegal map name: "+downloadMapName); + instance_destroy(); + exit; + } + + if (!noReloadPlugins && string_length(plugins)) + { + usePlugins = pluginsRequired || !global.serverPluginsPrompt; + if (global.serverPluginsPrompt) + { + var prompt; + if (pluginsRequired) + { + prompt = show_question( + "This server requires the following plugins to play on it: " + + string_replace_all(plugins, ",", "#") + + '#They are downloaded from the source: "' + + PLUGIN_SOURCE + + '"#The source states: "' + + PLUGIN_SOURCE_NOTICE + + '"#Do you wish to download them and continue connecting?' + ); + if (!prompt) + { + instance_destroy(); + exit; + } + } + else + { + prompt = show_question( + "This server suggests the following optional plugins to play on it: " + + string_replace_all(plugins, ",", "#") + + '#They are downloaded from the source: "' + + PLUGIN_SOURCE + + '"#The source states: "' + + PLUGIN_SOURCE_NOTICE + + '"#Do you wish to download them and use them?' + ); + if (prompt) + { + usePlugins = true; + } + } + } + if (usePlugins) + { + if (!loadserverplugins(plugins)) + { + show_message("Error ocurred loading server-sent plugins."); + instance_destroy(); + exit; + } + global.serverPluginsInUse = true; + } + } + noReloadPlugins = false; + + if(advertisedMapMd5 != "") + { + var download; + download = not file_exists("Maps/" + downloadMapName + ".png"); + if(!download and CustomMapGetMapMD5(downloadMapName) != advertisedMapMd5) + { + if(show_question("The server's copy of the map (" + downloadMapName + ") differs from ours.#Would you like to download this server's version of the map?")) + download = true; + else + { + instance_destroy(); + exit; + } + } + + if(download) + { + write_ubyte(global.serverSocket, DOWNLOAD_MAP); + socket_send(global.serverSocket); + receiveCompleteMessage(global.serverSocket,4,global.tempBuffer); + downloadMapBytes = read_uint(global.tempBuffer); + downloadMapBuffer = buffer_create(); + downloadingMap = true; + roomchange=true; + } + } + ClientPlayerJoin(global.serverSocket); + if(global.rewardKey != "" and global.rewardId != "") + { + var rewardId; + rewardId = string_copy(global.rewardId, 0, 255); + write_ubyte(global.serverSocket, REWARD_REQUEST); + write_ubyte(global.serverSocket, string_length(rewardId)); + write_string(global.serverSocket, rewardId); + } + if(global.queueJumping == true) + { + write_ubyte(global.serverSocket, CLIENT_SETTINGS); + write_ubyte(global.serverSocket, global.queueJumping); + } + socket_send(global.serverSocket); + break; + + case JOIN_UPDATE: + receiveCompleteMessage(global.serverSocket,2,global.tempBuffer); + global.playerID = read_ubyte(global.tempBuffer); + global.currentMapArea = read_ubyte(global.tempBuffer); + break; + + case FULL_UPDATE: + deserializeState(FULL_UPDATE); + break; + + case QUICK_UPDATE: + deserializeState(QUICK_UPDATE); + break; + + case CAPS_UPDATE: + deserializeState(CAPS_UPDATE); + break; + + case INPUTSTATE: + deserializeState(INPUTSTATE); + break; + + case PLAYER_JOIN: + player = instance_create(0,0,Player); + player.name = receivestring(global.serverSocket, 1); + + ds_list_add(global.players, player); + if(ds_list_size(global.players)-1 == global.playerID) { + global.myself = player; + instance_create(0,0,PlayerControl); + } + break; + + case PLAYER_LEAVE: + // Delete player from the game, adjust own ID accordingly + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + playerID = read_ubyte(global.tempBuffer); + player = ds_list_find_value(global.players, playerID); + removePlayer(player); + if(playerID < global.playerID) { + global.playerID -= 1; + } + break; + + case PLAYER_DEATH: + var causeOfDeath, assistantPlayerID, assistantPlayer; + receiveCompleteMessage(global.serverSocket,4,global.tempBuffer); + playerID = read_ubyte(global.tempBuffer); + otherPlayerID = read_ubyte(global.tempBuffer); + assistantPlayerID = read_ubyte(global.tempBuffer); + causeOfDeath = read_ubyte(global.tempBuffer); + + player = ds_list_find_value(global.players, playerID); + + otherPlayer = noone; + if(otherPlayerID != 255) + otherPlayer = ds_list_find_value(global.players, otherPlayerID); + + assistantPlayer = noone; + if(assistantPlayerID != 255) + assistantPlayer = ds_list_find_value(global.players, assistantPlayerID); + + doEventPlayerDeath(player, otherPlayer, assistantPlayer, causeOfDeath); + break; + + case BALANCE: + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + balanceplayer=read_ubyte(global.tempBuffer); + if balanceplayer == 255 { + if !instance_exists(Balancer) instance_create(x,y,Balancer); + with(Balancer) notice=0; + } else { + player = ds_list_find_value(global.players, balanceplayer); + if(player.object != -1) { + with(player.object) { + instance_destroy(); + } + player.object = -1; + } + if(player.team==TEAM_RED) { + player.team = TEAM_BLUE; + } else { + player.team = TEAM_RED; + } + if !instance_exists(Balancer) instance_create(x,y,Balancer); + Balancer.name=player.name; + with (Balancer) notice=1; + } + break; + + case PLAYER_CHANGETEAM: + receiveCompleteMessage(global.serverSocket,2,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + if(player.object != -1) { + with(player.object) { + instance_destroy(); + } + player.object = -1; + } + player.team = read_ubyte(global.tempBuffer); + break; + + case PLAYER_CHANGECLASS: + receiveCompleteMessage(global.serverSocket,2,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + if(player.object != -1) { + with(player.object) { + instance_destroy(); + } + player.object = -1; + } + player.class = read_ubyte(global.tempBuffer); + break; + + case PLAYER_CHANGENAME: + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + player.name = receivestring(global.serverSocket, 1); + if player=global.myself { + global.playerName=player.name + } + break; + + case PLAYER_SPAWN: + receiveCompleteMessage(global.serverSocket,3,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + doEventSpawn(player, read_ubyte(global.tempBuffer), read_ubyte(global.tempBuffer)); + break; + + case CHAT_BUBBLE: + var bubbleImage; + receiveCompleteMessage(global.serverSocket,2,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + setChatBubble(player, read_ubyte(global.tempBuffer)); + break; + + case BUILD_SENTRY: + receiveCompleteMessage(global.serverSocket,6,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + buildSentry(player, read_ushort(global.tempBuffer)/5, read_ushort(global.tempBuffer)/5, read_byte(global.tempBuffer)); + break; + + case DESTROY_SENTRY: + receiveCompleteMessage(global.serverSocket,4,global.tempBuffer); + playerID = read_ubyte(global.tempBuffer); + otherPlayerID = read_ubyte(global.tempBuffer); + assistantPlayerID = read_ubyte(global.tempBuffer); + causeOfDeath = read_ubyte(global.tempBuffer); + + player = ds_list_find_value(global.players, playerID); + if(otherPlayerID == 255) { + doEventDestruction(player, noone, noone, causeOfDeath); + } else { + otherPlayer = ds_list_find_value(global.players, otherPlayerID); + if (assistantPlayerID == 255) { + doEventDestruction(player, otherPlayer, noone, causeOfDeath); + } else { + assistantPlayer = ds_list_find_value(global.players, assistantPlayerID); + doEventDestruction(player, otherPlayer, assistantPlayer, causeOfDeath); + } + } + break; + + case GRAB_INTEL: + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + doEventGrabIntel(player); + break; + + case SCORE_INTEL: + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + doEventScoreIntel(player); + break; + + case DROP_INTEL: + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + doEventDropIntel(player); + break; + + case RETURN_INTEL: + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + doEventReturnIntel(read_ubyte(global.tempBuffer)); + break; + + case GENERATOR_DESTROY: + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + team = read_ubyte(global.tempBuffer); + doEventGeneratorDestroy(team); + break; + + case UBER_CHARGED: + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + doEventUberReady(player); + break; + + case UBER: + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + doEventUber(player); + break; + + case OMNOMNOMNOM: + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + if(player.object != -1) { + with(player.object) { + omnomnomnom=true; + if(hp < 200) + { + canEat = false; + alarm[6] = eatCooldown; //10 second cooldown + } + if(player.team == TEAM_RED) { + omnomnomnomindex=0; + omnomnomnomend=31; + } else if(player.team==TEAM_BLUE) { + omnomnomnomindex=32; + omnomnomnomend=63; + } + xscale=image_xscale; + } + } + break; + + case TOGGLE_ZOOM: + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + player = ds_list_find_value(global.players, read_ubyte(global.tempBuffer)); + if player.object != -1 { + toggleZoom(player.object); + } + break; + + case PASSWORD_REQUEST: + if(!usePreviousPwd) + global.clientPassword = get_string("Enter Password:", ""); + write_ubyte(global.serverSocket, string_length(global.clientPassword)); + write_string(global.serverSocket, global.clientPassword); + socket_send(global.serverSocket); + break; + + case PASSWORD_WRONG: + show_message("Incorrect Password."); + instance_destroy(); + exit; + + case INCOMPATIBLE_PROTOCOL: + show_message("Incompatible server protocol version."); + instance_destroy(); + exit; + + case KICK: + receiveCompleteMessage(global.serverSocket,1,global.tempBuffer); + reason = read_ubyte(global.tempBuffer); + if reason == KICK_NAME kickReason = "Name Exploit"; + else if reason == KICK_BAD_PLUGIN_PACKET kickReason = "Invalid plugin packet ID"; + else if reason == KICK_MULTI_CLIENT kickReason = "There are too many connections from your IP"; + else kickReason = ""; + show_message("You have been kicked from the server. "+kickReason+"."); + instance_destroy(); + exit; + + case ARENA_STARTROUND: + doEventArenaStartRound(); + break; + + case ARENA_ENDROUND: + with ArenaHUD clientArenaEndRound(); + break; + + case ARENA_RESTART: + doEventArenaRestart(); + break; + + case UNLOCKCP: + doEventUnlockCP(); + break; + + case MAP_END: + global.nextMap=receivestring(global.serverSocket, 1); + receiveCompleteMessage(global.serverSocket,2,global.tempBuffer); + global.winners=read_ubyte(global.tempBuffer); + global.currentMapArea=read_ubyte(global.tempBuffer); + global.mapchanging = true; + if !instance_exists(ScoreTableController) instance_create(0,0,ScoreTableController); + instance_create(0,0,WinBanner); + break; + + case CHANGE_MAP: + roomchange=true; + global.mapchanging = false; + global.currentMap = receivestring(global.serverSocket, 1); + global.currentMapMD5 = receivestring(global.serverSocket, 1); + if(global.currentMapMD5 == "") { // if this is an internal map (signified by the lack of an md5) + if(findInternalMapRoom(global.currentMap)) + room_goto_fix(findInternalMapRoom(global.currentMap)); + else + { + show_message("Error:#Server went to invalid internal map: " + global.currentMap + "#Exiting."); + instance_destroy(); + exit; + } + } else { // it's an external map + if(string_pos("/", global.currentMap) != 0 or string_pos("\", global.currentMap) != 0) + { + show_message("Server sent illegal map name: "+global.currentMap); + instance_destroy(); + exit; + } + if(!file_exists("Maps/" + global.currentMap + ".png") or CustomMapGetMapMD5(global.currentMap) != global.currentMapMD5) + { // Reconnect to the server to download the map + var oldReturnRoom; + oldReturnRoom = returnRoom; + returnRoom = DownloadRoom; + if (global.serverPluginsInUse) + noUnloadPlugins = true; + event_perform(ev_destroy,0); + ClientCreate(); + if (global.serverPluginsInUse) + noReloadPlugins = true; + returnRoom = oldReturnRoom; + usePreviousPwd = true; + exit; + } + room_goto_fix(CustomMapRoom); + } + + for(i=0; i. + + Additional permission under GNU GPL version 3 section 7 + If you modify this Program, or any covered work, by linking or combining it with the Game Maker runtime library, + the 39dll library/extension, Hobbel's Download Manager DLL, or modified versions of these libraries, + the licensors of this Program grant you additional permission to convey the resulting work. +*/ +// Downloading code. + +var downloadHandle, url, tmpfile, window_oldshowborder, window_oldfullscreen; +timeLeft = 0; +counter = 0; +AudioControlPlaySong(-1, false); +window_oldshowborder = window_get_showborder(); +window_oldfullscreen = window_get_fullscreen(); +window_set_fullscreen(false); +window_set_showborder(false); + +if(global.updaterBetaChannel) + url = UPDATE_SOURCE_BETA; +else + url = UPDATE_SOURCE; + +tmpfile = temp_directory + "\gg2update.zip"; + +downloadHandle = httpGet(url, -1); + +while(!httpRequestStatus(downloadHandle)) +{ // while download isn't finished + sleep(floor(1000/30)); // sleep for the equivalent of one frame + io_handle(); // this prevents GameMaker from appearing locked-up + httpRequestStep(downloadHandle); + + // check if the user cancelled the download with the esc key + if(keyboard_check(vk_escape)) + { + httpRequestDestroy(downloadHandle); + window_set_showborder(window_oldshowborder); + window_set_fullscreen(window_oldfullscreen); + room_goto_fix(Menu); + exit; + } + + if(counter == 0 || counter mod 60 == 0) + timer = random(359)+1; + draw_sprite(UpdaterBackgroundS,0,0,0); + draw_set_color(c_white); + draw_set_halign(fa_left); + draw_set_valign(fa_center); + minutes=floor(timer/60); + seconds=floor(timer-minutes*60); + draw_text(x,y-20,string(minutes) + " minutes " + string(seconds) + " seconds Remaining..."); + counter+=1; + var progress, size; + progress = httpRequestResponseBodyProgress(downloadHandle); + size = httpRequestResponseBodySize(downloadHandle); + if (size != -1) + { + progressBar = floor((progress/size) * 20); + offset = 3; + for(i=0;i. + + Additional permission under GNU GPL version 3 section 7 + If you modify this Program, or any covered work, by linking or combining it with the Game Maker runtime library, + the 39dll library/extension, Hobbel's Download Manager DLL, or modified versions of these libraries, + the licensors of this Program grant you additional permission to convey the resulting work. +*/ + +xoffset = view_xview[0]; +yoffset = view_yview[0]; +xsize = view_wview[0]; +ysize = view_hview[0]; + +if (distance_to_point(xoffset+xsize/2,yoffset+ysize/2) > 800) + exit; + +var xr, yr; +xr = round(x); +yr = round(y); + +image_alpha = cloakAlpha; + +if (global.myself.team == team and canCloak) + image_alpha = cloakAlpha/2 + 0.5; + +if (invisible) + exit; + +if(stabbing) + image_alpha -= power(currentWeapon.stab.alpha, 2); + +if team == global.myself.team && (player != global.myself || global.showHealthBar == 1){ + draw_set_alpha(1); + draw_healthbar(xr-10, yr-30, xr+10, yr-25,hp*100/maxHp,c_black,c_red,c_green,0,true,true); +} +if(distance_to_point(mouse_x, mouse_y)<25) { + if cloak && team!=global.myself.team exit; + draw_set_alpha(1); + draw_set_halign(fa_center); + draw_set_valign(fa_bottom); + if(team==TEAM_RED) { + draw_set_color(c_red); + } else { + draw_set_color(c_blue); + } + draw_text(xr, yr-35, player.name); + + if(team == global.myself.team && global.showTeammateStats) + { + if(weapons[0] == Medigun) + draw_text(xr,yr+50, "Superburst: " + string(currentWeapon.uberCharge/20) + "%"); + else if(weapons[0] == Shotgun) + draw_text(xr,yr+50, "Nuts 'N' Bolts: " + string(nutsNBolts)); + else if(weapons[0] == Minegun) + draw_text(xr,yr+50, "Lobbed Mines: " + string(currentWeapon.lobbed)); + } +} + +draw_set_alpha(1); +if team == TEAM_RED ubercolour = c_red; +if team == TEAM_BLUE ubercolour = c_blue; + +var sprite, overlaySprite; +if zoomed +{ + if (team == TEAM_RED) + sprite = SniperCrouchRedS; + else + sprite = SniperCrouchBlueS; + overlaySprite = sniperCrouchOverlay; +} +else +{ + sprite = sprite_index; + overlaySprite = overlay; +} + +if (omnomnomnom) +{ + draw_sprite_ext_overlay(omnomnomnomSprite,omnomnomnomOverlay,omnomnomnomindex,xr,yr,image_xscale,image_yscale,image_angle,c_white,1); + if (ubered) + draw_sprite_ext_overlay(omnomnomnomSprite,omnomnomnomOverlay,omnomnomnomindex,xr,yr,image_xscale,image_yscale,image_angle,ubercolour,0.7); +} +else if (taunting) +{ + draw_sprite_ext_overlay(tauntsprite,tauntOverlay,tauntindex,xr,yr,image_xscale,image_yscale,image_angle,c_white,1); + if (ubered) + draw_sprite_ext_overlay(tauntsprite,tauntOverlay,tauntindex,xr,yr,image_xscale,image_yscale,image_angle,ubercolour,0.7); +} +else if (player.humiliated) + draw_sprite_ext(humiliationPoses,floor(animationImage)+humiliationOffset,xr,yr,image_xscale,image_yscale,image_angle,c_white,image_alpha); +else if (!taunting) +{ + if (cloak) + { + if (!ubered) + draw_sprite_ext(sprite,floor(animationImage+animationOffset),xr,yr,image_xscale,image_yscale,image_angle,c_white,image_alpha); + else if (ubered) + { + draw_sprite_ext(sprite,floor(animationImage+animationOffset),xr,yr,image_xscale,image_yscale,image_angle,c_white,1); + draw_sprite_ext(sprite,floor(animationImage+animationOffset),xr,yr,image_xscale,image_yscale,image_angle,ubercolour,0.7); + } + } + else + { + if (!ubered) + draw_sprite_ext_overlay(sprite,overlaySprite,floor(animationImage+animationOffset),xr,yr,image_xscale,image_yscale,image_angle,c_white,image_alpha); + else if (ubered) + { + draw_sprite_ext_overlay(sprite,overlaySprite,floor(animationImage+animationOffset),xr,yr,image_xscale,image_yscale,image_angle,c_white,1); + draw_sprite_ext_overlay(sprite,overlaySprite,floor(animationImage+animationOffset),xr,yr,image_xscale,image_yscale,image_angle,ubercolour,0.7); + } + } +} +if (burnDuration > 0 or burnIntensity > 0) { + for(i = 0; i < numFlames * burnIntensity / maxIntensity; i += 1) + { + draw_sprite_ext(FlameS, alarm[5] + i + random(2), x + flameArray_x[i], y + flameArray_y[i], 1, 1, 0, c_white, burnDuration / maxDuration * 0.71 + 0.35); + } +} + +// Copied from Lorgan's itemserver "angels" with slight modifications +// All credit be upon him +if (demon != -1) +{ + demonX = median(x-40,demonX,x+40); + demonY = median(y-40,demonY,y); + demonOffset += demonDir; + if (abs(demonOffset) > 15) + demonDir *= -1; + + var dir; + if (demonX > x) + dir = -1; + else + dir = 1; + + if (demonFrame > sprite_get_number(demon)) + demonFrame = 0; + + if (stabbing || ubered) + draw_sprite_ext(demon,demonFrame+floor(animationImage)+7*player.team,demonX,demonY+demonOffset,dir*1,1,0,c_white,1); + else + draw_sprite_ext(demon,demonFrame+floor(animationImage)+7*player.team,demonX,demonY+demonOffset,dir*1,1,0,c_white,image_alpha); + + demonFrame += 1; +} diff --git a/samples/Game Maker Language/characterDrawEvent.gml b/samples/Game Maker Language/characterDrawEvent.gml new file mode 100644 index 00000000..6dcd8fcc --- /dev/null +++ b/samples/Game Maker Language/characterDrawEvent.gml @@ -0,0 +1,80 @@ +// Originally from /spelunky/Scripts/Platform Engine/characterDrawEvent.gml in the Spelunky Community Update Project + +/********************************************************************************** + Copyright (c) 2008, 2009 Derek Yu and Mossmouth, LLC + + This file is part of Spelunky. + + You can redistribute and/or modify Spelunky, including its source code, under + the terms of the Spelunky User License. + + Spelunky is distributed in the hope that it will be entertaining and useful, + but WITHOUT WARRANTY. Please see the Spelunky User License for more details. + + The Spelunky User License should be available in "Game Information", which + can be found in the Resource Explorer, or as an external file called COPYING. + If not, please obtain a new copy of Spelunky from + +***********************************************************************************/ + +/* +This event should be placed in the draw event of the platform character. +*/ +//draws the sprite +draw = true; +if (facing == RIGHT) image_xscale = -1; +else image_xscale = 1; + +if (blinkToggle != 1) +{ + if ((state == CLIMBING or (sprite_index == sPExit or sprite_index == sDamselExit or sprite_index == sTunnelExit)) and global.hasJetpack and not whipping) + { + draw_sprite_ext(sprite_index, -1, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha); + //draw_sprite(sprite_index,-1,x,y); + draw_sprite(sJetpackBack,-1,x,y); + draw = false; + } + else if (global.hasJetpack and facing == RIGHT) draw_sprite(sJetpackRight,-1,x-4,y-1); + else if (global.hasJetpack) draw_sprite(sJetpackLeft,-1,x+4,y-1); + if (draw) + { + if (redColor > 0) draw_sprite_ext(sprite_index, -1, x, y, image_xscale, image_yscale, image_angle, make_color_rgb(200 + redColor,0,0), image_alpha); + else draw_sprite_ext(sprite_index, -1, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha); + } + if (facing == RIGHT) + { + if (holdArrow == ARROW_NORM) + { + draw_sprite(sArrowRight, -1, x+4, y+1); + } + else if (holdArrow == ARROW_BOMB) + { + if (holdArrowToggle) draw_sprite(sBombArrowRight, 0, x+4, y+2); + else draw_sprite(sBombArrowRight, 1, x+4, y+2); + } + } + else if (facing == LEFT) + { + if (holdArrow == ARROW_NORM) + { + draw_sprite(sArrowLeft, -1, x-4, y+1); + } + else if (holdArrow == ARROW_BOMB) + { + if (holdArrowToggle) draw_sprite(sBombArrowLeft, 0, x-4, y+2); + else draw_sprite(sBombArrowLeft, 1, x-4, y+2); + } + } +} +/* +if canRun +{ + xOffset=80 + if player=1 + yOffset=120 + else + yOffset=143 + //draw the "flySpeed" bar, which shows how much speed the character has acquired while holding the "run" button + //draw_healthbar(view_xview[0]+224+xOffset,view_yview[0]+432+yOffset,view_xview[0]+400+xOffset,view_yview[0]+450+yOffset,flySpeed,make_color_rgb(0,64,128),c_blue,c_aqua,0,1,1) +} +*/ diff --git a/samples/Game Maker Language/characterStepEvent.gml b/samples/Game Maker Language/characterStepEvent.gml new file mode 100644 index 00000000..7416df80 --- /dev/null +++ b/samples/Game Maker Language/characterStepEvent.gml @@ -0,0 +1,1050 @@ +// Originally from /spelunky/Scripts/Platform Engine/characterStepEvent.gml in the Spelunky Community Update Project + +/********************************************************************************** + Copyright (c) 2008, 2009 Derek Yu and Mossmouth, LLC + + This file is part of Spelunky. + + You can redistribute and/or modify Spelunky, including its source code, under + the terms of the Spelunky User License. + + Spelunky is distributed in the hope that it will be entertaining and useful, + but WITHOUT WARRANTY. Please see the Spelunky User License for more details. + + The Spelunky User License should be available in "Game Information", which + can be found in the Resource Explorer, or as an external file called COPYING. + If not, please obtain a new copy of Spelunky from + +***********************************************************************************/ + +/* +This script should be placed in the step event for the platform character. +It updates the keys used by the character, moves all of the solids, moves the +character, sets the sprite index, and sets the animation speed for the sprite. +*/ +hangCountMax = 3; + +////////////////////////////////////// +// KEYS +////////////////////////////////////// + +kLeft = checkLeft(); + +if (kLeft) kLeftPushedSteps += 1; +else kLeftPushedSteps = 0; + +kLeftPressed = checkLeftPressed(); +kLeftReleased = checkLeftReleased(); + +kRight = checkRight(); + +if (kRight) kRightPushedSteps += 1; +else kRightPushedSteps = 0; + +kRightPressed = checkRightPressed(); +kRightReleased = checkRightReleased(); + +kUp = checkUp(); +kDown = checkDown(); + +//key "run" +if canRun + kRun = 0; +// kRun=runKey +else + kRun=0 + +kJump = checkJump(); +kJumpPressed = checkJumpPressed(); +kJumpReleased = checkJumpReleased(); + +if (cantJump > 0) +{ + kJump = 0; + kJumpPressed = 0; + kJumpReleased = 0; + cantJump -= 1; +} +else +{ + if (global.isTunnelMan and + sprite_index == sTunnelAttackL and + !holdItem) + { + kJump = 0; + kJumpPressed = 0; + kJumpReleased = 0; + cantJump -= 1; + } +} + +kAttack = checkAttack(); +kAttackPressed = checkAttackPressed(); +kAttackReleased = checkAttackReleased(); + +kItemPressed = checkItemPressed(); + +xPrev = x; +yPrev = y; + +if (stunned or dead) +{ + kLeft = false; + kLeftPressed = false; + kLeftReleased = false; + kRight = false; + kRightPressed = false; + kRightReleased = false; + kUp = false; + kDown = false; + kJump = false; + kJumpPressed = false; + kJumpReleased = false; + kAttack = false; + kAttackPressed = false; + kAttackReleased = false; + kItemPressed = false; +} + +////////////////////////////////////////// +// Collisions +////////////////////////////////////////// + +colSolidLeft = false; +colSolidRight = false; +colLeft = false; +colRight = false; +colTop = false; +colBot = false; +colLadder = false; +colPlatBot = false; +colPlat = false; +colWaterTop = false; +colIceBot = false; +runKey = false; +if (isCollisionMoveableSolidLeft(1)) colSolidLeft = true; +if (isCollisionMoveableSolidRight(1)) colSolidRight = true; +if (isCollisionLeft(1)) colLeft = true; +if (isCollisionRight(1)) colRight = true; +if (isCollisionTop(1)) colTop = true; +if (isCollisionBottom(1)) colBot = true; +if (isCollisionLadder()) colLadder = true; +if (isCollisionPlatformBottom(1)) colPlatBot = true; +if (isCollisionPlatform()) colPlat = true; +if (isCollisionWaterTop(1)) colWaterTop = true; +if (collision_point(x, y+8, oIce, 0, 0)) colIceBot = true; +if (checkRun()) +{ + runHeld = 100; + runKey = true; +} + +if (checkAttack() and not whipping) +{ + runHeld += 1; + runKey = true; +} + +if (not runKey or (not kLeft and not kRight)) runHeld = 0; + +// allows the character to run left and right +// if state!=DUCKING and state!=LOOKING_UP and state!=CLIMBING +if (state != CLIMBING and state != HANGING) +{ + if (kLeftReleased and approximatelyZero(xVel)) xAcc -= 0.5 + if (kRightReleased and approximatelyZero(xVel)) xAcc += 0.5 + + if (kLeft and not kRight) + { + if (colSolidLeft) + { + // xVel = 3; + if (platformCharacterIs(ON_GROUND) and state != DUCKING) + { + xAcc -= 1; + pushTimer += 10; + //if (not SS_IsSoundPlaying(global.sndPush)) playSound(global.sndPush); + } + } + else if (kLeftPushedSteps > 2) and (facing=LEFT or approximatelyZero(xVel)) + { + xAcc -= runAcc; + } + facing = LEFT; + //if (platformCharacterIs(ON_GROUND) and abs(xVel) > 0 and alarm[3] < 1) alarm[3] = floor(16/-xVel); + } + + if (kRight and not kLeft) + { + if (colSolidRight) + { + // xVel = 3; + if (platformCharacterIs(ON_GROUND) and state != DUCKING) + { + xAcc += 1; + pushTimer += 10; + //if (not SS_IsSoundPlaying(global.sndPush)) playSound(global.sndPush); + } + } + else if (kRightPushedSteps > 2 or colSolidLeft) and (facing=RIGHT or approximatelyZero(xVel)) + { + xAcc += runAcc; + } + facing = RIGHT; + //if (platformCharacterIs(ON_GROUND) and abs(xVel) > 0 and alarm[3] < 1) alarm[3] = floor(16/xVel); + } +} + +/****************************************** + + LADDERS + +*******************************************/ + +if (state == CLIMBING) +{ + if (instance_exists(oCape)) + { + oCape.open = false; + } + kJumped = false; + ladderTimer = 10; + ladder = collision_point(x, y, oLadder, 0, 0); + if (ladder) x = ladder.x + 8; + + if (kLeft) facing = LEFT; + else if (kRight) facing = RIGHT; + if (kUp) + { + if (collision_point(x, y-8, oLadder, 0, 0) or collision_point(x, y-8, oLadderTop, 0, 0)) + { + yAcc -= climbAcc; + if (alarm[2] < 1) alarm[2] = 8; + } + } + else if (kDown) + { + if (collision_point(x, y+8, oLadder, 0, 0) or collision_point(x, y+8, oLadderTop, 0, 0)) + { + yAcc += climbAcc; + if (alarm[2] < 1) alarm[2] = 8; + } + else + state = FALLING; + if (colBot) state = STANDING; + } + + if (kJumpPressed and not whipping) + { + if (kLeft) + xVel = -departLadderXVel; + else if (kRight) + xVel = departLadderXVel; + else + xVel = 0; + yAcc += departLadderYVel; + state = JUMPING; + jumpButtonReleased = 0; + jumpTime = 0; + ladderTimer = 5; + } +} +else +{ + if (ladderTimer > 0) ladderTimer -= 1; +} + +if (platformCharacterIs(IN_AIR) and state != HANGING) +{ + yAcc += gravityIntensity; +} + +// Player has landed +if ((colBot or colPlatBot) and platformCharacterIs(IN_AIR) and yVel >= 0) +{ + if (not colPlat or colBot) + { + yVel = 0; + yAcc = 0; + state = RUNNING; + jumps = 0; + } + //playSound(global.sndLand); +} +if ((colBot or colPlatBot) and not colPlat) yVel = 0; + +// Player has just walked off of the edge of a solid +if (colBot == 0 and (not colPlatBot or colPlat) and platformCharacterIs(ON_GROUND)) +{ + state = FALLING; + yAcc += grav; + kJumped = true; + if (global.hasGloves) hangCount = 5; +} + +if (colTop) +{ + if (dead or stunned) yVel = -yVel * 0.8; + else if (state == JUMPING) yVel = abs(yVel*0.3) +} + +if (colLeft and facing == LEFT) or (colRight and facing == RIGHT) +{ + if (dead or stunned) xVel = -xVel * 0.5; + else xVel = 0; +} + +/****************************************** + + JUMPING + +*******************************************/ + +if (kJumpReleased and platformCharacterIs(IN_AIR)) +{ + kJumped = true; +} +else if (platformCharacterIs(ON_GROUND)) +{ + oCape.open = false; + kJumped = false; +} + +if (kJumpPressed and collision_point(x, y, oWeb, 0, 0)) +{ + obj = instance_place(x, y, oWeb); + obj.life -= 1; + yAcc += initialJumpAcc * 2; + yVel -= 3; + xAcc += xVel/2; + + state = JUMPING; + jumpButtonReleased = 0; + jumpTime = 0; + + grav = gravNorm; +} +else if (kJumpPressed and colWaterTop) +{ + yAcc += initialJumpAcc * 2; + yVel -= 3; + xAcc += xVel/2; + + state = JUMPING; + jumpButtonReleased = 0; + jumpTime = 0; + + grav = gravNorm; +} +else if (global.hasCape and kJumpPressed and kJumped and platformCharacterIs(IN_AIR)) +{ + if (not oCape.open) oCape.open = true; + else oCape.open = false; +} +else if (global.hasJetpack and kJump and kJumped and platformCharacterIs(IN_AIR) and jetpackFuel > 0) +{ + yAcc += initialJumpAcc; + yVel = -1; + jetpackFuel -= 1; + if (alarm[10] < 1) alarm[10] = 3; + + state = JUMPING; + jumpButtonReleased = 0; + jumpTime = 0; + + grav = 0; +} +else if (platformCharacterIs(ON_GROUND) and kJumpPressed and fallTimer == 0) +{ + if (xVel > 3 or xVel < -3) + { + yAcc += initialJumpAcc * 2; + xAcc += xVel * 2; + } + else + { + yAcc += initialJumpAcc * 2; + xAcc += xVel/2; + } + + if (global.hasJordans) + { + yAcc *= 3; + yAccLimit = 12; + grav = 0.5; + } + else if (global.hasSpringShoes) yAcc *= 1.5; + else + { + yAccLimit = 6; + grav = gravNorm; + } + + playSound(global.sndJump); + + pushTimer = 0; + + // the "state" gets changed to JUMPING later on in the code + state = FALLING; + // "variable jumping" states + jumpButtonReleased = 0; + jumpTime = 0; +} + +if (jumpTime < jumpTimeTotal) jumpTime += 1; +//let the character continue to jump +if (kJump == 0) jumpButtonReleased = 1; +if (jumpButtonReleased) jumpTime = jumpTimeTotal; + +gravityIntensity = (jumpTime/jumpTimeTotal) * grav; + +if (kUp and platformCharacterIs(ON_GROUND) and not colLadder) +{ + looking = UP; + if (xVel == 0 and xAcc == 0) state = LOOKING_UP; +} +else looking = 0; + +if (not kUp and state == LOOKING_UP) +{ + state=STANDING +} + +/****************************************** + + HANGING + +*******************************************/ + +if (not colTop) +{ +if (global.hasGloves and yVel > 0) +{ + if (hangCount == 0 and y > 16 and !platformCharacterIs(ON_GROUND) and kRight and colRight and + (collision_point(x+9, y-5, oSolid, 0, 0) or collision_point(x+9, y-6, oSolid, 0, 0))) + { + state = HANGING; + move_snap(1, 8); + yVel = 0; + yAcc = 0; + grav = 0; + } + else if (hangCount == 0 and y > 16 and !platformCharacterIs(ON_GROUND) and kLeft and colLeft and + (collision_point(x-9, y-5, oSolid, 0, 0) or collision_point(x-9, y-6, oSolid, 0, 0))) + { + state = HANGING; + move_snap(1, 8); + yVel = 0; + yAcc = 0; + grav = 0; + } +} +else if (hangCount == 0 and y > 16 and !platformCharacterIs(ON_GROUND) and kRight and colRight and + (collision_point(x+9, y-5, oTree, 0, 0) or collision_point(x+9, y-6, oTree, 0, 0))) +{ + state = HANGING; + move_snap(1, 8); + yVel = 0; + yAcc = 0; + grav = 0; +} +else if (hangCount == 0 and y > 16 and !platformCharacterIs(ON_GROUND) and kLeft and colLeft and + (collision_point(x-9, y-5, oTree, 0, 0) or collision_point(x-9, y-6, oTree, 0, 0))) +{ + state = HANGING; + move_snap(1, 8); + yVel = 0; + yAcc = 0; + grav = 0; +} +else if (hangCount == 0 and y > 16 and !platformCharacterIs(ON_GROUND) and kRight and colRight and + (collision_point(x+9, y-5, oSolid, 0, 0) or collision_point(x+9, y-6, oSolid, 0, 0)) and + not collision_point(x+9, y-9, oSolid, 0, 0) and not collision_point(x, y+9, oSolid, 0, 0)) +{ + state = HANGING; + move_snap(1, 8); + yVel = 0; + yAcc = 0; + grav = 0; +} +else if (hangCount == 0 and y > 16 and !platformCharacterIs(ON_GROUND) and kLeft and colLeft and + (collision_point(x-9, y-5, oSolid, 0, 0) or collision_point(x-9, y-6, oSolid, 0, 0)) and + not collision_point(x-9, y-9, oSolid, 0, 0) and not collision_point(x, y+9, oSolid, 0, 0)) +{ + state = HANGING; + move_snap(1, 8); + yVel = 0; + yAcc = 0; + grav = 0; +} + +if (hangCount == 0 and y > 16 and !platformCharacterIs(ON_GROUND) and state == FALLING and + (collision_point(x, y-5, oArrow, 0, 0) or collision_point(x, y-6, oArrow, 0, 0)) and + not collision_point(x, y-9, oArrow, 0, 0) and not collision_point(x, y+9, oArrow, 0, 0)) +{ + obj = instance_nearest(x, y-5, oArrow); + if (obj.stuck) + { + state = HANGING; + // move_snap(1, 8); + yVel = 0; + yAcc = 0; + grav = 0; + } +} + +/* +if (hangCount == 0 and y > 16 and !platformCharacterIs(ON_GROUND) and state == FALLING and + (collision_point(x, y-5, oTreeBranch, 0, 0) or collision_point(x, y-6, oTreeBranch, 0, 0)) and + not collision_point(x, y-9, oTreeBranch, 0, 0) and not collision_point(x, y+9, oTreeBranch, 0, 0)) +{ + state = HANGING; + // move_snap(1, 8); + yVel = 0; + yAcc = 0; + grav = 0; +} +*/ + +} + +if (hangCount > 0) hangCount -= 1; + +if (state == HANGING) +{ + if (instance_exists(oCape)) oCape.open = false; + kJumped = false; + + if (kDown and kJumpPressed) + { + grav = gravNorm; + state = FALLING; + yAcc -= grav; + hangCount = 5; + if (global.hasGloves) hangCount = 10; + } + else if (kJumpPressed) + { + grav = gravNorm; + if ((facing == RIGHT and kLeft) or (facing == LEFT and kRight)) + { + state = FALLING; + yAcc -= grav; + } + else + { + state = JUMPING; + yAcc += initialJumpAcc * 2; + if (facing == RIGHT) x -= 2; + else x += 2; + } + hangCount = hangCountMax; + } + + if ((facing == LEFT and not isCollisionLeft(2)) or + (facing == RIGHT and not isCollisionRight(2))) + { + grav = gravNorm; + state = FALLING; + yAcc -= grav; + hangCount = 4; + } +} +else +{ + grav = gravNorm; +} + +// pressing down while standing +if (kDown and platformCharacterIs(ON_GROUND) and not whipping) +{ + if (colBot) + { + state = DUCKING; + } + else if colPlatBot + { + // climb down ladder if possible, else jump down + fallTimer = 0; + if (not colBot) + { + ladder = 0; + ladder = instance_place(x, y+16, oLadder); + if (instance_exists(ladder)) + { + if (abs(x-(ladder.x+8)) < 4) + { + x = ladder.x + 8; + + xVel = 0; + yVel = 0; + xAcc = 0; + yAcc = 0; + state = CLIMBING; + } + } + else + { + y += 1; + state = FALLING; + yAcc += grav; + } + } + else + { + //the character can't move down because there is a solid in the way + state = RUNNING; + } + } +} +if (not kDown and state == DUCKING) +{ + state = STANDING; + xVel = 0; + xAcc = 0; +} +if (xVel == 0 and xAcc == 0 and state == RUNNING) +{ + state = STANDING; +} +if (xAcc != 0 and state == STANDING) +{ + state = RUNNING; +} +if (yVel < 0 and platformCharacterIs(IN_AIR) and state != HANGING) +{ + state = JUMPING; +} +if (yVel > 0 and platformCharacterIs(IN_AIR) and state != HANGING) +{ + state = FALLING; + setCollisionBounds(-5, -6, 5, 8); +} +else setCollisionBounds(-5, -8, 5, 8); + +// CLIMB LADDER +colPointLadder = collision_point(x, y, oLadder, 0, 0) or collision_point(x, y, oLadderTop, 0, 0); + +if ((kUp and platformCharacterIs(IN_AIR) and collision_point(x, y-8, oLadder, 0, 0) and ladderTimer == 0) or + (kUp and colPointLadder and ladderTimer == 0) or + (kDown and colPointLadder and ladderTimer == 0 and platformCharacterIs(ON_GROUND) and collision_point(x, y+9, oLadderTop, 0, 0) and xVel == 0)) +{ + ladder = 0; + ladder = instance_place(x, y-8, oLadder); + if (instance_exists(ladder)) + { + if (abs(x-(ladder.x+8)) < 4) + { + x = ladder.x + 8; + if (not collision_point(x, y, oLadder, 0, 0) and + not collision_point(x, y, oLadderTop, 0, 0)) + { + y = ladder.y + 14; + } + + xVel = 0; + yVel = 0; + xAcc = 0; + yAcc = 0; + state = CLIMBING; + } + } +} + +/* +if (sprite_index == sDuckToHangL or sprite_index == sDamselDtHL) +{ + ladder = 0; + if (facing == LEFT and collision_rectangle(x-8, y, x, y+16, oLadder, 0, 0) and not collision_point(x-4, y+16, oSolid, 0, 0)) + { + ladder = instance_nearest(x-4, y+16, oLadder); + } + else if (facing == RIGHT and collision_rectangle(x, y, x+8, y+16, oLadder, 0, 0) and not collision_point(x+4, y+16, oSolid, 0, 0)) + { + ladder = instance_nearest(x+4, y+16, oLadder); + } + + if (ladder) + { + x = ladder.x + 8; + + xVel = 0; + yVel = 0; + xAcc = 0; + yAcc = 0; + state = CLIMBING; + } +} +*/ +/* +if (colLadder and state == CLIMBING and kJumpPressed and not whipping) +{ + if (kLeft) + xVel = -departLadderXVel; + else if (kRight) + xVel = departLadderXVel; + else + xVel = 0; + yAcc += departLadderYVel; + state = JUMPING; + jumpButtonReleased = 0; + jumpTime = 0; + ladderTimer = 5; +} +*/ + +// Calculate horizontal/vertical friction +if (state == CLIMBING) +{ + xFric = frictionClimbingX; + yFric = frictionClimbingY; +} +else +{ + if (runKey and platformCharacterIs(ON_GROUND) and runHeld >= 10) + { + if (kLeft) // run + { + xVel -= 0.1; + xVelLimit = 6; + xFric = frictionRunningFastX; + } + else if (kRight) + { + xVel += 0.1; + xVelLimit = 6; + xFric = frictionRunningFastX; + } + } + else if (state == DUCKING) + { + if (xVel<2 and xVel>-2) + { + xFric = 0.2 + xVelLimit = 3; + image_speed = 0.8; + } + else if (kLeft and global.downToRun) // run + { + xVel -= 0.1; + xVelLimit = 6; + xFric = frictionRunningFastX; + } + else if (kRight and global.downToRun) + { + xVel += 0.1; + xVelLimit = 6; + xFric = frictionRunningFastX; + } + else + { + xVel *= 0.8; + if (xVel < 0.5) xVel = 0; + xFric = 0.2 + xVelLimit = 3; + image_speed = 0.8; + } + } + else + { + //decrease the friction when the character is "flying" + if (platformCharacterIs(IN_AIR)) + { + if (dead or stunned) xFric = 1.0; + else xFric = 0.8; + } + else + { + xFric = frictionRunningX; + } + } + + // Stuck on web or underwater + if (collision_point(x, y, oWeb, 0, 0)) + { + xFric = 0.2; + yFric = 0.2; + fallTimer = 0; + } + else if (collision_point(x, y, oWater, -1, -1)) + { + if (instance_exists(oCape)) oCape.open = false; + + if (state == FALLING and yVel > 0) + { + yFric = 0.5; + } + else if (not collision_point(x, y-9, oWater, -1, -1)) + { + yFric = 1; + } + else + { + yFric = 0.9; + } + } + else + { + swimming = false; + yFric = 1; + } +} + +if (colIceBot and state != DUCKING and not global.hasSpikeShoes) +{ + xFric = 0.98; + yFric = 1; +} + +// RUNNING + +if (platformCharacterIs(ON_GROUND)) +{ + if (state == RUNNING and kLeft and colLeft) + { + pushTimer += 1; + } + else if (state == RUNNING and kRight and colRight) + { + pushTimer += 1; + } + else + { + pushTimer = 0; + } + + if (platformCharacterIs(ON_GROUND) and not kJump and not kDown and not runKey) + { + xVelLimit = 3; + } + + + // ledge flip + if (state == DUCKING and abs(xVel) < 3 and facing == LEFT and + collision_point(x, y+9, oSolid, 0, 0) and not collision_line(x-1, y+9, x-10, y+9, oSolid, 0, 0) and kLeft) + { + state = DUCKTOHANG; + + if (holdItem) + { + holdItem.held = false; + if (holdItem.type == "Gold Idol") holdItem.y -= 8; + scrDropItem(-1, -4); + } + + with oMonkey + { + // knock off monkeys that grabbed you + if (status == 7) + { + xVel = -1; + yVel = -4; + status = 1; + vineCounter = 20; + grabCounter = 60; + } + } + } + else if (state == DUCKING and abs(xVel) < 3 and facing == RIGHT and + collision_point(x, y+9, oSolid, 0, 0) and not collision_line(x+1, y+9, x+10, y+9, oSolid, 0, 0) and kRight) + { + state = DUCKTOHANG; + + if (holdItem) + { + // holdItem.held = false; + if (holdItem.type == "Gold Idol") holdItem.y -= 8; + scrDropItem(1, -4); + } + + with oMonkey + { + // knock off monkeys that grabbed you + if (status == 7) + { + xVel = 1; + yVel = -4; + status = 1; + vineCounter = 20; + grabCounter = 60; + } + } + } +} + +if (state == DUCKTOHANG) +{ + x = xPrev; + y = yPrev; + xVel = 0; + yVel = 0; + xAcc = 0; + yAcc = 0; + grav = 0; +} + +// PARACHUTE AND CAPE +if (instance_exists(oParachute)) +{ + yFric = 0.5; +} +if (instance_exists(oCape)) +{ + if (oCape.open) yFric = 0.5; +} + +if (pushTimer > 100) pushTimer = 100; + +// limits the acceleration if it is too extreme +if (xAcc > xAccLimit) xAcc = xAccLimit; +else if (xAcc < -xAccLimit) xAcc = -xAccLimit; +if (yAcc > yAccLimit) yAcc = yAccLimit; +else if (yAcc < -yAccLimit) yAcc = -yAccLimit; + +// applies the acceleration +xVel += xAcc; +if (dead or stunned) yVel += 0.6; +else yVel += yAcc; + +// nullifies the acceleration +xAcc = 0; +yAcc = 0; + +// applies the friction to the velocity, now that the velocity has been calculated +xVel *= xFric; +yVel *= yFric; + +// apply ball and chain +if (instance_exists(oBall)) +{ + if (distance_to_object(oBall) >= 24) + { + if (xVel > 0 and oBall.x < x and abs(oBall.x-x) > 24) xVel = 0; + if (xVel < 0 and oBall.x > x and abs(oBall.x-x) > 24) xVel = 0; + if (yVel > 0 and oBall.y < y and abs(oBall.y-y) > 24) + { + if (abs(oBall.x-x) < 1) + { + x = oBall.x; + } + else if (oBall.x < x and not kRight) + { + if (xVel > 0) xVel *= -0.25; + else if (xVel == 0) xVel -= 1; + } + else if (oBall.x > x and not kLeft) + { + if (xVel < 0) xVel *= -0.25; + else if (xVel == 0) xVel += 1; + } + yVel = 0; + fallTimer = 0; + } + if (yVel < 0 and oBall.y > y and abs(oBall.y-y) > 24) yVel = 0; + } +} + +// apply the limits since the velocity may be too extreme +if (not dead and not stunned) +{ + if (xVel > xVelLimit) xVel = xVelLimit; + else if (xVel < -xVelLimit) xVel = -xVelLimit; +} +if (yVel > yVelLimit) yVel = yVelLimit; +else if (yVel < -yVelLimit) yVel = -yVelLimit; + +// approximates the "active" variables +if approximatelyZero(xVel) xVel=0 +if approximatelyZero(yVel) yVel=0 +if approximatelyZero(xAcc) xAcc=0 +if approximatelyZero(yAcc) yAcc=0 + +// prepares the character to move up a hill +// we need to use the "slopeYPrev" variable later to know the "true" y previous value +// keep this condition the same +if maxSlope>0 and platformCharacterIs(ON_GROUND) and xVel!=0 +{ + slopeYPrev=y + for(y=y;y>=slopeYPrev-maxSlope;y-=1) + if colTop + break + slopeChangeInY=slopeYPrev-y +} +else + slopeChangeInY=0 + +// moves the character, and balances out the effects caused by other processes +// keep this condition the same +if maxSlope*abs(xVel)>0 and platformCharacterIs(ON_GROUND) +{ + // we need to check if we should dampen out the speed as the character runs on upward slopes + xPrev=x + yPrev=slopeYPrev // we don't want to use y, because y is too high + yPrevHigh=y // we'll use the higher previous variable later + moveTo(xVel,yVel+slopeChangeInY) + dist=point_distance(xPrev,yPrev,x,y)// overall distance that has been traveled + // we should have only ran at xVel + if dist>abs(xVelInteger) + { + // show_message(string(dist)+ " "+string(abs(xVelInteger))) + excess=dist-abs(xVelInteger) + if(xVelInteger<0) + excess*=-1 + // move back since the character moved too far + x=xPrev + y=yPrevHigh // we need the character to be high so the character can move down + // this time we'll move the correct distance, but we need to shorten out the xVel a little + // these lines can be changed for different types of slowing down when running up hills + ratio=abs(xVelInteger)/dist*0.9 //can be changed + moveTo( round(xVelInteger*ratio),round(yVelInteger*ratio+slopeChangeInY) ) + } +} +else +{ + // we simply move xVel and yVel while in the air or on a ladder + moveTo(xVel,yVel) +} +// move the character downhill if possible +// we need to multiply maxDownSlope by the absolute value of xVel since the character normally runs at an xVel larger than 1 +if not colBot and maxDownSlope>0 and xVelInteger!=0 and platformCharacterIs(ON_GROUND) +{ + //the character is floating just above the slope, so move the character down + upYPrev=y + for(y=y;y<=upYPrev+maxDownSlope;y+=1) + if colBot // we hit a solid below + { + upYPrev=y // I know that this doesn't seem to make sense, because of the name of the variable, but it all works out correctly after we break out of this loop + break + } + y=upYPrev +} + +//figures out what the sprite index of the character should be +characterSprite(); + +//sets the previous state and the previously previous state +statePrevPrev = statePrev; +statePrev = state; + +//calculates the image_speed based on the character's velocity +if (state == RUNNING or state == DUCKING or state == LOOKING_UP) +{ + if (state == RUNNING or state == LOOKING_UP) image_speed = abs(xVel) * runAnimSpeed + 0.1; +} + +if (state == CLIMBING) image_speed = sqrt(sqr(abs(xVel))+sqr(abs(yVel))) * climbAnimSpeed +if (xVel >= 4 or xVel <= -4) +{ + image_speed = 1; + if (platformCharacterIs(ON_GROUND)) setCollisionBounds(-8, -8, 8, 8); + else setCollisionBounds(-5, -8, 5, 8); +} +else setCollisionBounds(-5, -8, 5, 8); +if (whipping) image_speed = 1; +if (state == DUCKTOHANG) +{ + image_index = 0; + image_speed = 0.8; +} +//limit the image_speed at 1 so the animation always looks good +if (image_speed > 1) image_speed = 1; diff --git a/samples/Game Maker Language/doEventPlayerDeath.gml b/samples/Game Maker Language/doEventPlayerDeath.gml new file mode 100644 index 00000000..47ee7780 --- /dev/null +++ b/samples/Game Maker Language/doEventPlayerDeath.gml @@ -0,0 +1,251 @@ +/* + Originally from /Source/gg2/Scripts/Events/doEventPlayerDeath.gml in Gang Garrison 2 + + Copyright (C) 2008-2013 Faucet Software + http://www.ganggarrison.com + + This program is free software; + you can redistribute it and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 3 of the License, or (at your option) + any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License along with this program; if not, + see . + + Additional permission under GNU GPL version 3 section 7 + If you modify this Program, or any covered work, by linking or combining it with the Game Maker runtime library, + the 39dll library/extension, Hobbel's Download Manager DLL, or modified versions of these libraries, + the licensors of this Program grant you additional permission to convey the resulting work. +*/ + +/** + * Perform the "player death" event, i.e. change the appropriate scores, + * destroy the character object to much splattering and so on. + * + * argument0: The player whose character died + * argument1: The player who inflicted the fatal damage (or noone for unknown) + * argument2: The player who assisted the kill (or noone for no assist) + * argument3: The source of the fatal damage + */ +var victim, killer, assistant, damageSource; +victim = argument0; +killer = argument1; +assistant = argument2; +damageSource = argument3; + +if(!instance_exists(killer)) + killer = noone; + +if(!instance_exists(assistant)) + assistant = noone; + +//************************************* +//* Scoring and Kill log +//************************************* + + +recordKillInLog(victim, killer, assistant, damageSource); + +victim.stats[DEATHS] += 1; +if(killer) +{ + if(damageSource == WEAPON_KNIFE || damageSource == WEAPON_BACKSTAB) + { + killer.stats[STABS] += 1; + killer.roundStats[STABS] += 1; + killer.stats[POINTS] += 1; + killer.roundStats[POINTS] +=1; + } + + if (victim.object.currentWeapon.object_index == Medigun) + { + if (victim.object.currentWeapon.uberReady) + { + killer.stats[BONUS] += 1; + killer.roundStats[BONUS] += 1; + killer.stats[POINTS] += 1; + killer.roundStats[POINTS] += 1; + } + } + + if (killer != victim) + { + killer.stats[KILLS] += 1; + killer.roundStats[KILLS] += 1; + killer.stats[POINTS] += 1; + killer.roundStats[POINTS] += 1; + if(victim.object.intel) + { + killer.stats[DEFENSES] += 1; + killer.roundStats[DEFENSES] += 1; + killer.stats[POINTS] += 1; + killer.roundStats[POINTS] += 1; + recordEventInLog(4, killer.team, killer.name, global.myself == killer); + } + } +} + +if (assistant) +{ + assistant.stats[ASSISTS] += 1; + assistant.roundStats[ASSISTS] += 1; + assistant.stats[POINTS] += .5; + assistant.roundStats[POINTS] += .5; +} + +//SPEC +if (victim == global.myself) + instance_create(victim.object.x, victim.object.y, Spectator); + +//************************************* +//* Gibbing +//************************************* +var xoffset, yoffset, xsize, ysize; + +xoffset = view_xview[0]; +yoffset = view_yview[0]; +xsize = view_wview[0]; +ysize = view_hview[0]; + +randomize(); +with(victim.object) { + if((damageSource == WEAPON_ROCKETLAUNCHER + or damageSource == WEAPON_MINEGUN or damageSource == FRAG_BOX + or damageSource == WEAPON_REFLECTED_STICKY or damageSource == WEAPON_REFLECTED_ROCKET + or damageSource == FINISHED_OFF_GIB or damageSource == GENERATOR_EXPLOSION) + and (player.class != CLASS_QUOTE) and (global.gibLevel>1) + and distance_to_point(xoffset+xsize/2,yoffset+ysize/2) < 900) { + if (hasReward(victim, 'PumpkinGibs')) + { + repeat(global.gibLevel * 2) { + createGib(x,y,PumpkinGib,hspeed,vspeed,random(145)-72, choose(0,1,1,2,2,3), false, true) + } + } + else + { + repeat(global.gibLevel) { + createGib(x,y,Gib,hspeed,vspeed,random(145)-72, 0, false) + } + switch(player.team) + { + case TEAM_BLUE : + repeat(global.gibLevel - 1) { + createGib(x,y,BlueClump,hspeed,vspeed,random(145)-72, 0, false) + } + break; + case TEAM_RED : + repeat(global.gibLevel - 1) { + createGib(x,y,RedClump,hspeed,vspeed,random(145)-72, 0, false) + } + break; + } + } + + repeat(global.gibLevel * 14) { + var blood; + blood = instance_create(x+random(23)-11,y+random(23)-11,BloodDrop); + blood.hspeed=(random(21)-10); + blood.vspeed=(random(21)-13); + if (hasReward(victim, 'PumpkinGibs')) + { + blood.sprite_index = PumpkinJuiceS; + } + } + if (!hasReward(victim, 'PumpkinGibs')) + { + //All Classes gib head, hands, and feet + if(global.gibLevel > 2 || choose(0,1) == 1) + createGib(x,y,Headgib,0,0,random(105)-52, player.class, false); + repeat(global.gibLevel -1){ + //Medic has specially colored hands + if (player.class == CLASS_MEDIC){ + if (player.team == TEAM_RED) + createGib(x,y,Hand, hspeed, vspeed, random(105)-52 , 9, false); + else + createGib(x,y,Hand, hspeed, vspeed, random(105)-52 , 10, false); + }else{ + createGib(x,y,Hand, hspeed, vspeed, random(105)-52 , player.class, false); + } + createGib(x,y,Feet,random(5)-2,random(3),random(13)-6 , player.class, true); + } + } + + //Class specific gibs + switch(player.class) { + case CLASS_PYRO : + if(global.gibLevel > 2 || choose(0,1) == 1) + createGib(x,y,Accesory,hspeed,vspeed,random(105)-52, 4, false) + break; + case CLASS_SOLDIER : + if(global.gibLevel > 2 || choose(0,1) == 1){ + switch(player.team) { + case TEAM_BLUE : + createGib(x,y,Accesory,hspeed,vspeed,random(105)-52, 2, false); + break; + case TEAM_RED : + createGib(x,y,Accesory,hspeed,vspeed,random(105)-52, 1, false); + break; + } + } + break; + case CLASS_ENGINEER : + if(global.gibLevel > 2 || choose(0,1) == 1) + createGib(x,y,Accesory,hspeed,vspeed,random(105)-52, 3, false) + break; + case CLASS_SNIPER : + if(global.gibLevel > 2 || choose(0,1) == 1) + createGib(x,y,Accesory,hspeed,vspeed,random(105)-52, 0, false) + break; + } + playsound(x,y,Gibbing); + } else { + var deadbody; + if player.class != CLASS_QUOTE playsound(x,y,choose(DeathSnd1, DeathSnd2)); + deadbody = instance_create(x,y-30,DeadGuy); + // 'GS' reward - *G*olden *S*tatue + if(hasReward(player, 'GS')) + { + deadbody.sprite_index = haxxyStatue; + deadbody.image_index = 0; + } + else + { + deadbody.sprite_index = sprite_index; + deadbody.image_index = CHARACTER_ANIMATION_DEAD; + } + deadbody.hspeed=hspeed; + deadbody.vspeed=vspeed; + if(hspeed>0) { + deadbody.image_xscale = -1; + } + } +} + +if (global.gg_birthday){ + myHat = instance_create(victim.object.x,victim.object.y,PartyHat); + myHat.image_index = victim.team; +} +if (global.xmas){ + myHat = instance_create(victim.object.x,victim.object.y,XmasHat); + myHat.image_index = victim.team; +} + + +with(victim.object) { + instance_destroy(); +} + +//************************************* +//* Deathcam +//************************************* +if( global.killCam and victim == global.myself and killer and killer != victim and !(damageSource == KILL_BOX || damageSource == FRAG_BOX || damageSource == FINISHED_OFF || damageSource == FINISHED_OFF_GIB || damageSource == GENERATOR_EXPLOSION)) { + instance_create(0,0,DeathCam); + DeathCam.killedby=killer; + DeathCam.name=killer.name; + DeathCam.oldxview=view_xview[0]; + DeathCam.oldyview=view_yview[0]; + DeathCam.lastDamageSource=damageSource; + DeathCam.team = global.myself.team; +} diff --git a/samples/Game Maker Language/faucet-http.gml b/samples/Game Maker Language/faucet-http.gml new file mode 100644 index 00000000..c9b4d0f5 --- /dev/null +++ b/samples/Game Maker Language/faucet-http.gml @@ -0,0 +1,1469 @@ +#define __http_init +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Creates global.__HttpClient +// real __http_init() + +global.__HttpClient = object_add(); +object_set_persistent(global.__HttpClient, true); + +#define __http_split +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// real __http_split(string text, delimeter delimeter, real limit) +// Splits string into items + +// text - string comma-separated values +// delimeter - delimeter to split by +// limit if non-zero, maximum times to split text +// When limited, the remaining text will be left as the last item. +// E.g. splitting "1,2,3,4,5" with delimeter "," and limit 2 yields this list: +// "1", "2", "3,4,5" + +// return value - ds_list containing strings of values + +var text, delimeter, limit; +text = argument0; +delimeter = argument1; +limit = argument2; + +var list, count; +list = ds_list_create(); +count = 0; + +while (string_pos(delimeter, text) != 0) +{ + ds_list_add(list, string_copy(text, 1, string_pos(delimeter,text) - 1)); + text = string_copy(text, string_pos(delimeter, text) + string_length(delimeter), string_length(text) - string_pos(delimeter, text)); + + count += 1; + if (limit and count == limit) + break; +} +ds_list_add(list, text); + +return list; + +#define __http_parse_url +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Parses a URL into its components +// real __http_parse_url(string url) + +// Return value is a ds_map containing keys for the different URL parts: (or -1 on failure) +// "url" - the URL which was passed in +// "scheme" - the URL scheme (e.g. "http") +// "host" - the hostname (e.g. "example.com" or "127.0.0.1") +// "port" - the port (e.g. 8000) - this is a real, unlike the others +// "abs_path" - the absolute path (e.g. "/" or "/index.html") +// "query" - the query string (e.g. "a=b&c=3") +// Parts which are not included will not be in the map +// e.g. http://example.com will not have the "port", "path" or "query" keys + +// This will *only* work properly for URLs of format: +// scheme ":" "//" host [ ":" port ] [ abs_path [ "?" query ]]" +// where [] denotes an optional component +// file: URLs will *not* work as they lack the authority (host:port) component +// It will not work correctly for IPv6 host values + +var url; +url = argument0; + +var map; +map = ds_map_create(); +ds_map_add(map, 'url', url); + +// before scheme +var colonPos; +// Find colon for end of scheme +colonPos = string_pos(':', url); +// No colon - bad URL +if (colonPos == 0) + return -1; +ds_map_add(map, 'scheme', string_copy(url, 1, colonPos - 1)); +url = string_copy(url, colonPos + 1, string_length(url) - colonPos); + +// before double slash +// remove slashes (yes this will screw up file:// but who cares) +while (string_char_at(url, 1) == '/') + url = string_copy(url, 2, string_length(url) - 1); + +// before hostname +var slashPos, colonPos; +// Find slash for beginning of path +slashPos = string_pos('/', url); +// No slash ahead - http://host format with no ending slash +if (slashPos == 0) +{ + // Find : for beginning of port + colonPos = string_pos(':', url); +} +else +{ + // Find : for beginning of port prior to / + colonPos = string_pos(':', string_copy(url, 1, slashPos - 1)); +} +// No colon - no port +if (colonPos == 0) +{ + // There was no slash + if (slashPos == 0) + { + ds_map_add(map, 'host', url); + return map; + } + // There was a slash + else + { + ds_map_add(map, 'host', string_copy(url, 1, slashPos - 1)); + url = string_copy(url, slashPos, string_length(url) - slashPos + 1); + } +} +// There's a colon - port specified +else +{ + // There was no slash + if (slashPos == 0) + { + ds_map_add(map, 'host', string_copy(url, 1, colonPos - 1)); + ds_map_add(map, 'port', real(string_copy(url, colonPos + 1, string_length(url) - colonPos))); + return map; + } + // There was a slash + else + { + ds_map_add(map, 'host', string_copy(url, 1, colonPos - 1)); + url = string_copy(url, colonPos + 1, string_length(url) - colonPos); + slashPos = string_pos('/', url); + ds_map_add(map, 'port', real(string_copy(url, 1, slashPos - 1))); + url = string_copy(url, slashPos, string_length(url) - slashPos + 1); + } +} + +// before path +var queryPos; +queryPos = string_pos('?', url); +// There's no ? - no query +if (queryPos == 0) +{ + ds_map_add(map, 'abs_path', url); + return map; +} +else +{ + ds_map_add(map, 'abs_path', string_copy(url, 1, queryPos - 1)); + ds_map_add(map, 'query', string_copy(url, queryPos + 1, string_length(url) - queryPos)); + return map; +} + +// Return -1 upon unlikely error +ds_map_destroy(map); +return -1; + +#define __http_resolve_url +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Takes a base URL and a URL reference and applies it to the base URL +// Returns resulting absolute URL +// string __http_resolve_url(string baseUrl, string refUrl) + +// Return value is a string containing the new absolute URL, or "" on failure + +// Works only for restricted URL syntax as understood by by http_resolve_url +// The sole restriction of which is that only scheme://authority/path URLs work +// This notably excludes file: URLs which lack the authority component + +// As described by RFC3986: +// URI-reference = URI / relative-ref +// relative-ref = relative-part [ "?" query ] [ "#" fragment ] +// relative-part = "//" authority path-abempty +// / path-absolute +// / path-noscheme +// / path-empty +// However http_resolve_url does *not* deal with fragments + +// Algorithm based on that of section 5.2.2 of RFC 3986 + +var baseUrl, refUrl; +baseUrl = argument0; +refUrl = argument1; + +// Parse base URL +var urlParts; +urlParts = __http_parse_url(baseUrl); +if (urlParts == -1) + return ''; + +// Try to parse reference URL +var refUrlParts, canParseRefUrl; +refUrlParts = __http_parse_url(refUrl); +canParseRefUrl = (refUrlParts != -1); +if (refUrlParts != -1) + ds_map_destroy(refUrlParts); + +var result; +result = ''; + +// Parsing of reference URL succeeded - it's absolute and we're done +if (canParseRefUrl) +{ + result = refUrl; +} +// Begins with '//' - scheme-relative URL +else if (string_copy(refUrl, 1, 2) == '//' and string_length(refUrl) > 2) +{ + result = ds_map_find_value(urlParts, 'scheme') + ':' + refUrl; +} +// Is or begins with '/' - absolute path relative URL +else if (((string_char_at(refUrl, 1) == '/' and string_length(refUrl) > 1) or refUrl == '/') +// Doesn't begin with ':' and is not blank - relative path relative URL + or (string_char_at(refUrl, 1) != ':' and string_length(refUrl) > 0)) +{ + // Find '?' for query + var queryPos; + queryPos = string_pos('?', refUrl); + // No query + if (queryPos == 0) + { + refUrl = __http_resolve_path(ds_map_find_value(urlParts, 'abs_path'), refUrl); + ds_map_replace(urlParts, 'abs_path', refUrl); + if (ds_map_exists(urlParts, 'query')) + ds_map_delete(urlParts, 'query'); + } + // Query exists, split + else + { + var path, query; + path = string_copy(refUrl, 1, queryPos - 1); + query = string_copy(refUrl, queryPos + 1, string_length(relUrl) - queryPos); + path = __http_resolve_path(ds_map_find_value(urlParts, 'abs_path'), path); + ds_map_replace(urlParts, 'abs_path', path); + if (ds_map_exists(urlParts, 'query')) + ds_map_replace(urlParts, 'query', query); + else + ds_map_add(urlParts, 'query', query); + } + result = __http_construct_url(urlParts); +} + +ds_map_destroy(urlParts); +return result; + +#define __http_resolve_path +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Takes a base path and a path reference and applies it to the base path +// Returns resulting absolute path +// string __http_resolve_path(string basePath, string refPath) + +// Return value is a string containing the new absolute path + +// Deals with UNIX-style / paths, not Windows-style \ paths +// Can be used to clean up .. and . in non-absolute paths too ('' as basePath) + +var basePath, refPath; +basePath = argument0; +refPath = argument1; + +// refPath begins with '/' (is absolute), we can ignore all of basePath +if (string_char_at(refPath, 1) == '/') +{ + basePath = refPath; + refPath = ''; +} + +var parts, refParts; +parts = __http_split(basePath, '/', 0); +refParts = __http_split(refPath, '/', 0); + +if (refPath != '') +{ + // Find last part of base path + var lastPart; + lastPart = ds_list_find_value(parts, ds_list_size(parts) - 1); + + // If it's not blank (points to a file), remove it + if (lastPart != '') + { + ds_list_delete(parts, ds_list_size(parts) - 1); + } + + // Concatenate refParts to end of parts + var i; + for (i = 0; i < ds_list_size(refParts); i += 1) + ds_list_add(parts, ds_list_find_value(refParts, i)); +} + +// We now don't need refParts any more +ds_list_destroy(refParts); + +// Deal with '..' and '.' +for (i = 0; i < ds_list_size(parts); i += 1) +{ + var part; + part = ds_list_find_value(parts, i); + + if (part == '.') + { + if (i == 1 or i == ds_list_size(parts) - 1) + ds_list_replace(parts, i, ''); + else + ds_list_delete(parts, i); + i -= 1; + continue; + } + else if (part == '..') + { + if (i > 1) + { + ds_list_delete(parts, i - 1); + ds_list_delete(part, i); + i -= 2; + } + else + { + ds_list_replace(parts, i, ''); + i -= 1; + } + continue; + } + else if (part == '' and i != 0 and i != ds_list_size(parts) - 1) + { + ds_list_delete(parts, i); + i -= 1; + continue; + } +} + +// Reconstruct path from parts +var path; +path = ''; +for (i = 0; i < ds_list_size(parts); i += 1) +{ + if (i != 0) + path += '/'; + path += ds_list_find_value(parts, i); +} + +ds_map_destroy(parts); +return path; + +#define __http_parse_hex +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Takes a lowercase hexadecimal string and returns its integer value +// real __http_parse_hex(string hexString) + +// Return value is the whole number value (or -1 if invalid) +// Only works for whole numbers (non-fractional numbers >= 0) and lowercase hex + +var hexString; +hexString = argument0; + +var result, hexValues; +result = 0; +hexValues = "0123456789abcdef"; + +var i; +for (i = 1; i <= string_length(hexString); i += 1) { + result *= 16; + var digit; + digit = string_pos(string_char_at(hexString, i), hexValues) - 1; + if (digit == -1) + return -1; + result += digit; +} + +return result; + +#define __http_construct_url +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Constructs an URL from its components (as http_parse_url would return) +// string __http_construct_url(real parts) + +// Return value is the string of the constructed URL +// Keys of parts map: +// "scheme" - the URL scheme (e.g. "http") +// "host" - the hostname (e.g. "example.com" or "127.0.0.1") +// "port" - the port (e.g. 8000) - this is a real, unlike the others +// "abs_path" - the absolute path (e.g. "/" or "/index.html") +// "query" - the query string (e.g. "a=b&c=3") +// Parts which are omitted will be omitted in the URL +// e.g. http://example.com lacks "port", "path" or "query" keys + +// This will *only* work properly for URLs of format: +// scheme ":" "//" host [ ":" port ] [ abs_path [ "?" query ]]" +// where [] denotes an optional component +// file: URLs will *not* work as they lack the authority (host:port) component +// Should work correctly for IPv6 host values, but bare in mind parse_url won't + +var parts; +parts = argument0; + +var url; +url = ''; + +url += ds_map_find_value(parts, 'scheme'); +url += '://'; +url += ds_map_find_value(parts, 'host'); +if (ds_map_exists(parts, 'port')) + url += ':' + string(ds_map_find_value(parts, 'port')); +if (ds_map_exists(parts, 'abs_path')) +{ + url += ds_map_find_value(parts, 'abs_path'); + if (ds_map_exists(parts, 'query')) + url += '?' + ds_map_find_value(parts, 'query'); +} + +return url; + +#define __http_prepare_request +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Internal function - prepares request +// void __http_prepare_request(real client, string url, real headers) + +// client - HttpClient object to prepare +// url - URL to send GET request to +// headers - ds_map of extra headers to send, -1 if none + +var client, url, headers; +client = argument0; +url = argument1; +headers = argument2; + +var parsed; +parsed = __http_parse_url(url); + +if (parsed == -1) + show_error("Error when making HTTP GET request - can't parse URL: " + url, true); + +if (!ds_map_exists(parsed, 'port')) + ds_map_add(parsed, 'port', 80); +if (!ds_map_exists(parsed, 'abs_path')) + ds_map_add(parsed, 'abs_path', '/'); + +with (client) +{ + destroyed = false; + CR = chr(13); + LF = chr(10); + CRLF = CR + LF; + socket = tcp_connect(ds_map_find_value(parsed, 'host'), ds_map_find_value(parsed, 'port')); + state = 0; + errored = false; + error = ''; + linebuf = ''; + line = 0; + statusCode = -1; + reasonPhrase = ''; + responseBody = buffer_create(); + responseBodySize = -1; + responseBodyProgress = -1; + responseHeaders = ds_map_create(); + requestUrl = url; + requestHeaders = headers; + + // Request = Request-Line ; Section 5.1 + // *(( general-header ; Section 4.5 + // | request-header ; Section 5.3 + // | entity-header ) CRLF) ; Section 7.1 + // CRLF + // [ message-body ] ; Section 4.3 + + // "The Request-Line begins with a method token, followed by the + // Request-URI and the protocol version, and ending with CRLF. The + // elements are separated by SP characters. No CR or LF is allowed + // except in the final CRLF sequence." + if (ds_map_exists(parsed, 'query')) + write_string(socket, 'GET ' + ds_map_find_value(parsed, 'abs_path') + '?' + ds_map_find_value(parsed, 'query') + ' HTTP/1.1' + CRLF); + else + write_string(socket, 'GET ' + ds_map_find_value(parsed, 'abs_path') + ' HTTP/1.1' + CRLF); + + // "A client MUST include a Host header field in all HTTP/1.1 request + // messages." + // "A "host" without any trailing port information implies the default + // port for the service requested (e.g., "80" for an HTTP URL)." + if (ds_map_find_value(parsed, 'port') == 80) + write_string(socket, 'Host: ' + ds_map_find_value(parsed, 'host') + CRLF); + else + write_string(socket, 'Host: ' + ds_map_find_value(parsed, 'host') + + ':' + string(ds_map_find_value(parsed, 'port')) + CRLF); + + // "An HTTP/1.1 server MAY assume that a HTTP/1.1 client intends to + // maintain a persistent connection unless a Connection header including + // the connection-token "close" was sent in the request." + write_string(socket, 'Connection: close' + CRLF); + + // "If no Accept-Encoding field is present in a request, the server MAY + // assume that the client will accept any content coding." + write_string(socket, 'Accept-Encoding:' + CRLF); + + // If headers specified + if (headers != -1) + { + var key; + // Iterate over headers map + for (key = ds_map_find_first(headers); is_string(key); key = ds_map_find_next(headers, key)) + { + write_string(socket, key + ': ' + ds_map_find_value(headers, key) + CRLF); + } + } + + // Send extra CRLF to terminate request + write_string(socket, CRLF); + + socket_send(socket); + + ds_map_destroy(parsed); +} + +#define __http_parse_header +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Internal function - parses header +// real __http_parse_header(string linebuf, real line) +// Returns false if it errored (caller should return and destroy) + +var linebuf, line; +linebuf = argument0; +line = argument1; + +// "HTTP/1.1 header field values can be folded onto multiple lines if the +// continuation line begins with a space or horizontal tab." +if ((string_char_at(linebuf, 1) == ' ' or ord(string_char_at(linebuf, 1)) == 9)) +{ + if (line == 1) + { + errored = true; + error = "First header line of response can't be a continuation, right?"; + return false; + } + headerValue = ds_map_find_value(responseHeaders, string_lower(headerName)) + + string_copy(linebuf, 2, string_length(linebuf) - 1); +} +// "Each header field consists +// of a name followed by a colon (":") and the field value. Field names +// are case-insensitive. The field value MAY be preceded by any amount +// of LWS, though a single SP is preferred." +else +{ + var colonPos; + colonPos = string_pos(':', linebuf); + if (colonPos == 0) + { + errored = true; + error = "No colon in a header line of response"; + return false; + } + headerName = string_copy(linebuf, 1, colonPos - 1); + headerValue = string_copy(linebuf, colonPos + 1, string_length(linebuf) - colonPos); + // "The field-content does not include any leading or trailing LWS: + // linear white space occurring before the first non-whitespace + // character of the field-value or after the last non-whitespace + // character of the field-value. Such leading or trailing LWS MAY be + // removed without changing the semantics of the field value." + while (string_char_at(headerValue, 1) == ' ' or ord(string_char_at(headerValue, 1)) == 9) + headerValue = string_copy(headerValue, 2, string_length(headerValue) - 1); +} + +ds_map_add(responseHeaders, string_lower(headerName), headerValue); + +if (string_lower(headerName) == 'content-length') +{ + responseBodySize = real(headerValue); + responseBodyProgress = 0; +} + +return true; + +#define __http_client_step +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Steps the HTTP client (needs to be called each step or so) + +var client; +client = argument0; + +with (client) +{ + if (errored) + exit; + + // Socket error + if (socket_has_error(socket)) + { + errored = true; + error = "Socket error: " + socket_error(socket); + return __http_client_destroy(); + } + + var available; + available = tcp_receive_available(socket); + + switch (state) + { + // Receiving lines + case 0: + if (!available && tcp_eof(socket)) + { + errored = true; + error = "Unexpected EOF when receiving headers/status code"; + return __http_client_destroy(); + } + + var bytesRead, c; + for (bytesRead = 1; bytesRead <= available; bytesRead += 1) + { + c = read_string(socket, 1); + // Reached end of line + // "HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all + // protocol elements except the entity-body (see appendix 19.3 for + // tolerant applications)." + if (c == LF and string_char_at(linebuf, string_length(linebuf)) == CR) + { + // Strip trailing CR + linebuf = string_copy(linebuf, 1, string_length(linebuf) - 1); + // First line - status code + if (line == 0) + { + // "The first line of a Response message is the Status-Line, consisting + // of the protocol version followed by a numeric status code and its + // associated textual phrase, with each element separated by SP + // characters. No CR or LF is allowed except in the final CRLF sequence." + var httpVer, spacePos; + spacePos = string_pos(' ', linebuf); + if (spacePos == 0) + { + errored = true; + error = "No space in first line of response"; + return __http_client_destroy(); + } + httpVer = string_copy(linebuf, 1, spacePos); + linebuf = string_copy(linebuf, spacePos + 1, string_length(linebuf) - spacePos); + + spacePos = string_pos(' ', linebuf); + if (spacePos == 0) + { + errored = true; + error = "No second space in first line of response"; + return __http_client_destroy(); + } + statusCode = real(string_copy(linebuf, 1, spacePos)); + reasonPhrase = string_copy(linebuf, spacePos + 1, string_length(linebuf) - spacePos); + } + // Other line + else + { + // Blank line, end of response headers + if (linebuf == '') + { + state = 1; + // write remainder + write_buffer_part(responseBody, socket, available - bytesRead); + responseBodyProgress = available - bytesRead; + break; + } + // Header + else + { + if (!__http_parse_header(linebuf, line)) + return __http_client_destroy(); + } + } + + linebuf = ''; + line += 1; + } + else + linebuf += c; + } + break; + // Receiving response body + case 1: + write_buffer(responseBody, socket); + responseBodyProgress += available; + if (tcp_eof(socket)) + { + if (ds_map_exists(responseHeaders, 'transfer-encoding')) + { + if (ds_map_find_value(responseHeaders, 'transfer-encoding') == 'chunked') + { + // Chunked transfer, let's decode it + var actualResponseBody, actualResponseSize; + actualResponseBody = buffer_create(); + actualResponseBodySize = 0; + + // Parse chunks + // chunk = chunk-size [ chunk-extension ] CRLF + // chunk-data CRLF + // chunk-size = 1*HEX + while (buffer_bytes_left(responseBody)) + { + var chunkSize, c; + chunkSize = ''; + + // Read chunk size byte by byte + while (buffer_bytes_left(responseBody)) + { + c = read_string(responseBody, 1); + if (c == CR or c == ';') + break; + else + chunkSize += c; + } + + // We found a semicolon - beginning of chunk-extension + if (c == ';') + { + // skip all extension stuff + while (buffer_bytes_left(responseBody) && c != CR) + { + c = read_string(responseBody, 1); + } + } + // Reached end of header + if (c == CR) + { + c += read_string(responseBody, 1); + // Doesn't end in CRLF + if (c != CRLF) + { + errored = true; + error = 'header of chunk in chunked transfer did not end in CRLF'; + buffer_destroy(actualResponseBody); + return __http_client_destroy(); + } + // chunk-size is empty - something's up! + if (chunkSize == '') + { + errored = true; + error = 'empty chunk-size in a chunked transfer'; + buffer_destroy(actualResponseBody); + return __http_client_destroy(); + } + chunkSize = __http_parse_hex(chunkSize); + // Parsing of size failed - not hex? + if (chunkSize == -1) + { + errored = true; + error = 'chunk-size was not hexadecimal in a chunked transfer'; + buffer_destroy(actualResponseBody); + return __http_client_destroy(); + } + // Is the chunk bigger than the remaining response? + if (chunkSize + 2 > buffer_bytes_left(responseBody)) + { + errored = true; + error = 'chunk-size was greater than remaining data in a chunked transfer'; + buffer_destroy(actualResponseBody); + return __http_client_destroy(); + } + // OK, everything's good, read the chunk + write_buffer_part(actualResponseBody, responseBody, chunkSize); + actualResponseBodySize += chunkSize; + // Check for CRLF + if (read_string(responseBody, 2) != CRLF) + { + errored = true; + error = 'chunk did not end in CRLF in a chunked transfer'; + return __http_client_destroy(); + } + } + else + { + errored = true; + error = 'did not find CR after reading chunk header in a chunked transfer, Faucet HTTP bug?'; + return __http_client_destroy(); + } + // if the chunk size is zero, then it was the last chunk + if (chunkSize == 0 + // trailer headers will be present + and ds_map_exists(responseHeaders, 'trailer')) + { + // Parse header lines + var line; + line = 1; + while (buffer_bytes_left(responseBody)) + { + var linebuf; + linebuf = ''; + while (buffer_bytes_left(responseBody)) + { + c = read_string(responseBody, 1); + if (c != CR) + linebuf += c; + else + break; + } + c += read_string(responseBody, 1); + if (c != CRLF) + { + errored = true; + error = 'trailer header did not end in CRLF in a chunked transfer'; + return __http_client_destroy(); + } + if (!__http_parse_header(linebuf, line)) + return __http_client_destroy(); + line += 1; + } + } + } + responseBodySize = actualResponseBodySize; + buffer_destroy(responseBody); + responseBody = actualResponseBody; + } + else + { + errored = true; + error = 'Unsupported Transfer-Encoding: "' + ds_map_find_value(responseHaders, 'transfer-encoding') + '"'; + return __http_client_destroy(); + } + } + else if (responseBodySize != -1) + { + if (responseBodyProgress < responseBodySize) + { + errored = true; + error = "Unexpected EOF, response body size is less than expected"; + return __http_client_destroy(); + } + } + // 301 Moved Permanently/302 Found/303 See Other/307 Moved Temporarily + if (statusCode == 301 or statusCode == 302 or statusCode == 303 or statusCode == 307) + { + if (ds_map_exists(responseHeaders, 'location')) + { + var location, resolved; + location = ds_map_find_value(responseHeaders, 'location'); + resolved = __http_resolve_url(requestUrl, location); + // Resolving URL didn't fail and it's http:// + if (resolved != '' and string_copy(resolved, 1, 7) == 'http://') + { + // Restart request + __http_client_destroy(); + __http_prepare_request(client, resolved, requestHeaders); + } + else + { + errored = true; + error = "301, 302, 303 or 307 response with invalid or unsupported Location URL ('" + location + "') - can't redirect"; + return __http_client_destroy(); + } + exit; + } + else + { + errored = true; + error = "301, 302, 303 or 307 response without Location header - can't redirect"; + return __http_client_destroy(); + } + } + else + state = 2; + } + break; + // Done. + case 2: + break; + } +} + +#define __http_client_destroy +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Clears up contents of an httpClient prior to destruction or after error + +if (!destroyed) { + socket_destroy(socket); + buffer_destroy(responseBody); + ds_map_destroy(responseHeaders); +} +destroyed = true; + +#define http_new_get +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Makes a GET HTTP request +// real http_new_get(string url) + +// url - URL to send GET request to + +// Return value is an HttpClient instance that can be passed to +// fct_http_request_status etc. +// (errors on failure to parse URL) + +var url, client; + +url = argument0; + +if (!variable_global_exists('__HttpClient')) + __http_init(); + +client = instance_create(0, 0, global.__HttpClient); +__http_prepare_request(client, url, -1); +return client; + +#define http_new_get_ex +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Makes a GET HTTP request with custom headers +// real http_new_get_ex(string url, real headers) + +// url - URL to send GET request to +// headers - ds_map of extra headers to send + +// Return value is an HttpClient instance that can be passed to +// fct_http_request_status etc. +// (errors on failure to parse URL) + +var url, headers, client; + +url = argument0; +headers = argument1; + +if (!variable_global_exists('__HttpClient')) + __http_init(); + +client = instance_create(0, 0, global.__HttpClient); +__http_prepare_request(client, url, headers); +return client; + +#define http_step +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Steps the HTTP client. This is what makes everything actually happen. +// Call it each step. Returns whether or not the request has finished. +// real http_step(real client) + +// client - HttpClient object + +// Return value is either: +// 0 - In progress +// 1 - Done or Errored + +// Example usage: +// req = http_new_get("http://example.com/x.txt"); +// while (http_step(req)) {} +// if (http_status_code(req) != 200) { +// // Errored! +// } else { +// // Hasn't errored, do stuff here. +// } + +var client; +client = argument0; + +__http_client_step(client); + +if (client.errored || client.state == 2) + return 1; +else + return 0; + +#define http_status_code +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Gets the status code +// real http_status_code(real client) + +// client - HttpClient object + +// Return value is either: +// * 0, if the request has not yet finished +// * a negative value, if there was an internal Faucet HTTP error +// * a positive value, the status code of the HTTP request + +// "The Status-Code element is a 3-digit integer result code of the +// attempt to understand and satisfy the request. These codes are fully +// defined in section 10. The Reason-Phrase is intended to give a short +// textual description of the Status-Code. The Status-Code is intended +// for use by automata and the Reason-Phrase is intended for the human +// user. The client is not required to examine or display the Reason- +// Phrase." + +// See also: http_reason_phrase, gets the Reason-Phrase + +var client; +client = argument0; + +if (client.errored) + return -1; +else if (client.state == 2) + return client.statusCode; +else + return 0; + +#define http_reason_phrase +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Gets the reason phrase +// string http_reason_phrase(real client) + +// client - HttpClient object +// Return value is either: +// * "", if the request has not yet finished +// * an internal Faucet HTTP error message, if there was one +// * the reason phrase of the HTTP request + +// "The Status-Code element is a 3-digit integer result code of the +// attempt to understand and satisfy the request. These codes are fully +// defined in section 10. The Reason-Phrase is intended to give a short +// textual description of the Status-Code. The Status-Code is intended +// for use by automata and the Reason-Phrase is intended for the human +// user. The client is not required to examine or display the Reason- +// Phrase." + +// See also: http_status_code, gets the Status-Code + +var client; +client = argument0; + +if (client.errored) + return client.error; +else if (client.state == 2) + return client.reasonPhrase; +else + return ""; + +#define http_response_body +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Gets the response body returned by an HTTP request as a buffer +// real http_response_body(real client) + +// client - HttpClient object + +// Return value is a buffer if client hasn't errored and is finished + +var client; +client = argument0; + +return client.responseBody; + +#define http_response_body_size +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Gets the size of response body returned by an HTTP request +// real http_response_body_size(real client) + +// client - HttpClient object + +// Return value is the size in bytes, or -1 if we don't know or don't know yet + +// Call this each time you use the size - it may have changed in the case of redirect + +var client; +client = argument0; + +return client.responseBodySize; + +#define http_response_body_progress +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Gets the size of response body returned by an HTTP request which is so far downloaded +// real http_response_body_progress(real client) + +// client - HttpClient object + +// Return value is the size in bytes, or -1 if we haven't started yet or client has errored + +var client; +client = argument0; + +return client.responseBodyProgress; + +#define http_response_headers +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Gets the response headers returned by an HTTP request as a ds_map +// real http_response_headers(real client) + +// client - HttpClient object + +// Return value is a ds_map if client hasn't errored and is finished + +// All headers will have lowercase keys +// The ds_map is owned by the HttpClient, do not use ds_map_destroy() yourself +// Call when the request has finished - otherwise may be incomplete or missing + +var client; +client = argument0; + +return client.responseHeaders; + +#define http_destroy +// *** +// This function forms part of Faucet HTTP v1.0 +// https://github.com/TazeTSchnitzel/Faucet-HTTP-Extension +// +// Copyright (c) 2013-2014, Andrea Faulds +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// *** + +// Cleans up HttpClient +// void http_destroy(real client) + +// client - HttpClient object + +var client; +client = argument0; + +with (client) +{ + __http_client_destroy(); + instance_destroy(); +} + diff --git a/samples/Game Maker Language/game_init.gml b/samples/Game Maker Language/game_init.gml new file mode 100644 index 00000000..4f5012d2 --- /dev/null +++ b/samples/Game Maker Language/game_init.gml @@ -0,0 +1,484 @@ +/* + Originally from /Source/gg2/Scripts/game_init.gml in Gang Garrison 2 + + Copyright (C) 2008-2013 Faucet Software + http://www.ganggarrison.com + + This program is free software; + you can redistribute it and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 3 of the License, or (at your option) + any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License along with this program; if not, + see . + + Additional permission under GNU GPL version 3 section 7 + If you modify this Program, or any covered work, by linking or combining it with the Game Maker runtime library, + the 39dll library/extension, Hobbel's Download Manager DLL, or modified versions of these libraries, + the licensors of this Program grant you additional permission to convey the resulting work. +*/ + +// Returns true if the game is successfully initialized, false if there was an error and we should quit. +{ + instance_create(0,0,RoomChangeObserver); + set_little_endian_global(true); + if file_exists("game_errors.log") file_delete("game_errors.log"); + if file_exists("last_plugin.log") file_delete("last_plugin.log"); + + // Delete old left-over files created by the updater + var backupFilename; + backupFilename = file_find_first("gg2-old.delete.me.*", 0); + while(backupFilename != "") + { + file_delete(backupFilename); + backupFilename = file_find_next(); + } + file_find_close(); + + var customMapRotationFile, restart; + restart = false; + + //import wav files for music + global.MenuMusic=sound_add(choose("Music/menumusic1.wav","Music/menumusic2.wav","Music/menumusic3.wav","Music/menumusic4.wav","Music/menumusic5.wav","Music/menumusic6.wav"), 1, true); + global.IngameMusic=sound_add("Music/ingamemusic.wav", 1, true); + global.FaucetMusic=sound_add("Music/faucetmusic.wav", 1, true); + if(global.MenuMusic != -1) + sound_volume(global.MenuMusic, 0.8); + if(global.IngameMusic != -1) + sound_volume(global.IngameMusic, 0.8); + if(global.FaucetMusic != -1) + sound_volume(global.FaucetMusic, 0.8); + + global.sendBuffer = buffer_create(); + global.tempBuffer = buffer_create(); + global.HudCheck = false; + global.map_rotation = ds_list_create(); + + global.CustomMapCollisionSprite = -1; + + window_set_region_scale(-1, false); + + ini_open("gg2.ini"); + global.playerName = ini_read_string("Settings", "PlayerName", "Player"); + if string_count("#",global.playerName) > 0 global.playerName = "Player"; + global.playerName = string_copy(global.playerName, 0, min(string_length(global.playerName), MAX_PLAYERNAME_LENGTH)); + global.fullscreen = ini_read_real("Settings", "Fullscreen", 0); + global.useLobbyServer = ini_read_real("Settings", "UseLobby", 1); + global.hostingPort = ini_read_real("Settings", "HostingPort", 8190); + global.music = ini_read_real("Settings", "Music", ini_read_real("Settings", "IngameMusic", MUSIC_BOTH)); + global.playerLimit = ini_read_real("Settings", "PlayerLimit", 10); + //thy playerlimit shalt not exceed 48! + if (global.playerLimit > 48) + { + if (global.dedicatedMode != 1) + show_message("Warning: Player Limit cannot exceed 48. It has been set to 48"); + global.playerLimit = 48; + ini_write_real("Settings", "PlayerLimit", 48); + } + global.multiClientLimit = ini_read_real("Settings", "MultiClientLimit", 3); + global.particles = ini_read_real("Settings", "Particles", PARTICLES_NORMAL); + global.gibLevel = ini_read_real("Settings", "Gib Level", 3); + global.killCam = ini_read_real("Settings", "Kill Cam", 1); + global.monitorSync = ini_read_real("Settings", "Monitor Sync", 0); + if global.monitorSync == 1 set_synchronization(true); + else set_synchronization(false); + global.medicRadar = ini_read_real("Settings", "Healer Radar", 1); + global.showHealer = ini_read_real("Settings", "Show Healer", 1); + global.showHealing = ini_read_real("Settings", "Show Healing", 1); + global.showHealthBar = ini_read_real("Settings", "Show Healthbar", 0); + global.showTeammateStats = ini_read_real("Settings", "Show Extra Teammate Stats", 0); + global.serverPluginsPrompt = ini_read_real("Settings", "ServerPluginsPrompt", 1); + global.restartPrompt = ini_read_real("Settings", "RestartPrompt", 1); + //user HUD settings + global.timerPos=ini_read_real("Settings","Timer Position", 0) + global.killLogPos=ini_read_real("Settings","Kill Log Position", 0) + global.kothHudPos=ini_read_real("Settings","KoTH HUD Position", 0) + global.clientPassword = ""; + // for admin menu + customMapRotationFile = ini_read_string("Server", "MapRotation", ""); + global.shuffleRotation = ini_read_real("Server", "ShuffleRotation", 1); + global.timeLimitMins = max(1, min(255, ini_read_real("Server", "Time Limit", 15))); + global.serverPassword = ini_read_string("Server", "Password", ""); + global.mapRotationFile = customMapRotationFile; + global.dedicatedMode = ini_read_real("Server", "Dedicated", 0); + global.serverName = ini_read_string("Server", "ServerName", "My Server"); + global.welcomeMessage = ini_read_string("Server", "WelcomeMessage", ""); + global.caplimit = max(1, min(255, ini_read_real("Server", "CapLimit", 5))); + global.caplimitBkup = global.caplimit; + global.autobalance = ini_read_real("Server", "AutoBalance",1); + global.Server_RespawntimeSec = ini_read_real("Server", "Respawn Time", 5); + global.rewardKey = unhex(ini_read_string("Haxxy", "RewardKey", "")); + global.rewardId = ini_read_string("Haxxy", "RewardId", ""); + global.mapdownloadLimitBps = ini_read_real("Server", "Total bandwidth limit for map downloads in bytes per second", 50000); + global.updaterBetaChannel = ini_read_real("General", "UpdaterBetaChannel", isBetaVersion()); + global.attemptPortForward = ini_read_real("Server", "Attempt UPnP Forwarding", 0); + global.serverPluginList = ini_read_string("Server", "ServerPluginList", ""); + global.serverPluginsRequired = ini_read_real("Server", "ServerPluginsRequired", 0); + if (string_length(global.serverPluginList) > 254) { + show_message("Error: Server plugin list cannot exceed 254 characters"); + return false; + } + var CrosshairFilename, CrosshairRemoveBG; + CrosshairFilename = ini_read_string("Settings", "CrosshairFilename", ""); + CrosshairRemoveBG = ini_read_real("Settings", "CrosshairRemoveBG", 1); + global.queueJumping = ini_read_real("Settings", "Queued Jumping", 0); + + global.backgroundHash = ini_read_string("Background", "BackgroundHash", "default"); + global.backgroundTitle = ini_read_string("Background", "BackgroundTitle", ""); + global.backgroundURL = ini_read_string("Background", "BackgroundURL", ""); + global.backgroundShowVersion = ini_read_real("Background", "BackgroundShowVersion", true); + + readClasslimitsFromIni(); + + global.currentMapArea=1; + global.totalMapAreas=1; + global.setupTimer=1800; + global.joinedServerName=""; + global.serverPluginsInUse=false; + // Create plugin packet maps + global.pluginPacketBuffers = ds_map_create(); + global.pluginPacketPlayers = ds_map_create(); + + ini_write_string("Settings", "PlayerName", global.playerName); + ini_write_real("Settings", "Fullscreen", global.fullscreen); + ini_write_real("Settings", "UseLobby", global.useLobbyServer); + ini_write_real("Settings", "HostingPort", global.hostingPort); + ini_key_delete("Settings", "IngameMusic"); + ini_write_real("Settings", "Music", global.music); + ini_write_real("Settings", "PlayerLimit", global.playerLimit); + ini_write_real("Settings", "MultiClientLimit", global.multiClientLimit); + ini_write_real("Settings", "Particles", global.particles); + ini_write_real("Settings", "Gib Level", global.gibLevel); + ini_write_real("Settings", "Kill Cam", global.killCam); + ini_write_real("Settings", "Monitor Sync", global.monitorSync); + ini_write_real("Settings", "Healer Radar", global.medicRadar); + ini_write_real("Settings", "Show Healer", global.showHealer); + ini_write_real("Settings", "Show Healing", global.showHealing); + ini_write_real("Settings", "Show Healthbar", global.showHealthBar); + ini_write_real("Settings", "Show Extra Teammate Stats", global.showTeammateStats); + ini_write_real("Settings", "Timer Position", global.timerPos); + ini_write_real("Settings", "Kill Log Position", global.killLogPos); + ini_write_real("Settings", "KoTH HUD Position", global.kothHudPos); + ini_write_real("Settings", "ServerPluginsPrompt", global.serverPluginsPrompt); + ini_write_real("Settings", "RestartPrompt", global.restartPrompt); + ini_write_string("Server", "MapRotation", customMapRotationFile); + ini_write_real("Server", "ShuffleRotation", global.shuffleRotation); + ini_write_real("Server", "Dedicated", global.dedicatedMode); + ini_write_string("Server", "ServerName", global.serverName); + ini_write_string("Server", "WelcomeMessage", global.welcomeMessage); + ini_write_real("Server", "CapLimit", global.caplimit); + ini_write_real("Server", "AutoBalance", global.autobalance); + ini_write_real("Server", "Respawn Time", global.Server_RespawntimeSec); + ini_write_real("Server", "Total bandwidth limit for map downloads in bytes per second", global.mapdownloadLimitBps); + ini_write_real("Server", "Time Limit", global.timeLimitMins); + ini_write_string("Server", "Password", global.serverPassword); + ini_write_real("General", "UpdaterBetaChannel", global.updaterBetaChannel); + ini_write_real("Server", "Attempt UPnP Forwarding", global.attemptPortForward); + ini_write_string("Server", "ServerPluginList", global.serverPluginList); + ini_write_real("Server", "ServerPluginsRequired", global.serverPluginsRequired); + ini_write_string("Settings", "CrosshairFilename", CrosshairFilename); + ini_write_real("Settings", "CrosshairRemoveBG", CrosshairRemoveBG); + ini_write_real("Settings", "Queued Jumping", global.queueJumping); + + ini_write_string("Background", "BackgroundHash", global.backgroundHash); + ini_write_string("Background", "BackgroundTitle", global.backgroundTitle); + ini_write_string("Background", "BackgroundURL", global.backgroundURL); + ini_write_real("Background", "BackgroundShowVersion", global.backgroundShowVersion); + + ini_write_real("Classlimits", "Scout", global.classlimits[CLASS_SCOUT]) + ini_write_real("Classlimits", "Pyro", global.classlimits[CLASS_PYRO]) + ini_write_real("Classlimits", "Soldier", global.classlimits[CLASS_SOLDIER]) + ini_write_real("Classlimits", "Heavy", global.classlimits[CLASS_HEAVY]) + ini_write_real("Classlimits", "Demoman", global.classlimits[CLASS_DEMOMAN]) + ini_write_real("Classlimits", "Medic", global.classlimits[CLASS_MEDIC]) + ini_write_real("Classlimits", "Engineer", global.classlimits[CLASS_ENGINEER]) + ini_write_real("Classlimits", "Spy", global.classlimits[CLASS_SPY]) + ini_write_real("Classlimits", "Sniper", global.classlimits[CLASS_SNIPER]) + ini_write_real("Classlimits", "Quote", global.classlimits[CLASS_QUOTE]) + + //screw the 0 index we will start with 1 + //map_truefort + maps[1] = ini_read_real("Maps", "ctf_truefort", 1); + //map_2dfort + maps[2] = ini_read_real("Maps", "ctf_2dfort", 2); + //map_conflict + maps[3] = ini_read_real("Maps", "ctf_conflict", 3); + //map_classicwell + maps[4] = ini_read_real("Maps", "ctf_classicwell", 4); + //map_waterway + maps[5] = ini_read_real("Maps", "ctf_waterway", 5); + //map_orange + maps[6] = ini_read_real("Maps", "ctf_orange", 6); + //map_dirtbowl + maps[7] = ini_read_real("Maps", "cp_dirtbowl", 7); + //map_egypt + maps[8] = ini_read_real("Maps", "cp_egypt", 8); + //arena_montane + maps[9] = ini_read_real("Maps", "arena_montane", 9); + //arena_lumberyard + maps[10] = ini_read_real("Maps", "arena_lumberyard", 10); + //gen_destroy + maps[11] = ini_read_real("Maps", "gen_destroy", 11); + //koth_valley + maps[12] = ini_read_real("Maps", "koth_valley", 12); + //koth_corinth + maps[13] = ini_read_real("Maps", "koth_corinth", 13); + //koth_harvest + maps[14] = ini_read_real("Maps", "koth_harvest", 14); + //dkoth_atalia + maps[15] = ini_read_real("Maps", "dkoth_atalia", 15); + //dkoth_sixties + maps[16] = ini_read_real("Maps", "dkoth_sixties", 16); + + //Server respawn time calculator. Converts each second to a frame. (read: multiply by 30 :hehe:) + if (global.Server_RespawntimeSec == 0) + { + global.Server_Respawntime = 1; + } + else + { + global.Server_Respawntime = global.Server_RespawntimeSec * 30; + } + + // I have to include this, or the client'll complain about an unknown variable. + global.mapchanging = false; + + ini_write_real("Maps", "ctf_truefort", maps[1]); + ini_write_real("Maps", "ctf_2dfort", maps[2]); + ini_write_real("Maps", "ctf_conflict", maps[3]); + ini_write_real("Maps", "ctf_classicwell", maps[4]); + ini_write_real("Maps", "ctf_waterway", maps[5]); + ini_write_real("Maps", "ctf_orange", maps[6]); + ini_write_real("Maps", "cp_dirtbowl", maps[7]); + ini_write_real("Maps", "cp_egypt", maps[8]); + ini_write_real("Maps", "arena_montane", maps[9]); + ini_write_real("Maps", "arena_lumberyard", maps[10]); + ini_write_real("Maps", "gen_destroy", maps[11]); + ini_write_real("Maps", "koth_valley", maps[12]); + ini_write_real("Maps", "koth_corinth", maps[13]); + ini_write_real("Maps", "koth_harvest", maps[14]); + ini_write_real("Maps", "dkoth_atalia", maps[15]); + ini_write_real("Maps", "dkoth_sixties", maps[16]); + + ini_close(); + + // parse the protocol version UUID for later use + global.protocolUuid = buffer_create(); + parseUuid(PROTOCOL_UUID, global.protocolUuid); + + global.gg2lobbyId = buffer_create(); + parseUuid(GG2_LOBBY_UUID, global.gg2lobbyId); + + // Create abbreviations array for rewards use + initRewards() + +var a, IPRaw, portRaw; +doubleCheck=0; +global.launchMap = ""; + + for(a = 1; a <= parameter_count(); a += 1) + { + if (parameter_string(a) == "-dedicated") + { + global.dedicatedMode = 1; + } + else if (parameter_string(a) == "-restart") + { + restart = true; + } + else if (parameter_string(a) == "-server") + { + IPRaw = parameter_string(a+1); + if (doubleCheck == 1) + { + doubleCheck = 2; + } + else + { + doubleCheck = 1; + } + } + else if (parameter_string(a) == "-port") + { + portRaw = parameter_string(a+1); + if (doubleCheck == 1) + { + doubleCheck = 2; + } + else + { + doubleCheck = 1; + } + } + else if (parameter_string(a) == "-map") + { + global.launchMap = parameter_string(a+1); + global.dedicatedMode = 1; + } + } + + if (doubleCheck == 2) + { + global.serverPort = real(portRaw); + global.serverIP = IPRaw; + global.isHost = false; + instance_create(0,0,Client); + } + + global.customMapdesginated = 0; + + // if the user defined a valid map rotation file, then load from there + + if(customMapRotationFile != "" && file_exists(customMapRotationFile) && global.launchMap == "") { + global.customMapdesginated = 1; + var fileHandle, i, mapname; + fileHandle = file_text_open_read(customMapRotationFile); + for(i = 1; !file_text_eof(fileHandle); i += 1) { + mapname = file_text_read_string(fileHandle); + // remove leading whitespace from the string + while(string_char_at(mapname, 0) == " " || string_char_at(mapname, 0) == chr(9)) { // while it starts with a space or tab + mapname = string_delete(mapname, 0, 1); // delete that space or tab + } + if(mapname != "" && string_char_at(mapname, 0) != "#") { // if it's not blank and it's not a comment (starting with #) + ds_list_add(global.map_rotation, mapname); + } + file_text_readln(fileHandle); + } + file_text_close(fileHandle); + } + + else if (global.launchMap != "") && (global.dedicatedMode == 1) + { + ds_list_add(global.map_rotation, global.launchMap); + } + + else { // else load from the ini file Maps section + //Set up the map rotation stuff + var i, sort_list; + sort_list = ds_list_create(); + for(i=1; i <= 16; i += 1) { + if(maps[i] != 0) ds_list_add(sort_list, ((100*maps[i])+i)); + } + ds_list_sort(sort_list, 1); + + // translate the numbers back into the names they represent + for(i=0; i < ds_list_size(sort_list); i += 1) { + switch(ds_list_find_value(sort_list, i) mod 100) { + case 1: + ds_list_add(global.map_rotation, "ctf_truefort"); + break; + case 2: + ds_list_add(global.map_rotation, "ctf_2dfort"); + break; + case 3: + ds_list_add(global.map_rotation, "ctf_conflict"); + break; + case 4: + ds_list_add(global.map_rotation, "ctf_classicwell"); + break; + case 5: + ds_list_add(global.map_rotation, "ctf_waterway"); + break; + case 6: + ds_list_add(global.map_rotation, "ctf_orange"); + break; + case 7: + ds_list_add(global.map_rotation, "cp_dirtbowl"); + break; + case 8: + ds_list_add(global.map_rotation, "cp_egypt"); + break; + case 9: + ds_list_add(global.map_rotation, "arena_montane"); + break; + case 10: + ds_list_add(global.map_rotation, "arena_lumberyard"); + break; + case 11: + ds_list_add(global.map_rotation, "gen_destroy"); + break; + case 12: + ds_list_add(global.map_rotation, "koth_valley"); + break; + case 13: + ds_list_add(global.map_rotation, "koth_corinth"); + break; + case 14: + ds_list_add(global.map_rotation, "koth_harvest"); + break; + case 15: + ds_list_add(global.map_rotation, "dkoth_atalia"); + break; + case 16: + ds_list_add(global.map_rotation, "dkoth_sixties"); + break; + + } + } + ds_list_destroy(sort_list); + } + + window_set_fullscreen(global.fullscreen); + + global.gg2Font = font_add_sprite(gg2FontS,ord("!"),false,0); + global.countFont = font_add_sprite(countFontS, ord("0"),false,2); + draw_set_font(global.gg2Font); + cursor_sprite = CrosshairS; + + if(!directory_exists(working_directory + "\Maps")) directory_create(working_directory + "\Maps"); + + instance_create(0, 0, AudioControl); + instance_create(0, 0, SSControl); + + // custom dialog box graphics + message_background(popupBackgroundB); + message_button(popupButtonS); + message_text_font("Century",9,c_white,1); + message_button_font("Century",9,c_white,1); + message_input_font("Century",9,c_white,0); + + //Key Mapping + ini_open("controls.gg2"); + global.jump = ini_read_real("Controls", "jump", ord("W")); + global.down = ini_read_real("Controls", "down", ord("S")); + global.left = ini_read_real("Controls", "left", ord("A")); + global.right = ini_read_real("Controls", "right", ord("D")); + global.attack = ini_read_real("Controls", "attack", MOUSE_LEFT); + global.special = ini_read_real("Controls", "special", MOUSE_RIGHT); + global.taunt = ini_read_real("Controls", "taunt", ord("F")); + global.chat1 = ini_read_real("Controls", "chat1", ord("Z")); + global.chat2 = ini_read_real("Controls", "chat2", ord("X")); + global.chat3 = ini_read_real("Controls", "chat3", ord("C")); + global.medic = ini_read_real("Controls", "medic", ord("E")); + global.drop = ini_read_real("Controls", "drop", ord("B")); + global.changeTeam = ini_read_real("Controls", "changeTeam", ord("N")); + global.changeClass = ini_read_real("Controls", "changeClass", ord("M")); + global.showScores = ini_read_real("Controls", "showScores", vk_shift); + ini_close(); + + calculateMonthAndDay(); + + if(!directory_exists(working_directory + "\Plugins")) directory_create(working_directory + "\Plugins"); + loadplugins(); + + /* Windows 8 is known to crash GM when more than three (?) sounds play at once + * We'll store the kernel version (Win8 is 6.2, Win7 is 6.1) and check it there. + ***/ + registry_set_root(1); // HKLM + global.NTKernelVersion = real(registry_read_string_ext("\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", "CurrentVersion")); // SIC + + if (file_exists(CrosshairFilename)) + { + sprite_replace(CrosshairS,CrosshairFilename,1,CrosshairRemoveBG,false,0,0); + sprite_set_offset(CrosshairS,sprite_get_width(CrosshairS)/2,sprite_get_height(CrosshairS)/2); + } + if(global.dedicatedMode == 1) { + AudioControlToggleMute(); + room_goto_fix(Menu); + } else if(restart) { + room_goto_fix(Menu); + } + return true; +} diff --git a/samples/Game Maker Language/jsonion.gml b/samples/Game Maker Language/jsonion.gml new file mode 100644 index 00000000..e4d2a6cb --- /dev/null +++ b/samples/Game Maker Language/jsonion.gml @@ -0,0 +1,1861 @@ +// Originally from /jsonion.gml in JSOnion +// JSOnion v1.0.0d is licensed under the MIT licence. You may freely adapt and use this library in commercial and non-commercial projects. + +#define __jso_gmt_tuple +{ + + /** + tuple(>element_0<, >element_1<, ..., >element_n<): Return an n-tuple + @author: GameGeisha + @version: 1.2 (GMTuple) + */ + + //Position, address table and data + var pos, addr_table, data; + pos = 6*argument_count+4; + addr_table = ""; + data = ""; + + //Build the tuple element-by-element + var i, ca, isstr, datastr; + for (i=0; ith element of + @author: GameGeisha + @version: 1.2 (GMTuple) + */ + + //Capture arguments + var t, n, size; + t = argument0; + n = argument1; + size = __jso_gmt_size(t); + + //Search for the bounding positions for the th element in the address table + var start, afterend, isstr; + isstr = ord(string_char_at(t, 4+6*n))-$30; + start = real(string_copy(t, 5+6*n, 5)); + if (n < size-1) { + afterend = real(string_copy(t, 11+6*n, 5)); + } else { + afterend = string_length(t)+1; + } + + //Return the th element with the correct type + if (isstr) { + return string_copy(t, start, afterend-start); + } + else { + return real(string_copy(t, start, afterend-start)); + } + +} + +#define __jso_gmt_size +{ + + /** + size(tuple_source): Return the size of + @author: GameGeisha + @version: 1.2 (GMTuple) + */ + + return real(string_copy(argument0, 1, 3)); + +} + +#define __jso_gmt_numtostr +{ + + /** + __gmt_numtostr(num): Return string representation of . Decimal numbers expressed as scientific notation + with double precision (i.e. 15 digits) + @author: GameGeisha + @version: 1.2 (edited) + */ + if (frac(argument0) == 0) { + return string(argument0); + } + + var mantissa, exponent; + exponent = floor(log10(abs(argument0))); + mantissa = string_format(argument0/power(10,exponent), 15, 14); + var i, ca; + i = string_length(mantissa); + do { + ca = string_char_at(mantissa, i); + i -= 1; + } until (ca != "0") + if (ca != ".") { + mantissa = string_copy(mantissa, 1, i+1); + } + else { + mantissa = string_copy(mantissa, 1, i); + } + if (exponent != 0) { + return mantissa + "e" + string(exponent); + } + else { + return mantissa; + } + +} + +#define __jso_gmt_test_all +{ + + /** + test_all(): Runs all test suites + @author: GameGeisha + @version: 1.2 (GMTuple) + */ + + //Automated testing sequence + __jso_gmt_test_elem(); + __jso_gmt_test_size(); + __jso_gmt_test_numtostr(); + +} + +#define __jso_gmt_test_numtostr +{ + + /** + _test_numtostr(): Runs number-to-string tests + @author: GameGeisha + @version: 1.2 (GMTuple) + */ + + var tolerance; + tolerance = 1/10000000000; + + if (real(__jso_gmt_numtostr(9)) != 9) { + show_message("Scientific notation conversion failed for 1-digit integer! Result: " + __jso_gmt_numtostr(9)); + } + if (real(__jso_gmt_numtostr(500)) != 500) { + show_message("Scientific notation conversion failed for 3-digit integer! Result: " + __jso_gmt_numtostr(500)); + } + if (abs(real(__jso_gmt_numtostr(pi))-pi) > tolerance) { + show_message("Scientific notation conversion failed for pi! Result: " + __jso_gmt_numtostr(pi)); + } + if (abs(real(__jso_gmt_numtostr(104729.903455))-104729.903455) > tolerance) { + show_message("Scientific notation conversion failed for large decimal number! Result: " + __jso_gmt_numtostr(104729.903455)); + } + if (abs(real(__jso_gmt_numtostr(-pi))+pi) > tolerance) { + show_message("Scientific notation conversion failed for -pi! Result: " + __jso_gmt_numtostr(-pi)); + } + if (abs(real(__jso_gmt_numtostr(1/pi))-1/pi) > tolerance) { + show_message("Scientific notation conversion failed for 1/pi! Result: " + __jso_gmt_numtostr(1/pi)); + } + +} + +#define __jso_gmt_test_elem +{ + + /** + _test_elem(): Runs tuple element retrieval tests + @author: GameGeisha + @version: 1.2 (GMTuple) + */ + + if (__jso_gmt_elem(__jso_gmt_tuple("Qblock", "kll"), 0) != "Qblock") { + show_message("Element retrieval failed for simple string. #Should be:Qblock#Actual:" + __jso_gmt_elem(__jso_gmt_tuple("Qblock"), 0)); + } + if (__jso_gmt_elem(__jso_gmt_tuple(9, "Q", -7), 0) != 9) { + show_message("Element retrieval failed for simple number. #Should be 9#Actual:" + string(__jso_gmt_elem(__jso_gmt_tuple(9, "Q", 7), 0))); + } + if (__jso_gmt_elem(__jso_gmt_tuple("Qblock", "", "Negg"), 1) != "") { + show_message("Element retrieval failed for empty string#Should be empty string#Actual:"+string(__jso_gmt_elem(__jso_gmt_tuple("Qblock", "", "Negg"), 0))); + } + + if (__jso_gmt_elem(__jso_gmt_elem(__jso_gmt_tuple("Not this", __jso_gmt_tuple(0, 1, 2, 3), "Waahoo"), 1), 3) != 3) { + show_message("Element retrieval failed in nested tuple. #Should be 3#Actual:" + string(__jso_gmt_elem(__jso_gmt_elem(__jso_gmt_tuple("Not this", __jso_gmt_tuple(0, 1, 2, 3), "Waahoo"), 1), 3))); + } + +} + +#define __jso_gmt_test_size +{ + + /** + _test_size(): Runs tuple size tests + @author: GameGeisha + @version: 1.2 (GMTuple) + */ + + if (__jso_gmt_size(__jso_gmt_tuple("Waahoo", "Negg", 0)) != 3) { + show_message("Bad size for 3-tuple"); + } + if (__jso_gmt_size(__jso_gmt_tuple()) != 0) { + show_message("Bad size for null tuple"); + } + if (__jso_gmt_size(__jso_gmt_tuple(7)) != 1) { + show_message("Bad size for 1-tuple"); + } + if (__jso_gmt_size(__jso_gmt_tuple(1,2,3,4,5,6,7,8,9,10)) != 10) { + show_message("Bad size for 10-tuple"); + } + +} + +#define jso_new_map +{ + /** + jso_new_map(): Create a new map. + JSOnion version: 1.0.0d + */ + return ds_map_create(); +} + +#define jso_new_list +{ + /** + jso_new_list(): Create a new list. + JSOnion version: 1.0.0d + */ + return ds_list_create(); +} + +#define jso_map_add_real +{ + /** + jso_map_add_real(map, key, val): Add the key-value pair : to , where is a real value. + JSOnion version: 1.0.0d + */ + ds_map_add(argument0, argument1, argument2); +} + +#define jso_map_add_string +{ + /** + jso_map_add_string(map, key, str): Add the key-value pair : to , where is a string value. + JSOnion version: 1.0.0d + */ + ds_map_add(argument0, argument1, "s" + argument2); +} + +#define jso_map_add_sublist +{ + /** + jso_map_add_sublist(map, key, sublist): Add the key-value pair : to , where is a list. + JSOnion version: 1.0.0d + */ + ds_map_add(argument0, argument1, "l" + string(argument2)); +} + +#define jso_map_add_submap +{ + /** + jso_map_add_submap(map, key, submap): Add the key-value pair : to , where is a map. + JSOnion version: 1.0.0d + */ + ds_map_add(argument0, argument1, "m" + string(argument2)); +} + +#define jso_map_add_integer +{ + /** + jso_map_add_integer(map, key, int): Add the key-value pair : to , where is a integer value. + JSOnion version: 1.0.0d + */ + ds_map_add(argument0, argument1, floor(argument2)); +} + +#define jso_map_add_boolean +{ + /** + jso_map_add_boolean(map, key, bool): Add the key-value pair : to , where is a boolean value. + JSOnion version: 1.0.0d + */ + if (argument2) { + ds_map_add(argument0, argument1, "btrue"); + } else { + ds_map_add(argument0, argument1, "bfalse"); + } +} + +#define jso_list_add_real +{ + /** + jso_list_add_real(list, val): Append the real value to . + JSOnion version: 1.0.0d + */ + ds_list_add(argument0, argument1); +} + +#define jso_list_add_string +{ + /** + jso_list_add_string(list, str): Append the string value to . + JSOnion version: 1.0.0d + */ + ds_list_add(argument0, "s" + argument1); +} + +#define jso_list_add_sublist +{ + /** + jso_list_add_sublist(list, sublist): Append the list to . + JSOnion version: 1.0.0d + */ + ds_list_add(argument0, "l" + string(argument1)); +} + +#define jso_list_add_submap +{ + /** + jso_list_add_submap(list, submap): Append the map to . + JSOnion version: 1.0.0d + */ + ds_list_add(argument0, "m" + string(argument1)); +} + +#define jso_list_add_integer +{ + /** + jso_list_add_integer(list, int): Append the integer to . + JSOnion version: 1.0.0d + */ + ds_list_add(argument0, floor(argument1)); +} + +#define jso_list_add_boolean +{ + /** + jso_list_add_boolean(list, bool): Append the boolean value to . + JSOnion version: 1.0.0d + */ + if (argument1) { + ds_list_add(argument0, "btrue"); + } else { + ds_list_add(argument0, "bfalse"); + } +} + +#define jso_map_get +{ + /** + jso_map_get(map, key): Retrieve the value stored in with the key value , with the correct type. + JSOnion version: 1.0.0d + */ + + //Grab the value + var v; + v = ds_map_find_value(argument0, argument1); + + //String; could be string, map or list + if (is_string(v)) { + switch (string_char_at(v, 1)) { + case "s": + return string_delete(v, 1, 1); + break; + case "l": case "m": + return real(string_delete(v, 1, 1)); + break; + case "b": + if (v == "btrue") { + return true; + } + else if (v == "bfalse") { + return false; + } + else { + show_error("Invalid boolean value.", true); + } + break; + default: show_error("Invalid map contents.", true); break; + } + } + + //Real; return real value as-is + else { + return v; + } +} + +#define jso_map_get_type +{ + /** + jso_map_get_type(map, key): Return the type of value to which the key value is mapped to in . + JSOnion version: 1.0.0d + */ + + //Grab the value + var v; + v = ds_map_find_value(argument0, argument1); + + //String; could be string, map or list + if (is_string(v)) { + switch (string_char_at(v, 1)) { + case "s": + return jso_type_string; + break; + case "l": + return jso_type_list; + break; + case "m": + return jso_type_map; + break; + case "b": + return jso_type_boolean; + break; + default: show_error("Invalid map content type.", true); break; + } + } + + //Real + else { + return jso_type_real; + } +} + +#define jso_list_get +{ + /** + jso_list_get(list, index): Retrieve the value stored in at position , with the correct type. + JSOnion version: 1.0.0d + */ + + //Grab the value + var v; + v = ds_list_find_value(argument0, argument1); + + //String; could be string, map or list + if (is_string(v)) { + switch (string_char_at(v, 1)) { + case "s": + return string_delete(v, 1, 1); + break; + case "l": case "m": + return real(string_delete(v, 1, 1)); + break; + case "b": + if (v == "btrue") { + return true; + } + else if (v == "bfalse") { + return false; + } + else { + show_error("Invalid boolean value.", true); + } + break; + default: show_error("Invalid list contents.", true); break; + } + } + + //Real; return real value as-is + else { + return v; + } +} + +#define jso_list_get_type +{ + /** + jso_list_get_type(list, index): Retrieve the type of value found at position of . + JSOnion version: 1.0.0d + */ + + //Grab the value + var v; + v = ds_list_find_value(argument0, argument1); + + //String; could be string, map or list + if (is_string(v)) { + switch (string_char_at(v, 1)) { + case "s": + return jso_type_string; + break; + case "l": + return jso_type_list; + break; + case "m": + return jso_type_map; + break; + case "b": + return jso_type_boolean; + break; + default: show_error("Invalid list content type.", true); break; + } + } + + //Real + else { + return jso_type_real; + } +} + +#define jso_cleanup_map +{ + /** + jso_cleanup_map(map): Recursively free up . + JSOnion version: 1.0.0d + */ + + //Loop through all keys + var i, l, k; + l = ds_map_size(argument0); + k = ds_map_find_first(argument0); + for (i=0; i. + JSOnion version: 1.0.0d + */ + + //Loop through all elements + var i, l, v; + l = ds_list_size(argument0); + for (i=0; i): Return a JSON-encoded version of real value . + This uses scientific notation with up to 15 significant digits for decimal values. + For integers, it just uses string(). + This is adapted from the same algorithm used in GMTuple. + JSOnion version: 1.0.0d + */ + + return __jso_gmt_numtostr(argument0); +} + +#define jso_encode_string +{ + /** + jso_encode_string(str): Return a JSON-encoded version of string . + JSOnion version: 1.0.0d + */ + + //Iteratively reconstruct the string + var i, l, s, c; + s = ""; + l = string_length(argument0); + for (i=1; i<=l; i+=1) { + //Replace escape characters + c = string_char_at(argument0, i); + switch (ord(c)) { + case 34: case 92: case 47: //Double quotes, backslashes and slashes + s += "\" + c; + break; + case 8: //Backspace + s += "\b"; + break; + case 12: //Form feed + s += "\f"; + break; + case 10: //New line + s += "\n"; + break; + case 13: //Carriage return + s += "\r"; + break; + case 9: //Horizontal tab + s += "\t"; + break; + default: //Not an escape character + s += c; + break; + } + } + + //Add quotes + return '"' + s + '"'; +} + +#define jso_encode_list +{ + /** + jso_encode_list(list): Return a JSON-encoded version of list . + JSOnion version: 1.0.0d + */ + + //Iteratively encode each element + var i, l, s; + s = ""; + l = ds_list_size(argument0); + for (i=0; i 0) { + s += ","; + } + //Select correct encoding for each element, then recursively encode each + switch (jso_list_get_type(argument0, i)) { + case jso_type_real: + s += jso_encode_real(jso_list_get(argument0, i)); + break; + case jso_type_string: + s += jso_encode_string(jso_list_get(argument0, i)); + break; + case jso_type_map: + s += jso_encode_map(jso_list_get(argument0, i)); + break; + case jso_type_list: + s += jso_encode_list(jso_list_get(argument0, i)); + break; + case jso_type_boolean: + s += jso_encode_boolean(jso_list_get(argument0, i)); + break; + } + } + + //Done, add square brackets + return "[" + s + "]"; +} + +#define jso_encode_map +{ + /** + jso_encode_map(map): Return a JSON-encoded version of map . + JSOnion version: 1.0.0d + */ + + //Go through every key-value pair + var i, l, k, s; + s = ""; + l = ds_map_size(argument0); + k = ds_map_find_first(argument0); + for (i=0; i 0) { + s += ","; + } + //Find the key and encode it + if (is_real(k)) { + s += jso_encode_real(k); + } else { + s += jso_encode_string(k); + } + //Add the : separator + s += ":"; + //Select correct encoding for each value, then recursively encode each + switch (jso_map_get_type(argument0, k)) { + case jso_type_real: + s += jso_encode_real(jso_map_get(argument0, k)); + break; + case jso_type_string: + s += jso_encode_string(jso_map_get(argument0, k)); + break; + case jso_type_map: + s += jso_encode_map(jso_map_get(argument0, k)); + break; + case jso_type_list: + s += jso_encode_list(jso_map_get(argument0, k)); + break; + case jso_type_boolean: + s += jso_encode_boolean(jso_map_get(argument0, k)); + break; + } + //Get next key + k = ds_map_find_next(argument0, k); + } + + //Done, add braces + return "{" + s + "}"; +} + +#define jso_encode_integer +{ + /** + jso_encode_integer(int): Return a JSON-encoded version of the integer value . + JSOnion version: 1.0.0d + */ + return string(floor(argument0)); +} + +#define jso_encode_boolean +{ + /** + jso_encode_boolean(bool): Return a JSON-encoded version of the boolean value . + JSOnion version: 1.0.0d + */ + if (argument0) { + return "true"; + } else { + return "false"; + } +} + +#define jso_decode_map +{ + /** + jso_decode_map(json): Return a JSOnion-compatible map representing the JSON string . + JSOnion version: 1.0.0d + */ + return __jso_gmt_elem(_jso_decode_map(argument0, 1), 0); +} + +#define jso_decode_list +{ + /** + jso_decode_list(json): Return a JSOnion-compatible list representing the JSON string . + JSOnion version: 1.0.0d + */ + return __jso_gmt_elem(_jso_decode_list(argument0, 1), 0); +} + +#define jso_decode_string +{ + /** + jso_decode_string(json): Return a string representing the JSON string . + JSOnion version: 1.0.0d + */ + return __jso_gmt_elem(_jso_decode_string(argument0, 1), 0); +} + +#define jso_decode_boolean +{ + /** + jso_decode_boolean(json): Return a boolean value representing the JSON string . + JSOnion version: 1.0.0d + */ + return __jso_gmt_elem(_jso_decode_boolean(argument0, 1), 0); +} + +#define jso_decode_real +{ + /** + jso_decode_real(json): Return a real value representing the JSON string . + JSOnion version: 1.0.0d + */ + return __jso_gmt_elem(_jso_decode_real(argument0, 1), 0); +} + +#define jso_decode_integer +{ + /** + jso_decode_integer(json): Return an integer value representing the JSON string . + JSOnion version: 1.0.0d + */ + return __jso_gmt_elem(_jso_decode_integer(argument0, 1), 0); +} + +#define _jso_decode_map +{ + /** + _jso_decode_map(json, startindex): Extract a map from JSON string starting at position . + Return a 2-tuple of the extracted map handle and the position after the ending }. + JSOnion version: 1.0.0d + */ + var i, len, map; + i = argument1; + len = string_length(argument0); + map = jso_new_map(); + + //Seek to first { + var c; + c = string_char_at(argument0, i); + if (c != "{") { + do { + i += 1; + c = string_char_at(argument0, i); + if (!_jso_is_whitespace_char(c)) && (c != "{") { + show_error("Cannot parse map at position " + string(i), true); + } + } until (c == "{") + } + i += 1; + + //Read until end of JSON or ending } + var found_end, state, found, current_key; + found_end = false; + state = 0; + for (i=i; i<=len && !found_end; i+=1) { + c = string_char_at(argument0, i); + switch (state) { + //0: Looking for a key or closing } + case 0: + switch (c) { + case "}": + found_end = true; + break; + case '"': + found = _jso_decode_string(argument0, i); + current_key = __jso_gmt_elem(found, 0); + i = __jso_gmt_elem(found, 1)-1; + state = 1; + break; + case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": case "+": case "-": + found = _jso_decode_real(argument0, i); + current_key = __jso_gmt_elem(found, 0); + i = __jso_gmt_elem(found, 1)-1; + state = 1; + break; + default: + if (!_jso_is_whitespace_char(c)) { + show_error("Unexpected character at position " + string(i) + ".", true); + } + break; + } + break; + //1: Looking for the : separator + case 1: + switch (c) { + case ":": + state = 2; + break; + default: + if (!_jso_is_whitespace_char(c)) { + show_error("Unexpected character at position " + string(i) + ".", true); + } + break; + } + break; + //2: Looking for a value + case 2: + switch (c) { + case "[": + found = _jso_decode_list(argument0, i); + jso_map_add_sublist(map, current_key, __jso_gmt_elem(found, 0)); + i = __jso_gmt_elem(found, 1)-1; + state = 3; + break; + case "{": + found = _jso_decode_map(argument0, i); + jso_map_add_submap(map, current_key, __jso_gmt_elem(found, 0)); + i = __jso_gmt_elem(found, 1)-1; + state = 3; + break; + case '"': + found = _jso_decode_string(argument0, i); + jso_map_add_string(map, current_key, __jso_gmt_elem(found, 0)); + i = __jso_gmt_elem(found, 1)-1; + state = 3; + break; + case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": case "+": case "-": + found = _jso_decode_real(argument0, i); + jso_map_add_real(map, current_key, __jso_gmt_elem(found, 0)); + i = __jso_gmt_elem(found, 1)-1; + state = 3; + break; + case "t": case "f": + found = _jso_decode_boolean(argument0, i); + jso_map_add_boolean(map, current_key, __jso_gmt_elem(found, 0)); + i = __jso_gmt_elem(found, 1)-1; + state = 3; + break; + default: + if (!_jso_is_whitespace_char(c)) { + show_error("Unexpected character at position " + string(i) + ".", true); + } + break; + } + break; + //3: Done looking for an entry, want comma or } + case 3: + switch (c) { + case "}": + found_end = true; + break; + case ",": + state = 0; + break; + default: + if (!_jso_is_whitespace_char(c)) { + show_error("Unexpected character at position " + string(i) + ".", true); + } + break; + } + break; + } + } + + //Return extracted map with ending position if the ending } is found + if (found_end) { + return __jso_gmt_tuple(map, i); + } + //Ended too early, throw error + else { + show_error("Unexpected end of map in JSON string.", true); + } +} + +#define _jso_decode_list +{ + /** + _jso_decode_list(json, startindex): Extract a list from JSON string starting at position . + Return a 2-tuple of the extracted list handle and the position after the ending ]. + JSOnion version: 1.0.0d + */ + var i, len, list; + i = argument1; + len = string_length(argument0); + list = jso_new_list(); + + //Seek to first [ + var c; + c = string_char_at(argument0, i); + if (c != "[") { + do { + i += 1; + c = string_char_at(argument0, i); + if (!_jso_is_whitespace_char(c)) && (c != "[") { + show_error("Cannot parse list at position " + string(i), true); + } + } until (c == "[") + } + i += 1; + + //Read until end of JSON or ending ] + var found_end, state, found; + found_end = false; + state = 0; + for (i=i; i<=len && !found_end; i+=1) { + c = string_char_at(argument0, i); + switch (state) { + //0: Looking for an item + case 0: + switch (c) { + case "]": + found_end = true; + break; + case "[": + found = _jso_decode_list(argument0, i); + jso_list_add_sublist(list, __jso_gmt_elem(found, 0)); + i = __jso_gmt_elem(found, 1)-1; + state = 1; + break; + case "{": + found = _jso_decode_map(argument0, i); + jso_list_add_submap(list, __jso_gmt_elem(found, 0)); + i = __jso_gmt_elem(found, 1)-1; + state = 1; + break; + case '"': + found = _jso_decode_string(argument0, i); + jso_list_add_string(list, __jso_gmt_elem(found, 0)); + i = __jso_gmt_elem(found, 1)-1; + state = 1; + break; + case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": case "+": case "-": + found = _jso_decode_real(argument0, i); + jso_list_add_real(list, __jso_gmt_elem(found, 0)); + i = __jso_gmt_elem(found, 1)-1; + state = 1; + break; + case "t": case "f": + found = _jso_decode_boolean(argument0, i); + jso_list_add_boolean(list, __jso_gmt_elem(found, 0)); + i = __jso_gmt_elem(found, 1)-1; + state = 1; + break; + default: + if (!_jso_is_whitespace_char(c)) { + show_error("Unexpected character at position " + string(i) + ".", true); + } + break; + } + break; + //1: Done looking for an item, want comma or ] + case 1: + switch (c) { + case "]": + found_end = true; + break; + case ",": + state = 0; + break; + default: + if (!_jso_is_whitespace_char(c)) { + show_error("Unexpected character at position " + string(i) + ".", true); + } + break; + } + break; + } + } + + //Return extracted list with ending position if the ending ] is found + if (found_end) { + return __jso_gmt_tuple(list, i); + } + //Ended too early, throw error + else { + show_error("Unexpected end of list in JSON string.", true); + } +} + +#define _jso_decode_string +{ + /** + _jso_decode_string(json, startindex): Extract a string from JSON string starting at position . + Return a 2-tuple of the extracted string and the position after the ending double quote. + JSOnion version: 1.0.0d + */ + var i, len, str; + i = argument1; + len = string_length(argument0); + str = ""; + + //Seek to first double quote + var c; + c = string_char_at(argument0, i); + if (c != '"') { + do { + i += 1; + c = string_char_at(argument0, i); + } until (c == '"') + } + i += 1; + + //Read until end of JSON or ending double quote + var found_end, escape_mode; + found_end = false; + escape_mode = false; + for (i=i; i<=len && !found_end; i+=1) { + c = string_char_at(argument0, i); + //Escape mode + if (escape_mode) { + switch (c) { + case '"': case "\": case "/": + str += c; + escape_mode = false; + break; + case "b": + str += chr(8); + escape_mode = false; + break; + case "f": + str += chr(12); + escape_mode = false; + break; + case "n": + str += chr(10); + escape_mode = false; + break; + case "r": + str += chr(13); + escape_mode = false; + break; + case "t": + str += chr(9); + escape_mode = false; + break; + case "u": + var u; + if (len-i < 5) { + show_error("Invalid escape character at position " + string(i) + ".", true); + } else { + str += chr(_jso_hex_to_decimal(string_copy(argument0, i+1, 4))); + escape_mode = false; + i += 4; + } + break; + default: + show_error("Invalid escape character at position " + string(i) + ".", true); + break; + } + } + //Regular mode + else { + switch (c) { + case '"': found_end = true; break; + case "\": escape_mode = true; break; + default: str += c; break; + } + } + } + + //Return extracted string with ending position if the ending double quote is found + if (found_end) { + return __jso_gmt_tuple(str, i); + } + //Ended too early, throw error + else { + show_error("Unexpected end of string in JSON string.", true); + } +} + +#define _jso_decode_boolean +{ + /** + _jso_decode_boolean(json, startindex): Extract a boolean from JSON string starting at position . + Return a 2-tuple of the extracted boolean and the position after the last e. + JSOnion version: 1.0.0d + */ + var i, len, str; + i = argument1; + len = string_length(argument0); + + //Seek to first t or f that can be found + var c; + c = string_char_at(argument0, i); + if (c != "t") && (c != "f") { + do { + i += 1; + c = string_char_at(argument0, i); + if (!_jso_is_whitespace_char(c)) && (c != "t") && (c != "f") { + show_error("Cannot parse boolean value at position " + string(i), true); + } + } until (c == "t") || (c == "f") + } + + //Look for true if t is found + if (c == "t") && (string_copy(argument0, i, 4) == "true") { + return __jso_gmt_tuple(true, i+4); + } + //Look for false if f is found + else if (c == "f") && (string_copy(argument0, i, 5) == "false") { + return __jso_gmt_tuple(false, i+5); + } + //Error: unexpected ending + else { + show_error("Unexpected end of boolean in JSON string.", true); + } +} + +#define _jso_decode_real +{ + /** + _jso_decode_real(json, startindex): Extract a real value from JSON string starting at position . + Return a 2-tuple of the extracted real value and the position after the real value. + JSOnion version: 1.0.0d + */ + var i, len, str; + i = argument1; + len = string_length(argument0); + str = ""; + + //Seek to first character: +, -, or 0-9 + var c; + c = string_char_at(argument0, i); + if (string_pos(c, "0123456789+-") == 0) { + do { + i += 1; + c = string_char_at(argument0, i); + if (!_jso_is_whitespace_char(c)) && (string_pos(c, "0123456789+-") == 0) { + show_error("Cannot parse real value at position " + string(i), true); + } + } until (string_pos(c, "0123456789+-") > 0) + } + + //Determine starting state + var state; + switch (c) { + case "+": case "-": + state = 0; + break; + default: + state = 1; + break; + } + str += c; + i += 1; + + //Loop until no more digits found + var done; + done = false; + for (i=i; i<=len && !done; i+=1) { + c = string_char_at(argument0, i); + switch (state) { + //0: Found a sign, looking for a starting number + case 0: + switch (c) { + case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": + str += c; + state = 1; + break; + default: + show_error("Unexpected character at position " + string(i) + ", expecting a digit.", true); + break; + } + break; + //1: Found a starting digit, looking for decimal dot, e, E, or more digits + case 1: + if (_jso_is_whitespace_char(c)) || (string_pos(c, ":,]}") > 0) { + done = true; + i -= 1; + } else { + switch (c) { + case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": + str += c; + break; + case ".": + str += c; + state = 2; + break; + case "e": case "E": + str += c; + state = 3; + break; + default: + show_error("Unexpected character at position " + string(i) + ", expecting a dot, e, E or a digit.", true); + break; + } + } + break; + //2: Found a decimal dot, looking for more digits + case 2: + switch (c) { + case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": + str += c; + state = -2; + break; + default: + show_error("Unexpected character at position " + string(i) + ", expecting a digit.", true); + break; + } + break; + //-2: Found a decimal dot and a digit after it, looking for more digits, e, or E + case -2: + if (_jso_is_whitespace_char(c)) || (string_pos(c, ":,]}") > 0) { + done = true; + i -= 1; + } else { + switch (c) { + case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": + str += c; + break; + case "e": case "E": + str += c; + state = 3; + break; + default: + show_error("Unexpected character at position " + string(i) + ", expecting an e, E or a digit.", true); + break; + } + } + break; + //3: Found an e/E, looking for +, - or more digits + case 3: + switch (c) { + case "+": case "-": + str += c; + state = 4; + break; + case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": + str += c; + state = 5; + break; + default: + show_error("Unexpected character at position " + string(i) + ", expecting a +, - or a digit.", true); + break; + } + break; + //4: Found an e/E exponent sign, looking for more digits + case 4: + switch (c) { + case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": + str += c; + state = 5; + break; + default: + show_error("Unexpected character at position " + string(i) + ", expecting a digit.", true); + break; + } + break; + //5: Looking for final digits of the exponent + case 5: + if (_jso_is_whitespace_char(c)) || (string_pos(c, ":,]}") > 0) { + done = true; + i -= 1; + } else { + switch (c) { + case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": + str += c; + state = 5; + break; + default: + show_error("Unexpected character at position " + string(i) + ", expecting a digit.", true); + break; + } + } + break; + } + } + + //Am I still expecting more characters? + if (done) || (state == 1) || (state == -2) || (state == 5) { + return __jso_gmt_tuple(real(str), i); + } + //Error: unexpected ending + else { + show_error("Unexpected end of real in JSON string.", true); + } +} + +#define _jso_decode_integer +{ + /** + _jso_decode_real(json, startindex): Extract a real value from JSON string starting at position . + Return a 2-tuple of the extracted integer value (with leading i) and the position after the real value. + JSOnion version: 1.0.0d + */ + var i, len, str; + i = argument1; + len = string_length(argument0); + str = ""; + + //Seek to first character: +, -, or 0-9 + var c; + c = string_char_at(argument0, i); + if (string_pos(c, "0123456789+-") == 0) { + do { + i += 1; + c = string_char_at(argument0, i); + if (!_jso_is_whitespace_char(c)) && (string_pos(c, "0123456789+-") == 0) { + show_error("Cannot parse integer value at position " + string(i), true); + } + } until (string_pos(c, "0123456789+-") > 0) + } + + //Determine starting state + var state; + switch (c) { + case "+": case "-": + state = 0; + break; + default: + state = 1; + break; + } + str += c; + i += 1; + + //Loop until no more digits found + var done; + done = false; + for (i=i; i<=len && !done; i+=1) { + c = string_char_at(argument0, i); + switch (state) { + //0: Found a sign, looking for a starting number + case 0: + switch (c) { + case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": + str += c; + state = 1; + break; + default: + show_error("Unexpected character at position " + string(i) + ", expecting a digit.", true); + break; + } + break; + //1: Found a starting digit, looking for decimal dot, e, E, or more digits + case 1: + if (_jso_is_whitespace_char(c)) || (string_pos(c, ":,]}") > 0) { + done = true; + i -= 1; + } else { + switch (c) { + case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": + str += c; + break; + default: + show_error("Unexpected character at position " + string(i) + ", expecting a digit.", true); + break; + } + } + break; + } + } + + //Am I still expecting more characters? + if (done) || (state == 1) { + return __jso_gmt_tuple(floor(real(str)), i); + } + //Error: unexpected ending + else { + show_error("Unexpected end of integer in JSON string.", true); + } +} + +#define jso_compare_maps +{ + /** + jso_compare_maps(map1, map2): Return whether the contents of JSOnion-compatible maps and are the same. + JSOnion version: 1.0.0d + */ + + //If they aren't the same size, they can't be the same + var size; + size = ds_map_size(argument0); + if (size != ds_map_size(argument1)) { + return false; + } + + //Compare contents pairwise + var i, k, type, a, b; + k = ds_map_find_first(argument0); + for (i=0; i and are the same. + JSOnion version: 1.0.0d + */ + + //If they aren't the same size, they can't be the same + var size; + size = ds_list_size(argument0); + if (size != ds_list_size(argument1)) { + return false; + } + + //Compare contents pairwise + var i, type, a, b; + for (i=0; i, return whether a value exists there. + JSOnion version: 1.0.0d + */ + + //Catch empty calls + if (argument_count < 2) { + show_error("Expected at least 2 arguments, got " + string(argument_count) + ".", true); + } + + //Build list of keys/indices + var i, key_list; + key_list = ds_list_create(); + for (i=1; i, return whether a value exists there. + JSOnion version: 1.0.0d + */ + + //Catch empty calls + if (argument_count < 2) { + show_error("Expected at least 2 arguments, got " + string(argument_count) + ".", true); + } + + //Build list of keys/indices + var i, key_list; + key_list = ds_list_create(); + for (i=1; i, return the value that exists there. + JSOnion version: 1.0.0d + */ + + //Catch empty calls + if (argument_count < 2) { + show_error("Expected at least 2 arguments, got " + string(argument_count) + ".", true); + } + + //Build list of keys/indices + var i, key_list; + key_list = ds_list_create(); + for (i=1; i, return the type of value that exists there. + JSOnion version: 1.0.0d + */ + + //Catch empty calls + if (argument_count < 2) { + show_error("Expected at least 2 arguments, got " + string(argument_count) + ".", true); + } + + //Build list of keys/indices + var i, key_list; + key_list = ds_list_create(); + for (i=1; i, return the value that exists there. + JSOnion version: 1.0.0d + */ + + //Catch empty calls + if (argument_count < 2) { + show_error("Expected at least 2 arguments, got " + string(argument_count) + ".", true); + } + + //Build list of keys/indices + var i, key_list; + key_list = ds_list_create(); + for (i=1; i, return the type of value that exists there. + JSOnion version: 1.0.0d + */ + + //Catch empty calls + if (argument_count < 2) { + show_error("Expected at least 2 arguments, got " + string(argument_count) + ".", true); + } + + //Build list of keys/indices + var i, key_list; + key_list = ds_list_create(); + for (i=1; i= ds_list_size(data)) { + switch (task_type) { + case 0: + return false; + break; + default: + show_error("Index overflow for nested lists in " + type_string + " lookup.", true); + break; + } + } + type = jso_list_get_type(data, k); + data = jso_list_get(data, k); + break; + //Trying to go through a leaf; don't attempt to look further + default: + switch (task_type) { + case 0: + return false; + break; + default: + show_error("Recursive overflow in " + type_string + " lookup.", true); + break; + } + break; + } + } + + //Can find something, return the value requested by the task + switch (task_type) { + case 0: + return true; + break; + case 1: + return data; + break; + case 2: + return type; + break; + } +} + +#define _jso_is_whitespace_char +{ + /** + _jso_is_whitespace_char(char): Return whether is a whitespace character. + Definition of whitespace is given by Unicode 6.0, Chapter 4.6. + JSOnion version: 1.0.0d + */ + switch (ord(argument0)) { + case $0009: + case $000A: + case $000B: + case $000C: + case $000D: + case $0020: + case $0085: + case $00A0: + case $1680: + case $180E: + case $2000: + case $2001: + case $2002: + case $2003: + case $2004: + case $2005: + case $2006: + case $2007: + case $2008: + case $2009: + case $200A: + case $2028: + case $2029: + case $202F: + case $205F: + case $3000: + return true; + } + return false; +} + +#define _jso_hex_to_decimal +{ + /** + _jso_hex_to_decimal(hex_string): Return the decimal value of the hex number represented by + JSOnion version: 1.0.0d + */ + var hex_string, hex_digits; + hex_string = string_lower(argument0); + hex_digits = "0123456789abcdef"; + + //Convert digit-by-digit + var i, len, digit_value, num; + len = string_length(hex_string); + num = 0; + for (i=1; i<=len; i+=1) { + digit_value = string_pos(string_char_at(hex_string, i), hex_digits)-1; + if (digit_value >= 0) { + num *= 16; + num += digit_value; + } + //Unknown character + else { + show_error("Invalid hex number: " + argument0, true); + } + } + return num; +} + diff --git a/samples/Game Maker Language/jsonion_test.gml b/samples/Game Maker Language/jsonion_test.gml new file mode 100644 index 00000000..3cf0d423 --- /dev/null +++ b/samples/Game Maker Language/jsonion_test.gml @@ -0,0 +1,1169 @@ +// Originally from /jsonion_test.gml in JSOnion +// JSOnion v1.0.0d is licensed under the MIT licence. You may freely adapt and use this library in commercial and non-commercial projects. + +#define assert_true +{ + /** + assert_true(result, errormsg): Display error unless is true. + */ + + if (!argument0) { + _assert_error_popup(argument1 + string_repeat(_assert_newline(), 2) + "Expected true, got false."); + } +} + +#define assert_false +{ + /** + assert_false(result, errormsg): Display error unless is false. + */ + + if (argument0) { + _assert_error_popup(argument1 + string_repeat(_assert_newline(), 2) + "Expected false, got true."); + } +} + +#define assert_equal +{ + /** + assert_equal(expected, result, errormsg): Display error unless and are equal. + */ + + //Safe equality check; won't crash even if the two are different types + var match; + match = is_string(argument0) == is_string(argument1); + if (match) { + match = argument0 == argument1; + } + + //No match? + if (!match) { + //Data types + var type; + type[0] = "(Real)"; + type[1] = "(String)"; + + //Construct message + var msg; + msg = argument2; + //Add expected value + msg += string_repeat(_assert_newline(), 2); + msg += "Expected " + type[is_string(argument0)] + ":" + _assert_newline(); + msg += _assert_debug_value(argument0); + //Add actual value + msg += string_repeat(_assert_newline(), 2); + msg += "Actual " + type[is_string(argument1)] + ":" + _assert_newline(); + msg += _assert_debug_value(argument1); + + //Display message + _assert_error_popup(msg); + } +} + +#define _assert_error_popup +{ + /** + _assert_error_popup(msg): Display an assertion error. + */ + + //Display message + if (os_browser == browser_not_a_browser) { + show_error(argument0, false); //Full-fledged error message for non-browser environments + } else { + show_message(argument0); //Browsers don't support show_error(), use show_message() instead + } +} + +#define _assert_debug_value +{ + /** + _assert_debug_value(val): Returns a low-level debug value for the value . + can be a string or a real value. + */ + + //String + if (is_string(argument0)) { + if (os_browser == browser_not_a_browser) { + return argument0; + } else { + return string_replace_all(argument0, "#", "\#"); + } + } + + //Numeric --- use GMTuple's algorithm + else { + + //Integers + if (frac(argument0) == 0) { + return string(argument0); + } + + //Decimal numbers; get exponent and mantissa + var mantissa, exponent; + exponent = floor(log10(abs(argument0))); + mantissa = string_format(argument0/power(10,exponent), 15, 14); + //Look for trailing zeros in the mantissa + var i, ca; + i = string_length(mantissa); + do { + ca = string_char_at(mantissa, i); + i -= 1; + } until (ca != "0") + //Remove the dot if only the first digit of the normalized mantissa is nonzero + if (ca != ".") { + mantissa = string_copy(mantissa, 1, i+1); + } + else { + mantissa = string_copy(mantissa, 1, i); + } + //Remove the exponent if it is 0 + if (exponent != 0) { + return mantissa + "e" + string(exponent); + } else { + return mantissa; + } + + //GMTuple algorithm done + } +} + +#define _assert_newline +{ + /** + _assert_newline(): Returns a system-appropriate newline character sequence. + */ + + if (os_browser == browser_not_a_browser) { + return chr(13) + chr(10); + } else { + return "#"; + } +} + +#define jso_test_all +{ + /** + jso_test_all(): Run the test suite for the JSOnion library. + JSOnion version: 1.0.0d + */ + var a, b; + a = current_time; + _test_jso_new(); + _test_jso_map_add(); + _test_jso_list_add(); + _test_jso_encode(); + _test_jso_compare(); + _test_jso_decode(); + _test_jso_lookup(); + _test_jso_bugs(); + __jso_gmt_test_all(); + b = current_time; + show_debug_message("JSOnion: Tests completed in " + string(b-a) + "ms."); +} + +#define _test_jso_new +{ + /** + _test_jso_new(): Test jso_new_*() functions. + JSOnion version: 1.0.0d + */ + + var expected, actual; + + //jso_new_map() + actual = jso_new_map(); + assert_true(actual >= 0, "jso_new_map() failed to create a new map."); + ds_map_destroy(actual); + + //jso_new_list() + actual = jso_new_list(); + assert_true(actual >= 0, "jso_new_list() failed to create a new list."); + ds_list_destroy(actual); +} + +#define _test_jso_map_add +{ + /** + _test_jso_map_add(): Test jso_map_add_*() functions. + JSOnion version: 1.0.0d + */ + + var expected, actual, key, map; + map = jso_new_map(); + + //jso_map_add_real() + expected = pi; + key = "pi"; + jso_map_add_real(map, key, expected); + actual = jso_map_get(map, key); + assert_true(ds_map_exists(map, key), "jso_map_add_real() failed to add the number."); + assert_equal(expected, actual, "jso_map_add_real() added the wrong number."); + ds_map_delete(map, key); + + //jso_map_add_string() + expected = "waahoo"; + key = "str"; + jso_map_add_string(map, key, expected); + actual = jso_map_get(map, key); + assert_true(ds_map_exists(map, key), "jso_map_add_string() failed to add the string."); + assert_equal(expected, actual, "jso_map_add_string() added the wrong string."); + ds_map_delete(map, key); + + //jso_map_add_sublist() + expected = jso_new_list(); + key = "sublist"; + jso_map_add_sublist(map, key, expected); + actual = jso_map_get(map, key); + assert_true(ds_map_exists(map, key), "jso_map_add_sublist() failed to add the new sublist."); + assert_equal(expected, actual, "jso_map_add_sublist() added the wrong sublist."); + ds_map_delete(map, key); + ds_list_destroy(expected); + + //jso_map_add_submap() + expected = jso_new_map(); + key = "sublist"; + jso_map_add_sublist(map, key, expected); + actual = jso_map_get(map, key); + assert_true(ds_map_exists(map, key), "jso_map_add_submap() failed to add the new submap."); + assert_equal(expected, actual, "jso_map_add_submap() added the wrong submap."); + ds_map_delete(map, key); + ds_map_destroy(expected); + + //jso_map_add_integer() + expected = 2345; + key = "integer"; + jso_map_add_integer(map, key, expected); + actual = jso_map_get(map, key); + assert_true(ds_map_exists(map, key), "jso_map_add_integer() failed to add the new integer."); + assert_equal(expected, actual, "jso_map_add_integer() added the wrong integer."); + ds_map_delete(map, key); + + //jso_map_add_boolean() --- true + expected = true; + key = "booleantrue"; + jso_map_add_boolean(map, key, expected); + actual = jso_map_get(map, key); + assert_true(ds_map_exists(map, key), "jso_map_add_boolean() failed to add true."); + assert_true(actual, "jso_map_add_boolean() added the wrong true."); + ds_map_delete(map, key); + + //jso_map_add_boolean() --- false + expected = false; + key = "booleanfalse"; + jso_map_add_boolean(map, key, expected); + actual = jso_map_get(map, key) + assert_true(ds_map_exists(map, key), "jso_map_add_boolean() failed to add false."); + assert_false(actual, "jso_map_add_boolean() added the wrong false."); + ds_map_delete(map, key); + + //Cleanup + ds_map_destroy(map); +} + +#define _test_jso_list_add +{ + /** + _test_jso_list_add(): Test jso_list_add_*() functions. + JSOnion version: 1.0.0d + */ + + var expected, actual, list; + list = jso_new_list(); + + //jso_list_add_real() + expected = pi; + jso_list_add_real(list, expected); + actual = jso_list_get(list, 0); + assert_false(ds_list_empty(list), "jso_list_add_real() failed to add the number."); + assert_equal(expected, actual, "jso_list_add_real() added the wrong number."); + ds_list_clear(list); + + //jso_list_add_string() + expected = "waahoo"; + jso_list_add_string(list, expected); + actual = jso_list_get(list, 0); + assert_false(ds_list_empty(list), "jso_list_add_string() failed to add the string."); + assert_equal(expected, actual, "jso_list_add_string() added the wrong string."); + ds_list_clear(list); + + //jso_list_add_sublist() + expected = jso_new_list(); + jso_list_add_sublist(list, expected); + actual = jso_list_get(list, 0); + assert_false(ds_list_empty(list), "jso_list_add_sublist() failed to add the sublist."); + assert_equal(expected, actual, "jso_list_add_sublist() added the wrong sublist."); + ds_list_clear(list); + ds_list_destroy(expected); + + //jso_list_add_submap() + expected = jso_new_map(); + jso_list_add_submap(list, expected); + actual = jso_list_get(list, 0); + assert_false(ds_list_empty(list), "jso_list_add_submap() failed to add the submap."); + assert_equal(expected, actual, "jso_list_add_submap() added the wrong submap."); + ds_list_clear(list); + ds_map_destroy(expected); + + //jso_list_add_integer() + expected = 2345; + jso_list_add_integer(list, expected); + actual = jso_list_get(list, 0); + assert_false(ds_list_empty(list), "jso_list_add_integer() failed to add integer."); + assert_equal(expected, actual, "jso_list_add_integer() added the wrong integer."); + ds_list_clear(list); + + //jso_list_add_boolean() --- true + expected = true; + jso_list_add_boolean(list, expected); + actual = jso_list_get(list, 0); + assert_false(ds_list_empty(list), "jso_list_add_boolean() failed to add boolean true."); + assert_true(actual, "jso_list_add_boolean() added the wrong boolean true."); + ds_list_clear(list); + + //jso_list_add_boolean() --- false + expected = false; + jso_list_add_boolean(list, expected); + actual = jso_list_get(list, 0); + assert_false(ds_list_empty(list), "jso_list_add_boolean() failed to add boolean false."); + assert_false(actual, "jso_list_add_boolean() added the wrong boolean false."); + ds_list_clear(list); + + //Cleanup + ds_list_destroy(list); +} + +#define _test_jso_encode +{ + /** + _test_jso_encode(): Tests jso_encode_*() functions. + JSOnion version: 1.0.0d + */ + + var original, expected, actual; + + //jso_encode_real() --- Positive + expected = 3.1415; + actual = jso_encode_real(3.1415); + assert_equal(expected, real(actual), "jso_encode_real() failed to encode positive real!"); + + //jso_encode_real() --- Negative + expected = -2.71828; + actual = jso_encode_real(-2.71828); + assert_equal(expected, real(actual), "jso_encode_real() failed to encode negative real!"); + + //jso_encode_real() --- Zero + expected = 0; + actual = jso_encode_integer(0); + assert_equal(expected, real(actual), "jso_encode_real() failed to encode zero!"); + + //jso_encode_integer() --- Positive + expected = "2345"; + actual = jso_encode_integer(2345); + assert_equal(expected, actual, "jso_encode_integer() failed to encode positive integer!"); + + //jso_encode_integer() --- Negative + expected = "-45"; + actual = jso_encode_integer(-45); + assert_equal(expected, actual, "jso_encode_integer() failed to encode negative integer!"); + + //jso_encode_integer() --- Zero + expected = "0"; + actual = jso_encode_integer(0); + assert_equal(expected, actual, "jso_encode_integer() failed to encode zero!"); + + //jso_encode_boolean() --- true + expected = "true"; + actual = jso_encode_boolean(true); + assert_equal(expected, actual, "jso_encode_boolean() failed to encode true!"); + + //jso_encode_boolean() --- false + expected = "false"; + actual = jso_encode_boolean(false); + assert_equal(expected, actual, "jso_encode_boolean() failed to encode false!"); + + //jso_encode_string() --- Simple string + expected = '"waahoo"'; + actual = jso_encode_string("waahoo"); + assert_equal(expected, actual, "jso_encode_string() failed to encode simple string!"); + + //jso_encode_string() --- Empty string + expected = '""'; + actual = jso_encode_string(""); + assert_equal(expected, actual, "jso_encode_string() failed to encode empty string!"); + + //jso_encode_string() --- Basic escape characters + expected = '"\\\"\b\f\n\r\t"'; + actual = jso_encode_string('\"' + chr(8) + chr(12) + chr(10) + chr(13) + chr(9)); + assert_equal(expected, actual, "jso_encode_string() failed to encode escape character string!"); + + //jso_encode_map() --- Empty map + var empty_map; + empty_map = jso_new_map(); + expected = "{}"; + actual = jso_encode_map(empty_map); + assert_equal(expected, actual, "jso_encode_map() failed to encode empty map!"); + jso_cleanup_map(empty_map); + + //jso_encode_map() --- One-element map + var one_map; + one_map = jso_new_map(); + jso_map_add_string(one_map, "key", "value"); + expected = '{"key":"value"}'; + actual = jso_encode_map(one_map); + assert_equal(expected, actual, "jso_encode_map() failed to encode one-element map!"); + jso_cleanup_map(one_map); + + //jso_encode_map() --- Multi-element map + var multi_map, ok1, ok2; + multi_map = jso_new_map(); + jso_map_add_string(multi_map, "key1", "value\1"); + jso_map_add_integer(multi_map, "key2", 2); + ok1 = '{"key1":"value\\1","key2":2}'; + ok2 = '{"key2":2,"key1":"value\\1"}'; + actual = jso_encode_map(multi_map); + assert_true((actual == ok1) || (actual == ok2), "jso_encode_map() failed to encode multi-element map!"); + jso_cleanup_map(multi_map); + + //jso_encode_list() --- Empty list + var empty_list; + empty_list = jso_new_list(); + expected = "[]"; + actual = jso_encode_list(empty_list); + assert_equal(expected, actual, "jso_encode_list() failed to encode empty list!"); + jso_cleanup_list(empty_list); + + //jso_encode_list() --- One-element nested list + var one_list; + one_list = jso_new_list(); + jso_list_add_submap(one_list, jso_new_map()); + expected = "[{}]"; + actual = jso_encode_list(one_list); + assert_equal(expected, actual, "jso_encode_list() failed to encode one-element nested list!"); + jso_cleanup_list(one_list); + + //jso_encode_list() --- Multi-element nested list + var multi_list, submap, sublist; + multi_list = jso_new_list(); + submap = jso_new_map(); + jso_map_add_string(submap, "1", "one"); + jso_list_add_submap(multi_list, submap); + jso_list_add_integer(multi_list, 2); + sublist = jso_new_list(); + jso_list_add_string(sublist, "three"); + jso_list_add_boolean(sublist, true); + jso_list_add_sublist(multi_list, sublist); + expected = '[{"1":"one"},2,["three",true]]'; + actual = jso_encode_list(multi_list); + assert_equal(expected, actual, "jso_encode_list() failed to encode one-element nested list!"); + jso_cleanup_list(multi_list); +} + +#define _test_jso_decode +{ + /** + _test_jso_decode(): Test core _jso_decode_*() functions. + The formatting is intentionally erratic here to simulate actual formatting deviations. + JSOnion version: 1.0.0d + */ + var json, expected, actual, expected_structure, actual_structure; + + ////Primitives + + //_jso_decode_string(): Empty string + json = '""'; + expected = __jso_gmt_tuple("", 3); + actual = _jso_decode_string(json, 1); + assert_equal(expected, actual, "_jso_decode_string() failed to decode an empty string!"); + + //_jso_decode_string(): Small string + json = '"key" '; + expected = __jso_gmt_tuple("key", 6); + actual = _jso_decode_string(json, 1); + assert_equal(expected, actual, "_jso_decode_string() failed to decode a small string!"); + + //_jso_decode_string(): Simple string + json = ' "The quick brown fox jumps over the lazy dog." '; + expected = __jso_gmt_tuple("The quick brown fox jumps over the lazy dog.", 49); + actual = _jso_decode_string(json, 1); + assert_equal(expected, actual, "_jso_decode_string() failed to decode a simple string!"); + + //_jso_decode_string(): Escape characters + json = ' "\"\\\b\f\n\r\t\u003A"'; + expected = __jso_gmt_tuple('"\' + chr(8) + chr(12) + chr(10) + chr(13) + chr(9) + chr($003a), 24); + actual = _jso_decode_string(json, 1); + assert_equal(expected, actual, "_jso_decode_string() failed to decode a string with escape characters!"); + + //_jso_decode_string(): Mixed characters + json = ' "\"\\\bWaahoo\f\n\r\tnegg\u003a"'; + expected = __jso_gmt_tuple('"\' + chr(8) + "Waahoo" + chr(12) + chr(10) + chr(13) + chr(9) + "negg" + chr($003a), 34); + actual = _jso_decode_string(json, 1); + assert_equal(expected, actual, "_jso_decode_string() failed to decode a string with mixed characters!"); + + //_jso_decode_boolean(): True + json = 'true'; + expected = __jso_gmt_tuple(true, 5); + actual = _jso_decode_boolean(json, 1); + assert_equal(expected, actual, "_jso_decode_boolean() failed to decode true!"); + + //_jso_decode_boolean(): False + json = ' false '; + expected = __jso_gmt_tuple(false, 8); + actual = _jso_decode_boolean(json, 1); + assert_equal(expected, actual, "_jso_decode_boolean() failed to decode false!"); + + //_jso_decode_real(): Zero + json = '0'; + expected = __jso_gmt_tuple(0, 2); + actual = _jso_decode_real(json, 1); + assert_equal(expected, actual, "_jso_decode_real() failed to decode standard zero!"); + + //_jso_decode_real(): Signed zero + json = ' +0 '; + expected = __jso_gmt_tuple(0, 5); + actual = _jso_decode_real(json, 1); + assert_equal(expected, actual, "_jso_decode_real() failed to decode signed zero!"); + + //_jso_decode_real(): Signed zero with decimal digits + json = ' -0.000'; + expected = __jso_gmt_tuple(0, 8); + actual = _jso_decode_real(json, 1); + assert_equal(expected, actual, "_jso_decode_real() failed to decode signed zero with decimal digits!"); + + //_jso_decode_real(): Positive real + json = '3.14159'; + expected = __jso_gmt_tuple(3.14159, 8); + actual = _jso_decode_real(json, 1); + assert_equal(expected, actual, "_jso_decode_real() failed to decode positive real number!"); + + //_jso_decode_real(): Negative real + json = ' -2.71828'; + expected = __jso_gmt_tuple(-2.71828, 10); + actual = _jso_decode_real(json, 1); + assert_equal(expected, actual, "_jso_decode_real() failed to decode negative real number!"); + + //_jso_decode_real(): Positive real with positive exponent + json = ' 3.14159e2'; + expected = __jso_gmt_tuple(3.14159*100, 11); + actual = _jso_decode_real(json, 1); + assert_equal(expected, actual, "_jso_decode_real() failed to decode positive real number with positive exponent!"); + + //_jso_decode_real(): Negative real with positive exponent + json = ' -2.71828E2'; + expected = __jso_gmt_tuple(-2.71828*100, 12); + actual = _jso_decode_real(json, 1); + assert_equal(expected, actual, "_jso_decode_real() failed to decode negative real number with positive exponent!"); + + //_jso_decode_real(): Positive real with negative exponent + json = ' 314.159e-2'; + expected = __jso_gmt_tuple(3.14159, 12); + actual = _jso_decode_real(json, 1); + assert_equal(expected, actual, "_jso_decode_real() failed to decode positive real number with negative exponent!"); + + //_jso_decode_real(): Negative real with negative exponent + json = ' -271.828E-2'; + expected = __jso_gmt_tuple(-2.71828, 13); + actual = _jso_decode_real(json, 1); + assert_equal(expected, actual, "_jso_decode_real() failed to decode negative real number with negative exponent!"); + + //_jso_decode_real(): Positive integer + json = ' +1729'; + expected = __jso_gmt_tuple(1729, 7); + actual = _jso_decode_real(json, 1); + assert_equal(expected, actual, "_jso_decode_real() failed to decode positive integer!"); + + //_jso_decode_real(): Negative integer + json = '-583'; + expected = __jso_gmt_tuple(-583, 5); + actual = _jso_decode_real(json, 1); + assert_equal(expected, actual, "_jso_decode_real() failed to decode negative integer!"); + + //_jso_decode_integer(): Zero + json = ' 0 '; + expected = __jso_gmt_tuple(0, 3); + actual = _jso_decode_integer(json, 1); + assert_equal(expected, actual, "_jso_decode_integer() failed to decode zero!"); + + //_jso_decode_integer(): Positive integer + json = ' 1729 '; + expected = __jso_gmt_tuple(1729, 6); + actual = _jso_decode_integer(json, 1); + assert_equal(expected, actual, "_jso_decode_integer() failed to decode positive integer!"); + + //_jso_decode_integer(): Negative integer + json = ' -583'; + expected = __jso_gmt_tuple(-583, 8); + actual = _jso_decode_integer(json, 1); + assert_equal(expected, actual, "_jso_decode_integer() failed to decode negative integer!"); + + + ////Data structures + + //_jso_decode_map(): Empty map #1 + json = '{}'; + expected_structure = jso_new_map(); + expected = __jso_gmt_tuple(expected_structure, 3); + actual = _jso_decode_map(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_map() didn't stop at the right place! (#1)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_map() didn't include the right prefix! (#1)"); + assert_true(jso_compare_maps(expected_structure, actual_structure), "_jso_decode_map() failed to decode an empty map! (#1)"); + jso_cleanup_map(expected_structure); + jso_cleanup_map(actual_structure); + + //_jso_decode_map(): Empty map #2 + json = ' { } '; + expected_structure = jso_new_map(); + expected = __jso_gmt_tuple(expected_structure, 7); + actual = _jso_decode_map(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_map() didn't stop at the right place! (#2)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_map() didn't include the right prefix! (#2)"); + assert_true(jso_compare_maps(expected_structure, actual_structure), "_jso_decode_map() failed to decode an empty map! (#2)"); + jso_cleanup_map(expected_structure); + jso_cleanup_map(actual_structure); + + //_jso_decode_map(): One-entry map + json = ' {"key": "value"} '; + expected_structure = jso_new_map(); + expected = __jso_gmt_tuple(expected_structure, 18); + jso_map_add_string(expected_structure, "key", "value"); + actual = _jso_decode_map(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_map() didn't stop at the right place! (one-entry map)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_map() didn't include the right prefix! (one-entry map)"); + assert_true(jso_compare_maps(expected_structure, actual_structure), "_jso_decode_map() failed to decode a one-entry map!"); + jso_cleanup_map(expected_structure); + jso_cleanup_map(actual_structure); + + //_jso_decode_map(): Multi-entry map + json = ' {"key" : "value", "pi":3.14, "bool" : true} '; + expected_structure = jso_new_map(); + expected = __jso_gmt_tuple(expected_structure, 48); + jso_map_add_string(expected_structure, "key", "value"); + jso_map_add_real(expected_structure, "pi", 3.14); + jso_map_add_boolean(expected_structure, "bool", true); + actual = _jso_decode_map(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_map() didn't stop at the right place! (multi-entry map)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_map() didn't include the right prefix! (multi-entry map)"); + assert_true(jso_compare_maps(expected_structure, actual_structure), "_jso_decode_map() failed to decode a multi-entry map!"); + jso_cleanup_map(expected_structure); + jso_cleanup_map(actual_structure); + + //_jso_decode_map(): Nested maps + var submap; + json = '{ "waahoo" : { "woohah" : 3 } , "woohah" : 4 }'; + expected_structure = jso_new_map(); + expected = __jso_gmt_tuple(expected_structure, 47); + jso_map_add_integer(expected_structure, "woohah", 4); + submap = jso_new_map(); + jso_map_add_integer(submap, "woohah", 3); + jso_map_add_submap(expected_structure, "waahoo", submap); + actual = _jso_decode_map(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_map() didn't stop at the right place! (nested map)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_map() didn't include the right prefix! (nested map)"); + assert_true(jso_compare_maps(expected_structure, actual_structure), "_jso_decode_map() failed to decode a nested map!"); + jso_cleanup_map(expected_structure); + jso_cleanup_map(actual_structure); + + //_jso_decode_map(): Map with nested lists + var sublist, subsublist; + json = '{ "waahoo" : [ "woohah", [true] ] , "woohah" : 4 }'; + expected_structure = jso_new_map(); + expected = __jso_gmt_tuple(expected_structure, 51); + jso_map_add_real(expected_structure, "woohah", 4); + sublist = jso_new_list(); + jso_list_add_string(sublist, "woohah"); + subsublist = jso_new_list(); + jso_list_add_boolean(subsublist, true); + jso_list_add_sublist(sublist, subsublist); + jso_map_add_sublist(expected_structure, "waahoo", sublist); + actual = _jso_decode_map(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_map() didn't stop at the right place! (map with nested lists)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_map() didn't include the right prefix! (map with nested lists)"); + assert_true(jso_compare_maps(expected_structure, actual_structure), "_jso_decode_map() failed to decode a map with nested lists!"); + jso_cleanup_map(expected_structure); + jso_cleanup_map(actual_structure); + + //_jso_decode_map(): Mix-up nested map + var sublist; + json = ' { "waahoo" : [{}, "a", 1] }'; + expected_structure = jso_new_map(); + expected = __jso_gmt_tuple(expected_structure, 30); + sublist = jso_new_list(); + jso_list_add_submap(sublist, jso_new_map()); + jso_list_add_string(sublist, "a"); + jso_list_add_real(sublist, 1); + jso_map_add_sublist(expected_structure, "waahoo", sublist); + actual = _jso_decode_map(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_map() didn't stop at the right place! (mix-up nested map)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_map() didn't include the right prefix! (mix-up nested map)"); + assert_true(jso_compare_maps(expected_structure, actual_structure), "_jso_decode_map() failed to decode a mix-up nested map!"); + jso_cleanup_map(expected_structure); + jso_cleanup_map(actual_structure); + + //_jso_decode_list(): Empty list #1 + json = '[]'; + expected_structure = jso_new_list(); + expected = __jso_gmt_tuple(expected_structure, 3); + actual = _jso_decode_list(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_list() didn't stop at the right place! (#1)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_list() didn't include the right prefix! (#1)"); + assert_true(jso_compare_lists(expected_structure, actual_structure), "_jso_decode_list() failed to decode an empty list! (#1)"); + jso_cleanup_list(expected_structure); + jso_cleanup_list(actual_structure) + + //_jso_decode_list(): Empty list #2 + json = ' [ ] '; + expected_structure = jso_new_list(); + expected = __jso_gmt_tuple(expected_structure, 6); + actual = _jso_decode_list(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_list() didn't stop at the right place! (#2)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_list() didn't include the right prefix! (#2)"); + assert_true(jso_compare_lists(expected_structure, actual_structure), "_jso_decode_list() failed to decode an empty list! (#2)"); + jso_cleanup_list(expected_structure); + jso_cleanup_list(actual_structure); + + //_jso_decode_list(): One-entry list + json = '[3]'; + expected_structure = jso_new_list(); + expected = __jso_gmt_tuple(expected_structure, 4); + jso_list_add_integer(expected_structure, 3); + actual = _jso_decode_list(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_list() didn't stop at the right place! (one-entry list)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_list() didn't include the right prefix! (one-entry list)"); + assert_true(jso_compare_lists(expected_structure, actual_structure), "_jso_decode_list() failed to decode a one-entry list!"); + jso_cleanup_list(expected_structure); + jso_cleanup_list(actual_structure); + + //_jso_decode_list(): Multi-entry list + json = ' [4,"multi-entry",true]'; + expected_structure = jso_new_list(); + expected = __jso_gmt_tuple(expected_structure, 24); + jso_list_add_real(expected_structure, 4); + jso_list_add_string(expected_structure, "multi-entry"); + jso_list_add_boolean(expected_structure, true); + actual = _jso_decode_list(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_list() didn't stop at the right place! (multi-entry list)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_list() didn't include the right prefix! (multi-entry list)"); + assert_true(jso_compare_lists(expected_structure, actual_structure), "_jso_decode_list() failed to decode a multi-entry list!"); + jso_cleanup_list(expected_structure); + jso_cleanup_list(actual_structure); + + //_jso_decode_list(): Nested list + var sublist; + json = ' [ [], 3, false, ["waahoo"]]'; + expected_structure = jso_new_list(); + expected = __jso_gmt_tuple(expected_structure, 29); + jso_list_add_sublist(expected_structure, jso_new_list()); + jso_list_add_integer(expected_structure, 3); + jso_list_add_boolean(expected_structure, false); + sublist = jso_new_list(); + jso_list_add_string(sublist, "waahoo"); + jso_list_add_sublist(expected_structure, sublist); + actual = _jso_decode_list(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_list() didn't stop at the right place! (nested list)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_list() didn't include the right prefix! (nested list)"); + assert_true(jso_compare_lists(expected_structure, actual_structure), "_jso_decode_list() failed to decode a nested list!"); + jso_cleanup_list(expected_structure); + jso_cleanup_list(actual_structure); + + //_jso_decode_list(): List with nested maps + var submap; + json = ' [3, false, { "waahoo":"woo"}]'; + expected_structure = jso_new_list(); + expected = __jso_gmt_tuple(expected_structure, 31); + jso_list_add_integer(expected_structure, 3); + jso_list_add_boolean(expected_structure, false); + submap = jso_new_map(); + jso_map_add_string(submap, "waahoo", "woo"); + jso_list_add_submap(expected_structure, submap); + actual = _jso_decode_list(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_list() didn't stop at the right place! (list with nested maps)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_list() didn't include the right prefix! (list with nested maps)"); + assert_true(jso_compare_lists(expected_structure, actual_structure), "_jso_decode_list() failed to decode a list with nested maps!"); + jso_cleanup_list(expected_structure); + jso_cleanup_list(actual_structure); + + //_jso_decode_list(): Mix-up nested list + var submap; + json = '[{}, {"a":[]}]'; + expected_structure = jso_new_list(); + expected = __jso_gmt_tuple(expected_structure, 15); + jso_list_add_submap(expected_structure, jso_new_map()); + submap = jso_new_map(); + jso_map_add_sublist(submap, "a", jso_new_list()); + jso_list_add_submap(expected_structure, submap); + actual = _jso_decode_list(json, 1); + actual_structure = __jso_gmt_elem(actual, 0); + assert_equal(__jso_gmt_elem(expected, 1), __jso_gmt_elem(actual, 1), "_jso_decode_list() didn't stop at the right place! (mix-up nested list)"); + assert_equal(actual_structure, __jso_gmt_elem(actual, 0), "_jso_decode_list() didn't include the right prefix! (mix-up nested list)"); + assert_true(jso_compare_lists(expected_structure, actual_structure), "_jso_decode_list() failed to decode a mix-up nested list!"); + jso_cleanup_list(expected_structure); + jso_cleanup_list(actual_structure); +} + +#define _test_jso_compare +{ + /** + _test_jso_compare(): Test basic jso_compare_*() functions. + JSOnion version: 1.0.0d + */ + var a, b; + + //jso_compare_maps(): Empty maps should equal each other + a = jso_new_map(); + b = jso_new_map(); + assert_true(jso_compare_maps(a, b), "Empty maps should equal each other. (#1)"); + assert_true(jso_compare_maps(b, a), "Empty maps should equal each other. (#2)"); + jso_cleanup_map(a); + jso_cleanup_map(b); + + //jso_compare_maps(): An empty map should not equal a filled map + a = jso_new_map(); + b = jso_new_map(); + jso_map_add_string(b, "junk", "info"); + jso_map_add_integer(b, "taxi", 1729); + assert_false(jso_compare_maps(a, b), "An empty map should not equal a filled map. (#1)"); + assert_false(jso_compare_maps(b, a), "An empty map should not equal a filled map. (#2)"); + jso_cleanup_map(a); + jso_cleanup_map(b); + + //jso_compare_maps(): Maps with same content entered in different orders should equal each other + a = jso_new_map(); + b = jso_new_map(); + jso_map_add_real(a, "A", 1); + jso_map_add_real(a, "B", 2); + jso_map_add_real(a, "C", 3); + jso_map_add_real(b, "C", 3); + jso_map_add_real(b, "A", 1); + jso_map_add_real(b, "B", 2); + assert_true(jso_compare_maps(a, b), "Maps with same content entered in different orders should equal each other. (#1)"); + assert_true(jso_compare_maps(b, a), "Maps with same content entered in different orders should equal each other. (#2)"); + jso_cleanup_map(a); + jso_cleanup_map(b); + + //jso_compare_maps(): Maps with different keys should not equal each other + a = jso_new_map(); + b = jso_new_map(); + jso_map_add_real(a, "A", 1); + jso_map_add_real(a, "B", 2); + jso_map_add_real(a, "C", 3); + jso_map_add_real(b, "D", 3); + jso_map_add_real(b, "A", 1); + jso_map_add_real(b, "B", 2); + assert_false(jso_compare_maps(a, b), "Maps with different keys should not equal each other. (#1)"); + assert_false(jso_compare_maps(b, a), "Maps with different keys should not equal each other. (#2)"); + jso_cleanup_map(a); + jso_cleanup_map(b); + + //jso_compare_maps(): Maps with different values should not equal each other + a = jso_new_map(); + b = jso_new_map(); + jso_map_add_real(a, "A", 5); + jso_map_add_real(a, "B", 6); + jso_map_add_real(a, "C", 9); + jso_map_add_real(b, "A", 5); + jso_map_add_real(b, "B", 6); + jso_map_add_real(b, "C", 8); + assert_false(jso_compare_maps(a, b), "Maps with different values should not equal each other. (#1)"); + assert_false(jso_compare_maps(b, a), "Maps with different values should not equal each other. (#2)"); + jso_cleanup_map(a); + jso_cleanup_map(b); + + //jso_compare_maps(): Maps with corresponding values of different types should not equal each other, and should not crash. + a = jso_new_map(); + b = jso_new_map(); + jso_map_add_real(a, "A", 5); + jso_map_add_real(a, "B", 6); + jso_map_add_real(a, "C", 8); + jso_map_add_real(b, "A", 5); + jso_map_add_string(b, "B", "six"); + jso_map_add_real(b, "C", 8); + assert_false(jso_compare_maps(a, b), "Maps with corresponding values of different types should not equal each other, and should not crash. (#1)"); + assert_false(jso_compare_maps(b, a), "Maps with corresponding values of different types should not equal each other, and should not crash. (#2)"); + jso_cleanup_map(a); + jso_cleanup_map(b); + + //jso_compare_lists(): Empty lists should equal each other + a = jso_new_list(); + b = jso_new_list(); + assert_true(jso_compare_lists(a, b), "Empty lists should equal each other. (#1)"); + assert_true(jso_compare_lists(b, a), "Empty lists should equal each other. (#2)"); + jso_cleanup_list(a); + jso_cleanup_list(b); + + //jso_compare_lists(): An empty list should not equal a filled list + a = jso_new_list(); + b = jso_new_list(); + jso_list_add_string(b, "junk"); + jso_list_add_integer(b, 1729); + assert_false(jso_compare_lists(a, b), "An empty list should not equal a filled list. (#1)"); + assert_false(jso_compare_lists(b, a), "An empty list should not equal a filled list. (#2)"); + jso_cleanup_list(a); + jso_cleanup_list(b); + + //jso_compare_lists(): Lists with same content entered in different orders should not equal each other + a = jso_new_list(); + b = jso_new_list(); + jso_list_add_real(a, 1); + jso_list_add_real(a, 2); + jso_list_add_real(a, 3); + jso_list_add_real(b, 3); + jso_list_add_real(b, 1); + jso_list_add_real(b, 2); + assert_false(jso_compare_lists(a, b), "Lists with same content entered in different orders should not equal each other. (#1)"); + assert_false(jso_compare_lists(b, a), "Lists with same content entered in different orders should not equal each other. (#2)"); + jso_cleanup_list(a); + jso_cleanup_list(b); + + //jso_compare_lists(): Lists with corresponding entries of different types should not equal each other, should also not crash. + a = jso_new_list(); + b = jso_new_list(); + jso_list_add_real(a, 1); + jso_list_add_real(a, 2); + jso_list_add_real(a, 3); + jso_list_add_real(b, 1); + jso_list_add_string(b, "two"); + jso_list_add_real(b, 3); + assert_false(jso_compare_lists(a, b), "Lists with corresponding entries of different types should not equal each other, should also not crash. (#1)"); + assert_false(jso_compare_lists(b, a), "Lists with corresponding entries of different types should not equal each other, should also not crash. (#2)"); + jso_cleanup_list(a); + jso_cleanup_list(b); +} + +#define _test_jso_lookup +{ + /** + _test_jso_lookup(): Test core jso_*_lookup() and jso_*_check() functions for nested structures. + JSOnion version: 1.0.0d + */ + var json, structure, expected, actual; + + //jso_map_check(): Single argument --- exists + json = '{ "one" : 1, "two" : 2, "three" : 3 }'; + structure = jso_decode_map(json); + assert_true(jso_map_check(structure, "one"), "jso_map_check() failed to find existing entry! (single argument)"); + jso_cleanup_map(structure); + + //jso_map_lookup(): Single argument --- exists + json = '{ "one" : 1, "two" : 2, "three" : 3 }'; + structure = jso_decode_map(json); + expected = 1; + actual = jso_map_lookup(structure, "one") + assert_equal(expected, actual, "jso_map_lookup() found the wrong entry! (single argument)"); + jso_cleanup_map(structure); + + //jso_map_lookup_type(): Single argument --- exists + json = '{ "one" : -1, "two" : true, "three" : "trap" }'; + structure = jso_decode_map(json); + expected = jso_type_real; + actual = jso_map_lookup_type(structure, "one") + assert_equal(expected, actual, "jso_map_lookup_type() found the wrong type! (single argument)"); + jso_cleanup_map(structure); + + //jso_map_check(): Single argument --- doesn't exist + json = '{ "one" : 1, "two" : 2, "three" : 3 }'; + structure = jso_decode_map(json); + assert_false(jso_map_check(structure, "four"), "jso_map_check() found an inexistent entry! (single argument)"); + jso_cleanup_map(structure); + + //jso_map_check(): Single argument --- doesn't exist + json = '{ "one" : 1, "two" : 2, "three" : 3, "four" : { "A":true, "B":false } }'; + structure = jso_decode_map(json); + assert_false(jso_map_check(structure, "A"), "jso_map_check() found an inexistent entry! (single argument, nested)"); + jso_cleanup_map(structure); + + //jso_map_check(): Multiple arguments (recurse) --- exists + json = '{ "one" : 1, "two" : 2, "three" : 3, "four" : { "A":true, "B":false } }'; + structure = jso_decode_map(json); + assert_true(jso_map_check(structure, "four", "A"), "jso_map_check() failed to find existing entry! (multiple arguments)"); + jso_cleanup_map(structure); + + //jso_map_lookup(): Multiple arguments (recurse) --- exists + json = '{ "one" : 1, "two" : 2, "three" : 3, "four" : { "A":true, "B":false } }'; + structure = jso_decode_map(json); + expected = true; + actual = jso_map_lookup(structure, "four", "A"); + assert_equal(expected, actual, "jso_map_lookup() found the wrong entry! (multiple arguments)"); + jso_cleanup_map(structure); + + //jso_map_lookup_type(): Multiple arguments (recurse) --- exists + json = '{ "one" : 1, "two" : 2, "three" : 3, "four" : { "A":true, "B":"trap" } }'; + structure = jso_decode_map(json); + expected = jso_type_boolean; + actual = jso_map_lookup_type(structure, "four", "A"); + assert_equal(expected, actual, "jso_map_lookup_type() found the wrong type! (multiple arguments)"); + jso_cleanup_map(structure); + + //jso_map_check(): Multiple arguments (recurse) --- doesn't exist + json = '{ "one" : 1, "two" : 2, "three" : 3, "four" : { "A":true, "B":false } }'; + structure = jso_decode_map(json); + assert_false(jso_map_check(structure, "four", "C"), "jso_map_check() found an inexistent entry! (multiple arguments, 1)"); + jso_cleanup_map(structure); + + //jso_map_check(): Multiple arguments (recurse) --- doesn't exist + json = '{ "one" : 1, "two" : 2, "three" : 3, "four" : { "A":true, "B":false } }'; + structure = jso_decode_map(json); + assert_false(jso_map_check(structure, "three", ""), "jso_map_check() found an inexistent entry! (multiple arguments, 2)"); + jso_cleanup_map(structure); + + //jso_map_check(): Multiple arguments with nested list --- exists + json = '{ "one" : 1, "two" : 2, "three" : 3, "four" : [ "A", true, ["B", false] ] }'; + structure = jso_decode_map(json); + assert_true(jso_map_check(structure, "four", 2, 1), "jso_map_check() failed to find an existing entry! (multiple arguments, nested)"); + jso_cleanup_map(structure); + + //jso_map_lookup(): Multiple arguments with nested list --- exists + json = '{ "one" : 1, "two" : 2, "three" : 3, "four" : [ "A", true, ["B", false] ] }'; + structure = jso_decode_map(json); + expected = false; + actual = jso_map_lookup(structure, "four", 2, 1); + assert_equal(expected, actual, "jso_map_lookup() failed to find an existing entry! (multiple arguments, nested)"); + jso_cleanup_map(structure); + + //jso_map_lookup_type(): Multiple arguments with nested list --- exists + json = '{ "one" : 1, "two" : 2, "three" : 3, "four" : [ "A", true, [false, "false"] ] }'; + structure = jso_decode_map(json); + expected = jso_type_string; + actual = jso_map_lookup_type(structure, "four", 2, 1); + assert_equal(expected, actual, "jso_map_lookup_type() found the wrong type! (multiple arguments, nested)"); + jso_cleanup_map(structure); + + //jso_map_check(): Multiple arguments with nested list --- wrong type + json = '{ "one" : 1, "two" : 2, "three" : 3, "four" : [ "A", true, ["B", false] ] }'; + structure = jso_decode_map(json); + assert_false(jso_map_check(structure, "four", "A", 1), "jso_map_check() found an inexistent entry! (multiple arguments, nested, wrong type)"); + jso_cleanup_map(structure); + + //jso_map_check(): Multiple arguments with nested list --- index overflow + json = '{ "one" : 1, "two" : 2, "three" : 3, "four" : [ "A", true, ["B", false] ] }'; + structure = jso_decode_map(json); + assert_false(jso_map_check(structure, "four", 2, 3), "jso_map_check() found an inexistent entry! (multiple arguments, nested, index overflow)"); + jso_cleanup_map(structure); + + //jso_list_check(): Single argument --- exists + json = '["one", 2, "three", true, 5]'; + structure = jso_decode_list(json); + assert_true(jso_list_check(structure, 2), "jso_list_check() failed to find an existing index! (single argument)"); + jso_cleanup_list(structure); + + //jso_list_lookup(): Single argument --- exists + json = '["one", 2, "three", true, 5]'; + structure = jso_decode_list(json); + expected = "three"; + actual = jso_list_lookup(structure, 2); + assert_equal(expected, actual, "jso_list_lookup() found the wrong index! (single argument)"); + jso_cleanup_list(structure); + + //jso_list_lookup_type(): Single argument --- exists + json = '["one", 2, "three", true, 5]'; + structure = jso_decode_list(json); + expected = jso_type_string; + actual = jso_list_lookup_type(structure, 2); + assert_equal(expected, actual, "jso_list_lookup_type() found the wrong type! (single argument)"); + jso_cleanup_list(structure); + + //jso_list_check(): Single argument --- doesn't exist + json = '["one", 2, "three", true, 5]'; + structure = jso_decode_list(json); + assert_false(jso_list_check(structure, 5), "jso_list_check() found an inexistent index! (single argument)"); + jso_cleanup_list(structure); + + //jso_list_check(): Multiple arguments (recurse) --- exists + json = '["one", 2, ["three", 3], true, 5]'; + structure = jso_decode_list(json); + assert_true(jso_list_check(structure, 2, 1), "jso_list_check() failed to find an existing index! (multiple arguments)"); + jso_cleanup_list(structure); + + //jso_list_lookup(): Multiple arguments (recurse) --- exists + json = '["one", 2, ["three", 3], true, 5]'; + structure = jso_decode_list(json); + expected = 3; + actual = jso_list_lookup(structure, 2, 1); + assert_equal(expected, actual, "jso_list_lookup() failed to find an existing index! (multiple arguments)"); + jso_cleanup_list(structure); + + //jso_list_lookup_type(): Multiple arguments (recurse) --- exists + json = '["one", 2, ["three", 3], true, 5]'; + structure = jso_decode_list(json); + expected = jso_type_real; + actual = jso_list_lookup_type(structure, 2, 1); + assert_equal(expected, actual, "jso_list_lookup_type() found the wrong type! (multiple arguments)"); + jso_cleanup_list(structure); + + //jso_list_check(): Multiple arguments (recurse) --- doesn't exist, inner index overflow + json = '["one", 2, ["three", 3], true, 5]'; + structure = jso_decode_list(json); + assert_false(jso_list_check(structure, 2, 2), "jso_list_check() found an inexistent index! (multiple arguments, inner index overflow)"); + jso_cleanup_list(structure); + + //jso_list_check(): Multiple arguments (recurse) --- doesn't exist, trying to index single entry + json = '["one", 2, ["three", 3], true, 5]'; + structure = jso_decode_list(json); + assert_false(jso_list_check(structure, 1, 0), "jso_list_check() found an inexistent index! (multiple arguments, indexing single entry)"); + jso_cleanup_list(structure); + + //jso_list_check(): Multiple arguments with nested map --- exists + json = '["one", 2, {"three":3}, true, 5]'; + structure = jso_decode_list(json); + assert_true(jso_list_check(structure, 2, "three"), "jso_list_check() failed to find an existing entry! (multiple arguments, nested map)"); + jso_cleanup_list(structure); + + //jso_list_lookup(): Multiple arguments with nested map --- exists + json = '["one", 2, {"three":3}, true, 5]'; + structure = jso_decode_list(json); + expected = 3; + actual = jso_list_lookup(structure, 2, "three"); + assert_equal(expected, actual, "jso_list_lookup() failed to find an existing entry! (multiple arguments, nested map)"); + jso_cleanup_list(structure); + + //jso_list_lookup_type(): Multiple arguments with nested map --- exists + json = '["one", 2, {"three":false}, true, 5]'; + structure = jso_decode_list(json); + expected = jso_type_boolean; + actual = jso_list_lookup_type(structure, 2, "three"); + assert_equal(expected, actual, "jso_list_lookup_type() found the wrong type! (multiple arguments, nested map)"); + jso_cleanup_list(structure); + + //jso_list_exists(): Multiple arguments with nested map --- doesn't exist, key on single entry + json = '["one", 2, {"three":3}, true, 5]'; + structure = jso_decode_list(json); + assert_false(jso_list_check(structure, 1, ""), "jso_list_check() found an inexistent entry! (multiple arguments, nested map, key on single entry)"); + jso_cleanup_list(structure); + + //jso_list_exists(): Multiple arguments with nested map --- doesn't exist, bad key + json = '["one", 2, {"three":3}, true, 5]'; + structure = jso_decode_list(json); + assert_false(jso_list_check(structure, 2, ""), "jso_list_check() found an inexistent entry! (multiple arguments, nested map, bad key)"); + jso_cleanup_list(structure); +} + +#define _test_jso_bugs +{ + /** + _test_jso_bugs(): Test reported bugs. + JSOnion version: 1.0.0d + */ + var expected, actual; + + //jso_encode_map() --- One-element map + //Bug 1: Crash when encoding boolean-valued entries in maps, unknown variable jso_type_integer + var one_map; + one_map = jso_new_map(); + jso_map_add_boolean(one_map, "true", true); + expected = '{"true":true}'; + actual = jso_encode_map(one_map); + assert_equal(expected, actual, "jso_encode_map() failed to encode one-element map with boolean entry!"); + jso_cleanup_map(one_map); +} + diff --git a/samples/Game Maker Language/loadserverplugins.gml b/samples/Game Maker Language/loadserverplugins.gml new file mode 100644 index 00000000..26a26758 --- /dev/null +++ b/samples/Game Maker Language/loadserverplugins.gml @@ -0,0 +1,252 @@ +/* + Originally from /Source/gg2/Scripts/Plugins/loadserverplugins.gml in Gang Garrison 2 + + Copyright (C) 2008-2013 Faucet Software + http://www.ganggarrison.com + + This program is free software; + you can redistribute it and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 3 of the License, or (at your option) + any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License along with this program; if not, + see . + + Additional permission under GNU GPL version 3 section 7 + If you modify this Program, or any covered work, by linking or combining it with the Game Maker runtime library, + the 39dll library/extension, Hobbel's Download Manager DLL, or modified versions of these libraries, + the licensors of this Program grant you additional permission to convey the resulting work. +*/ + +// loads plugins from ganggarrison.com asked for by server +// argument0 - comma separated plugin list (pluginname@md5hash) +// returns true on success, false on failure +var list, hashList, text, i, pluginname, pluginhash, realhash, url, handle, filesize, progress, tempfile, tempdir, failed, lastContact, isCached; + +failed = false; +list = ds_list_create(); +lastContact = 0; +isCached = false; +isDebug = false; +hashList = ds_list_create(); + +// split plugin list string +list = split(argument0, ','); + +// Split hashes from plugin names +for (i = 0; i < ds_list_size(list); i += 1) +{ + text = ds_list_find_value(list, i); + pluginname = string_copy(text, 0, string_pos("@", text) - 1); + pluginhash = string_copy(text, string_pos("@", text) + 1, string_length(text) - string_pos("@", text)); + ds_list_replace(list, i, pluginname); + ds_list_add(hashList, pluginhash); +} + +// Check plugin names and check for duplicates +for (i = 0; i < ds_list_size(list); i += 1) +{ + pluginname = ds_list_find_value(list, i); + + // invalid plugin name + if (!checkpluginname(pluginname)) + { + show_message('Error loading server-sent plugins - invalid plugin name:#"' + pluginname + '"'); + return false; + } + // is duplicate + else if (ds_list_find_index(list, pluginname) != i) + { + show_message('Error loading server-sent plugins - duplicate plugin:#"' + pluginname + '"'); + return false; + } +} + +// Download plugins +for (i = 0; i < ds_list_size(list); i += 1) +{ + pluginname = ds_list_find_value(list, i); + pluginhash = ds_list_find_value(hashList, i); + isDebug = file_exists(working_directory + "\ServerPluginsDebug\" + pluginname + ".zip"); + isCached = file_exists(working_directory + "\ServerPluginsCache\" + pluginname + "@" + pluginhash); + tempfile = temp_directory + "\" + pluginname + ".zip.tmp"; + tempdir = temp_directory + "\" + pluginname + ".tmp"; + + // check to see if we have a local copy for debugging + if (isDebug) + { + file_copy(working_directory + "\ServerPluginsDebug\" + pluginname + ".zip", tempfile); + // show warning + if (global.isHost) + { + show_message( + "Warning: server-sent plugin '" + + pluginname + + "' is being loaded from ServerPluginsDebug. Make sure clients have the same version, else they may be unable to connect." + ); + } + else + { + show_message( + "Warning: server-sent plugin '" + + pluginname + + "' is being loaded from ServerPluginsDebug. Make sure the server has the same version, else you may be unable to connect." + ); + } + } + // otherwise, check if we have it cached + else if (isCached) + { + file_copy(working_directory + "\ServerPluginsCache\" + pluginname + "@" + pluginhash, tempfile); + } + // otherwise, download as usual + else + { + // construct the URL + // http://www.ganggarrison.com/plugins/$PLUGINNAME$@$PLUGINHASH$.zip) + url = PLUGIN_SOURCE + pluginname + "@" + pluginhash + ".zip"; + + // let's make the download handle + handle = httpGet(url, -1); + + // download it + while (!httpRequestStatus(handle)) { + // prevent game locking up + io_handle(); + + httpRequestStep(handle); + + if (!global.isHost) { + // send ping if we haven't contacted server in 20 seconds + // we need to do this to keep the connection open + if (current_time-lastContact > 20000) { + write_byte(global.serverSocket, PING); + socket_send(global.serverSocket); + lastContact = current_time; + } + } + + // draw progress bar since they may be waiting a while + filesize = httpRequestResponseBodySize(handle); + progress = httpRequestResponseBodyProgress(handle); + draw_background_ext(background_index[0], 0, 0, background_xscale[0], background_yscale[0], 0, c_white, 1); + draw_set_color(c_white); + draw_set_alpha(1); + draw_set_halign(fa_left); + draw_rectangle(50, 550, 300, 560, 2); + draw_text(50, 530, "Downloading server-sent plugin " + string(i + 1) + "/" + string(ds_list_size(list)) + ' - "' + pluginname + '"'); + if (filesize != -1) + draw_rectangle(50, 550, 50 + progress / filesize * 250, 560, 0); + screen_refresh(); + } + + // errored + if (httpRequestStatus(handle) == 2) + { + show_message('Error loading server-sent plugins - download failed for "' + pluginname + '":#' + httpRequestError(handle)); + failed = true; + break; + } + + // request failed + if (httpRequestStatusCode(handle) != 200) + { + show_message('Error loading server-sent plugins - download failed for "' + pluginname + '":#' + string(httpRequestStatusCode(handle)) + ' ' + httpRequestReasonPhrase(handle)); + failed = true; + break; + } + else + { + write_buffer_to_file(httpRequestResponseBody(handle), tempfile); + if (!file_exists(tempfile)) + { + show_message('Error loading server-sent plugins - download failed for "' + pluginname + '":# No such file?'); + failed = true; + break; + } + } + + httpRequestDestroy(handle); + } + + // check file integrity + realhash = GG2DLL_compute_MD5(tempfile); + if (realhash != pluginhash) + { + show_message('Error loading server-sent plugins - integrity check failed (MD5 hash mismatch) for:#"' + pluginname + '"'); + failed = true; + break; + } + + // don't try to cache debug plugins + if (!isDebug) + { + // add to cache if we don't already have it + if (!file_exists(working_directory + "\ServerPluginsCache\" + pluginname + "@" + pluginhash)) + { + // make sure directory exists + if (!directory_exists(working_directory + "\ServerPluginsCache")) + { + directory_create(working_directory + "\ServerPluginsCache"); + } + // store in cache + file_copy(tempfile, working_directory + "\ServerPluginsCache\" + pluginname + "@" + pluginhash); + } + } + + // let's get 7-zip to extract the files + extractzip(tempfile, tempdir); + + // if the directory doesn't exist, extracting presumably failed + if (!directory_exists(tempdir)) + { + show_message('Error loading server-sent plugins - extracting zip failed for:#"' + pluginname + '"'); + failed = true; + break; + } +} + +if (!failed) +{ + // Execute plugins + for (i = 0; i < ds_list_size(list); i += 1) + { + pluginname = ds_list_find_value(list, i); + tempdir = temp_directory + "\" + pluginname + ".tmp"; + + // Debugging facility, so we know *which* plugin caused compile/execute error + fp = file_text_open_write(working_directory + "\last_plugin.log"); + file_text_write_string(fp, pluginname); + file_text_close(fp); + + // packetID is (i), so make queues for it + ds_map_add(global.pluginPacketBuffers, i, ds_queue_create()); + ds_map_add(global.pluginPacketPlayers, i, ds_queue_create()); + + // Execute plugin + execute_file( + // the plugin's main gml file must be in the root of the zip + // it is called plugin.gml + tempdir + "\plugin.gml", + // the plugin needs to know where it is + // so the temporary directory is passed as first argument + tempdir, + // the plugin needs to know its packetID + // so it is passed as the second argument + i + ); + } +} + +// Delete last plugin log +file_delete(working_directory + "\last_plugin.log"); + +// Get rid of plugin list +ds_list_destroy(list); + +// Get rid of plugin hash list +ds_list_destroy(hashList); + +return !failed; diff --git a/samples/Game Maker Language/processClientCommands.gml b/samples/Game Maker Language/processClientCommands.gml new file mode 100644 index 00000000..6c241d4b --- /dev/null +++ b/samples/Game Maker Language/processClientCommands.gml @@ -0,0 +1,384 @@ +/* + Originally from /Source/gg2/Scripts/GameServer/processClientCommands.gml in Gang Garrison 2 + + Copyright (C) 2008-2013 Faucet Software + http://www.ganggarrison.com + + This program is free software; + you can redistribute it and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 3 of the License, or (at your option) + any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License along with this program; if not, + see . + + Additional permission under GNU GPL version 3 section 7 + If you modify this Program, or any covered work, by linking or combining it with the Game Maker runtime library, + the 39dll library/extension, Hobbel's Download Manager DLL, or modified versions of these libraries, + the licensors of this Program grant you additional permission to convey the resulting work. +*/ + +var player, playerId, commandLimitRemaining; + +player = argument0; +playerId = argument1; + +// To prevent players from flooding the server, limit the number of commands to process per step and player. +commandLimitRemaining = 10; + +with(player) { + if(!variable_local_exists("commandReceiveState")) { + // 0: waiting for command byte. + // 1: waiting for command data length (1 byte) + // 2: waiting for command data. + commandReceiveState = 0; + commandReceiveExpectedBytes = 1; + commandReceiveCommand = 0; + } +} + +while(commandLimitRemaining > 0) { + var socket; + socket = player.socket; + if(!tcp_receive(socket, player.commandReceiveExpectedBytes)) { + return 0; + } + + switch(player.commandReceiveState) + { + case 0: + player.commandReceiveCommand = read_ubyte(socket); + switch(commandBytes[player.commandReceiveCommand]) { + case commandBytesInvalidCommand: + // Invalid byte received. Wait for another command byte. + break; + + case commandBytesPrefixLength1: + player.commandReceiveState = 1; + player.commandReceiveExpectedBytes = 1; + break; + + case commandBytesPrefixLength2: + player.commandReceiveState = 3; + player.commandReceiveExpectedBytes = 2; + break; + + default: + player.commandReceiveState = 2; + player.commandReceiveExpectedBytes = commandBytes[player.commandReceiveCommand]; + break; + } + break; + + case 1: + player.commandReceiveState = 2; + player.commandReceiveExpectedBytes = read_ubyte(socket); + break; + + case 3: + player.commandReceiveState = 2; + player.commandReceiveExpectedBytes = read_ushort(socket); + break; + + case 2: + player.commandReceiveState = 0; + player.commandReceiveExpectedBytes = 1; + commandLimitRemaining -= 1; + + switch(player.commandReceiveCommand) + { + case PLAYER_LEAVE: + socket_destroy(player.socket); + player.socket = -1; + break; + + case PLAYER_CHANGECLASS: + var class; + class = read_ubyte(socket); + if(getCharacterObject(player.team, class) != -1) + { + if(player.object != -1) + { + with(player.object) + { + if (collision_point(x,y,SpawnRoom,0,0) < 0) + { + if (!instance_exists(lastDamageDealer) || lastDamageDealer == player) + { + sendEventPlayerDeath(player, player, noone, BID_FAREWELL); + doEventPlayerDeath(player, player, noone, BID_FAREWELL); + } + else + { + var assistant; + assistant = secondToLastDamageDealer; + if (lastDamageDealer.object) + if (lastDamageDealer.object.healer) + assistant = lastDamageDealer.object.healer; + sendEventPlayerDeath(player, lastDamageDealer, assistant, FINISHED_OFF); + doEventPlayerDeath(player, lastDamageDealer, assistant, FINISHED_OFF); + } + } + else + instance_destroy(); + + } + } + else if(player.alarm[5]<=0) + player.alarm[5] = 1; + class = checkClasslimits(player, player.team, class); + player.class = class; + ServerPlayerChangeclass(playerId, player.class, global.sendBuffer); + } + break; + + case PLAYER_CHANGETEAM: + var newTeam, balance, redSuperiority; + newTeam = read_ubyte(socket); + + redSuperiority = 0 //calculate which team is bigger + with(Player) + { + if(team == TEAM_RED) + redSuperiority += 1; + else if(team == TEAM_BLUE) + redSuperiority -= 1; + } + if(redSuperiority > 0) + balance = TEAM_RED; + else if(redSuperiority < 0) + balance = TEAM_BLUE; + else + balance = -1; + + if(balance != newTeam) + { + if(getCharacterObject(newTeam, player.class) != -1 or newTeam==TEAM_SPECTATOR) + { + if(player.object != -1) + { + with(player.object) + { + if (!instance_exists(lastDamageDealer) || lastDamageDealer == player) + { + sendEventPlayerDeath(player, player, noone, BID_FAREWELL); + doEventPlayerDeath(player, player, noone, BID_FAREWELL); + } + else + { + var assistant; + assistant = secondToLastDamageDealer; + if (lastDamageDealer.object) + if (lastDamageDealer.object.healer) + assistant = lastDamageDealer.object.healer; + sendEventPlayerDeath(player, lastDamageDealer, assistant, FINISHED_OFF); + doEventPlayerDeath(player, lastDamageDealer, assistant, FINISHED_OFF); + } + } + player.alarm[5] = global.Server_Respawntime; + } + else if(player.alarm[5]<=0) + player.alarm[5] = 1; + var newClass; + newClass = checkClasslimits(player, newTeam, player.class); + if newClass != player.class + { + player.class = newClass; + ServerPlayerChangeclass(playerId, player.class, global.sendBuffer); + } + player.team = newTeam; + ServerPlayerChangeteam(playerId, player.team, global.sendBuffer); + ServerBalanceTeams(); + } + } + break; + + case CHAT_BUBBLE: + var bubbleImage; + bubbleImage = read_ubyte(socket); + if(global.aFirst) { + bubbleImage = 0; + } + write_ubyte(global.sendBuffer, CHAT_BUBBLE); + write_ubyte(global.sendBuffer, playerId); + write_ubyte(global.sendBuffer, bubbleImage); + + setChatBubble(player, bubbleImage); + break; + + case BUILD_SENTRY: + if(player.object != -1) + { + if(player.class == CLASS_ENGINEER + and collision_circle(player.object.x, player.object.y, 50, Sentry, false, true) < 0 + and player.object.nutsNBolts == 100 + and (collision_point(player.object.x,player.object.y,SpawnRoom,0,0) < 0) + and !player.sentry + and !player.object.onCabinet) + { + write_ubyte(global.sendBuffer, BUILD_SENTRY); + write_ubyte(global.sendBuffer, playerId); + write_ushort(global.serializeBuffer, round(player.object.x*5)); + write_ushort(global.serializeBuffer, round(player.object.y*5)); + write_byte(global.serializeBuffer, player.object.image_xscale); + buildSentry(player, player.object.x, player.object.y, player.object.image_xscale); + } + } + break; + + case DESTROY_SENTRY: + with(player.sentry) + instance_destroy(); + break; + + case DROP_INTEL: + if (player.object != -1) + { + if (player.object.intel) + { + sendEventDropIntel(player); + doEventDropIntel(player); + } + } + break; + + case OMNOMNOMNOM: + if(player.object != -1) { + if(!player.humiliated + and !player.object.taunting + and !player.object.omnomnomnom + and player.object.canEat + and player.class==CLASS_HEAVY) + { + write_ubyte(global.sendBuffer, OMNOMNOMNOM); + write_ubyte(global.sendBuffer, playerId); + with(player.object) + { + omnomnomnom = true; + if player.team == TEAM_RED { + omnomnomnomindex=0; + omnomnomnomend=31; + } else if player.team==TEAM_BLUE { + omnomnomnomindex=32; + omnomnomnomend=63; + } + xscale=image_xscale; + } + } + } + break; + + case TOGGLE_ZOOM: + if player.object != -1 { + if player.class == CLASS_SNIPER { + write_ubyte(global.sendBuffer, TOGGLE_ZOOM); + write_ubyte(global.sendBuffer, playerId); + toggleZoom(player.object); + } + } + break; + + case PLAYER_CHANGENAME: + var nameLength; + nameLength = socket_receivebuffer_size(socket); + if(nameLength > MAX_PLAYERNAME_LENGTH) + { + write_ubyte(player.socket, KICK); + write_ubyte(player.socket, KICK_NAME); + socket_destroy(player.socket); + player.socket = -1; + } + else + { + with(player) + { + if(variable_local_exists("lastNamechange")) + if(current_time - lastNamechange < 1000) + break; + lastNamechange = current_time; + name = read_string(socket, nameLength); + if(string_count("#",name) > 0) + { + name = "I <3 Bacon"; + } + write_ubyte(global.sendBuffer, PLAYER_CHANGENAME); + write_ubyte(global.sendBuffer, playerId); + write_ubyte(global.sendBuffer, string_length(name)); + write_string(global.sendBuffer, name); + } + } + break; + + case INPUTSTATE: + if(player.object != -1) + { + with(player.object) + { + keyState = read_ubyte(socket); + netAimDirection = read_ushort(socket); + aimDirection = netAimDirection*360/65536; + event_user(1); + } + } + break; + + case REWARD_REQUEST: + player.rewardId = read_string(socket, socket_receivebuffer_size(socket)); + player.challenge = rewardCreateChallenge(); + + write_ubyte(socket, REWARD_CHALLENGE_CODE); + write_binstring(socket, player.challenge); + break; + + case REWARD_CHALLENGE_RESPONSE: + var answer, i, authbuffer; + answer = read_binstring(socket, 16); + + with(player) + if(variable_local_exists("challenge") and variable_local_exists("rewardId")) + rewardAuthStart(player, answer, challenge, true, rewardId); + + break; + + case PLUGIN_PACKET: + var packetID, buf, success; + + packetID = read_ubyte(socket); + + // get packet data + buf = buffer_create(); + write_buffer_part(buf, socket, socket_receivebuffer_size(socket)); + + // try to enqueue + success = _PluginPacketPush(packetID, buf, player); + + // if it returned false, packetID was invalid + if (!success) + { + // clear up buffer + buffer_destroy(buf); + + // kick player + write_ubyte(player.socket, KICK); + write_ubyte(player.socket, KICK_BAD_PLUGIN_PACKET); + socket_destroy(player.socket); + player.socket = -1; + } + break; + + case CLIENT_SETTINGS: + var mirror; + mirror = read_ubyte(player.socket); + player.queueJump = mirror; + + write_ubyte(global.sendBuffer, CLIENT_SETTINGS); + write_ubyte(global.sendBuffer, playerId); + write_ubyte(global.sendBuffer, mirror); + break; + + } + break; + } +} diff --git a/samples/Game Maker Language/scrInitLevel.gml b/samples/Game Maker Language/scrInitLevel.gml new file mode 100644 index 00000000..af0cf274 --- /dev/null +++ b/samples/Game Maker Language/scrInitLevel.gml @@ -0,0 +1,298 @@ +// Originally from /spelunky/Scripts/Level Generation/scrInitLevel.gml in the Spelunky Community Update Project + +// +// scrInitLevel() +// +// Calls scrLevelGen(), scrRoomGen*(), and scrEntityGen() to build level. +// + +/********************************************************************************** + Copyright (c) 2008, 2009 Derek Yu and Mossmouth, LLC + + This file is part of Spelunky. + + You can redistribute and/or modify Spelunky, including its source code, under + the terms of the Spelunky User License. + + Spelunky is distributed in the hope that it will be entertaining and useful, + but WITHOUT WARRANTY. Please see the Spelunky User License for more details. + + The Spelunky User License should be available in "Game Information", which + can be found in the Resource Explorer, or as an external file called COPYING. + If not, please obtain a new copy of Spelunky from + +***********************************************************************************/ + +global.levelType = 0; +//global.currLevel = 16; +if (global.currLevel > 4 and global.currLevel < 9) global.levelType = 1; +if (global.currLevel > 8 and global.currLevel < 13) global.levelType = 2; +if (global.currLevel > 12 and global.currLevel < 16) global.levelType = 3; +if (global.currLevel == 16) global.levelType = 4; + +if (global.currLevel <= 1 or + global.currLevel == 5 or + global.currLevel == 9 or + global.currLevel == 13) +{ + global.hadDarkLevel = false; +} + +// global.levelType = 3; // debug + +// DEBUG MODE // +/* +if (global.currLevel == 2) global.levelType = 4; +if (global.currLevel == 3) global.levelType = 2; +if (global.currLevel == 4) global.levelType = 3; +if (global.currLevel == 5) global.levelType = 4; +*/ + +// global.levelType = 0; + +global.startRoomX = 0; +global.startRoomY = 0; +global.endRoomX = 0; +global.endRoomY = 0; +oGame.levelGen = false; + +// this is used to determine the path to the exit (generally no bombs required) +for (i = 0; i < 4; i += 1) +{ + for (j = 0; j < 4; j += 1) + { + global.roomPath[i,j] = 0; + } +} + +// side walls +if (global.levelType == 4) + k = 54; +else if (global.levelType == 2) + k = 38; +else if (global.lake) + k = 41; +else + k = 33; +for (i = 0; i <= 42; i += 1) +{ + for (j = 0; j <= k; j += 1) + { + if (not isLevel()) + { + i = 999; + j = 999; + } + else if (global.levelType == 2) + { + if (i*16 == 0 or + i*16 == 656 or + j*16 == 0) + { + obj = instance_create(i*16, j*16, oDark); + obj.invincible = true; + obj.sprite_index = sDark; + } + } + else if (global.levelType == 4) + { + if (i*16 == 0 or + i*16 == 656 or + j*16 == 0) + { + obj = instance_create(i*16, j*16, oTemple); + obj.invincible = true; + if (not global.cityOfGold) obj.sprite_index = sTemple; + } + } + else if (global.lake) + { + if (i*16 == 0 or + i*16 == 656 or + j*16 == 0 or + j*16 >= 656) + { + obj = instance_create(i*16, j*16, oLush); obj.sprite_index = sLush; + obj.invincible = true; + } + } + else if (i*16 == 0 or + i*16 == 656 or + j*16 == 0 or + j*16 >= 528) + { + if (global.levelType == 0) { obj = instance_create(i*16, j*16, oBrick); obj.sprite_index = sBrick; } + else if (global.levelType == 1) { obj = instance_create(i*16, j*16, oLush); obj.sprite_index = sLush; } + else { obj = instance_create(i*16, j*16, oTemple); if (not global.cityOfGold) obj.sprite_index = sTemple; } + obj.invincible = true; + } + } +} + +if (global.levelType == 2) +{ + for (i = 0; i <= 42; i += 1) + { + instance_create(i*16, 40*16, oDark); + //instance_create(i*16, 35*16, oSpikes); + } +} + +if (global.levelType == 3) +{ + background_index = bgTemple; +} + +global.temp1 = global.gameStart; +scrLevelGen(); + +global.cemetary = false; +if (global.levelType == 1 and rand(1,global.probCemetary) == 1) global.cemetary = true; + +with oRoom +{ + if (global.levelType == 0) scrRoomGen(); + else if (global.levelType == 1) + { + if (global.blackMarket) scrRoomGenMarket(); + else scrRoomGen2(); + } + else if (global.levelType == 2) + { + if (global.yetiLair) scrRoomGenYeti(); + else scrRoomGen3(); + } + else if (global.levelType == 3) scrRoomGen4(); + else scrRoomGen5(); +} + +global.darkLevel = false; +//if (not global.hadDarkLevel and global.currLevel != 0 and global.levelType != 2 and global.currLevel != 16 and rand(1,1) == 1) +if (not global.hadDarkLevel and not global.noDarkLevel and global.currLevel != 0 and global.currLevel != 1 and global.levelType != 2 and global.currLevel != 16 and rand(1,global.probDarkLevel) == 1) +{ + global.darkLevel = true; + global.hadDarkLevel = true; + //instance_create(oPlayer1.x, oPlayer1.y, oFlare); +} + +if (global.blackMarket) global.darkLevel = false; + +global.genUdjatEye = false; +if (not global.madeUdjatEye) +{ + if (global.currLevel == 2 and rand(1,3) == 1) global.genUdjatEye = true; + else if (global.currLevel == 3 and rand(1,2) == 1) global.genUdjatEye = true; + else if (global.currLevel == 4) global.genUdjatEye = true; +} + +global.genMarketEntrance = false; +if (not global.madeMarketEntrance) +{ + if (global.currLevel == 5 and rand(1,3) == 1) global.genMarketEntrance = true; + else if (global.currLevel == 6 and rand(1,2) == 1) global.genMarketEntrance = true; + else if (global.currLevel == 7) global.genMarketEntrance = true; +} + +//////////////////////////// +// ENTITY / TREASURES +//////////////////////////// +global.temp2 = global.gameStart; +if (not isRoom("rTutorial") and not isRoom("rLoadLevel")) scrEntityGen(); + +if (instance_exists(oEntrance) and not global.customLevel) +{ + oPlayer1.x = oEntrance.x+8; + oPlayer1.y = oEntrance.y+8; +} + +if (global.darkLevel or + global.blackMarket or + global.snakePit or + global.cemetary or + global.lake or + global.yetiLair or + global.alienCraft or + global.sacrificePit or + global.cityOfGold) +{ + if (not isRoom("rLoadLevel")) + { + with oPlayer1 { alarm[0] = 10; } + } +} + +if (global.levelType == 4) scrSetupWalls(864); +else if (global.lake) scrSetupWalls(656); +else scrSetupWalls(528); + +// add background details +if (global.graphicsHigh) +{ + repeat(20) + { + // bg = instance_create(16*rand(1,42), 16*rand(1,33), oCaveBG); + if (global.levelType == 1 and rand(1,3) < 3) + tile_add(bgExtrasLush, 32*rand(0,1), 0, 32, 32, 16*rand(1,42), 16*rand(1,33), 10002); + else if (global.levelType == 2 and rand(1,3) < 3) + tile_add(bgExtrasIce, 32*rand(0,1), 0, 32, 32, 16*rand(1,42), 16*rand(1,33), 10002); + else if (global.levelType == 3 and rand(1,3) < 3) + tile_add(bgExtrasTemple, 32*rand(0,1), 0, 32, 32, 16*rand(1,42), 16*rand(1,33), 10002); + else + tile_add(bgExtras, 32*rand(0,1), 0, 32, 32, 16*rand(1,42), 16*rand(1,33), 10002); + } +} + +oGame.levelGen = true; + +// generate angry shopkeeper at exit if murderer or thief +if ((global.murderer or global.thiefLevel > 0) and isRealLevel()) +{ + with oExit + { + if (type == "Exit") + { + obj = instance_create(x, y, oShopkeeper); + obj.status = 4; + } + } + // global.thiefLevel -= 1; +} + +with oTreasure +{ + if (collision_point(x, y, oSolid, 0, 0)) + { + obj = instance_place(x, y, oSolid); + if (obj.invincible) instance_destroy(); + } +} + +with oWater +{ + if (sprite_index == sWaterTop or sprite_index == sLavaTop) + { + scrCheckWaterTop(); + } + /* + obj = instance_place(x-16, y, oWater); + if (instance_exists(obj)) + { + if (obj.sprite_index == sWaterTop or obj.sprite_index == sLavaTop) + { + if (type == "Lava") sprite_index = sLavaTop; + else sprite_index = sWaterTop; + } + } + obj = instance_place(x+16, y, oWater); + if (instance_exists(obj)) + { + if (obj.sprite_index == sWaterTop or obj.sprite_index == sLavaTop) + { + if (type == "Lava") sprite_index = sLavaTop; + else sprite_index = sWaterTop; + } + } + */ +} + +global.temp3 = global.gameStart; diff --git a/samples/Gnuplot/dashcolor.1.gnu b/samples/Gnuplot/dashcolor.1.gnu new file mode 100644 index 00000000..291747bd --- /dev/null +++ b/samples/Gnuplot/dashcolor.1.gnu @@ -0,0 +1,22 @@ +# set terminal pngcairo background "#ffffff" fontscale 1.0 dashed size 640, 480 +# set output 'dashcolor.1.png' +set label 1 "set style line 1 lt 2 lc rgb \"red\" lw 3" at -0.4, -0.25, 0 left norotate back textcolor rgb "red" nopoint offset character 0, 0, 0 +set label 2 "set style line 2 lt 2 lc rgb \"orange\" lw 2" at -0.4, -0.35, 0 left norotate back textcolor rgb "orange" nopoint offset character 0, 0, 0 +set label 3 "set style line 3 lt 2 lc rgb \"yellow\" lw 3" at -0.4, -0.45, 0 left norotate back textcolor rgb "yellow" nopoint offset character 0, 0, 0 +set label 4 "set style line 4 lt 2 lc rgb \"green\" lw 2" at -0.4, -0.55, 0 left norotate back textcolor rgb "green" nopoint offset character 0, 0, 0 +set label 5 "plot ... lt 1 lc 3 " at -0.4, -0.65, 0 left norotate back textcolor lt 3 nopoint offset character 0, 0, 0 +set label 6 "plot ... lt 3 lc 3 " at -0.4, -0.75, 0 left norotate back textcolor lt 3 nopoint offset character 0, 0, 0 +set label 7 "plot ... lt 5 lc 3 " at -0.4, -0.85, 0 left norotate back textcolor lt 3 nopoint offset character 0, 0, 0 +set style line 1 linetype 2 linecolor rgb "red" linewidth 3.000 pointtype 2 pointsize default pointinterval 0 +set style line 2 linetype 2 linecolor rgb "orange" linewidth 2.000 pointtype 2 pointsize default pointinterval 0 +set style line 3 linetype 2 linecolor rgb "yellow" linewidth 3.000 pointtype 2 pointsize default pointinterval 0 +set style line 4 linetype 2 linecolor rgb "green" linewidth 2.000 pointtype 2 pointsize default pointinterval 0 +set noxtics +set noytics +set title "Independent colors and dot/dash styles" +set xlabel "You will only see dashed lines if your current terminal setting permits it" +set xrange [ -0.500000 : 3.50000 ] noreverse nowriteback +set yrange [ -1.00000 : 1.40000 ] noreverse nowriteback +set bmargin 7 +unset colorbox +plot cos(x) ls 1 title 'ls 1', cos(x-.2) ls 2 title 'ls 2', cos(x-.4) ls 3 title 'ls 3', cos(x-.6) ls 4 title 'ls 4', cos(x-.8) lt 1 lc 3 title 'lt 1 lc 3', cos(x-1.) lt 3 lc 3 title 'lt 3 lc 3', cos(x-1.2) lt 5 lc 3 title 'lt 5 lc 3' diff --git a/samples/Gnuplot/histograms.2.gnu b/samples/Gnuplot/histograms.2.gnu new file mode 100644 index 00000000..e268ce01 --- /dev/null +++ b/samples/Gnuplot/histograms.2.gnu @@ -0,0 +1,15 @@ +# set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 500, 350 +# set output 'histograms.2.png' +set boxwidth 0.9 absolute +set style fill solid 1.00 border lt -1 +set key inside right top vertical Right noreverse noenhanced autotitles nobox +set style histogram clustered gap 1 title offset character 0, 0, 0 +set datafile missing '-' +set style data histograms +set xtics border in scale 0,0 nomirror rotate by -45 offset character 0, 0, 0 autojustify +set xtics norangelimit font ",8" +set xtics () +set title "US immigration from Northern Europe\nPlot selected data columns as histogram of clustered boxes" +set yrange [ 0.00000 : 300000. ] noreverse nowriteback +i = 22 +plot 'immigration.dat' using 6:xtic(1) ti col, '' u 12 ti col, '' u 13 ti col, '' u 14 ti col diff --git a/samples/Gnuplot/rates.gp b/samples/Gnuplot/rates.gp new file mode 100644 index 00000000..aad2a52e --- /dev/null +++ b/samples/Gnuplot/rates.gp @@ -0,0 +1,14 @@ +#!/usr/bin/env gnuplot + +reset + +set terminal png +set output 'rates100.png' + +set xlabel "A2A price" +set ylabel "Response Rate" + +#set xr [0:5] +#set yr [0:6] + +plot 'rates100.dat' pt 7 notitle diff --git a/samples/Gnuplot/surface1.16.gnu b/samples/Gnuplot/surface1.16.gnu new file mode 100644 index 00000000..dd1ffefa --- /dev/null +++ b/samples/Gnuplot/surface1.16.gnu @@ -0,0 +1,40 @@ +# set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 500, 350 +# set output 'surface1.16.png' +set dummy u,v +set label 1 "increasing v" at 6, 0, -1 left norotate back nopoint offset character 0, 0, 0 +set label 2 "u=0" at 5, 6.5, -1 left norotate back nopoint offset character 0, 0, 0 +set label 3 "u=1" at 5, 6.5, 0.100248 left norotate back nopoint offset character 0, 0, 0 +set arrow 1 from 5, -5, -1.2 to 5, 5, -1.2 head back nofilled linetype -1 linewidth 1.000 +set arrow 2 from 5, 6, -1 to 5, 5, -1 head back nofilled linetype -1 linewidth 1.000 +set arrow 3 from 5, 6, 0.100248 to 5, 5, 0.100248 head back nofilled linetype -1 linewidth 1.000 +set parametric +set view 70, 20, 1, 1 +set samples 51, 51 +set isosamples 2, 33 +set hidden3d back offset 1 trianglepattern 3 undefined 1 altdiagonal bentover +set ztics -1.00000,0.25,1.00000 norangelimit +set title "\"fence plot\" using separate parametric surfaces" +set xlabel "X axis" +set xlabel offset character -3, -2, 0 font "" textcolor lt -1 norotate +set xrange [ -5.00000 : 5.00000 ] noreverse nowriteback +set ylabel "Y axis" +set ylabel offset character 3, -2, 0 font "" textcolor lt -1 rotate by -270 +set yrange [ -5.00000 : 5.00000 ] noreverse nowriteback +set zlabel "Z axis" +set zlabel offset character -5, 0, 0 font "" textcolor lt -1 norotate +set zrange [ -1.00000 : 1.00000 ] noreverse nowriteback +sinc(u,v) = sin(sqrt(u**2+v**2)) / sqrt(u**2+v**2) +GPFUN_sinc = "sinc(u,v) = sin(sqrt(u**2+v**2)) / sqrt(u**2+v**2)" +xx = 6.08888888888889 +dx = 1.10888888888889 +x0 = -5 +x1 = -3.89111111111111 +x2 = -2.78222222222222 +x3 = -1.67333333333333 +x4 = -0.564444444444444 +x5 = 0.544444444444445 +x6 = 1.65333333333333 +x7 = 2.76222222222222 +x8 = 3.87111111111111 +x9 = 4.98 +splot [u=0:1][v=-4.99:4.99] x0, v, (u<0.5) ? -1 : sinc(x0,v) notitle, x1, v, (u<0.5) ? -1 : sinc(x1,v) notitle, x2, v, (u<0.5) ? -1 : sinc(x2,v) notitle, x3, v, (u<0.5) ? -1 : sinc(x3,v) notitle, x4, v, (u<0.5) ? -1 : sinc(x4,v) notitle, x5, v, (u<0.5) ? -1 : sinc(x5,v) notitle, x6, v, (u<0.5) ? -1 : sinc(x6,v) notitle, x7, v, (u<0.5) ? -1 : sinc(x7,v) notitle, x8, v, (u<0.5) ? -1 : sinc(x8,v) notitle, x9, v, (u<0.5) ? -1 : sinc(x9,v) notitle diff --git a/samples/Gnuplot/surface1.17.gnu b/samples/Gnuplot/surface1.17.gnu new file mode 100644 index 00000000..3d272bc7 --- /dev/null +++ b/samples/Gnuplot/surface1.17.gnu @@ -0,0 +1,46 @@ +# set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 500, 350 +# set output 'surface1.17.png' +set dummy u,v +set label 1 "increasing v" at 6, 0, -1 left norotate back nopoint offset character 0, 0, 0 +set label 2 "increasing u" at 0, -5, -1.5 left norotate back nopoint offset character 0, 0, 0 +set label 3 "floor(u)%3=0" at 5, 6.5, -1 left norotate back nopoint offset character 0, 0, 0 +set label 4 "floor(u)%3=1" at 5, 6.5, 0.100248 left norotate back nopoint offset character 0, 0, 0 +set arrow 1 from 5, -5, -1.2 to 5, 5, -1.2 head back nofilled linetype -1 linewidth 1.000 +set arrow 2 from -5, -5, -1.2 to 5, -5, -1.2 head back nofilled linetype -1 linewidth 1.000 +set arrow 3 from 5, 6, -1 to 5, 5, -1 head back nofilled linetype -1 linewidth 1.000 +set arrow 4 from 5, 6, 0.100248 to 5, 5, 0.100248 head back nofilled linetype -1 linewidth 1.000 +set parametric +set view 70, 20, 1, 1 +set samples 51, 51 +set isosamples 30, 33 +set hidden3d back offset 1 trianglepattern 3 undefined 1 altdiagonal bentover +set ztics -1.00000,0.25,1.00000 norangelimit +set title "\"fence plot\" using single parametric surface with undefined points" +set xlabel "X axis" +set xlabel offset character -3, -2, 0 font "" textcolor lt -1 norotate +set xrange [ -5.00000 : 5.00000 ] noreverse nowriteback +set ylabel "Y axis" +set ylabel offset character 3, -2, 0 font "" textcolor lt -1 rotate by -270 +set yrange [ -5.00000 : 5.00000 ] noreverse nowriteback +set zlabel "Z axis" +set zlabel offset character -5, 0, 0 font "" textcolor lt -1 norotate +set zrange [ -1.00000 : 1.00000 ] noreverse nowriteback +sinc(u,v) = sin(sqrt(u**2+v**2)) / sqrt(u**2+v**2) +GPFUN_sinc = "sinc(u,v) = sin(sqrt(u**2+v**2)) / sqrt(u**2+v**2)" +xx = 6.08888888888889 +dx = 1.11 +x0 = -5 +x1 = -3.89111111111111 +x2 = -2.78222222222222 +x3 = -1.67333333333333 +x4 = -0.564444444444444 +x5 = 0.544444444444445 +x6 = 1.65333333333333 +x7 = 2.76222222222222 +x8 = 3.87111111111111 +x9 = 4.98 +xmin = -4.99 +xmax = 5 +n = 10 +zbase = -1 +splot [u=.5:3*n-.5][v=-4.99:4.99] xmin+floor(u/3)*dx, v, ((floor(u)%3)==0) ? zbase : (((floor(u)%3)==1) ? sinc(xmin+u/3.*dx,v) : 1/0) notitle diff --git a/samples/Gnuplot/world2.1.gnu b/samples/Gnuplot/world2.1.gnu new file mode 100644 index 00000000..53dc22b6 --- /dev/null +++ b/samples/Gnuplot/world2.1.gnu @@ -0,0 +1,21 @@ +# set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 500, 350 +# set output 'world2.1.png' +unset border +set dummy u,v +set angles degrees +set parametric +set view 60, 136, 1.22, 1.26 +set samples 64, 64 +set isosamples 13, 13 +set mapping spherical +set noxtics +set noytics +set noztics +set title "Labels colored by GeV plotted in spherical coordinate system" +set urange [ -90.0000 : 90.0000 ] noreverse nowriteback +set vrange [ 0.00000 : 360.000 ] noreverse nowriteback +set cblabel "GeV" +set cbrange [ 0.00000 : 8.00000 ] noreverse nowriteback +set colorbox user +set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.02, 0.75, 0 front bdefault +splot cos(u)*cos(v),cos(u)*sin(v),sin(u) notitle with lines lt 5, 'world.dat' notitle with lines lt 2, 'srl.dat' using 3:2:(1):1:4 with labels notitle point pt 6 lw .1 left offset 1,0 font "Helvetica,7" tc pal diff --git a/samples/Gosu/hello.gsp b/samples/Gosu/hello.gsp deleted file mode 100644 index ce47b771..00000000 --- a/samples/Gosu/hello.gsp +++ /dev/null @@ -1 +0,0 @@ -print("hello") \ No newline at end of file diff --git a/samples/Grammatical Framework/Foods.gf b/samples/Grammatical Framework/Foods.gf new file mode 100644 index 00000000..8ea02f39 --- /dev/null +++ b/samples/Grammatical Framework/Foods.gf @@ -0,0 +1,15 @@ +-- (c) 2009 Aarne Ranta under LGPL + +abstract Foods = { + flags startcat = Comment ; + cat + Comment ; Item ; Kind ; Quality ; + fun + Pred : Item -> Quality -> Comment ; + This, That, These, Those : Kind -> Item ; + Mod : Quality -> Kind -> Kind ; + Wine, Cheese, Fish, Pizza : Kind ; + Very : Quality -> Quality ; + Fresh, Warm, Italian, + Expensive, Delicious, Boring : Quality ; +} diff --git a/samples/Grammatical Framework/FoodsAfr.gf b/samples/Grammatical Framework/FoodsAfr.gf new file mode 100644 index 00000000..d0226710 --- /dev/null +++ b/samples/Grammatical Framework/FoodsAfr.gf @@ -0,0 +1,79 @@ +-- (c) 2009 Laurette Pretorius Sr & Jr and Ansu Berg under LGPL + +concrete FoodsAfr of Foods = open Prelude, Predef in{ + + flags coding=utf8; + + lincat + Comment = {s: Str} ; + Kind = {s: Number => Str} ; + Item = {s: Str ; n: Number} ; + Quality = {s: AdjAP => Str} ; + + lin + Pred item quality = {s = item.s ++ "is" ++ (quality.s ! Predic)}; + This kind = {s = "hierdie" ++ (kind.s ! Sg); n = Sg}; + That kind = {s = "daardie" ++ (kind.s ! Sg); n = Sg}; + These kind = {s = "hierdie" ++ (kind.s ! Pl); n = Pl}; + Those kind = {s = "daardie" ++ (kind.s ! Pl); n = Pl}; + Mod quality kind = {s = table{n => (quality.s ! Attr) ++ (kind.s!n)}}; + + Wine = declNoun_e "wyn"; + Cheese = declNoun_aa "kaas"; + Fish = declNoun_ss "vis"; + Pizza = declNoun_s "pizza"; + + Very quality = veryAdj quality; + + Fresh = regAdj "vars"; + Warm = regAdj "warm"; + Italian = smartAdj_e "Italiaans"; + Expensive = regAdj "duur"; + Delicious = smartAdj_e "heerlik"; + Boring = smartAdj_e "vervelig"; + + param + AdjAP = Attr | Predic ; + Number = Sg | Pl ; + + oper + --Noun operations (wyn, kaas, vis, pizza) + + declNoun_aa: Str -> {s: Number => Str} = \x -> + let v = tk 2 x + in + {s = table{Sg => x ; Pl => v + (last x) +"e"}}; + + declNoun_e: Str -> {s: Number => Str} = \x -> {s = table{Sg => x ; Pl => x + "e"}} ; + declNoun_s: Str -> {s: Number => Str} = \x -> {s = table{Sg => x ; Pl => x + "s"}} ; + + declNoun_ss: Str -> {s: Number => Str} = \x -> {s = table{Sg => x ; Pl => x + (last x) + "e"}} ; + + + --Adjective operations + + mkAdj : Str -> Str -> {s: AdjAP => Str} = \x,y -> {s = table{Attr => x; Predic => y}}; + + declAdj_e : Str -> {s : AdjAP=> Str} = \x -> mkAdj (x + "e") x; + declAdj_g : Str -> {s : AdjAP=> Str} = \w -> + let v = init w + in mkAdj (v + "ë") w ; + + declAdj_oog : Str -> {s : AdjAP=> Str} = \w -> + let v = init w + in + let i = init v + in mkAdj (i + "ë") w ; + + regAdj : Str -> {s : AdjAP=> Str} = \x -> mkAdj x x; + + veryAdj : {s: AdjAP => Str} -> {s : AdjAP=> Str} = \x -> {s = table{a => "baie" ++ (x.s!a)}}; + + + smartAdj_e : Str -> {s : AdjAP=> Str} = \a -> case a of + { + _ + "oog" => declAdj_oog a ; + _ + ("e" | "ie" | "o" | "oe") + "g" => declAdj_g a ; + _ => declAdj_e a + }; +} diff --git a/samples/Grammatical Framework/FoodsAmh.gf b/samples/Grammatical Framework/FoodsAmh.gf new file mode 100644 index 00000000..e8915d86 --- /dev/null +++ b/samples/Grammatical Framework/FoodsAmh.gf @@ -0,0 +1,21 @@ +concrete FoodsAmh of Foods ={ + flags coding = utf8; + lincat + Comment,Item,Kind,Quality = Str; + lin + Pred item quality = item ++ quality++ "ነው::" ; + This kind = "ይህ" ++ kind; + That kind = "ያ" ++ kind; + Mod quality kind = quality ++ kind; + Wine = "ወይን"; + Cheese = "አይብ"; + Fish = "ዓሳ"; + Very quality = "በጣም" ++ quality; + Fresh = "አዲስ"; + Warm = "ትኩስ"; + Italian = "የጥልያን"; + Expensive = "ውድ"; + Delicious = "ጣፋጭ"; + Boring = "አስቀያሚ"; + +} \ No newline at end of file diff --git a/samples/Grammatical Framework/FoodsBul.gf b/samples/Grammatical Framework/FoodsBul.gf new file mode 100644 index 00000000..ac912766 --- /dev/null +++ b/samples/Grammatical Framework/FoodsBul.gf @@ -0,0 +1,43 @@ +-- (c) 2009 Krasimir Angelov under LGPL + +concrete FoodsBul of Foods = { + + flags + coding = utf8; + + param + Gender = Masc | Fem | Neutr; + Number = Sg | Pl; + Agr = ASg Gender | APl ; + + lincat + Comment = Str ; + Quality = {s : Agr => Str} ; + Item = {s : Str; a : Agr} ; + Kind = {s : Number => Str; g : Gender} ; + + lin + Pred item qual = item.s ++ case item.a of {ASg _ => "е"; APl => "са"} ++ qual.s ! item.a ; + + This kind = {s=case kind.g of {Masc=>"този"; Fem=>"тази"; Neutr=>"това" } ++ kind.s ! Sg; a=ASg kind.g} ; + That kind = {s=case kind.g of {Masc=>"онзи"; Fem=>"онази"; Neutr=>"онова"} ++ kind.s ! Sg; a=ASg kind.g} ; + These kind = {s="тези" ++ kind.s ! Pl; a=APl} ; + Those kind = {s="онези" ++ kind.s ! Pl; a=APl} ; + + Mod qual kind = {s=\\n => qual.s ! (case n of {Sg => ASg kind.g; Pl => APl}) ++ kind.s ! n; g=kind.g} ; + + Wine = {s = table {Sg => "вино"; Pl => "вина"}; g = Neutr}; + Cheese = {s = table {Sg => "сирене"; Pl => "сирена"}; g = Neutr}; + Fish = {s = table {Sg => "риба"; Pl => "риби"}; g = Fem}; + Pizza = {s = table {Sg => "пица"; Pl => "пици"}; g = Fem}; + + Very qual = {s = \\g => "много" ++ qual.s ! g}; + + Fresh = {s = table {ASg Masc => "свеж"; ASg Fem => "свежа"; ASg Neutr => "свежо"; APl => "свежи"}}; + Warm = {s = table {ASg Masc => "горещ"; ASg Fem => "гореща"; ASg Neutr => "горещо"; APl => "горещи"}}; + Italian = {s = table {ASg Masc => "италиански"; ASg Fem => "италианска"; ASg Neutr => "италианско"; APl => "италиански"}}; + Expensive = {s = table {ASg Masc => "скъп"; ASg Fem => "скъпа"; ASg Neutr => "скъпо"; APl => "скъпи"}}; + Delicious = {s = table {ASg Masc => "превъзходен"; ASg Fem => "превъзходна"; ASg Neutr => "превъзходно"; APl => "превъзходни"}}; + Boring = {s = table {ASg Masc => "еднообразен"; ASg Fem => "еднообразна"; ASg Neutr => "еднообразно"; APl => "еднообразни"}}; + +} diff --git a/samples/Grammatical Framework/FoodsCat.gf b/samples/Grammatical Framework/FoodsCat.gf new file mode 100644 index 00000000..5ad38d0d --- /dev/null +++ b/samples/Grammatical Framework/FoodsCat.gf @@ -0,0 +1,7 @@ +--# -path=.:present + +-- (c) 2009 Jordi Saludes under LGPL + +concrete FoodsCat of Foods = FoodsI with + (Syntax = SyntaxCat), + (LexFoods = LexFoodsCat) ; diff --git a/samples/Grammatical Framework/FoodsChi.gf b/samples/Grammatical Framework/FoodsChi.gf new file mode 100644 index 00000000..163aa0eb --- /dev/null +++ b/samples/Grammatical Framework/FoodsChi.gf @@ -0,0 +1,35 @@ +concrete FoodsChi of Foods = { +flags coding = utf8 ; +lincat + Comment, Item = Str ; + Kind = {s,c : Str} ; + Quality = {s,p : Str} ; +lin + Pred item quality = item ++ "是" ++ quality.s ++ quality.p ; + This kind = "这" ++ kind.c ++ kind.s ; + That kind = "那" ++ kind.c ++ kind.s ; + These kind = "这" ++ "些" ++ kind.s ; + Those kind = "那" ++ "些" ++ kind.s ; + Mod quality kind = { + s = quality.s ++ quality.p ++ kind.s ; + c = kind.c + } ; + Wine = geKind "酒" ; + Pizza = geKind "比 萨 饼" ; + Cheese = geKind "奶 酪" ; + Fish = geKind "鱼" ; + Very quality = longQuality ("非 常" ++ quality.s) ; + Fresh = longQuality "新 鲜" ; + Warm = longQuality "温 热" ; + Italian = longQuality "意 大 利 式" ; + Expensive = longQuality "昂 贵" ; + Delicious = longQuality "美 味" ; + Boring = longQuality "难 吃" ; +oper + mkKind : Str -> Str -> {s,c : Str} = \s,c -> + {s = s ; c = c} ; + geKind : Str -> {s,c : Str} = \s -> + mkKind s "个" ; + longQuality : Str -> {s,p : Str} = \s -> + {s = s ; p = "的"} ; +} diff --git a/samples/Grammatical Framework/FoodsCze.gf b/samples/Grammatical Framework/FoodsCze.gf new file mode 100644 index 00000000..3fec6814 --- /dev/null +++ b/samples/Grammatical Framework/FoodsCze.gf @@ -0,0 +1,35 @@ +-- (c) 2011 Katerina Bohmova under LGPL + +concrete FoodsCze of Foods = open ResCze in { + flags + coding = utf8 ; + lincat + Comment = {s : Str} ; + Quality = Adjective ; + Kind = Noun ; + Item = NounPhrase ; + lin + Pred item quality = + {s = item.s ++ copula ! item.n ++ + quality.s ! item.g ! item.n} ; + This = det Sg "tento" "tato" "toto" ; + That = det Sg "tamten" "tamta" "tamto" ; + These = det Pl "tyto" "tyto" "tato" ; + Those = det Pl "tamty" "tamty" "tamta" ; + Mod quality kind = { + s = \\n => quality.s ! kind.g ! n ++ kind.s ! n ; + g = kind.g + } ; + Wine = noun "víno" "vína" Neutr ; + Cheese = noun "sýr" "sýry" Masc ; + Fish = noun "ryba" "ryby" Fem ; + Pizza = noun "pizza" "pizzy" Fem ; + Very qual = {s = \\g,n => "velmi" ++ qual.s ! g ! n} ; + Fresh = regAdj "čerstv" ; + Warm = regAdj "tepl" ; + Italian = regAdj "italsk" ; + Expensive = regAdj "drah" ; + Delicious = regnfAdj "vynikající" ; + Boring = regAdj "nudn" ; +} + diff --git a/samples/Grammatical Framework/FoodsDut.gf b/samples/Grammatical Framework/FoodsDut.gf new file mode 100644 index 00000000..d4855e5c --- /dev/null +++ b/samples/Grammatical Framework/FoodsDut.gf @@ -0,0 +1,58 @@ +-- (c) 2009 Femke Johansson under LGPL + +concrete FoodsDut of Foods = { + + lincat + Comment = {s : Str}; + Quality = {s : AForm => Str}; + Kind = { s : Number => Str}; + Item = {s : Str ; n : Number}; + + lin + Pred item quality = + {s = item.s ++ copula ! item.n ++ quality.s ! APred}; + This = det Sg "deze"; + These = det Pl "deze"; + That = det Sg "die"; + Those = det Pl "die"; + + Mod quality kind = + {s = \\n => quality.s ! AAttr ++ kind.s ! n}; + Wine = regNoun "wijn"; + Cheese = noun "kaas" "kazen"; + Fish = noun "vis" "vissen"; + Pizza = noun "pizza" "pizza's"; + + Very a = {s = \\f => "erg" ++ a.s ! f}; + + Fresh = regadj "vers"; + Warm = regadj "warm"; + Italian = regadj "Italiaans"; + Expensive = adj "duur" "dure"; + Delicious = regadj "lekker"; + Boring = regadj "saai"; + + param + Number = Sg | Pl; + AForm = APred | AAttr; + + oper + det : Number -> Str -> + {s : Number => Str} -> {s : Str ; n: Number} = + \n,det,noun -> {s = det ++ noun.s ! n ; n=n}; + + noun : Str -> Str -> {s : Number => Str} = + \man,men -> {s = table {Sg => man; Pl => men}}; + + regNoun : Str -> {s : Number => Str} = + \wijn -> noun wijn (wijn + "en"); + + regadj : Str -> {s : AForm => Str} = + \koud -> adj koud (koud+"e"); + + adj : Str -> Str -> {s : AForm => Str} = + \duur, dure -> {s = table {APred => duur; AAttr => dure}}; + + copula : Number => Str = + table {Sg => "is" ; Pl => "zijn"}; +} diff --git a/samples/Grammatical Framework/FoodsEng.gf b/samples/Grammatical Framework/FoodsEng.gf new file mode 100644 index 00000000..e7359a4f --- /dev/null +++ b/samples/Grammatical Framework/FoodsEng.gf @@ -0,0 +1,43 @@ +-- (c) 2009 Aarne Ranta under LGPL + +concrete FoodsEng of Foods = { + flags language = en_US; + lincat + Comment, Quality = {s : Str} ; + Kind = {s : Number => Str} ; + Item = {s : Str ; n : Number} ; + lin + Pred item quality = + {s = item.s ++ copula ! item.n ++ quality.s} ; + This = det Sg "this" ; + That = det Sg "that" ; + These = det Pl "these" ; + Those = det Pl "those" ; + Mod quality kind = + {s = \\n => quality.s ++ kind.s ! n} ; + Wine = regNoun "wine" ; + Cheese = regNoun "cheese" ; + Fish = noun "fish" "fish" ; + Pizza = regNoun "pizza" ; + Very a = {s = "very" ++ a.s} ; + Fresh = adj "fresh" ; + Warm = adj "warm" ; + Italian = adj "Italian" ; + Expensive = adj "expensive" ; + Delicious = adj "delicious" ; + Boring = adj "boring" ; + param + Number = Sg | Pl ; + oper + det : Number -> Str -> + {s : Number => Str} -> {s : Str ; n : Number} = + \n,det,noun -> {s = det ++ noun.s ! n ; n = n} ; + noun : Str -> Str -> {s : Number => Str} = + \man,men -> {s = table {Sg => man ; Pl => men}} ; + regNoun : Str -> {s : Number => Str} = + \car -> noun car (car + "s") ; + adj : Str -> {s : Str} = + \cold -> {s = cold} ; + copula : Number => Str = + table {Sg => "is" ; Pl => "are"} ; +} diff --git a/samples/Grammatical Framework/FoodsEpo.gf b/samples/Grammatical Framework/FoodsEpo.gf new file mode 100644 index 00000000..dd2400fe --- /dev/null +++ b/samples/Grammatical Framework/FoodsEpo.gf @@ -0,0 +1,48 @@ +-- (c) 2009 Julia Hammar under LGPL + +concrete FoodsEpo of Foods = open Prelude in { + + flags coding =utf8 ; + + lincat + Comment = SS ; + Kind, Quality = {s : Number => Str} ; + Item = {s : Str ; n : Number} ; + + lin + Pred item quality = ss (item.s ++ copula ! item.n ++ quality.s ! item.n) ; + This = det Sg "ĉi tiu" ; + That = det Sg "tiu" ; + These = det Pl "ĉi tiuj" ; + Those = det Pl "tiuj" ; + Mod quality kind = {s = \\n => quality.s ! n ++ kind.s ! n} ; + Wine = regNoun "vino" ; + Cheese = regNoun "fromaĝo" ; + Fish = regNoun "fiŝo" ; + Pizza = regNoun "pico" ; + Very quality = {s = \\n => "tre" ++ quality.s ! n} ; + Fresh = regAdj "freŝa" ; + Warm = regAdj "varma" ; + Italian = regAdj "itala" ; + Expensive = regAdj "altekosta" ; + Delicious = regAdj "bongusta" ; + Boring = regAdj "enuiga" ; + + param + Number = Sg | Pl ; + + oper + det : Number -> Str -> {s : Number => Str} -> {s : Str ; n : Number} = + \n,d,cn -> { + s = d ++ cn.s ! n ; + n = n + } ; + regNoun : Str -> {s : Number => Str} = + \vino -> {s = table {Sg => vino ; Pl => vino + "j"} + } ; + regAdj : Str -> {s : Number => Str} = + \nova -> {s = table {Sg => nova ; Pl => nova + "j"} + } ; + copula : Number => Str = \\_ => "estas" ; +} + diff --git a/samples/Grammatical Framework/FoodsFin.gf b/samples/Grammatical Framework/FoodsFin.gf new file mode 100644 index 00000000..34da5764 --- /dev/null +++ b/samples/Grammatical Framework/FoodsFin.gf @@ -0,0 +1,7 @@ +--# -path=.:present + +-- (c) 2009 Aarne Ranta under LGPL + +concrete FoodsFin of Foods = FoodsI with + (Syntax = SyntaxFin), + (LexFoods = LexFoodsFin) ; diff --git a/samples/Grammatical Framework/FoodsFre.gf b/samples/Grammatical Framework/FoodsFre.gf new file mode 100644 index 00000000..ac6c8c63 --- /dev/null +++ b/samples/Grammatical Framework/FoodsFre.gf @@ -0,0 +1,32 @@ +--# -path=.:../foods:present + +concrete FoodsFre of Foods = open SyntaxFre, ParadigmsFre in { + + flags coding = utf8 ; + + lincat + Comment = Utt ; + Item = NP ; + Kind = CN ; + Quality = AP ; + + lin + Pred item quality = mkUtt (mkCl item quality) ; + This kind = mkNP this_QuantSg kind ; + That kind = mkNP that_QuantSg kind ; + These kind = mkNP these_QuantPl kind ; + Those kind = mkNP those_QuantPl kind ; + Mod quality kind = mkCN quality kind ; + Very quality = mkAP very_AdA quality ; + + Wine = mkCN (mkN "vin" masculine) ; + Pizza = mkCN (mkN "pizza" feminine) ; + Cheese = mkCN (mkN "fromage" masculine) ; + Fish = mkCN (mkN "poisson" masculine) ; + Fresh = mkAP (mkA "frais" "fraîche" "frais" "fraîchement") ; + Warm = mkAP (mkA "chaud") ; + Italian = mkAP (mkA "italien") ; + Expensive = mkAP (mkA "cher") ; + Delicious = mkAP (mkA "délicieux") ; + Boring = mkAP (mkA "ennuyeux") ; + } \ No newline at end of file diff --git a/samples/Grammatical Framework/FoodsGer.gf b/samples/Grammatical Framework/FoodsGer.gf new file mode 100644 index 00000000..934cefb9 --- /dev/null +++ b/samples/Grammatical Framework/FoodsGer.gf @@ -0,0 +1,7 @@ +--# -path=.:present + +-- (c) 2009 Aarne Ranta under LGPL + +concrete FoodsGer of Foods = FoodsI with + (Syntax = SyntaxGer), + (LexFoods = LexFoodsGer) ; diff --git a/samples/Grammatical Framework/FoodsHeb.gf b/samples/Grammatical Framework/FoodsHeb.gf new file mode 100644 index 00000000..3d76b639 --- /dev/null +++ b/samples/Grammatical Framework/FoodsHeb.gf @@ -0,0 +1,108 @@ +--# -path=alltenses + +--(c) 2009 Dana Dannells +-- Licensed under LGPL + +concrete FoodsHeb of Foods = open Prelude in { + + flags coding=utf8 ; + + lincat + Comment = SS ; + Quality = {s: Number => Species => Gender => Str} ; + Kind = {s : Number => Species => Str ; g : Gender ; mod : Modified} ; + Item = {s : Str ; g : Gender ; n : Number ; sp : Species ; mod : Modified} ; + + + lin + Pred item quality = ss (item.s ++ quality.s ! item.n ! Indef ! item.g ) ; + This = det Sg Def "הזה" "הזאת"; + That = det Sg Def "ההוא" "ההיא" ; + These = det Pl Def "האלה" "האלה" ; + Those = det Pl Def "ההם" "ההן" ; + Mod quality kind = { + s = \\n,sp => kind.s ! n ! sp ++ quality.s ! n ! sp ! kind.g; + g = kind.g ; + mod = T + } ; + Wine = regNoun "יין" "יינות" Masc ; + Cheese = regNoun "גבינה" "גבינות" Fem ; + Fish = regNoun "דג" "דגים" Masc ; + Pizza = regNoun "פיצה" "פיצות" Fem ; + Very qual = {s = \\g,n,sp => "מאוד" ++ qual.s ! g ! n ! sp} ; + Fresh = regAdj "טרי" ; + Warm = regAdj "חם" ; + Italian = regAdj2 "איטלקי" ; + Expensive = regAdj "יקר" ; + Delicious = regAdj "טעים" ; + Boring = regAdj2 "משעמם"; + + param + Number = Sg | Pl ; + Gender = Masc | Fem ; + Species = Def | Indef ; + Modified = T | F ; + + oper + Noun : Type = {s : Number => Species => Str ; g : Gender ; mod : Modified } ; + Adj : Type = {s : Number => Species => Gender => Str} ; + + det : Number -> Species -> Str -> Str -> Noun -> + {s : Str ; g :Gender ; n : Number ; sp : Species ; mod : Modified} = + \n,sp,m,f,cn -> { + s = case cn.mod of { _ => cn.s ! n ! sp ++ case cn.g of {Masc => m ; Fem => f} }; + g = cn.g ; + n = n ; + sp = sp ; + mod = cn.mod + } ; + + noun : (gvina,hagvina,gvinot,hagvinot : Str) -> Gender -> Noun = + \gvina,hagvina,gvinot,hagvinot,g -> { + s = table { + Sg => table { + Indef => gvina ; + Def => hagvina + } ; + Pl => table { + Indef => gvinot ; + Def => hagvinot + } + } ; + g = g ; + mod = F + } ; + + regNoun : Str -> Str -> Gender -> Noun = + \gvina,gvinot, g -> + noun gvina (defH gvina) gvinot (defH gvinot) g ; + + defH : Str -> Str = \cn -> + case cn of {_ => "ה" + cn}; + + replaceLastLetter : Str -> Str = \c -> + case c of {"ף" => "פ" ; "ם" => "מ" ; "ן" => "נ" ; "ץ" => "צ" ; "ך" => "כ"; _ => c} ; + + adjective : (_,_,_,_ : Str) -> Adj = + \tov,tova,tovim,tovot -> { + s = table { + Sg => table { + Indef => table { Masc => tov ; Fem => tova } ; + Def => table { Masc => defH tov ; Fem => defH tova } + } ; + Pl => table { + Indef => table {Masc => tovim ; Fem => tovot } ; + Def => table { Masc => defH tovim ; Fem => defH tovot } + } + } + } ; + + regAdj : Str -> Adj = \tov -> + case tov of { to + c@? => + adjective tov (to + replaceLastLetter (c) + "ה" ) (to + replaceLastLetter (c) +"ים" ) (to + replaceLastLetter (c) + "ות" )}; + + regAdj2 : Str -> Adj = \italki -> + case italki of { italk+ c@? => + adjective italki (italk + replaceLastLetter (c) +"ת" ) (italk + replaceLastLetter (c)+ "ים" ) (italk + replaceLastLetter (c) + "ות" )}; + +} -- FoodsHeb diff --git a/samples/Grammatical Framework/FoodsHin.gf b/samples/Grammatical Framework/FoodsHin.gf new file mode 100644 index 00000000..67c29df8 --- /dev/null +++ b/samples/Grammatical Framework/FoodsHin.gf @@ -0,0 +1,75 @@ +-- (c) 2010 Vikash Rauniyar under LGPL + +concrete FoodsHin of Foods = { + + flags coding=utf8 ; + + param + Gender = Masc | Fem ; + Number = Sg | Pl ; + lincat + Comment = {s : Str} ; + Item = {s : Str ; g : Gender ; n : Number} ; + Kind = {s : Number => Str ; g : Gender} ; + Quality = {s : Gender => Number => Str} ; + lin + Pred item quality = { + s = item.s ++ quality.s ! item.g ! item.n ++ copula item.n + } ; + This kind = {s = "यह" ++ kind.s ! Sg ; g = kind.g ; n = Sg} ; + That kind = {s = "वह" ++ kind.s ! Sg ; g = kind.g ; n = Sg} ; + These kind = {s = "ये" ++ kind.s ! Pl ; g = kind.g ; n = Pl} ; + Those kind = {s = "वे" ++ kind.s ! Pl ; g = kind.g ; n = Pl} ; + Mod quality kind = { + s = \\n => quality.s ! kind.g ! n ++ kind.s ! n ; + g = kind.g + } ; + Wine = regN "मदिरा" ; + Cheese = regN "पनीर" ; + Fish = regN "मछली" ; + Pizza = regN "पिज़्ज़ा" ; + Very quality = {s = \\g,n => "अति" ++ quality.s ! g ! n} ; + Fresh = regAdj "ताज़ा" ; + Warm = regAdj "गरम" ; + Italian = regAdj "इटली" ; + Expensive = regAdj "बहुमूल्य" ; + Delicious = regAdj "स्वादिष्ट" ; + Boring = regAdj "अरुचिकर" ; + + oper + mkN : Str -> Str -> Gender -> {s : Number => Str ; g : Gender} = + \s,p,g -> { + s = table { + Sg => s ; + Pl => p + } ; + g = g + } ; + + regN : Str -> {s : Number => Str ; g : Gender} = \s -> case s of { + lark + "ा" => mkN s (lark + "े") Masc ; + lark + "ी" => mkN s (lark + "ीयँा") Fem ; + _ => mkN s s Masc + } ; + + mkAdj : Str -> Str -> Str -> {s : Gender => Number => Str} = \ms,mp,f -> { + s = table { + Masc => table { + Sg => ms ; + Pl => mp + } ; + Fem => \\_ => f + } + } ; + + regAdj : Str -> {s : Gender => Number => Str} = \a -> case a of { + acch + "ा" => mkAdj a (acch + "े") (acch + "ी") ; + _ => mkAdj a a a + } ; + + copula : Number -> Str = \n -> case n of { + Sg => "है" ; + Pl => "हैं" + } ; + + } diff --git a/samples/Grammatical Framework/FoodsI.gf b/samples/Grammatical Framework/FoodsI.gf new file mode 100644 index 00000000..f4113b72 --- /dev/null +++ b/samples/Grammatical Framework/FoodsI.gf @@ -0,0 +1,29 @@ +-- (c) 2009 Aarne Ranta under LGPL + +incomplete concrete FoodsI of Foods = + open Syntax, LexFoods in { + lincat + Comment = Utt ; + Item = NP ; + Kind = CN ; + Quality = AP ; + lin + Pred item quality = mkUtt (mkCl item quality) ; + This kind = mkNP this_Det kind ; + That kind = mkNP that_Det kind ; + These kind = mkNP these_Det kind ; + Those kind = mkNP those_Det kind ; + Mod quality kind = mkCN quality kind ; + Very quality = mkAP very_AdA quality ; + + Wine = mkCN wine_N ; + Pizza = mkCN pizza_N ; + Cheese = mkCN cheese_N ; + Fish = mkCN fish_N ; + Fresh = mkAP fresh_A ; + Warm = mkAP warm_A ; + Italian = mkAP italian_A ; + Expensive = mkAP expensive_A ; + Delicious = mkAP delicious_A ; + Boring = mkAP boring_A ; +} diff --git a/samples/Grammatical Framework/FoodsIce.gf b/samples/Grammatical Framework/FoodsIce.gf new file mode 100644 index 00000000..ab1297c7 --- /dev/null +++ b/samples/Grammatical Framework/FoodsIce.gf @@ -0,0 +1,84 @@ +--# -path=.:prelude + +-- (c) 2009 Martha Dis Brandt under LGPL + +concrete FoodsIce of Foods = open Prelude in { + + flags coding=utf8; + + lincat + Comment = SS ; + Quality = {s : Gender => Number => Defin => Str} ; + Kind = {s : Number => Str ; g : Gender} ; + Item = {s : Str ; g : Gender ; n : Number} ; + + lin + Pred item quality = ss (item.s ++ copula item.n ++ quality.s ! item.g ! item.n ! Ind) ; + This, That = det Sg "þessi" "þessi" "þetta" ; + These, Those = det Pl "þessir" "þessar" "þessi" ; + Mod quality kind = { s = \\n => quality.s ! kind.g ! n ! Def ++ kind.s ! n ; g = kind.g } ; + Wine = noun "vín" "vín" Neutr ; + Cheese = noun "ostur" "ostar" Masc ; + Fish = noun "fiskur" "fiskar" Masc ; + -- the word "pizza" is more commonly used in Iceland, but "flatbaka" is the Icelandic word for it + Pizza = noun "flatbaka" "flatbökur" Fem ; + Very qual = {s = \\g,n,defOrInd => "mjög" ++ qual.s ! g ! n ! defOrInd } ; + Fresh = regAdj "ferskur" ; + Warm = regAdj "heitur" ; + Boring = regAdj "leiðinlegur" ; + -- the order of the given adj forms is: mSg fSg nSg mPl fPl nPl mSgDef f/nSgDef _PlDef + Italian = adjective "ítalskur" "ítölsk" "ítalskt" "ítalskir" "ítalskar" "ítölsk" "ítalski" "ítalska" "ítalsku" ; + Expensive = adjective "dýr" "dýr" "dýrt" "dýrir" "dýrar" "dýr" "dýri" "dýra" "dýru" ; + Delicious = adjective "ljúffengur" "ljúffeng" "ljúffengt" "ljúffengir" "ljúffengar" "ljúffeng" "ljúffengi" "ljúffenga" "ljúffengu" ; + + param + Number = Sg | Pl ; + Gender = Masc | Fem | Neutr ; + Defin = Ind | Def ; + + oper + det : Number -> Str -> Str -> Str -> {s : Number => Str ; g : Gender} -> + {s : Str ; g : Gender ; n : Number} = + \n,masc,fem,neutr,cn -> { + s = case cn.g of {Masc => masc ; Fem => fem; Neutr => neutr } ++ cn.s ! n ; + g = cn.g ; + n = n + } ; + + noun : Str -> Str -> Gender -> {s : Number => Str ; g : Gender} = + \man,men,g -> { + s = table { + Sg => man ; + Pl => men + } ; + g = g + } ; + + adjective : (x1,_,_,_,_,_,_,_,x9 : Str) -> {s : Gender => Number => Defin => Str} = + \ferskur,fersk,ferskt,ferskir,ferskar,fersk_pl,ferski,ferska,fersku -> { + s = \\g,n,t => case of { + < Masc, Sg, Ind > => ferskur ; + < Masc, Pl, Ind > => ferskir ; + < Fem, Sg, Ind > => fersk ; + < Fem, Pl, Ind > => ferskar ; + < Neutr, Sg, Ind > => ferskt ; + < Neutr, Pl, Ind > => fersk_pl; + < Masc, Sg, Def > => ferski ; + < Fem, Sg, Def > | < Neutr, Sg, Def > => ferska ; + < _ , Pl, Def > => fersku + } + } ; + + regAdj : Str -> {s : Gender => Number => Defin => Str} = \ferskur -> + let fersk = Predef.tk 2 ferskur + in adjective + ferskur fersk (fersk + "t") + (fersk + "ir") (fersk + "ar") fersk + (fersk + "i") (fersk + "a") (fersk + "u") ; + + copula : Number -> Str = + \n -> case n of { + Sg => "er" ; + Pl => "eru" + } ; +} diff --git a/samples/Grammatical Framework/FoodsIta.gf b/samples/Grammatical Framework/FoodsIta.gf new file mode 100644 index 00000000..51baf9d7 --- /dev/null +++ b/samples/Grammatical Framework/FoodsIta.gf @@ -0,0 +1,8 @@ +--# -path=.:present + +-- (c) 2009 Aarne Ranta under LGPL + +concrete FoodsIta of Foods = FoodsI with + (Syntax = SyntaxIta), + (LexFoods = LexFoodsIta) ; + diff --git a/samples/Grammatical Framework/FoodsJpn.gf b/samples/Grammatical Framework/FoodsJpn.gf new file mode 100644 index 00000000..9525ff16 --- /dev/null +++ b/samples/Grammatical Framework/FoodsJpn.gf @@ -0,0 +1,72 @@ +--# -path=.:../lib/src/prelude + +-- (c) 2009 Zofia Stankiewicz under LGPL + +concrete FoodsJpn of Foods = open Prelude in { + +flags coding=utf8 ; + + lincat + Comment = {s: Style => Str}; + Quality = {s: AdjUse => Str ; t: AdjType} ; + Kind = {s : Number => Str} ; + Item = {s : Str ; n : Number} ; + + lin + Pred item quality = {s = case quality.t of { + IAdj => table {Plain => item.s ++ quality.s ! APred ; Polite => item.s ++ quality.s ! APred ++ copula ! Polite ! item.n } ; + NaAdj => \\p => item.s ++ quality.s ! APred ++ copula ! p ! item.n } + } ; + This = det Sg "この" ; + That = det Sg "その" ; + These = det Pl "この" ; + Those = det Pl "その" ; + Mod quality kind = {s = \\n => quality.s ! Attr ++ kind.s ! n} ; + Wine = regNoun "ワインは" ; + Cheese = regNoun "チーズは" ; + Fish = regNoun "魚は" ; + Pizza = regNoun "ピザは" ; + Very quality = {s = \\a => "とても" ++ quality.s ! a ; t = quality.t } ; + Fresh = adj "新鮮な" "新鮮"; + Warm = regAdj "あたたかい" ; + Italian = adj "イタリアの" "イタリアのもの"; + Expensive = regAdj "たかい" ; + Delicious = regAdj "おいしい" ; + Boring = regAdj "つまらない" ; + + param + Number = Sg | Pl ; + AdjUse = Attr | APred ; -- na-adjectives have different forms as noun attributes and predicates + Style = Plain | Polite ; -- for phrase types + AdjType = IAdj | NaAdj ; -- IAdj can form predicates without the copula, NaAdj cannot + + oper + det : Number -> Str -> {s : Number => Str} -> {s : Str ; n : Number} = + \n,d,cn -> { + s = d ++ cn.s ! n ; + n = n + } ; + noun : Str -> Str -> {s : Number => Str} = + \sakana,sakana -> {s = \\_ => sakana } ; + + regNoun : Str -> {s : Number => Str} = + \sakana -> noun sakana sakana ; + + adj : Str -> Str -> {s : AdjUse => Str ; t : AdjType} = + \chosenna, chosen -> { + s = table { + Attr => chosenna ; + APred => chosen + } ; + t = NaAdj + } ; + + regAdj : Str -> {s: AdjUse => Str ; t : AdjType} =\akai -> { + s = \\_ => akai ; t = IAdj} ; + + copula : Style => Number => Str = + table { + Plain => \\_ => "だ" ; + Polite => \\_ => "です" } ; + +} diff --git a/samples/Grammatical Framework/FoodsLav.gf b/samples/Grammatical Framework/FoodsLav.gf new file mode 100644 index 00000000..efab6345 --- /dev/null +++ b/samples/Grammatical Framework/FoodsLav.gf @@ -0,0 +1,91 @@ +--# -path=.:prelude + +-- (c) 2009 Inese Bernsone under LGPL + +concrete FoodsLav of Foods = open Prelude in { + + flags + coding=utf8 ; + + lincat + Comment = SS ; + Quality = {s : Q => Gender => Number => Defin => Str } ; + Kind = {s : Number => Str ; g : Gender} ; + Item = {s : Str ; g : Gender ; n : Number } ; + + lin + Pred item quality = ss (item.s ++ {- copula item.n -} "ir" ++ quality.s ! Q1 ! item.g ! item.n ! Ind ) ; + This = det Sg "šis" "šī" ; + That = det Sg "tas" "tā" ; + These = det Pl "šie" "šīs" ; + Those = det Pl "tie" "tās" ; + Mod quality kind = {s = \\n => quality.s ! Q1 ! kind.g ! n ! Def ++ kind.s ! n ; g = kind.g } ; + Wine = noun "vīns" "vīni" Masc ; + Cheese = noun "siers" "sieri" Masc ; + Fish = noun "zivs" "zivis" Fem ; + Pizza = noun "pica" "picas" Fem ; + Very qual = {s = \\q,g,n,spec => "ļoti" ++ qual.s ! Q2 ! g ! n ! spec }; + + Fresh = adjective "svaigs" "svaiga" "svaigi" "svaigas" "svaigais" "svaigā" "svaigie" "svaigās" ; + Warm = regAdj "silts" ; + Italian = specAdj "itāļu" (regAdj "itālisks") ; + Expensive = regAdj "dārgs" ; + Delicious = regAdj "garšīgs" ; + Boring = regAdj "garlaicīgs" ; + + param + Number = Sg | Pl ; + Gender = Masc | Fem ; + Defin = Ind | Def ; + Q = Q1 | Q2 ; + + oper + det : Number -> Str -> Str -> {s : Number => Str ; g : Gender} -> + {s : Str ; g : Gender ; n : Number} = + \n,m,f,cn -> { + s = case cn.g of {Masc => m ; Fem => f} ++ cn.s ! n ; + g = cn.g ; + n = n + } ; + noun : Str -> Str -> Gender -> {s : Number => Str ; g : Gender} = + \man,men,g -> { + s = table { + Sg => man ; + Pl => men + } ; + g = g + } ; + adjective : (_,_,_,_,_,_,_,_ : Str) -> {s : Q => Gender => Number => Defin => Str} = + \skaists,skaista,skaisti,skaistas,skaistais,skaistaa,skaistie,skaistaas -> { + s = table { + _ => table { + Masc => table { + Sg => table {Ind => skaists ; Def => skaistais} ; + Pl => table {Ind => skaisti ; Def => skaistie} + } ; + Fem => table { + Sg => table {Ind => skaista ; Def => skaistaa} ; + Pl => table {Ind => skaistas ; Def => skaistaas} + } + } + } + } ; + + {- irregAdj : Str -> {s : Gender => Number => Defin => Str} = \itaalju -> + let itaalju = itaalju + in adjective itaalju (itaalju) (itaalju) (itaalju) (itaalju) (itaalju) (itaalju) (itaalju) ; -} + + regAdj : Str -> {s : Q => Gender => Number => Defin => Str} = \skaists -> + let skaist = init skaists + in adjective skaists (skaist + "a") (skaist + "i") (skaist + "as") (skaist + "ais") (skaist + "ā") (skaist + "ie") (skaist + "ās"); + + Adjective : Type = {s : Q => Gender => Number => Defin => Str} ; + + specAdj : Str -> Adjective -> Adjective = \s,a -> { + s = table { + Q2 => a.s ! Q1 ; + Q1 => \\_,_,_ => s + } + } ; + + } diff --git a/samples/Grammatical Framework/FoodsMlt.gf b/samples/Grammatical Framework/FoodsMlt.gf new file mode 100644 index 00000000..5fcd4de7 --- /dev/null +++ b/samples/Grammatical Framework/FoodsMlt.gf @@ -0,0 +1,105 @@ +-- (c) 2013 John J. Camilleri under LGPL + +concrete FoodsMlt of Foods = open Prelude in { + flags coding=utf8 ; + + lincat + Comment = SS ; + Quality = {s : Gender => Number => Str} ; + Kind = {s : Number => Str ; g : Gender} ; + Item = {s : Str ; g : Gender ; n : Number} ; + + lin + -- Pred item quality = ss (item.s ++ copula item.n item.g ++ quality.s ! item.g ! item.n) ; + Pred item quality = ss (item.s ++ quality.s ! item.g ! item.n) ; + + This kind = det Sg "dan" "din" kind ; + That kind = det Sg "dak" "dik" kind ; + These kind = det Pl "dawn" "" kind ; + Those kind = det Pl "dawk" "" kind ; + + Mod quality kind = { + s = \\n => kind.s ! n ++ quality.s ! kind.g ! n ; + g = kind.g + } ; + + Wine = noun "inbid" "inbejjed" Masc ; + Cheese = noun "ġobon" "ġobniet" Masc ; + Fish = noun "ħuta" "ħut" Fem ; + Pizza = noun "pizza" "pizzez" Fem ; + + Very qual = {s = \\g,n => qual.s ! g ! n ++ "ħafna"} ; + + Warm = adjective "sħun" "sħuna" "sħan" ; + Expensive = adjective "għali" "għalja" "għaljin" ; + Delicious = adjective "tajjeb" "tajba" "tajbin" ; + Boring = uniAdj "tad-dwejjaq" ; + Fresh = regAdj "frisk" ; + Italian = regAdj "Taljan" ; + + param + Number = Sg | Pl ; + Gender = Masc | Fem ; + + oper + --Create an adjective (full function) + --Params: Sing Masc, Sing Fem, Plural + adjective : (_,_,_ : Str) -> {s : Gender => Number => Str} = \iswed,sewda,suwed -> { + s = table { + Masc => table { + Sg => iswed ; + Pl => suwed + } ; + Fem => table { + Sg => sewda ; + Pl => suwed + } + } + } ; + + --Create a regular adjective + --Param: Sing Masc + regAdj : Str -> {s : Gender => Number => Str} = \frisk -> + adjective frisk (frisk + "a") (frisk + "i") ; + + --Create a "uni-adjective" eg tal-buzz + --Param: Sing Masc + uniAdj : Str -> {s : Gender => Number => Str} = \uni -> + adjective uni uni uni ; + + --Create a noun + --Params: Singular, Plural, Gender (inherent) + noun : Str -> Str -> Gender -> {s : Number => Str ; g : Gender} = \ktieb,kotba,g -> { + s = table { + Sg => ktieb ; + Pl => kotba + } ; + g = g + } ; + + --Copula is a linking verb + --Params: Number, Gender + -- copula : Number -> Gender -> Str = \n,g -> case n of { + -- Sg => case g of { Masc => "huwa" ; Fem => "hija" } ; + -- Pl => "huma" + -- } ; + + --Create an article, taking into account first letter of next word + article = pre { + "a"|"e"|"i"|"o"|"u" => "l-" ; + --cons@("ċ"|"d"|"n"|"r"|"s"|"t"|"x"|"ż") => "i" + cons + "-" ; + _ => "il-" + } ; + + --Create a determinant + --Params: Sg/Pl, Masc, Fem + det : Number -> Str -> Str -> {s : Number => Str ; g : Gender} -> {s : Str ; g : Gender ; n : Number} = \n,m,f,cn -> { + s = case n of { + Sg => case cn.g of {Masc => m ; Fem => f}; --string + Pl => m --default to masc + } ++ article ++ cn.s ! n ; + g = cn.g ; --gender + n = n --number + } ; + +} diff --git a/samples/Grammatical Framework/FoodsMon.gf b/samples/Grammatical Framework/FoodsMon.gf new file mode 100644 index 00000000..eda2012f --- /dev/null +++ b/samples/Grammatical Framework/FoodsMon.gf @@ -0,0 +1,49 @@ +--# -path=.:/GF/lib/src/prelude + +-- (c) 2009 Nyamsuren Erdenebadrakh under LGPL + +concrete FoodsMon of Foods = open Prelude in { + flags coding=utf8; + + lincat + Comment, Quality = SS ; + Kind = {s : Number => Str} ; + Item = {s : Str ; n : Number} ; + + lin + Pred item quality = ss (item.s ++ "бол" ++ quality.s) ; + This = det Sg "энэ" ; + That = det Sg "тэр" ; + These = det Pl "эдгээр" ; + Those = det Pl "тэдгээр" ; + Mod quality kind = {s = \\n => quality.s ++ kind.s ! n} ; + Wine = regNoun "дарс" ; + Cheese = regNoun "бяслаг" ; + Fish = regNoun "загас" ; + Pizza = regNoun "пицца" ; + Very = prefixSS "маш" ; + Fresh = ss "шинэ" ; + Warm = ss "халуун" ; + Italian = ss "итали" ; + Expensive = ss "үнэтэй" ; + Delicious = ss "амттай" ; + Boring = ss "амтгүй" ; + + param + Number = Sg | Pl ; + + oper + det : Number -> Str -> {s : Number => Str} -> {s : Str ; n : Number} = + \n,d,cn -> { + s = d ++ cn.s ! n ; + n = n + } ; + + regNoun : Str -> {s : Number => Str} = + \x -> {s = table { + Sg => x ; + Pl => x + "нууд"} + } ; + } + + diff --git a/samples/Grammatical Framework/FoodsNep.gf b/samples/Grammatical Framework/FoodsNep.gf new file mode 100644 index 00000000..ea02e64a --- /dev/null +++ b/samples/Grammatical Framework/FoodsNep.gf @@ -0,0 +1,60 @@ +-- (c) 2011 Dinesh Simkhada under LGPL + +concrete FoodsNep of Foods = { + + flags coding = utf8 ; + + lincat + Comment, Quality = {s : Str} ; + Kind = {s : Number => Str} ; + Item = {s : Str ; n : Number} ; + + lin + Pred item quality = + {s = item.s ++ quality.s ++ copula ! item.n} ; + + This = det Sg "यो" ; + That = det Sg "त्यो" ; + These = det Pl "यी" ; + Those = det Pl "ती" ; + Mod quality kind = + {s = \\n => quality.s ++ kind.s ! n} ; + + Wine = regNoun "रक्सी" ; + Cheese = regNoun "चिज" ; + Fish = regNoun "माछा" ; + Pizza = regNoun "पिज्जा" ; + Very a = {s = "धेरै" ++ a.s} ; + Fresh = adj "ताजा" ; + Warm = adj "तातो" ; + Italian = adj "इटालियन" ; + Expensive = adj "महँगो" | adj "बहुमूल्य" ; + Delicious = adj "स्वादिष्ट" | adj "मीठो" ; + Boring = adjPl "नमिठो" ; + + param + Number = Sg | Pl ; + + oper + det : Number -> Str -> + {s : Number => Str} -> {s : Str ; n : Number} = + \n,det,noun -> {s = det ++ noun.s ! n ; n = n} ; + + noun : Str -> Str -> {s : Number => Str} = + \man,men -> {s = table {Sg => man ; Pl => men}} ; + + regNoun : Str -> {s : Number => Str} = + \car -> noun car (car + "हरु") ; + + adjPl : Str -> {s : Str} = \a -> case a of { + bor + "ठो" => adj (bor + "ठा") ; + _ => adj a + } ; + + adj : Str -> {s : Str} = + \cold -> {s = cold} ; + + copula : Number => Str = + table {Sg => "छ" ; Pl => "छन्"} ; +} + diff --git a/samples/Grammatical Framework/FoodsOri.gf b/samples/Grammatical Framework/FoodsOri.gf new file mode 100644 index 00000000..ad4f492f --- /dev/null +++ b/samples/Grammatical Framework/FoodsOri.gf @@ -0,0 +1,30 @@ +concrete FoodsOri of Foods = { + +flags coding = utf8 ; + +lincat + Comment = Str; + Item = Str; + Kind = Str; + Quality = Str; + +lin + Pred item quality = item ++ quality ++ "ଅଟେ"; + This kind = "ଏଇ" ++ kind; + That kind = "ସେଇ" ++ kind; + These kind = "ଏଇ" ++ kind ++ "ଗୁଡିକ" ; + Those kind = "ସେଇ" ++ kind ++ "ଗୁଡିକ" ; + Mod quality kind = quality ++ kind; + Wine = "ମଦ"; + Cheese = "ଛେନା"; + Fish = "ମାଛ"; + Pizza = "ପିଜଜ଼ା" ; + Very quality = "ଅତି" ++ quality; + Fresh = "ତାଜା"; + Warm = "ଗରମ"; + Italian = "ଇଟାଲି"; + Expensive = "ମୁଲ୍ୟବାନ୍"; + Delicious = "ସ୍ଵାଦିସ୍ଟ "; + Boring = "ଅରୁଚିକର"; + +} diff --git a/samples/Grammatical Framework/FoodsPes.gf b/samples/Grammatical Framework/FoodsPes.gf new file mode 100644 index 00000000..c2e631e8 --- /dev/null +++ b/samples/Grammatical Framework/FoodsPes.gf @@ -0,0 +1,65 @@ +concrete FoodsPes of Foods = { + + flags optimize=noexpand ; coding=utf8 ; + + lincat + Comment = {s : Str} ; + Quality = {s : Add => Str; prep : Str} ; + Kind = {s : Add => Number => Str ; prep : Str}; + Item = {s : Str ; n : Number}; + lin + Pred item quality = {s = item.s ++ quality.s ! Indep ++ copula ! item.n} ; + This = det Sg "این" ; + That = det Sg "آن" ; + These = det Pl "این" ; + Those = det Pl "آن" ; + + Mod quality kind = {s = \\a,n => kind.s ! Attr ! n ++ kind.prep ++ quality.s ! a ; + prep = quality.prep + }; + Wine = regN "شراب" ; + Cheese = regN "پنیر" ; + Fish = regN "ماهى" ; + Pizza = regN "پیتزا" ; + Very a = {s = \\at => "خیلی" ++ a.s ! at ; prep = a.prep} ; + Fresh = adj "تازه" ; + Warm = adj "گرم" ; + Italian = adj "ایتالیایی" ; + Expensive = adj "گران" ; + Delicious = adj "لذىذ" ; + Boring = adj "ملال آور" ; -- it must be written as ملال آور. + + param + Number = Sg | Pl ; + Add = Indep | Attr ; + oper + det : Number -> Str -> {s: Add => Number => Str ; prep : Str} -> {s : Str ; n: Number} = + \n,det,noun -> {s = det ++ noun.s ! Indep ! n ; n = n }; + + noun : (x1,_,_,x4 : Str) -> {s : Add => Number => Str ; prep : Str} = \pytzA, pytzAy, pytzAhA,pr -> + {s = \\a,n => case of + { => pytzA ; => pytzAhA ; + =>pytzA ; => pytzAhA + "ى" }; + prep = pr + }; + + regN : Str -> {s: Add => Number => Str ; prep : Str} = \mrd -> + case mrd of + { _ + ("ا"|"ه"|"ى"|"و"|"") => noun mrd (mrd+"ى") (mrd + "ها") ""; + _ => noun mrd mrd (mrd + "ها") "e" + }; + + adj : Str -> {s : Add => Str; prep : Str} = \tAzh -> + case tAzh of + { _ + ("ا"|"ه"|"ى"|"و"|"") => mkAdj tAzh (tAzh ++ "ى") "" ; + _ => mkAdj tAzh tAzh "ه" + }; + + mkAdj : Str -> Str -> Str -> {s : Add => Str; prep : Str} = \tAzh, tAzhy, pr -> + {s = table {Indep => tAzh; + Attr => tAzhy}; + prep = pr + }; + copula : Number => Str = table {Sg => "است"; Pl => "هستند"}; + +} \ No newline at end of file diff --git a/samples/Grammatical Framework/FoodsPor.gf b/samples/Grammatical Framework/FoodsPor.gf new file mode 100644 index 00000000..6171c707 --- /dev/null +++ b/samples/Grammatical Framework/FoodsPor.gf @@ -0,0 +1,79 @@ +-- (c) 2009 Rami Shashati under LGPL + +concrete FoodsPor of Foods = open Prelude in { + flags coding=utf8; + + lincat + Comment = {s : Str} ; + Quality = {s : Gender => Number => Str} ; + Kind = {s : Number => Str ; g : Gender} ; + Item = {s : Str ; n : Number ; g : Gender } ; + + lin + Pred item quality = + {s = item.s ++ copula ! item.n ++ quality.s ! item.g ! item.n } ; + This = det Sg (table {Masc => "este" ; Fem => "esta"}) ; + That = det Sg (table {Masc => "esse" ; Fem => "essa"}) ; + These = det Pl (table {Masc => "estes" ; Fem => "estas"}) ; + Those = det Pl (table {Masc => "esses" ; Fem => "essas"}) ; + + Mod quality kind = { s = \\n => kind.s ! n ++ quality.s ! kind.g ! n ; g = kind.g } ; + + Wine = regNoun "vinho" Masc ; + Cheese = regNoun "queijo" Masc ; + Fish = regNoun "peixe" Masc ; + Pizza = regNoun "pizza" Fem ; + + Very a = { s = \\g,n => "muito" ++ a.s ! g ! n } ; + + Fresh = mkAdjReg "fresco" ; + Warm = mkAdjReg "quente" ; + Italian = mkAdjReg "Italiano" ; + Expensive = mkAdjReg "caro" ; + Delicious = mkAdjReg "delicioso" ; + Boring = mkAdjReg "chato" ; + + param + Number = Sg | Pl ; + Gender = Masc | Fem ; + + oper + QualityT : Type = {s : Gender => Number => Str} ; + + mkAdj : (_,_,_,_ : Str) -> QualityT = \bonito,bonita,bonitos,bonitas -> { + s = table { + Masc => table { Sg => bonito ; Pl => bonitos } ; + Fem => table { Sg => bonita ; Pl => bonitas } + } ; + } ; + + -- regular pattern + adjSozinho : Str -> QualityT = \sozinho -> + let sozinh = Predef.tk 1 sozinho + in mkAdj sozinho (sozinh + "a") (sozinh + "os") (sozinh + "as") ; + + -- for gender-independent adjectives + adjUtil : Str -> Str -> QualityT = \util,uteis -> + mkAdj util util uteis uteis ; + + -- smart paradigm for adjcetives + mkAdjReg : Str -> QualityT = \a -> case last a of { + "o" => adjSozinho a ; + "e" => adjUtil a (a + "s") + } ; + + ItemT : Type = {s : Str ; n : Number ; g : Gender } ; + + det : Number -> (Gender => Str) -> KindT -> ItemT = + \num,det,noun -> {s = det ! noun.g ++ noun.s ! num ; n = num ; g = noun.g } ; + + KindT : Type = {s : Number => Str ; g : Gender} ; + + noun : Str -> Str -> Gender -> KindT = + \animal,animais,gen -> {s = table {Sg => animal ; Pl => animais} ; g = gen } ; + + regNoun : Str -> Gender -> KindT = + \carro,gen -> noun carro (carro + "s") gen ; + + copula : Number => Str = table {Sg => "é" ; Pl => "são"} ; +} diff --git a/samples/Grammatical Framework/FoodsRon.gf b/samples/Grammatical Framework/FoodsRon.gf new file mode 100644 index 00000000..d7d917ff --- /dev/null +++ b/samples/Grammatical Framework/FoodsRon.gf @@ -0,0 +1,72 @@ +-- (c) 2009 Ramona Enache under LGPL + +concrete FoodsRon of Foods = +{ +flags coding=utf8 ; + +param Number = Sg | Pl ; + Gender = Masc | Fem ; + NGender = NMasc | NFem | NNeut ; +lincat +Comment = {s : Str}; +Quality = {s : Number => Gender => Str}; +Kind = {s : Number => Str; g : NGender}; +Item = {s : Str ; n : Number; g : Gender}; + +lin + +This = det Sg (mkTab "acest" "această"); +That = det Sg (mkTab "acel" "acea"); +These = det Pl (mkTab "acești" "aceste"); +Those = det Pl (mkTab "acei" "acele"); + +Wine = mkNoun "vin" "vinuri" NNeut ; +Cheese = mkNoun "brânză" "brânzeturi" NFem ; +Fish = mkNoun "peşte" "peşti" NMasc ; +Pizza = mkNoun "pizza" "pizze" NFem; + +Very a = {s = \\n,g => "foarte" ++ a.s ! n ! g}; + +Fresh = mkAdj "proaspăt" "proaspătă" "proaspeţi" "proaspete" ; +Warm = mkAdj "cald" "caldă" "calzi" "calde" ; +Italian = mkAdj "italian" "italiană" "italieni" "italiene" ; +Expensive = mkAdj "scump" "scumpă" "scumpi" "scumpe" ; +Delicious = mkAdj "delicios" "delcioasă" "delicioşi" "delicioase" ; +Boring = mkAdj "plictisitor" "plictisitoare" "plictisitori" "plictisitoare" ; + +Pred item quality = {s = item.s ++ copula ! item.n ++ quality.s ! item.n ! item.g} ; + +Mod quality kind = {s = \\n => kind.s ! n ++ quality.s ! n ! (getAgrGender kind.g n) ; g = kind.g}; + +oper + +mkTab : Str -> Str -> {s : Gender => Str} = \acesta, aceasta -> +{s = table{Masc => acesta; + Fem => aceasta}}; + +det : Number -> {s : Gender => Str} -> {s : Number => Str ; g : NGender} -> {s : Str; n : Number; g : Gender} = +\n,det,noun -> let gg = getAgrGender noun.g n + in + {s = det.s ! gg ++ noun.s ! n ; n = n ; g = gg}; + +mkNoun : Str -> Str -> NGender -> {s : Number => Str; g : NGender} = \peste, pesti,g -> +{s = table {Sg => peste; + Pl => pesti}; + g = g +}; + +oper mkAdj : (x1,_,_,x4 : Str) -> {s : Number => Gender => Str} = \scump, scumpa, scumpi, scumpe -> +{s = \\n,g => case of +{ => scump ; => scumpa; + => scumpi ; => scumpe +}}; + +copula : Number => Str = table {Sg => "este" ; Pl => "sunt"}; + +getAgrGender : NGender -> Number -> Gender = \ng,n -> +case of +{ => Masc ; => Fem; + => Masc ; => Fem +}; + +} diff --git a/samples/Grammatical Framework/FoodsSpa.gf b/samples/Grammatical Framework/FoodsSpa.gf new file mode 100644 index 00000000..972282ae --- /dev/null +++ b/samples/Grammatical Framework/FoodsSpa.gf @@ -0,0 +1,31 @@ +--# -path=.:present + +concrete FoodsSpa of Foods = open SyntaxSpa, StructuralSpa, ParadigmsSpa in { + + lincat + Comment = Utt ; + Item = NP ; + Kind = CN ; + Quality = AP ; + + lin + Pred item quality = mkUtt (mkCl item quality) ; + This kind = mkNP this_QuantSg kind ; + That kind = mkNP that_QuantSg kind ; + These kind = mkNP these_QuantPl kind ; + Those kind = mkNP those_QuantPl kind ; + Mod quality kind = mkCN quality kind ; + Very quality = mkAP very_AdA quality ; + Wine = mkCN (mkN "vino") ; + Pizza = mkCN (mkN "pizza") ; + Cheese = mkCN (mkN "queso") ; + Fish = mkCN (mkN "pescado") ; + Fresh = mkAP (mkA "fresco") ; + Warm = mkAP (mkA "caliente") ; + Italian = mkAP (mkA "italiano") ; + Expensive = mkAP (mkA "caro") ; + Delicious = mkAP (mkA "delicioso") ; + Boring = mkAP (mkA "aburrido") ; + +} + diff --git a/samples/Grammatical Framework/FoodsSwe.gf b/samples/Grammatical Framework/FoodsSwe.gf new file mode 100644 index 00000000..cbb35fb9 --- /dev/null +++ b/samples/Grammatical Framework/FoodsSwe.gf @@ -0,0 +1,7 @@ +--# -path=.:present + +-- (c) 2009 Aarne Ranta under LGPL + +concrete FoodsSwe of Foods = FoodsI with + (Syntax = SyntaxSwe), + (LexFoods = LexFoodsSwe) ** {flags language = sv_SE;} ; diff --git a/samples/Grammatical Framework/FoodsTha.gf b/samples/Grammatical Framework/FoodsTha.gf new file mode 100644 index 00000000..b031a7e2 --- /dev/null +++ b/samples/Grammatical Framework/FoodsTha.gf @@ -0,0 +1,33 @@ +--# -path=.:alltenses + +concrete FoodsTha of Foods = open SyntaxTha, LexiconTha, + ParadigmsTha, (R=ResTha) in { + + flags coding = utf8 ; + + lincat + Comment = Utt ; + Item = NP ; + Kind = CN ; + Quality = AP ; + + lin + Pred item quality = mkUtt (mkCl item quality) ; + This kind = mkNP this_Det kind ; + That kind = mkNP that_Det kind ; + These kind = mkNP these_Det kind ; + Those kind = mkNP those_Det kind ; + Mod quality kind = mkCN quality kind ; + Very quality = mkAP very_AdA quality ; + Wine = mkCN (mkN (R.thword "เหล้าอ" "งุ่น") "ขวด") ; + Pizza = mkCN (mkN (R.thword "พิซ" "ซา") "ถาด") ; + Cheese = mkCN (mkN (R.thword "เนย" "แข็ง") "ก้อน") ; + Fish = mkCN fish_N ; + Fresh = mkAP (mkA "สด") ; + Warm = mkAP warm_A ; + Italian = mkAP (mkA " อิตาลี") ; + Expensive = mkAP (mkA "แพง") ; + Delicious = mkAP (mkA "อร่อย") ; + Boring = mkAP (mkA (R.thword "น่า" "เบิ่อ")) ; + +} diff --git a/samples/Grammatical Framework/FoodsTsn.gf b/samples/Grammatical Framework/FoodsTsn.gf new file mode 100644 index 00000000..a7a69a1a --- /dev/null +++ b/samples/Grammatical Framework/FoodsTsn.gf @@ -0,0 +1,178 @@ +--# -path=alltenses + +-- (c) 2009 Laurette Pretorius Sr & Jr and Ansu Berg under LGPL + +concrete FoodsTsn of Foods = open Prelude, Predef in { + flags coding = utf8; + lincat + Comment = {s:Str}; + Item = {s:Str; c:NounClass; n:Number}; + Kind = {w: Number => Str; r: Str; c: NounClass; q: Number => Str; b: Bool}; + Quality = {s: NounClass => Number => Str; p_form: Str; t: TType}; + lin + Pred item quality = {s = item.s ++ ((mkPredDescrCop quality.t) ! item.c ! item.n) ++ quality.p_form}; + + This kind = {s = (kind.w ! Sg) ++ (mkDemPron1 ! kind.c ! Sg) ++ (kind.q ! Sg); c = kind.c; n = Sg}; + That kind = {s = (kind.w ! Sg) ++ (mkDemPron2 ! kind.c ! Sg) ++ (kind.q ! Sg); c = kind.c; n = Sg}; + These kind = {s = (kind.w ! Pl) ++ (mkDemPron1 ! kind.c ! Pl) ++ (kind.q ! Pl); c = kind.c; n = Pl}; + Those kind = {s = (kind.w ! Pl) ++ (mkDemPron2 ! kind.c ! Pl) ++ (kind.q ! Pl); c = kind.c; n = Pl}; + + Mod quality kind = mkMod quality kind; + + -- Lexicon + Wine = mkNounNC14_6 "jalwa"; + Cheese = mkNounNC9_10 "kase"; + Fish = mkNounNC9_10 "thlapi"; + Pizza = mkNounNC9_10 "pizza"; + Very quality = smartVery quality; + Fresh = mkVarAdj "ntsha"; + Warm = mkOrdAdj "bothitho"; + Italian = mkPerAdj "Itali"; + Expensive = mkVerbRel "tura"; + Delicious = mkOrdAdj "monate"; + Boring = mkOrdAdj "bosula"; + + param + NounClass = NC9_10 | NC14_6; + Number = Sg | Pl; + TType = P | V | ModV | R ; + oper + mkMod : {s: NounClass => Number => Str; p_form: Str; t: TType} -> {w: Number => Str; r: Str; c: NounClass; q: Number => Str; b: Bool} -> {w: Number => Str; r: Str; c: NounClass; q: Number => Str; + b: Bool} = \x,y -> case y.b of + { + True => {w = y.w; r = y.r; c = y.c; + q = table { + Sg => ((y.q ! Sg) ++ "le" ++ ((smartQualRelPart (x.t)) ! y.c ! Sg) ++ ((smartDescrCop (x.t)) ! y.c ! Sg) ++ (x.s ! y.c ! Sg)); + Pl => ((y.q ! Pl) ++ "le" ++ ((smartQualRelPart (x.t))! y.c ! Pl) ++ ((smartDescrCop (x.t)) ! y.c ! Pl) ++(x.s ! y.c ! Pl)) + }; b = True + }; + False => {w = y.w; r = y.r; c = y.c; + q = table { + Sg => ((y.q ! Sg) ++ ((smartQualRelPart (x.t)) ! y.c ! Sg) ++ ((smartDescrCop (x.t)) ! y.c ! Sg) ++ (x.s ! y.c ! Sg)); + Pl => ((y.q ! Pl) ++ ((smartQualRelPart (x.t)) ! y.c ! Pl) ++ ((smartDescrCop (x.t)) ! y.c ! Pl) ++(x.s ! y.c ! Pl)) + }; b = True + } + }; + + mkNounNC14_6 : Str -> {w: Number => Str; r: Str; c: NounClass; q: Number => Str; b: Bool} = \x -> {w = table {Sg => "bo" + x; Pl => "ma" + x}; r = x; c = NC14_6; + q = table {Sg => ""; Pl => ""}; b = False}; + + mkNounNC9_10 : Str -> {w: Number => Str; r: Str; c: NounClass; q: Number => Str; b: Bool} = \x -> {w = table {Sg => "" + x; Pl => "di" + x}; r = x; c = NC9_10; + q = table {Sg => ""; Pl => ""}; b = False}; + + mkVarAdj : Str -> {s: NounClass => Number => Str; p_form: Str; t: TType} = \x -> + { + s = table { + NC9_10 => table {Sg => "" + x; Pl => "di" + x}; + NC14_6 => table {Sg => "bo" + x; Pl => "ma" + x} + }; + p_form = x; + t = R; + }; + + mkOrdAdj : Str -> {s: NounClass => Number => Str; p_form: Str; t: TType} = \x -> + { + s = table { + NC9_10 => table {Sg => "" + x; Pl => "" + x}; + NC14_6 => table {Sg => "" + x; Pl => "" + x} + }; + p_form = x; + t = R; + }; + + mkVerbRel : Str -> {s: NounClass => Number => Str; p_form: Str; t: TType} = \x -> + { + s = table { + NC9_10 => table {Sg => x + "ng"; Pl => x + "ng"}; + NC14_6 => table {Sg => x + "ng"; Pl => x + "ng"} + }; + p_form = x; + t = V; + }; + + mkPerAdj : Str -> {s: NounClass => Number => Str; p_form: Str; t: TType} = \x -> + { + s = table { + NC9_10 => table {Sg => "" + x; Pl => "" + x}; + NC14_6 => table {Sg => "" + x; Pl => "" + x} + }; + p_form = "mo" ++ x; + t = P; + }; + + mkVeryAdj : {s: NounClass => Number => Str; p_form: Str; t: TType} -> {s: NounClass => Number => Str; p_form: Str; t: TType} = \x -> + { + s = table{c => table{n => (x.s!c!n) ++ "thata"}}; p_form = x.p_form ++ "thata"; t = x.t + }; + + mkVeryVerb : {s: NounClass => Number => Str; p_form: Str; t: TType} -> {s: NounClass => Number => Str; p_form: Str; t: TType} = \x -> + { + s = table{c => table{n => (x.s!c!n) ++ "thata"}}; p_form = x.p_form ++ "thata"; t = ModV + }; + + smartVery : {s: NounClass => Number => Str; p_form: Str; t: TType} -> {s: NounClass => Number => Str; p_form: Str; t: TType} = +\x -> case x.t of --(x.s!c!n) + { + (V | ModV) => mkVeryVerb x; + --ModV => mkVeryVerb x; + _ => mkVeryAdj x + }; + + mkDemPron1 : NounClass => Number => Str = table + { + NC9_10 => table {Sg => "e"; Pl => "tse"}; + NC14_6 => table {Sg => "bo"; Pl => "a"} + }; + + mkDemPron2 : NounClass => Number => Str = table + { + NC9_10 => table {Sg => "eo"; Pl => "tseo"}; + NC14_6 => table {Sg => "boo"; Pl => "ao"} + }; + + smartQualRelPart : TType -> (NounClass => Number => Str) = \x -> case x of + { + P => mkQualRelPart_PName; + _ => mkQualRelPart + }; + + mkQualRelPart : NounClass => Number => Str = table + { + NC9_10 => table {Sg => "e"; Pl => "tse"}; + NC14_6 => table {Sg => "bo"; Pl => "a"} + }; + + mkQualRelPart_PName : NounClass => Number => Str = table + { + NC9_10 => table {Sg => "ya"; Pl => "tsa"}; + NC14_6 => table {Sg => "ba"; Pl => "a"} + }; + + smartDescrCop : TType -> (NounClass => Number => Str) = \x -> case x of + { + P => mkDescrCop_PName; + _ => mkDescrCop + }; + + mkDescrCop : NounClass => Number => Str = table + { + NC9_10 => table {Sg => "e"; Pl => "di"}; + NC14_6 => table {Sg => "bo"; Pl => "a"} + }; + + mkDescrCop_PName : NounClass => Number => Str = table + { + NC9_10 => table {Sg => "ga"; Pl => "ga"}; + NC14_6 => table {Sg => "ga"; Pl => "ga"} + }; + + mkPredDescrCop : TType -> (NounClass => Number => Str) = \x -> case x of + { + V => table {NC9_10 => table {Sg => "e" ++ "a"; Pl => "di" ++ "a"}; + NC14_6 => table {Sg => "bo" ++ "a"; Pl => "a" ++ "a"}}; + + _ => table {NC9_10 => table {Sg => "e"; Pl => "di"}; + NC14_6 => table {Sg => "bo"; Pl => "a"}} + }; + +} diff --git a/samples/Grammatical Framework/FoodsTur.gf b/samples/Grammatical Framework/FoodsTur.gf new file mode 100644 index 00000000..9d6cd035 --- /dev/null +++ b/samples/Grammatical Framework/FoodsTur.gf @@ -0,0 +1,140 @@ +{- + File : FoodsTur.gf + Author : Server Çimen + Version : 1.0 + Created on: August 26, 2009 + + This file contains concrete grammar of Foods abstract grammar for Turkish Language. + This grammar is to be used for Fridge demo and developed in the scope of GF Resource + Grammar Summer School. + +-} + +concrete FoodsTur of Foods = open Predef in { + flags + coding=utf8 ; + lincat + Comment = {s : Str} ; + Quality = {s : Str ; c : Case; softness : Softness; h : Harmony} ; + Kind = {s : Case => Number => Str} ; + Item = {s : Str; n : Number} ; + lin + This = det Sg "bu" ; + That = det Sg "şu" ; + These = det Pl "bu" ; + Those = det Pl "şu" ; + -- Reason for excluding plural form of copula: In Turkish if subject is not a human being, + -- then singular form of copula is used regardless of the number of subject. Since all + -- possible subjects are non human, copula do not need to have plural form. + Pred item quality = {s = item.s ++ quality.s ++ "&+" ++ copula ! quality.softness ! quality.h} ;--! item.n} ; + Mod quality kind = {s = case quality.c of { + Nom => \\t,n => quality.s ++ kind.s ! t ! n ; + Gen => \\t,n => quality.s ++ kind.s ! Gen ! n + } + } ; + Wine = mkN "şarap" "şaraplar" "şarabı" "şarapları" ; + Cheese = mkN "peynir" "peynirler" "peyniri" "peynirleri" ; + Fish = mkN "balık" "balıklar" "balığı" "balıkları" ; + Pizza = mkN "pizza" "pizzalar" "pizzası" "pizzaları" ; + Very a = {s = "çok" ++ a.s ; c = a.c; softness = a.softness; h = a.h} ; + Fresh = adj "taze" Nom; + Warm = adj "ılık" Nom; + Italian = adj "İtalyan" Gen ; + Expensive = adj "pahalı" Nom; + Delicious = adj "lezzetli" Nom; + Boring = adj "sıkıcı" Nom; + param + Number = Sg | Pl ; + Case = Nom | Gen ; + Harmony = I_Har | Ih_Har | U_Har | Uh_Har ; --Ih = İ; Uh = Ü + Softness = Soft | Hard ; + oper + det : Number -> Str -> {s : Case => Number => Str} -> {s : Str; n : Number} = + \num,det,noun -> {s = det ++ noun.s ! Nom ! num; n = num} ; + mkN = overload { + mkN : Str -> Str -> {s : Case => Number => Str} = regNoun ; + mkn : Str -> Str -> Str -> Str-> {s : Case => Number => Str} = noun ; + } ; + regNoun : Str -> Str -> {s : Case => Number => Str} = + \peynir,peynirler -> noun peynir peynirler [] [] ; + noun : Str -> Str -> Str -> Str-> {s : Case => Number => Str} = + \sarap,saraplar,sarabi,saraplari -> { + s = table { + Nom => table { + Sg => sarap ; + Pl => saraplar + } ; + Gen => table { + Sg => sarabi ; + Pl => saraplari + } + } + }; + {- + Since there is a bug in overloading, this overload is useless. + + mkA = overload { + mkA : Str -> {s : Str; c : Case; softness : Softness; h : Harmony} = \base -> adj base Nom ; + mkA : Str -> Case -> {s : Str; c : Case; softness : Softness; h : Harmony} = adj ; + } ; + -} + adj : Str -> Case -> {s : Str; c : Case; softness : Softness; h : Harmony} = + \italyan,ca -> {s = italyan ; c = ca; softness = (getSoftness italyan); h = (getHarmony italyan)} ; + -- See the comment at lines 26 and 27 for excluded plural form of copula. + copula : Softness => Harmony {-=> Number-} => Str = + table { + Soft => table { + I_Har => "dır" ;--table { + -- Sg => "dır" ; + -- Pl => "dırlar" + --} ; + Ih_Har => "dir" ;--table { + --Sg => "dir" ; + --Pl => "dirler" + --} ; + U_Har => "dur" ;--table { + -- Sg => "dur" ; + -- Pl => "durlar" + --} ; + Uh_Har => "dür" --table { + --Sg => "dür" ; + --Pl => "dürler" + --} + } ; + Hard => table { + I_Har => "tır" ;--table { + --Sg => "tır" ; + --Pl => "tırlar" + --} ; + Ih_Har => "tir" ;--table { + --Sg => "tir" ; + --Pl => "tirler" + --} ; + U_Har => "tur" ;--table { + -- Sg => "tur" ; + -- Pl => "turlar" + --} ; + Uh_Har => "tür"--table { + --Sg => "tür" ; + --Pl => "türler" + --} + } + } ; + + getHarmony : Str -> Harmony + = \base -> case base of { + _+c@("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö")+ + ("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")* => + case c of { + ("ı"|"a") => I_Har ; + ("i"|"e") => Ih_Har ; + ("u"|"o") => U_Har ; + ("ü"|"ö") => Uh_Har + } + } ; + getSoftness : Str -> Softness + = \base -> case base of { + _+("f"|"s"|"t"|"k"|"ç"|"ş"|"h"|"p") => Hard ; + _ => Soft + } ; +} \ No newline at end of file diff --git a/samples/Grammatical Framework/FoodsUrd.gf b/samples/Grammatical Framework/FoodsUrd.gf new file mode 100644 index 00000000..186b2f92 --- /dev/null +++ b/samples/Grammatical Framework/FoodsUrd.gf @@ -0,0 +1,53 @@ +-- (c) 2009 Shafqat Virk under LGPL + +concrete FoodsUrd of Foods = { + + flags coding=utf8 ; + + + param Number = Sg | Pl ; + param Gender = Masc | Fem; + + oper coupla : Number -> Str =\n -> case n of {Sg => "ہے" ; Pl => "ہیں"}; + + + lincat + Comment = {s : Str} ; + Item = {s: Str ; n: Number ; g:Gender}; + Kind = {s: Number => Str ; g:Gender}; + Quality = {s: Gender => Number => Str}; + + lin + Pred item quality = {s = item.s ++ quality.s ! item.g ! item.n ++ coupla item.n} ; + This kind = {s = "یھ" ++ kind.s ! Sg; n= Sg ; g = kind.g } ; + These kind = {s = "یھ" ++ kind.s ! Pl; n = Pl ; g = kind.g} ; + That kind = {s = "وہ" ++ kind.s ! Sg; n= Sg ; g = kind.g} ; + Those kind = {s = "وہ" ++ kind.s ! Pl; n=Pl ; g = kind.g} ; + Mod quality kind = {s = \\n => quality.s ! kind.g ! n ++ kind.s ! n ; g = kind.g}; + Wine = {s = table { Sg => "شراب" ; Pl => "شرابیں"} ; g = Fem}; + Cheese = {s = table { Sg => "پنیر" ; Pl => "پنیریں"} ; g = Fem}; + Fish = {s = table { Sg => "مچھلی" ; Pl => "مچھلیاں"} ; g = Fem}; + Pizza = {s = table { Sg => "پیزہ" ; Pl => "پیزے"} ; g = Masc}; + Very quality = {s = \\g,n => "بہت" ++ quality.s ! g ! n} ; + Fresh = regAdj "تازہ" ; + Warm = regAdj "گرم" ; + Italian = regAdj "اٹا لوی" ; + Expensive = regAdj "مہنگا" ; + Delicious = regAdj "مزیدار" ; + Boring = regAdj "فضول" ; + + oper + regAdj : Str -> {s: Gender => Number => Str} = \a -> case a of { + x + "ا" => mkAdj a (x+"ے") (x+"ی"); + _ => mkAdj a a a + }; + mkAdj : Str -> Str -> Str -> {s: Gender => Number => Str} = \s,p,f -> { + s = table { + Masc => table { + Sg => s; + Pl => p + }; + Fem => \\_ => f + } + }; + } \ No newline at end of file diff --git a/samples/Grammatical Framework/LexFoods.gf b/samples/Grammatical Framework/LexFoods.gf new file mode 100644 index 00000000..12ace208 --- /dev/null +++ b/samples/Grammatical Framework/LexFoods.gf @@ -0,0 +1,15 @@ +-- (c) 2009 Aarne Ranta under LGPL + +interface LexFoods = open Syntax in { + oper + wine_N : N ; + pizza_N : N ; + cheese_N : N ; + fish_N : N ; + fresh_A : A ; + warm_A : A ; + italian_A : A ; + expensive_A : A ; + delicious_A : A ; + boring_A : A ; +} diff --git a/samples/Grammatical Framework/LexFoodsCat.gf b/samples/Grammatical Framework/LexFoodsCat.gf new file mode 100644 index 00000000..624fc98c --- /dev/null +++ b/samples/Grammatical Framework/LexFoodsCat.gf @@ -0,0 +1,18 @@ +-- (c) 2009 Jordi Saludes under LGPL + +instance LexFoodsCat of LexFoods = + open SyntaxCat, ParadigmsCat, (M = MorphoCat) in { + flags + coding = utf8 ; + oper + wine_N = mkN "vi" "vins" M.Masc ; + pizza_N = mkN "pizza" ; + cheese_N = mkN "formatge" ; + fish_N = mkN "peix" "peixos" M.Masc; + fresh_A = mkA "fresc" "fresca" "frescos" "fresques" "frescament"; + warm_A = mkA "calent" ; + italian_A = mkA "italià" "italiana" "italians" "italianes" "italianament" ; + expensive_A = mkA "car" ; + delicious_A = mkA "deliciós" "deliciosa" "deliciosos" "delicioses" "deliciosament"; + boring_A = mkA "aburrit" "aburrida" "aburrits" "aburrides" "aburridament" ; +} diff --git a/samples/Grammatical Framework/LexFoodsFin.gf b/samples/Grammatical Framework/LexFoodsFin.gf new file mode 100644 index 00000000..dbf8af6b --- /dev/null +++ b/samples/Grammatical Framework/LexFoodsFin.gf @@ -0,0 +1,21 @@ +-- (c) 2009 Aarne Ranta under LGPL + +instance LexFoodsFin of LexFoods = + open SyntaxFin, ParadigmsFin in { + flags coding=utf8; + oper + wine_N = mkN "viini" ; + pizza_N = mkN "pizza" ; + cheese_N = mkN "juusto" ; + fish_N = mkN "kala" ; + fresh_A = mkA "tuore" ; + warm_A = mkA + (mkN "lämmin" "lämpimän" "lämmintä" "lämpimänä" "lämpimään" + "lämpiminä" "lämpimiä" "lämpimien" "lämpimissä" "lämpimiin" + ) + "lämpimämpi" "lämpimin" ; + italian_A = mkA "italialainen" ; + expensive_A = mkA "kallis" ; + delicious_A = mkA "herkullinen" ; + boring_A = mkA "tylsä" ; +} diff --git a/samples/Grammatical Framework/LexFoodsGer.gf b/samples/Grammatical Framework/LexFoodsGer.gf new file mode 100644 index 00000000..253384f2 --- /dev/null +++ b/samples/Grammatical Framework/LexFoodsGer.gf @@ -0,0 +1,17 @@ +-- (c) 2009 Aarne Ranta under LGPL + +instance LexFoodsGer of LexFoods = + open SyntaxGer, ParadigmsGer in { + flags coding=utf8; + oper + wine_N = mkN "Wein" ; + pizza_N = mkN "Pizza" "Pizzen" feminine ; + cheese_N = mkN "Käse" "Käse" masculine ; + fish_N = mkN "Fisch" ; + fresh_A = mkA "frisch" ; + warm_A = mkA "warm" "wärmer" "wärmste" ; + italian_A = mkA "italienisch" ; + expensive_A = mkA "teuer" ; + delicious_A = mkA "köstlich" ; + boring_A = mkA "langweilig" ; +} diff --git a/samples/Grammatical Framework/LexFoodsIta.gf b/samples/Grammatical Framework/LexFoodsIta.gf new file mode 100644 index 00000000..11de5fcd --- /dev/null +++ b/samples/Grammatical Framework/LexFoodsIta.gf @@ -0,0 +1,16 @@ +-- (c) 2009 Aarne Ranta under LGPL + +instance LexFoodsIta of LexFoods = + open SyntaxIta, ParadigmsIta in { + oper + wine_N = mkN "vino" ; + pizza_N = mkN "pizza" ; + cheese_N = mkN "formaggio" ; + fish_N = mkN "pesce" ; + fresh_A = mkA "fresco" ; + warm_A = mkA "caldo" ; + italian_A = mkA "italiano" ; + expensive_A = mkA "caro" ; + delicious_A = mkA "delizioso" ; + boring_A = mkA "noioso" ; +} diff --git a/samples/Grammatical Framework/LexFoodsSwe.gf b/samples/Grammatical Framework/LexFoodsSwe.gf new file mode 100644 index 00000000..f9f02c33 --- /dev/null +++ b/samples/Grammatical Framework/LexFoodsSwe.gf @@ -0,0 +1,17 @@ +-- (c) 2009 Aarne Ranta under LGPL + +instance LexFoodsSwe of LexFoods = + open SyntaxSwe, ParadigmsSwe in { + flags coding=utf8; + oper + wine_N = mkN "vin" "vinet" "viner" "vinerna" ; + pizza_N = mkN "pizza" ; + cheese_N = mkN "ost" ; + fish_N = mkN "fisk" ; + fresh_A = mkA "färsk" ; + warm_A = mkA "varm" ; + italian_A = mkA "italiensk" ; + expensive_A = mkA "dyr" ; + delicious_A = mkA "läcker" ; + boring_A = mkA "tråkig" ; +} diff --git a/samples/Grammatical Framework/ResCze.gf b/samples/Grammatical Framework/ResCze.gf new file mode 100644 index 00000000..56b4aa6e --- /dev/null +++ b/samples/Grammatical Framework/ResCze.gf @@ -0,0 +1,46 @@ +-- (c) 2011 Katerina Bohmova under LGPL + +resource ResCze = open Prelude in { + flags + coding = utf8 ; + param + Number = Sg | Pl ; + Gender = Masc | Fem | Neutr; + oper + NounPhrase : Type = + {s : Str ; g : Gender ; n : Number} ; + Noun : Type = {s : Number => Str ; g : Gender} ; + Adjective : Type = {s : Gender => Number => Str} ; + + det : Number -> Str -> Str -> Str -> Noun -> NounPhrase = + \n,m,f,ne,cn -> { + s = table {Masc => m ; Fem => f; Neutr => ne} ! cn.g ++ + cn.s ! n ; + g = cn.g ; + n = n + } ; + noun : Str -> Str -> Gender -> Noun = + \muz,muzi,g -> { + s = table {Sg => muz ; Pl => muzi} ; + g = g + } ; + adjective : (msg,fsg,nsg,mpl,fpl,npl : Str) -> Adjective = + \msg,fsg,nsg,mpl,fpl,npl -> { + s = table { + Masc => table {Sg => msg ; Pl => mpl} ; + Fem => table {Sg => fsg ; Pl => fpl} ; + Neutr => table {Sg => nsg ; Pl => npl} + } + } ; + regAdj : Str -> Adjective = + \mlad -> + adjective (mlad+"ý") (mlad+"á") (mlad+"é") + (mlad+"é") (mlad+"é") (mlad+"á") ; + regnfAdj : Str -> Adjective = + \vynikajici -> + adjective vynikajici vynikajici vynikajici + vynikajici vynikajici vynikajici; + copula : Number => Str = + table {Sg => "je" ; Pl => "jsou"} ; +} + diff --git a/samples/Grammatical Framework/transFoodsHin.gf b/samples/Grammatical Framework/transFoodsHin.gf new file mode 100644 index 00000000..21d1d2ac --- /dev/null +++ b/samples/Grammatical Framework/transFoodsHin.gf @@ -0,0 +1,75 @@ +-- (c) 2009 Aarne Ranta under LGPL + +concrete FoodsHin of Foods = { + + flags coding=utf8 ; + + param + Gender = Masc | Fem ; + Number = Sg | Pl ; + lincat + Comment = {s : Str} ; + Item = {s : Str ; g : Gender ; n : Number} ; + Kind = {s : Number => Str ; g : Gender} ; + Quality = {s : Gender => Number => Str} ; + lin + Pred item quality = { + s = item.s ++ quality.s ! item.g ! item.n ++ copula item.n + } ; + This kind = {s = "yah" ++ kind.s ! Sg ; g = kind.g ; n = Sg} ; + That kind = {s = "vah" ++ kind.s ! Sg ; g = kind.g ; n = Sg} ; + These kind = {s = "ye" ++ kind.s ! Pl ; g = kind.g ; n = Pl} ; + Those kind = {s = "ve" ++ kind.s ! Pl ; g = kind.g ; n = Pl} ; + Mod quality kind = { + s = \\n => quality.s ! kind.g ! n ++ kind.s ! n ; + g = kind.g + } ; + Wine = regN "madirA" ; + Cheese = regN "panIr" ; + Fish = regN "maClI" ; + Pizza = regN "pijjA" ; + Very quality = {s = \\g,n => "bahut" ++ quality.s ! g ! n} ; + Fresh = regAdj "tAzA" ; + Warm = regAdj "garam" ; + Italian = regAdj "i-t.alI" ; + Expensive = regAdj "mahaNgA" ; + Delicious = regAdj "rucikar" ; + Boring = regAdj "pEriyA" ; + + oper + mkN : Str -> Str -> Gender -> {s : Number => Str ; g : Gender} = + \s,p,g -> { + s = table { + Sg => s ; + Pl => p + } ; + g = g + } ; + + regN : Str -> {s : Number => Str ; g : Gender} = \s -> case s of { + lark + "A" => mkN s (lark + "e") Masc ; + lark + "I" => mkN s (lark + "iyaM") Fem ; + _ => mkN s s Masc + } ; + + mkAdj : Str -> Str -> Str -> {s : Gender => Number => Str} = \ms,mp,f -> { + s = table { + Masc => table { + Sg => ms ; + Pl => mp + } ; + Fem => \\_ => f + } + } ; + + regAdj : Str -> {s : Gender => Number => Str} = \a -> case a of { + acch + "A" => mkAdj a (acch + "e") (acch + "I") ; + _ => mkAdj a a a + } ; + + copula : Number -> Str = \n -> case n of { + Sg => "hE" ; + Pl => "hEN" + } ; + + } diff --git a/samples/Groovy/script.gvy b/samples/Groovy/script.gvy new file mode 100644 index 00000000..25ef2eab --- /dev/null +++ b/samples/Groovy/script.gvy @@ -0,0 +1,2 @@ +#!/usr/bin/env groovy +println "Hello World" diff --git a/samples/Groovy/template.grt b/samples/Groovy/template.grt new file mode 100644 index 00000000..59bb9c22 --- /dev/null +++ b/samples/Groovy/template.grt @@ -0,0 +1,9 @@ +html { + head { + component "bootstrap" + title "Bootstrap Template" + } + + html { + } +} diff --git a/samples/Groovy/template.gtpl b/samples/Groovy/template.gtpl new file mode 100644 index 00000000..f2e594d1 --- /dev/null +++ b/samples/Groovy/template.gtpl @@ -0,0 +1,9 @@ +html { + head { + title "Example Template" + } + + body { + p "This is a quick template example" + } +} diff --git a/samples/HTML/ApiOverviewPage.st b/samples/HTML/ApiOverviewPage.st new file mode 100644 index 00000000..4faa1935 --- /dev/null +++ b/samples/HTML/ApiOverviewPage.st @@ -0,0 +1,60 @@ + + + +$Common_meta()$ + +Android API Differences Report + + +

+ + + + + + + diff --git a/samples/HTML/pages.html b/samples/HTML/pages.html new file mode 100644 index 00000000..e068e4fa --- /dev/null +++ b/samples/HTML/pages.html @@ -0,0 +1,31 @@ + + + + +Related Pages + + + + + + +
+
+
Related Pages
+
+
+
Here is a list of all related documentation pages:
+
+ + + diff --git a/samples/Haskell/Hello.hs b/samples/Haskell/Hello.hs new file mode 100644 index 00000000..cef0b4a9 --- /dev/null +++ b/samples/Haskell/Hello.hs @@ -0,0 +1,6 @@ +import Data.Char + +main :: IO () +main = do + let hello = "hello world" + putStrLn $ map toUpper hello \ No newline at end of file diff --git a/samples/Haskell/Main.hs b/samples/Haskell/Main.hs new file mode 100644 index 00000000..4a37a8c0 --- /dev/null +++ b/samples/Haskell/Main.hs @@ -0,0 +1,33 @@ +module Main where + +import Sudoku +import Data.Maybe + + +sudoku :: Sudoku +sudoku = [8, 0, 1, 3, 4, 0, 0, 0, 0, + 4, 3, 0, 8, 0, 0, 1, 0, 7, + 0, 0, 0, 0, 6, 0, 0, 0, 3, + 2, 0, 8, 0, 5, 0, 0, 0, 9, + 0, 0, 9, 0, 0, 0, 7, 0, 0, + 6, 0, 0, 0, 7, 0, 8, 0, 4, + 3, 0, 0, 0, 1, 0, 0, 0, 0, + 1, 0, 5, 0, 0, 6, 0, 4, 2, + 0, 0, 0, 0, 2, 4, 3, 0, 8] + +{- +sudoku :: Sudoku +sudoku = [8, 6, 1, 3, 4, 7, 2, 9, 5, + 4, 3, 2, 8, 9, 5, 1, 6, 7, + 9, 5, 7, 1, 6, 2, 4, 8, 3, + 2, 7, 8, 4, 5, 1, 6, 3, 9, + 5, 4, 9, 6, 8, 3, 7, 2, 1, + 6, 1, 3, 2, 7, 9, 8, 5, 4, + 3, 2, 4, 9, 1, 8, 5, 7, 6, + 1, 8, 5, 7, 3, 6, 9, 4, 2, + 7, 9, 6, 5, 2, 4, 3, 1, 8] +-} +main :: IO () +main = do + putStrLn $ pPrint sudoku ++ "\n\n" + putStrLn $ pPrint $ fromMaybe [] $ solve sudoku \ No newline at end of file diff --git a/samples/Haskell/Sudoku.hs b/samples/Haskell/Sudoku.hs new file mode 100644 index 00000000..ca6122e3 --- /dev/null +++ b/samples/Haskell/Sudoku.hs @@ -0,0 +1,46 @@ +module Sudoku +( + Sudoku, + solve, + isSolved, + pPrint +) where + +import Data.Maybe +import Data.List +import Data.List.Split + +type Sudoku = [Int] + +solve :: Sudoku -> Maybe Sudoku +solve sudoku + | isSolved sudoku = Just sudoku + | otherwise = do + index <- elemIndex 0 sudoku + let sudokus = [nextTest sudoku index i | i <- [1..9], + checkRow (nextTest sudoku index i) index, + checkColumn (nextTest sudoku index i) index, + checkBox (nextTest sudoku index i) index] + listToMaybe $ mapMaybe solve sudokus + where nextTest sudoku index i = take index sudoku ++ [i] ++ drop (index+1) sudoku + checkRow sudoku index = (length $ getRow sudoku index) == (length $ nub $ getRow sudoku index) + checkColumn sudoku index = (length $ getColumn sudoku index) == (length $ nub $ getColumn sudoku index) + checkBox sudoku index = (length $ getBox sudoku index) == (length $ nub $ getBox sudoku index) + getRow sudoku index = filter (/=0) $ (chunksOf 9 sudoku) !! (quot index 9) + getColumn sudoku index = filter (/=0) $ (transpose $ chunksOf 9 sudoku) !! (mod index 9) + getBox sudoku index = filter (/=0) $ (map concat $ concatMap transpose $ chunksOf 3 $ map (chunksOf 3) $ chunksOf 9 sudoku) + !! (3 * (quot index 27) + (quot (mod index 9) 3)) + +isSolved :: Sudoku -> Bool +isSolved sudoku + | product sudoku == 0 = False + | map (length . nub) sudokuRows /= map length sudokuRows = False + | map (length . nub) sudokuColumns /= map length sudokuColumns = False + | map (length . nub) sudokuBoxes /= map length sudokuBoxes = False + | otherwise = True + where sudokuRows = chunksOf 9 sudoku + sudokuColumns = transpose sudokuRows + sudokuBoxes = map concat $ concatMap transpose $ chunksOf 3 $ map (chunksOf 3) $ chunksOf 9 sudoku + +pPrint :: Sudoku -> String +pPrint sudoku = intercalate "\n" $ map (intercalate " " . map show) $ chunksOf 9 sudoku \ No newline at end of file diff --git a/samples/Hy/fibonacci.hy b/samples/Hy/fibonacci.hy new file mode 100644 index 00000000..9ccdd76c --- /dev/null +++ b/samples/Hy/fibonacci.hy @@ -0,0 +1,9 @@ +;; Fibonacci example in Hy. + +(defn fib [n] + (if (<= n 2) n + (+ (fib (- n 1)) (fib (- n 2))))) + +(if (= __name__ "__main__") + (for [x [1 2 3 4 5 6 7 8]] + (print (fib x)))) diff --git a/samples/Hy/hello-world.hy b/samples/Hy/hello-world.hy new file mode 100644 index 00000000..181095e1 --- /dev/null +++ b/samples/Hy/hello-world.hy @@ -0,0 +1,13 @@ +;; The concurrent.futures example in Hy. + +(import [concurrent.futures [ThreadPoolExecutor as-completed]] + [random [randint]] + [sh [sleep]]) + +(defn task-to-do [] + (sleep (randint 1 5))) + +(with-as (ThreadPoolExecutor 10) executor + (setv jobs (list-comp (.submit executor task-to-do) (x (range 0 10)))) + (for (future (as-completed jobs)) + (.result future))) diff --git a/samples/IDL/mg_acosh.pro b/samples/IDL/mg_acosh.pro new file mode 100644 index 00000000..1510f09f --- /dev/null +++ b/samples/IDL/mg_acosh.pro @@ -0,0 +1,29 @@ +; docformat = 'rst' + +;+ +; Inverse hyperbolic cosine. Uses the formula: +; +; $$\text{acosh}(z) = \ln(z + \sqrt{z + 1} \sqrt{z - 1})$$ +; +; :Examples: +; The arc hyperbolic sine function looks like:: +; +; IDL> x = 2.5 * findgen(1000) / 999. + 1. +; IDL> plot, x, mg_acosh(x), xstyle=1 +; +; This should look like: +; +; .. image:: acosh.png +; +; :Returns: +; float, double, complex, or double complex depending on the input +; +; :Params: +; z : in, required, type=numeric +; input +;- +function mg_acosh, z + compile_opt strictarr + + return, alog(z + sqrt(z + 1) * sqrt(z - 1)) +end \ No newline at end of file diff --git a/samples/IDL/mg_analysis.dlm b/samples/IDL/mg_analysis.dlm new file mode 100644 index 00000000..6cb7881f --- /dev/null +++ b/samples/IDL/mg_analysis.dlm @@ -0,0 +1,9 @@ +MODULE mg_analysis +DESCRIPTION Tools for analysis +VERSION 1.0 +SOURCE mgalloy +BUILD_DATE January 18, 2011 + +FUNCTION MG_ARRAY_EQUAL 2 2 KEYWORDS +FUNCTION MG_TOTAL 1 1 + diff --git a/samples/IDL/mg_gcd.pro b/samples/IDL/mg_gcd.pro new file mode 100644 index 00000000..2287723f --- /dev/null +++ b/samples/IDL/mg_gcd.pro @@ -0,0 +1,35 @@ +; docformat = 'rst' + +;+ +; Find the greatest common denominator (GCD) for two positive integers. +; +; :Returns: +; integer +; +; :Params: +; a : in, required, type=integer +; first integer +; b : in, required, type=integer +; second integer +;- +function mg_gcd, a, b + compile_opt strictarr + on_error, 2 + + if (n_params() ne 2) then message, 'incorrect number of arguments' + if (~mg_isinteger(a) || ~mg_isinteger(b)) then begin + message, 'integer arguments required' + endif + + _a = abs(a) + _b = abs(b) + minArg = _a < _b + maxArg = _a > _b + + if (minArg eq 0) then return, maxArg + + remainder = maxArg mod minArg + if (remainder eq 0) then return, minArg + + return, mg_gcd(minArg, remainder) +end diff --git a/samples/IDL/mg_trunc.pro b/samples/IDL/mg_trunc.pro new file mode 100644 index 00000000..c5288908 --- /dev/null +++ b/samples/IDL/mg_trunc.pro @@ -0,0 +1,42 @@ +; docformat = 'rst' + +;+ +; Truncate argument towards 0.0, i.e., takes the `FLOOR` of positive values +; and the `CEIL` of negative values. +; +; :Examples: +; Try the main-level program at the end of this file. It does:: +; +; IDL> print, mg_trunc([1.2, -1.2, 0.0]) +; 1 -1 0 +; IDL> print, floor([1.2, -1.2, 0.0]) +; 1 -2 0 +; IDL> print, ceil([1.2, -1.2, 0.0]) +; 2 -1 0 +; +; :Returns: +; array of same type as argument +; +; :Params: +; x : in, required, type=float/double +; array containing values to truncate +;- +function mg_trunc, x + compile_opt strictarr + + result = ceil(x) + posInd = where(x gt 0, nposInd) + + if (nposInd gt 0L) then begin + result[posInd] = floor(x[posInd]) + endif + + return, result +end + + +; main-level example program + +print, mg_trunc([1.2, -1.2, 0.0]) + +end diff --git a/samples/Idris/Chars.idr b/samples/Idris/Chars.idr new file mode 100644 index 00000000..7e3e3e86 --- /dev/null +++ b/samples/Idris/Chars.idr @@ -0,0 +1,42 @@ +module Prelude.Char + +import Builtins + +isUpper : Char -> Bool +isUpper x = x >= 'A' && x <= 'Z' + +isLower : Char -> Bool +isLower x = x >= 'a' && x <= 'z' + +isAlpha : Char -> Bool +isAlpha x = isUpper x || isLower x + +isDigit : Char -> Bool +isDigit x = (x >= '0' && x <= '9') + +isAlphaNum : Char -> Bool +isAlphaNum x = isDigit x || isAlpha x + +isSpace : Char -> Bool +isSpace x = x == ' ' || x == '\t' || x == '\r' || + x == '\n' || x == '\f' || x == '\v' || + x == '\xa0' + +isNL : Char -> Bool +isNL x = x == '\r' || x == '\n' + +toUpper : Char -> Char +toUpper x = if (isLower x) + then (prim__intToChar (prim__charToInt x - 32)) + else x + +toLower : Char -> Char +toLower x = if (isUpper x) + then (prim__intToChar (prim__charToInt x + 32)) + else x + +isHexDigit : Char -> Bool +isHexDigit x = elem (toUpper x) hexChars where + hexChars : List Char + hexChars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + 'A', 'B', 'C', 'D', 'E', 'F'] diff --git a/samples/Inform 7/Trivial Extension.i7x b/samples/Inform 7/Trivial Extension.i7x new file mode 100644 index 00000000..1aae1b85 --- /dev/null +++ b/samples/Inform 7/Trivial Extension.i7x @@ -0,0 +1,6 @@ +Version 1 of Trivial Extension by Andrew Plotkin begins here. + +A cow is a kind of animal. A cow can be purple. + +Trivial Extension ends here. + diff --git a/samples/Inform 7/story.ni b/samples/Inform 7/story.ni new file mode 100644 index 00000000..f8873369 --- /dev/null +++ b/samples/Inform 7/story.ni @@ -0,0 +1,12 @@ +"Test Case" by Andrew Plotkin. + +Include Trivial Extension by Andrew Plotkin. + +The Kitchen is a room. + +[This kitchen is modelled after the one in Zork, although it lacks the detail to establish this to the player.] + +A purple cow called Gelett is in the Kitchen. + +Instead of examining Gelett: + say "You'd rather see than be one." diff --git a/samples/Isabelle/HelloWorld.thy b/samples/Isabelle/HelloWorld.thy new file mode 100644 index 00000000..7c814dae --- /dev/null +++ b/samples/Isabelle/HelloWorld.thy @@ -0,0 +1,46 @@ +theory HelloWorld +imports Main +begin + +section{*Playing around with Isabelle*} + +text{* creating a lemma with the name hello_world*} +lemma hello_world: "True" by simp + +(*inspecting it*) +thm hello_world + +text{* defining a string constant HelloWorld *} + +definition HelloWorld :: "string" where + "HelloWorld \ ''Hello World!''" + +(*reversing HelloWorld twice yilds HelloWorld again*) +theorem "rev (rev HelloWorld) = HelloWorld" + by (fact List.rev_rev_ident) + +text{*now we delete the already proven List.rev_rev_ident lema and show it by hand*} +declare List.rev_rev_ident[simp del] +hide_fact List.rev_rev_ident + +(*It's trivial since we can just 'execute' it*) +corollary "rev (rev HelloWorld) = HelloWorld" + apply(simp add: HelloWorld_def) + done + +text{*does it hold in general?*} +theorem rev_rev_ident:"rev (rev l) = l" + proof(induction l) + case Nil thus ?case by simp + next + case (Cons l ls) + assume IH: "rev (rev ls) = ls" + have "rev (l#ls) = (rev ls) @ [l]" by simp + hence "rev (rev (l#ls)) = rev ((rev ls) @ [l])" by simp + also have "\ = [l] @ rev (rev ls)" by simp + finally show "rev (rev (l#ls)) = l#ls" using IH by simp + qed + +corollary "\(l::string). rev (rev l) = l" by(fastforce intro: rev_rev_ident) + +end diff --git a/samples/JSON/composer.lock b/samples/JSON/composer.lock new file mode 100644 index 00000000..09323450 --- /dev/null +++ b/samples/JSON/composer.lock @@ -0,0 +1,267 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" + ], + "hash": "d8ff8fcb71824f5199f3499bf71862f1", + "packages": [ + { + "name": "arbit/system-process", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/Arbitracker/system-process.git", + "reference": "1.0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Arbitracker/system-process/zipball/1.0", + "reference": "1.0", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "SystemProcess": "src/main/php/" + } + }, + "notification-url": "http://packagist.org/downloads/", + "description": "System process execution library", + "time": "2013-03-31 12:42:56" + }, + { + "name": "pdepend/staticReflection", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/manuelpichler/staticReflection.git", + "reference": "origin/master" + }, + "type": "library" + }, + { + "name": "qafoo/rmf", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/Qafoo/REST-Micro-Framework.git", + "reference": "5f43983f15a8aa12be42ad6068675d4008bfb9ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Qafoo/REST-Micro-Framework/zipball/5f43983f15a8aa12be42ad6068675d4008bfb9ed", + "reference": "5f43983f15a8aa12be42ad6068675d4008bfb9ed", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Qafoo\\RMF": "src/main/" + } + }, + "description": "Very simple VC framework which makes it easy to build HTTP applications / REST webservices", + "support": { + "source": "https://github.com/Qafoo/REST-Micro-Framework/tree/master", + "issues": "https://github.com/Qafoo/REST-Micro-Framework/issues" + }, + "time": "2012-12-07 13:33:01" + }, + { + "name": "twig/twig", + "version": "1.6.0", + "source": { + "type": "git", + "url": "git://github.com/fabpot/Twig.git", + "reference": "v1.6.0" + }, + "dist": { + "type": "zip", + "url": "https://github.com/fabpot/Twig/zipball/v1.6.0", + "reference": "v1.6.0", + "shasum": "" + }, + "require": { + "php": ">=5.2.4" + }, + "type": "library", + "autoload": { + "psr-0": { + "Twig_": "lib/" + } + }, + "license": [ + "BSD" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "http://twig.sensiolabs.org", + "keywords": [ + "templating" + ], + "time": "2012-02-03 23:34:52" + }, + { + "name": "twitter/bootstrap", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/twitter/bootstrap/", + "reference": "origin/master" + }, + "type": "library" + }, + { + "name": "zetacomponents/base", + "version": "1.8", + "source": { + "type": "git", + "url": "https://github.com/zetacomponents/Base.git", + "reference": "1.8" + }, + "dist": { + "type": "zip", + "url": "https://github.com/zetacomponents/Base/zipball/1.8", + "reference": "1.8", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src" + ] + }, + "license": [ + "apache2" + ], + "authors": [ + { + "name": "Sergey Alexeev" + }, + { + "name": "Sebastian Bergmann" + }, + { + "name": "Jan Borsodi" + }, + { + "name": "Raymond Bosman" + }, + { + "name": "Frederik Holljen" + }, + { + "name": "Kore Nordmann" + }, + { + "name": "Derick Rethans" + }, + { + "name": "Vadym Savchuk" + }, + { + "name": "Tobias Schlitt" + }, + { + "name": "Alexandru Stanoi" + } + ], + "description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.", + "homepage": "https://github.com/zetacomponents", + "time": "2009-12-21 04:14:16" + }, + { + "name": "zetacomponents/graph", + "version": "1.5", + "source": { + "type": "git", + "url": "https://github.com/zetacomponents/Graph.git", + "reference": "1.5" + }, + "dist": { + "type": "zip", + "url": "https://github.com/zetacomponents/Graph/zipball/1.5", + "reference": "1.5", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src" + ] + }, + "license": [ + "apache2" + ], + "authors": [ + { + "name": "Sergey Alexeev" + }, + { + "name": "Sebastian Bergmann" + }, + { + "name": "Jan Borsodi" + }, + { + "name": "Raymond Bosman" + }, + { + "name": "Frederik Holljen" + }, + { + "name": "Kore Nordmann" + }, + { + "name": "Derick Rethans" + }, + { + "name": "Vadym Savchuk" + }, + { + "name": "Tobias Schlitt" + }, + { + "name": "Alexandru Stanoi" + }, + { + "name": "Lars Jankowski" + }, + { + "name": "Elger Thiele" + }, + { + "name": "Michael Maclean" + } + ], + "description": "A component for creating pie charts, line graphs and other kinds of diagrams.", + "homepage": "https://github.com/zetacomponents", + "time": "2009-12-21 04:26:17" + } + ], + "packages-dev": [ + + ], + "aliases": [ + + ], + "minimum-stability": "stable", + "stability-flags": { + "qafoo/rmf": 20, + "arbit/system-process": 0 + }, + "platform": [ + + ], + "platform-dev": [ + + ] +} diff --git a/samples/JSON5/example.json5 b/samples/JSON5/example.json5 new file mode 100644 index 00000000..95f12408 --- /dev/null +++ b/samples/JSON5/example.json5 @@ -0,0 +1,29 @@ +/* + * The following is a contrived example, but it illustrates most of the features: + */ + +{ + foo: 'bar', + while: true, + + this: 'is a \ +multi-line string', + + // this is an inline comment + here: 'is another', // inline comment + + /* this is a block comment + that continues on another line */ + + hex: 0xDEADbeef, + half: .5, + delta: +10, + to: Infinity, // and beyond! + + finally: 'a trailing comma', + oh: [ + "we shouldn't forget", + 'arrays can have', + 'trailing commas too', + ], +} diff --git a/samples/JSON5/package.json5 b/samples/JSON5/package.json5 new file mode 100644 index 00000000..9e52ed24 --- /dev/null +++ b/samples/JSON5/package.json5 @@ -0,0 +1,28 @@ +// This file is written in JSON5 syntax, naturally, but npm needs a regular +// JSON file, so compile via `npm run build`. Be sure to keep both in sync! + +{ + name: 'json5', + version: '0.2.0', + description: 'JSON for the ES5 era.', + keywords: ['json', 'es5'], + author: 'Aseem Kishore ', + contributors: [ + 'Max Nanasy ', + ], + main: 'lib/json5.js', + bin: 'lib/cli.js', + dependencies: {}, + devDependencies: { + mocha: '~1.0.3', + }, + scripts: { + build: './lib/cli.js -c package.json5', + test: 'mocha --ui exports --reporter spec', + }, + homepage: 'http://json5.org/', + repository: { + type: 'git', + url: 'https://github.com/aseemk/json5.git', + }, +} diff --git a/samples/JSONLD/sample.jsonld b/samples/JSONLD/sample.jsonld new file mode 100644 index 00000000..dbae017a --- /dev/null +++ b/samples/JSONLD/sample.jsonld @@ -0,0 +1,30 @@ +{ + "@context": { + "property": "http://example.com/vocab#property" + }, + "@id": "../document-relative", + "@type": "#document-relative", + "property": { + "@context": { + "@base": "http://example.org/test/" + }, + "@id": "../document-base-overwritten", + "@type": "#document-base-overwritten", + "property": [ + { + "@context": null, + "@id": "../document-relative", + "@type": "#document-relative", + "property": "context completely reset, drops property" + }, + { + "@context": { + "@base": null + }, + "@id": "../document-relative", + "@type": "#document-relative", + "property": "only @base is cleared" + } + ] + } +} diff --git a/samples/JSONiq/detail.jq b/samples/JSONiq/detail.jq new file mode 100644 index 00000000..9ae43f8b --- /dev/null +++ b/samples/JSONiq/detail.jq @@ -0,0 +1,9 @@ +(: Query for returning one database entry :) + +import module namespace req = "http://www.28msec.com/modules/http-request"; +import module namespace catalog = "http://guide.com/catalog"; + +variable $id := (req:param-values("id"), "London")[1]; +variable $part := (req:param-values("part"), "main")[1]; + +catalog:get-data-by-key($id, $part) diff --git a/samples/JSONiq/query.jq b/samples/JSONiq/query.jq new file mode 100644 index 00000000..d1abbaba --- /dev/null +++ b/samples/JSONiq/query.jq @@ -0,0 +1,17 @@ +(: Query for searching the database for keywords :) + +import module namespace index = "http://guide.com/index"; +import module namespace catalog = "http://guide.com/catalog"; + +import module namespace req = "http://www.28msec.com/modules/http-request"; + +variable $phrase := (req:param-values("q"), "London")[1]; +variable $limit := integer((req:param-values("limit"), 5)[1]); + +[ +for $result at $idx in index:index-search($phrase) +where $idx le $limit +let $data := catalog:get-data-by-id($result.s, $result.p) +return + {| { score : $result.r } , $data |} +] diff --git a/samples/Jade/hello.jade b/samples/Jade/hello.jade new file mode 100644 index 00000000..32c72739 --- /dev/null +++ b/samples/Jade/hello.jade @@ -0,0 +1,3 @@ +p. + Hello, + World! diff --git a/samples/JavaScript/intro.js.frag b/samples/JavaScript/intro.js.frag new file mode 100644 index 00000000..a4e06b08 --- /dev/null +++ b/samples/JavaScript/intro.js.frag @@ -0,0 +1,7 @@ +(function(window, angular) { + +Array.prototype.last = function() { + return this[this.length-1]; +}; + +var app = angular.module('ConwayGameOfLife', []); diff --git a/samples/JavaScript/outro.js.frag b/samples/JavaScript/outro.js.frag new file mode 100644 index 00000000..8634f6ed --- /dev/null +++ b/samples/JavaScript/outro.js.frag @@ -0,0 +1,3 @@ + +})(window, window.angular); + diff --git a/samples/KRL/helloworld.krl b/samples/KRL/helloworld.krl new file mode 100644 index 00000000..0daf048b --- /dev/null +++ b/samples/KRL/helloworld.krl @@ -0,0 +1,15 @@ +ruleset sample { + meta { + name "Hello World" + description << +Hello world +>> + author "Phil Windley" + } + + // just one rule + rule hello { + select when web pageview + notify("Hello world!", "Just a note to say hello"); + } +} diff --git a/samples/Kit/demo.kit b/samples/Kit/demo.kit new file mode 100644 index 00000000..7c948f16 --- /dev/null +++ b/samples/Kit/demo.kit @@ -0,0 +1,8 @@ + + +
+

+

+ +

+
\ No newline at end of file diff --git a/samples/LFE/church.lfe b/samples/LFE/church.lfe new file mode 100644 index 00000000..b99d44ba --- /dev/null +++ b/samples/LFE/church.lfe @@ -0,0 +1,111 @@ +;; Copyright (c) 2013 Duncan McGreggor +;; +;; Licensed under the Apache License, Version 2.0 (the "License"); +;; you may not use this file except in compliance with the License. +;; You may obtain a copy of the License at +;; +;; http://www.apache.org/licenses/LICENSE-2.0 +;; +;; Unless required by applicable law or agreed to in writing, software +;; distributed under the License is distributed on an "AS IS" BASIS, +;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +;; See the License for the specific language governing permissions and +;; limitations under the License. + +;; File : church.lfe +;; Author : Duncan McGreggor +;; Purpose : Demonstrating church numerals from the lambda calculus + +;; The code below was used to create the section of the user guide here: +;; http://lfe.github.io/user-guide/recursion/5.html +;; +;; Here is some example usage: +;; +;; > (slurp '"church.lfe") +;; #(ok church) +;; > (zero) +;; #Fun +;; > (church->int1 (zero)) +;; 0 +;; > (church->int1 (three)) +;; 3 +;; > (church->int1 (five)) +;; 5 +;; > (church->int2 #'five/0) +;; 5 +;; > (church->int2 (lambda () (get-church 25))) +;; 25 + +(defmodule church + (export all)) + +(defun zero () + (lambda (s) + (lambda (x) x))) + +(defun one () + (lambda (s) + (lambda (x) + (funcall s x)))) + +(defun two () + (lambda (s) + (lambda (x) + (funcall s + (funcall s x))))) + +(defun three () + (lambda (s) + (lambda (x) + (funcall s + (funcall s + (funcall s x)))))) + +(defun four () + (lambda (s) + (lambda (x) + (funcall s + (funcall s + (funcall s + (funcall s x))))))) + +(defun five () + (get-church 5)) + +(defun int-successor (n) + (+ n 1)) + +(defun church->int1 (church-numeral) + " + Converts a called church numeral to an integer, e.g.: + > (church->int1 (five)) + " + (funcall + (funcall church-numeral #'int-successor/1) 0)) + +(defun church->int2 (church-numeral) + " + Converts a non-called church numeral to an integer, e.g.: + > (church->int2 #'five/0) + " + (funcall + (funcall + (funcall church-numeral) #'int-successor/1) 0)) + +(defun church-successor (church-numeral) + (lambda (s) + (lambda (x) + (funcall s + (funcall + (funcall church-numeral s) x))))) + +(defun get-church (church-numeral count limit) + (cond ((== count limit) church-numeral) + ((/= count limit) + (get-church + (church-successor church-numeral) + (+ 1 count) + limit)))) + +(defun get-church (integer) + (get-church (zero) 0 integer)) diff --git a/samples/LFE/gps1.lfe b/samples/LFE/gps1.lfe new file mode 100644 index 00000000..41115572 --- /dev/null +++ b/samples/LFE/gps1.lfe @@ -0,0 +1,104 @@ +;;; -*- Mode: LFE; -*- +;;; Code from Paradigms of Artificial Intelligence Programming +;;; Copyright (c) 1991 Peter Norvig + +;;;; File gps1.lisp: First version of GPS (General Problem Solver) + +;;;; Converted to LFE by Robert Virding + +;; Define macros for global variable access. This is a hack and very naughty! +(defsyntax defvar + ([name val] (let ((v val)) (put 'name v) v))) + +(defsyntax setvar + ([name val] (let ((v val)) (put 'name v) v))) + +(defsyntax getvar + ([name] (get 'name))) + +;; Module definition. + +(defmodule gps1 + (export (gps 2) (gps 3) (school-ops 0)) + (import (from lists (member 2) (all 2) (any 2)) + ;; Rename lists functions to be more CL like. + (rename lists ((all 2) every) ((any 2) some) ((filter 2) find-all)))) + +;; An operation. +(defrecord op + action preconds add-list del-list) + +;; General Problem Solver: achieve all goals using *ops*. +(defun gps (state goals ops) + ;; Set global variables + (defvar *state* state) ;The current state: a list of conditions. + (defvar *ops* ops) ;A list of available operators. + (if (every (fun achieve 1) goals) 'solved)) + +(defun gps (state goals) + ;; Set global variables, but use existing *ops* + (defvar *state* state) ;The current state: a list of conditions. + (if (every (fun achieve 1) goals) 'solved)) + +;; A goal is achieved if it already holds or if there is an +;; appropriate op for it that is applicable." +(defun achieve (goal) + (orelse (member goal (getvar *state*)) + (some (fun apply-op 1) + (find-all (lambda (op) (appropriate-p goal op)) + (getvar *ops*))))) + +;; An op is appropriate to a goal if it is in its add list. +(defun appropriate-p (goal op) + (member goal (op-add-list op))) + +;; Print a message and update *state* if op is applicable. +(defun apply-op (op) + (if (every (fun achieve 1) (op-preconds op)) + (progn + (: io fwrite '"executing ~p\n" (list (op-action op))) + (setvar *state* (set-difference (getvar *state*) (op-del-list op))) + (setvar *state* (union (getvar *state*) (op-add-list op))) + 'true))) + +;; Define the set functions to work on list, a listsets module really. +(defun set-difference + ([(cons e es) s2] + (if (member e s2) + (set-difference es s2) + (cons e (set-difference es s2)))) + ([() s2] ())) + +(defun union + ([(cons e es) s2] + (if (member e s2) (union es s2) (cons e (union es s2)))) + ([() s2] ())) + +;;; ============================== + +(defun school-ops () + (list + (make-op action 'drive-son-to-school + preconds '(son-at-home car-works) + add-list '(son-at-school) + del-list '(son-at-home)) + (make-op action 'shop-installs-battery + preconds '(car-needs-battery shop-knows-problem shop-has-money) + add-list '(car-works) + del-list ()) + (make-op action 'tell-shop-problem + preconds '(in-communication-with-shop) + add-list '(shop-knows-problem) + del-list ()) + (make-op action 'telephone-shop + preconds '(know-phone-number) + add-list '(in-communication-with-shop) + del-list ()) + (make-op action 'look-up-number + preconds '(have-phone-book) + add-list '(know-phone-number) + del-list ()) + (make-op action 'give-shop-money + preconds '(have-money) + add-list '(shop-has-money) + del-list '(have-money)))) diff --git a/samples/LFE/mnesia_demo.lfe b/samples/LFE/mnesia_demo.lfe new file mode 100644 index 00000000..f27014b6 --- /dev/null +++ b/samples/LFE/mnesia_demo.lfe @@ -0,0 +1,83 @@ +;; Copyright (c) 2008-2013 Robert Virding +;; +;; Licensed under the Apache License, Version 2.0 (the "License"); +;; you may not use this file except in compliance with the License. +;; You may obtain a copy of the License at +;; +;; http://www.apache.org/licenses/LICENSE-2.0 +;; +;; Unless required by applicable law or agreed to in writing, software +;; distributed under the License is distributed on an "AS IS" BASIS, +;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +;; See the License for the specific language governing permissions and +;; limitations under the License. + +;; File : mnesia_demo.lfe +;; Author : Robert Virding +;; Purpose : A simple Mnesia demo file for LFE. + +;; This file contains a simple demo of using LFE to access Mnesia +;; tables. It shows how to use the emp-XXXX macro (ETS match pattern) +;; together with mnesia:match_object, match specifications with +;; mnesia:select and Query List Comprehensions. + +(defmodule mnesia_demo + (export (new 0) (by_place 1) (by_place_ms 1) (by_place_qlc 1))) + +(defrecord person name place job) + +(defun new () + ;; Start mnesia and create a table, we will get an in memory only schema. + (: mnesia start) + (: mnesia create_table 'person '(#(attributes (name place job)))) + ;; Initialise the table. + (let ((people '( + ;; First some people in London. + #(fred london waiter) + #(bert london waiter) + #(john london painter) + #(paul london driver) + ;; Now some in Paris. + #(jean paris waiter) + #(gerard paris driver) + #(claude paris painter) + #(yves paris waiter) + ;; And some in Rome. + #(roberto rome waiter) + #(guiseppe rome driver) + #(paulo rome painter) + ;; And some in Berlin. + #(fritz berlin painter) + #(kurt berlin driver) + #(hans berlin waiter) + #(franz berlin waiter) + ))) + (: lists foreach (match-lambda + ([(tuple n p j)] + (: mnesia transaction + (lambda () + (let ((new (make-person name n place p job j))) + (: mnesia write new)))))) + people))) + +;; Match records by place using match_object and the emp-XXXX macro. +(defun by_place (place) + (: mnesia transaction + (lambda () (: mnesia match_object (emp-person place place))))) + +;; Use match specifications to match records +(defun by_place_ms (place) + (let ((f (lambda () (: mnesia select 'person + (match-spec ([(match-person name n place p job j)] + (when (=:= p place)) + (tuple n j))))))) + (: mnesia transaction f))) + +;; Use Query List Comprehensions to match records +(defun by_place_qlc (place) + (let ((f (lambda () + (let ((q (qlc (lc ((<- person (: mnesia table 'person)) + (=:= (person-place person) place)) + person)))) + (: qlc e q))))) + (: mnesia transaction f))) diff --git a/samples/LFE/object.lfe b/samples/LFE/object.lfe new file mode 100644 index 00000000..f652bc1f --- /dev/null +++ b/samples/LFE/object.lfe @@ -0,0 +1,169 @@ +;; Copyright (c) 2013 Duncan McGreggor +;; +;; Licensed under the Apache License, Version 2.0 (the "License"); +;; you may not use this file except in compliance with the License. +;; You may obtain a copy of the License at +;; +;; http://www.apache.org/licenses/LICENSE-2.0 +;; +;; Unless required by applicable law or agreed to in writing, software +;; distributed under the License is distributed on an "AS IS" BASIS, +;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +;; See the License for the specific language governing permissions and +;; limitations under the License. + +;; File : object.lfe +;; Author : Duncan McGreggor +;; Purpose : Demonstrating simple OOP with closures + +;; The simple object system demonstrated below shows how to do the following: +;; * create objects +;; * call methods on those objects +;; * have methods which can call other methods +;; * update the state of an instance variable +;; +;; Note, however, that his example does not demonstrate inheritance. +;; +;; To use the code below in LFE, do the following: +;; +;; $ cd examples +;; $ ../bin/lfe -pa ../ebin +;; +;; Load the file and create a fish-class instance: +;; +;; > (slurp '"object.lfe") +;; #(ok object) +;; > (set mommy-fish (fish-class '"Carp")) +;; #Fun +;; +;; Execute some of the basic methods: +;; +;; > (get-species mommy-fish) +;; "Carp" +;; > (move mommy-fish 17) +;; The Carp swam 17 feet! +;; ok +;; > (get-id mommy-fish) +;; "47eebe91a648f042fc3fb278df663de5" +;; +;; Now let's look at "modifying" state data (e.g., children counts): +;; +;; > (get-children mommy-fish) +;; () +;; > (get-children-count mommy-fish) +;; 0 +;; > (set (mommy-fish baby-fish-1) (reproduce mommy-fish)) +;; (#Fun #Fun) +;; > (get-id mommy-fish) +;; "47eebe91a648f042fc3fb278df663de5" +;; > (get-id baby-fish-1) +;; "fdcf35983bb496650e558a82e34c9935" +;; > (get-children-count mommy-fish) +;; 1 +;; > (set (mommy-fish baby-fish-2) (reproduce mommy-fish)) +;; (#Fun #Fun) +;; > (get-id mommy-fish) +;; "47eebe91a648f042fc3fb278df663de5" +;; > (get-id baby-fish-2) +;; "3e64e5c20fb742dd88dac1032749c2fd" +;; > (get-children-count mommy-fish) +;; 2 +;; > (get-info mommy-fish) +;; id: "47eebe91a648f042fc3fb278df663de5" +;; species: "Carp" +;; children: ["fdcf35983bb496650e558a82e34c9935", +;; "3e64e5c20fb742dd88dac1032749c2fd"] +;; ok + +(defmodule object + (export all)) + +(defun fish-class (species) + " + This is the constructor that will be used most often, only requiring that + one pass a 'species' string. + + When the children are not defined, simply use an empty list. + " + (fish-class species ())) + +(defun fish-class (species children) + " + This contructor is mostly useful as a way of abstracting out the id + generation from the larger constructor. Nothing else uses fish-class/2 + besides fish-class/1, so it's not strictly necessary. + + When the id isn't know, generate one." + (let* (((binary (id (size 128))) (: crypto rand_bytes 16)) + (formatted-id (car + (: io_lib format + '"~32.16.0b" (list id))))) + (fish-class species children formatted-id))) + +(defun fish-class (species children id) + " + This is the constructor used internally, once the children and fish id are + known. + " + (let ((move-verb '"swam")) + (lambda (method-name) + (case method-name + ('id + (lambda (self) id)) + ('species + (lambda (self) species)) + ('children + (lambda (self) children)) + ('info + (lambda (self) + (: io format + '"id: ~p~nspecies: ~p~nchildren: ~p~n" + (list (get-id self) + (get-species self) + (get-children self))))) + ('move + (lambda (self distance) + (: io format + '"The ~s ~s ~p feet!~n" + (list species move-verb distance)))) + ('reproduce + (lambda (self) + (let* ((child (fish-class species)) + (child-id (get-id child)) + (children-ids (: lists append + (list children (list child-id)))) + (parent-id (get-id self)) + (parent (fish-class species children-ids parent-id))) + (list parent child)))) + ('children-count + (lambda (self) + (: erlang length children))))))) + +(defun get-method (object method-name) + " + This is a generic function, used to call into the given object (class + instance). + " + (funcall object method-name)) + +; define object methods +(defun get-id (object) + (funcall (get-method object 'id) object)) + +(defun get-species (object) + (funcall (get-method object 'species) object)) + +(defun get-info (object) + (funcall (get-method object 'info) object)) + +(defun move (object distance) + (funcall (get-method object 'move) object distance)) + +(defun reproduce (object) + (funcall (get-method object 'reproduce) object)) + +(defun get-children (object) + (funcall (get-method object 'children) object)) + +(defun get-children-count (object) + (funcall (get-method object 'children-count) object)) \ No newline at end of file diff --git a/samples/Latte/layout.latte b/samples/Latte/layout.latte new file mode 100644 index 00000000..5e94975f --- /dev/null +++ b/samples/Latte/layout.latte @@ -0,0 +1,59 @@ +{** + * @param string $basePath web base path + * @param string $robots tell robots how to index the content of a page (optional) + * @param array $flashes flash messages + *} + + + + + + + + + + + {ifset $title}{$title} › {/ifset}Translation report + + + + + + + {block #head}{/block} + + + + + + {block #navbar} + {include _navbar.latte} + {/block} + +
+
+
+ {include _flash.latte, flash => $flash} +
+
+ + {include #content} +
+ +
+
+ + + {block #scripts}{/block} + + diff --git a/samples/Latte/template.latte b/samples/Latte/template.latte new file mode 100644 index 00000000..1718045a --- /dev/null +++ b/samples/Latte/template.latte @@ -0,0 +1,243 @@ +{var $title => "⚐ {$new->title}"} +{define author} + + + {$author->name|trim} + + + {$author->estimatedTimeTranslated|secondsToTime}{* + *}{if $author->joined}, {/if} + {if $author->joined}joined {$author->joined|timeAgo}{/if}{* + *}{ifset $postfix}, {$postfix}{/ifset} +{/define} +{block #scripts} + +{/block} +{block #content} + +{if isset($old)} +

Diffing revision #{$old->revision} and #{$new->revision}

+{else} +

First revision

+{/if} + +{var $editor = $user->loggedIn && $new->language === 'cs'} +{var $rev = $new->video->siteRevision} +
+
+

+ published {$new->publishedAt|timeAgo}{* + *}{ifset $old}, + + {$new->textChange * 100|number} % text change{* + *}{* + *}{if $new->timeChange}, + + {$new->timeChange * 100|number} % timing change + + {/if} + {/ifset} +

+ {cache $new->id, expires => '+4 hours'} +

+ {if isset($old) && $old->author->name !== $new->author->name} + {include author, author => $old->author, class => 'author-old'} + — + {include author, author => $new->author, class => 'author-new'} + {elseif isset($old)} + {include author, author => $new->author, class => 'author-new', postfix => 'authored both revisions'} + {else} + {include author, author => $new->author, class => 'author-new'} + {/if} +

+ {/cache} + + {var $threshold = 10} + {cache $new->id} + {var $done = $new->timeTranslated} + {var $outOf = $new->video->canonicalTimeTranslated} + {if $outOf} +

+ Only {$done|time} translated out of {$outOf|time}, + {(1-$done/$outOf) * 100|number} % ({$outOf - $done|time}) left +

+

+ Seems complete: {$done|time} translated out of {$outOf|time} +

+ {elseif $done} +

+ Although {$done|time} is translated, there are no English subtitles for comparison. +

+ {/if} + {/cache} + + {if $editor} + {var $ksid = $new->video->siteId} + {if $ksid} + + Video on khanovaskola.cz + {if $new->revision === $rev} + (on this revision) + {elseif $new->revision > $rev} + (on older revision #{$rev}) + {else} + (on newer revision #{$rev}) + {/if} + + {/if} + {/if} + +

{$diffs->title|noescape}

+
{$diffs->description|noescape}
+
+
+ {$line->text|noescape}  +
+
+ + + +
+
+ + {if $editor} + {if $new->approved} + + Revision has been approved{if $new->editor} by {$new->editor->name}{/if}. + + + + Edit on Amara + + + on Khan Academy + + + {elseif $new->incomplete} + + Revision has been marked as incomplete by {if $new->editor}{$new->editor->name}{/if}. + + {include editButton} + {include kaButton} + + {* else $new->status === UNSET: *} + {elseif $new->video->siteId} + + {include kaButton} + + {else} + + {include kaButton} +
+
Filed under category:
+ {foreach $new->video->categories as $list} + — {$list|implode:' › '}{sep}
{/sep} + {/foreach} +
+ {/if} + {/if} +
+
+

All revisions:

+ + {foreach $new->video->getRevisionsIn($new->language) as $revision} + + + + + + + {if $user->loggedIn && $revision->comments->count()} + + + + {/if} + {if $user->loggedIn && $new->id === $revision->id} + + + + {/if} + + {/foreach} +
+ #{$revision->revision} + + + + {$revision->author->name} + + + + {$revision->publishedAt|timeAgo} + + + {* vars $outOf, $threshold already set *} + {default $outOf = $new->video->canonicalTimeTranslated} + {if $outOf} {* ignore if canonical time not set *} + {var $done = $revision->timeTranslated} + + {$done/$outOf * 100|number} % + + + ~100 % + + {/if} + + {if $revision->incomplete || $revision->approved} + {var $i = $revision->incomplete} + + {if $i}incomplete{else}approved{/if} + + {/if} +
+ + + + + +
+ + {$comment->user->name}: + + + + {$comment->text} + +
+
+ {form commentForm} +
+ {input text, class => "form-control", placeholder => "Comment this revision (only visible to other editors)"} + + + +
+ {/form} +
+ +
+
diff --git a/samples/Liquid/layout.liquid b/samples/Liquid/layout.liquid new file mode 100644 index 00000000..7954c7ec --- /dev/null +++ b/samples/Liquid/layout.liquid @@ -0,0 +1,104 @@ + + + + + + {{shop.name}} - {{page_title}} + + {{ 'textile.css' | global_asset_url | stylesheet_tag }} + {{ 'lightbox/v204/lightbox.css' | global_asset_url | stylesheet_tag }} + + {{ 'prototype/1.6/prototype.js' | global_asset_url | script_tag }} + {{ 'scriptaculous/1.8.2/scriptaculous.js' | global_asset_url | script_tag }} + {{ 'lightbox/v204/lightbox.js' | global_asset_url | script_tag }} + {{ 'option_selection.js' | shopify_asset_url | script_tag }} + + {{ 'layout.css' | asset_url | stylesheet_tag }} + {{ 'shop.js' | asset_url | script_tag }} + + {{ content_for_header }} + + + + +

Skip to navigation.

+ + {% if cart.item_count > 0 %} + + {% endif %} + +
+ +
+
+ +
+
+ {{ content_for_layout }} +
+
+ +
+
+ + + + {% if tags %} + + {% endif %} + + + +
+ +

+ + + +
+
+ +
+ + + + diff --git a/samples/Liquid/template.liquid b/samples/Liquid/template.liquid new file mode 100644 index 00000000..5502c2e7 --- /dev/null +++ b/samples/Liquid/template.liquid @@ -0,0 +1,70 @@ +

We have wonderful products!

+
    +
    +
    + {% for image in product.images %} + {% if forloop.first %} + + {{product.title | escape }} + + {% else %} + + {{product.title | escape }} + + {% endif %} + {% endfor %} +
    + +

    {{ product.title }}

    + +
      +
    • Vendor: {{ product.vendor | link_to_vendor }}
    • +
    • Type: {{ product.type | link_to_type }}
    • +
    + + {{ product.price_min | money }}{% if product.price_varies %} - {{ product.price_max | money }}{% endif %} + +
    +
    + + + +
    + +
    +
    +
    + +
    + {{ product.description }} +
    +
    + + +
diff --git a/samples/Literate Agda/NatCat.lagda b/samples/Literate Agda/NatCat.lagda new file mode 100644 index 00000000..97059356 --- /dev/null +++ b/samples/Literate Agda/NatCat.lagda @@ -0,0 +1,82 @@ +\documentclass{article} + + % The following packages are needed because unicode + % is translated (using the next set of packages) to + % latex commands. You may need more packages if you + % use more unicode characters: + + \usepackage{amssymb} + \usepackage{bbm} + \usepackage[greek,english]{babel} + + % This handles the translation of unicode to latex: + + \usepackage{ucs} + \usepackage[utf8x]{inputenc} + \usepackage{autofe} + + % Some characters that are not automatically defined + % (you figure out by the latex compilation errors you get), + % and you need to define: + + \DeclareUnicodeCharacter{8988}{\ensuremath{\ulcorner}} + \DeclareUnicodeCharacter{8989}{\ensuremath{\urcorner}} + \DeclareUnicodeCharacter{8803}{\ensuremath{\overline{\equiv}}} + + % Add more as you need them (shouldn’t happen often). + + % Using “\newenvironment” to redefine verbatim to + % be called “code” doesn’t always work properly. + % You can more reliably use: + + \usepackage{fancyvrb} + + \DefineVerbatimEnvironment + {code}{Verbatim} + {} % Add fancy options here if you like. + + \begin{document} + + \begin{code} +module NatCat where + +open import Relation.Binary.PropositionalEquality + +-- If you can show that a relation only ever has one inhabitant +-- you get the category laws for free +module + EasyCategory + (obj : Set) + (_⟶_ : obj → obj → Set) + (_∘_ : ∀ {x y z} → x ⟶ y → y ⟶ z → x ⟶ z) + (id : ∀ x → x ⟶ x) + (single-inhabitant : (x y : obj) (r s : x ⟶ y) → r ≡ s) + where + + idʳ : ∀ x y (r : x ⟶ y) → r ∘ id y ≡ r + idʳ x y r = single-inhabitant x y (r ∘ id y) r + + idˡ : ∀ x y (r : x ⟶ y) → id x ∘ r ≡ r + idˡ x y r = single-inhabitant x y (id x ∘ r) r + + ∘-assoc : ∀ w x y z (r : w ⟶ x) (s : x ⟶ y) (t : y ⟶ z) → (r ∘ s) ∘ t ≡ r ∘ (s ∘ t) + ∘-assoc w x y z r s t = single-inhabitant w z ((r ∘ s) ∘ t) (r ∘ (s ∘ t)) + +open import Data.Nat + +same : (x y : ℕ) (r s : x ≤ y) → r ≡ s +same .0 y z≤n z≤n = refl +same .(suc m) .(suc n) (s≤s {m} {n} r) (s≤s s) = cong s≤s (same m n r s) + +≤-trans : ∀ x y z → x ≤ y → y ≤ z → x ≤ z +≤-trans .0 y z z≤n s = z≤n +≤-trans .(suc m) .(suc n) .(suc n₁) (s≤s {m} {n} r) (s≤s {.n} {n₁} s) = s≤s (≤-trans m n n₁ r s) + +≤-refl : ∀ x → x ≤ x +≤-refl zero = z≤n +≤-refl (suc x) = s≤s (≤-refl x) + +module Nat-EasyCategory = EasyCategory ℕ _≤_ (λ {x}{y}{z} → ≤-trans x y z) ≤-refl same + \end{code} + + \end{document} \ No newline at end of file diff --git a/samples/M/Comment.m b/samples/M/Comment.m new file mode 100644 index 00000000..6ddd7653 --- /dev/null +++ b/samples/M/Comment.m @@ -0,0 +1,36 @@ +Comment ; + ; this is a comment block + ; comments always start with a semicolon + ; the next line, while not a comment, is a legal blank line + + ;whitespace alone is a valid line in a routine + ;** Comments can have any graphic character, but no "control" + ;** characters + + ;graphic characters such as: !@#$%^&*()_+=-{}[]|\:"?/>.<, + ;the space character is considered a graphic character, even + ;though you can't see it. + ; ASCII characters whose numeric code is above 128 and below 32 + ; are NOT allowed on a line in a routine. + ;; multiple semicolons are okay + ; a line that has a tag must have whitespace after the tag, bug + ; does not have to have a comment or a command on it +Tag1 + ; + ;Tags can start with % or an uppercase or lowercase alphabetic + ; or can be a series of numeric characters +%HELO ; + ; +0123 ; + ; +%987 ; + ; the most common label is uppercase alphabetic +LABEL ; + ; + ; Tags can be followed directly by an open parenthesis and a + ; formal list of variables, and a close parenthesis +ANOTHER(X) ; + ; + ;Normally, a subroutine would be ended by a QUIT command, but we + ; are taking advantage of the rule that the END of routine is an + ; implicit QUIT diff --git a/samples/MTML/categories_to_columns.mtml b/samples/MTML/categories_to_columns.mtml new file mode 100644 index 00000000..a46c0674 --- /dev/null +++ b/samples/MTML/categories_to_columns.mtml @@ -0,0 +1,35 @@ +<$mt:Var name="num_cols" value="6"$> +<$mt:Var name="index" value="0"$> + + <$mt:Var name="index" op="++" setvar="index"$> + + <$mt:CategoryLabel remove_html="1"$> + + +<$mt:Var name="categories" function="count" setvar="cat_count"$> +<$mt:Var name="cat_count" op="%" value="$num_cols" setvar="modulus"$> + + <$mt:Var name="cat_count" op="-" value="$modulus" setvar="cat_count_minus_mod"$> + <$mt:Var name="cat_count_minus_mod" op="/" value="$num_cols" setvar="cats_per_col"$> + <$mt:Var name="cats_per_col" op="+" value="1" setvar="cats_per_col"$> + + <$mt:Var name="cat_count" op="/" value="$num_cols" setvar="cats_per_col"$> + + + <$mt:Var name="index" op="++" setvar="index"$> + + <$mt:Var name="categories{$index}"$> + + + +<$mt:Var name="index" value="0"$> +<$mt:Var name="col_num" value="1"$> + +
"> + + <$mt:Var name="for_inner"$> + +
+ <$mt:Var name="col_num" op="++" setvar="col_num"$> +
+ diff --git a/samples/Mask/view.mask b/samples/Mask/view.mask new file mode 100644 index 00000000..521273e6 --- /dev/null +++ b/samples/Mask/view.mask @@ -0,0 +1,61 @@ + +// HTML Elements +header { + + img .logo src='/images/~[currentLogo].png' alt=logo; + + h4 > 'Bar View' + + if (currentUser) { + + .account > + a href='/acount' > + 'Hello, ~[currentUser.username]' + } +} + +.view { + ul { + + // Iteration + for ((user, index) of users) { + + li.user data-id='~[user.id]' { + + // interpolation + .name > '~[ user.username ]' + + // expression + .count > '~[: user.level.toFixed(2) ]' + + // util + /* Localization sample + * lastActivity: "Am {0:dd. MM} war der letzte Eintrag" + */ + .date > '~[ L: "lastActivity", user.date]' + } + } + } + + // Component + :countdownComponent { + input type = text > + :dualbind value='number'; + + button x-signal='click: countdownStart' > 'Start'; + + h5 { + '~[bind: number]' + + :animation x-slot='countdownStart' { + @model > 'transition | scale(0) > scale(1) | 500ms' + @next > 'background-color | red > blue | 2s linear' + } + } + } +} + +footer > :bazCompo { + + 'Component generated at ~[: $u.format($c.date, "HH-mm") ]' +} \ No newline at end of file diff --git a/samples/Mathematica/Init.m b/samples/Mathematica/Init.m new file mode 100644 index 00000000..720d6100 --- /dev/null +++ b/samples/Mathematica/Init.m @@ -0,0 +1,3 @@ +(* Mathematica Init File *) + +Get[ "Foobar`Foobar`"] diff --git a/samples/Mathematica/MiscCalculations.nb b/samples/Mathematica/MiscCalculations.nb new file mode 100644 index 00000000..5e34ac95 --- /dev/null +++ b/samples/Mathematica/MiscCalculations.nb @@ -0,0 +1,232 @@ +(* Content-type: application/vnd.wolfram.mathematica *) + +(*** Wolfram Notebook File ***) +(* http://www.wolfram.com/nb *) + +(* CreatedBy='Mathematica 9.0' *) + +(*CacheID: 234*) +(* Internal cache information: +NotebookFileLineBreakTest +NotebookFileLineBreakTest +NotebookDataPosition[ 157, 7] +NotebookDataLength[ 7164, 223] +NotebookOptionsPosition[ 6163, 182] +NotebookOutlinePosition[ 6508, 197] +CellTagsIndexPosition[ 6465, 194] +WindowFrame->Normal*) + +(* Beginning of Notebook Content *) +Notebook[{ + +Cell[CellGroupData[{ +Cell[BoxData[ + RowBox[{ + RowBox[{"Solve", "[", + RowBox[{ + RowBox[{"y", "'"}], "\[Equal]", " ", "xy"}], "]"}], + "\[IndentingNewLine]"}]], "Input", + CellChangeTimes->{{3.6112716342092056`*^9, 3.6112716549793935`*^9}}], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"{", + RowBox[{"xy", "\[Rule]", + SuperscriptBox["y", "\[Prime]", + MultilineFunction->None]}], "}"}], "}"}]], "Output", + CellChangeTimes->{3.6112716579295626`*^9}] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"Log", "[", + RowBox[{"Sin", "[", "38", "]"}], "]"}]], "Input", + CellChangeTimes->{{3.611271663920905*^9, 3.6112716759275913`*^9}}], + +Cell[BoxData[ + RowBox[{"Log", "[", + RowBox[{"Sin", "[", "38", "]"}], "]"}]], "Output", + CellChangeTimes->{3.611271678256725*^9}] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"N", "[", + RowBox[{"Log", "[", + RowBox[{"Sin", "[", "38", "]"}], "]"}], "]"}]], "Input", + NumberMarks->False], + +Cell[BoxData[ + RowBox[{"-", "1.2161514009320473`"}]], "Output", + CellChangeTimes->{3.611271682061942*^9}] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"Abs", "[", + RowBox[{"-", "1.2161514009320473`"}], "]"}]], "Input", + NumberMarks->False], + +Cell[BoxData["1.2161514009320473`"], "Output", + CellChangeTimes->{3.6112716842780695`*^9}] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"RealDigits", "[", "1.2161514009320473`", "]"}]], "Input", + NumberMarks->False], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + "1", ",", "2", ",", "1", ",", "6", ",", "1", ",", "5", ",", "1", ",", "4", + ",", "0", ",", "0", ",", "9", ",", "3", ",", "2", ",", "0", ",", "4", + ",", "7"}], "}"}], ",", "1"}], "}"}]], "Output", + CellChangeTimes->{3.611271685319129*^9}] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + RowBox[{"Graph", "[", + RowBox[{"Log", "[", "x", "]"}], "]"}], "\[IndentingNewLine]"}]], "Input", + CellChangeTimes->{{3.611271689258354*^9, 3.611271702038085*^9}}], + +Cell[BoxData[ + RowBox[{"Graph", "[", + RowBox[{"Log", "[", "x", "]"}], "]"}]], "Output", + CellChangeTimes->{3.611271704295214*^9}] +}, Open ]], + +Cell[BoxData[""], "Input", + CellChangeTimes->{{3.611271712769699*^9, 3.6112717423153887`*^9}}], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + RowBox[{"Plot", "[", + RowBox[{ + RowBox[{"Log", "[", "x", "]"}], ",", " ", + RowBox[{"{", + RowBox[{"x", ",", " ", "0", ",", " ", "10"}], "}"}]}], "]"}], + "\[IndentingNewLine]"}]], "Input", + CellChangeTimes->{{3.6112717573482485`*^9, 3.6112717747822456`*^9}}], + +Cell[BoxData[ + GraphicsBox[{{}, {}, + {Hue[0.67, 0.6, 0.6], LineBox[CompressedData[" +1:eJwVzXs81Pkex/GZH7XlsutSQprwqxTSZVfJGp9P6UYqlyxHUhTaLrq4JpVK +0SHRisGWjYiEbHSvb+Q27rllmYwaY6JpwxgZTI7zx/vxejz/eht4H3PyoRgM +Rsj0/t+1MEPjP1Zc8O6L0tCYkJERTokxP5YLLR+MQy2qZWSzX62gWcaFn9s7 +5sVFyohY4ZvLs5Ya6AheLQxnyIgFe4fllag6yH4zayhMcYw0FU5SRl8bweS/ +wyVFa0aJBsz2VDVrAl8V299DGKPk1yWJllEHmqD42vuI4RopiRvJlYS9bYLZ +a2c4j3pJyS8JbT7eeW/By6ht44vkEXKuxtRu1d4WOB5QmStjSUhO0eMleTda +4EZtHmU5PEyaORsUFte1QFHRg6WjFcNkkZ/bC+11rVC0s8n9nf8wqVGINGNo +tkFRzD3HsYohosXu0misbAdxXml1VdQgKSi80nXErBNo/oP47aliMqAxEGvn +1QlVgoRvezzExCjYznppYifkn+K6CVli8peV8m2BrBNM20LljlmfyXVurK97 +RRfcVCpPCXg8QIIF14a2eLyHn6Y4909//UTSlWsvqm/qge1fVjduzhISa/Zp +jwjPHvCM6ZD7BQgJz9/E/GtIDyRsSj3Svl5ItJtj+uru9cBdE2PXZH4vSeDY +20arfYAT6Z3e8axecnFxw49TXR/gU5X5vDu5H4kfvE0RnxSAsqvDMcduPmFk +jD7rihGA7RmZ5qlYPuEo6vFq7gigR67QPetXPqnm+rJy2wUA0hVVHindZOmu +yQwfy17Y4OU185n7e/LpoNH9bqYQPPrPvwn+2kkOXT/zqim+DzJ72WEzdrcT +SprBJ7l9UD/Fag2c005SXasZhWV9kH51Z/aqhjZSo6dpc3WkD4L1tqolbGgj +JndzqmzdRPD67PLxVrNWIn7e0lS28BMs6Ba9FM1pJv7CZYLign6IeWFYmrqk +jvR4/jOrlNsPoq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Ly8z +bn5liLETFcsURUz0lSi+5RrTGL/GlX1jDoXeRcP6V67R6DRvQNHcmsIjF5wn +7RJoPPVD0ph42kHOxe9U/qDR/97LrjtAYbQ0KC4+iUa6N+b4nPUUFqyTTSTf +pDFTFtw6bEOhrHSqPTuPRo1786Pv21IY36xytbyKxo0v5z7UdKEwNfPowctc +GuUeojTutDMDG2y21tIYpHQ98NxvFD7Sih+vbaBRfeZZ6YArhTx3zYMtbTRC +CmNNqTuFRgIdm48CGveGmxUf2kfhyuIw1h0hjasPiNIWelFoealL5iOiMZKf +HdA6bXujmw/6B2gk7zZK2PspPHlYnzU0RGN40raf1XwpDLc6L/tbMv0vikor +n/Yl1Y+tgVIayzZ/kIT6UcgpzIwZG6Px0d7RwA8HKcyIUPR7Nk7j8sLHN2/8 +TmGeo8+G8Ekab1ncfmR7iMJiw8oF1t9pnF9RQuTTfiVZIpuaonFCb+xJ0WEK +/wc13qzo + "]]}}, + AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], + Axes->True, + AxesLabel->{None, None}, + AxesOrigin->{0, 0}, + Method->{}, + PlotRange->{{0, 10}, {-1.623796532045525, 2.3025850725858823`}}, + PlotRangeClipping->True, + PlotRangePadding->{ + Scaled[0.02], + Scaled[0.02]}]], "Output", + CellChangeTimes->{3.6112717778594217`*^9}] +}, Open ]] +}, +WindowSize->{716, 833}, +WindowMargins->{{Automatic, 214}, {Automatic, 26}}, +FrontEndVersion->"9.0 for Microsoft Windows (64-bit) (January 25, 2013)", +StyleDefinitions->"Default.nb" +] +(* End of Notebook Content *) + +(* Internal cache information *) +(*CellTagsOutline +CellTagsIndex->{} +*) +(*CellTagsIndex +CellTagsIndex->{} +*) +(*NotebookFileOutline +Notebook[{ +Cell[CellGroupData[{ +Cell[579, 22, 224, 6, 52, "Input"], +Cell[806, 30, 211, 6, 31, "Output"] +}, Open ]], +Cell[CellGroupData[{ +Cell[1054, 41, 155, 3, 31, "Input"], +Cell[1212, 46, 130, 3, 31, "Output"] +}, Open ]], +Cell[CellGroupData[{ +Cell[1379, 54, 137, 4, 31, "Input"], +Cell[1519, 60, 105, 2, 31, "Output"] +}, Open ]], +Cell[CellGroupData[{ +Cell[1661, 67, 113, 3, 31, "Input"], +Cell[1777, 72, 90, 1, 31, "Output"] +}, Open ]], +Cell[CellGroupData[{ +Cell[1904, 78, 102, 2, 31, "Input"], +Cell[2009, 82, 321, 8, 31, "Output"] +}, Open ]], +Cell[CellGroupData[{ +Cell[2367, 95, 191, 4, 52, "Input"], +Cell[2561, 101, 131, 3, 31, "Output"] +}, Open ]], +Cell[2707, 107, 94, 1, 31, "Input"], +Cell[CellGroupData[{ +Cell[2826, 112, 299, 8, 52, "Input"], +Cell[3128, 122, 3019, 57, 265, "Output"] +}, Open ]] +} +] +*) + +(* End of internal cache information *) diff --git a/samples/Mathematica/MiscCalculations2.nb b/samples/Mathematica/MiscCalculations2.nb new file mode 100644 index 00000000..84960c53 --- /dev/null +++ b/samples/Mathematica/MiscCalculations2.nb @@ -0,0 +1,3666 @@ +(* Content-type: application/vnd.wolfram.mathematica *) + +(*** Wolfram Notebook File ***) +(* http://www.wolfram.com/nb *) + +(* CreatedBy='Mathematica 9.0' *) + +(*CacheID: 234*) +(* Internal cache information: +NotebookFileLineBreakTest +NotebookFileLineBreakTest +NotebookDataPosition[ 157, 7] +NotebookDataLength[ 200462, 3656] +NotebookOptionsPosition[ 199657, 3624] +NotebookOutlinePosition[ 200002, 3639] +CellTagsIndexPosition[ 199959, 3636] +WindowFrame->Normal*) + +(* Beginning of Notebook Content *) +Notebook[{ + +Cell[CellGroupData[{ +Cell["\<\ +How far is the Earth from the Moon?\ +\>", "WolframAlphaLong", + CellChangeTimes->{{3.6112720079145803`*^9, 3.61127201386392*^9}}], + +Cell[BoxData[ + NamespaceBox["WolframAlphaQueryResults", + DynamicModuleBox[{Typeset`q$$ = "How far is the Earth from the Moon?", + Typeset`opts$$ = { + AppearanceElements -> { + "Warnings", "Assumptions", "Brand", "Pods", "PodMenus", "Unsuccessful", + "Sources"}, Asynchronous -> All, + TimeConstraint -> {30, Automatic, Automatic, Automatic}, + Method -> { + "Formats" -> {"cell", "minput", "msound", "dataformats"}, "Server" -> + "http://api.wolframalpha.com/v1/"}}, Typeset`elements$$ = { + "Warnings", "Assumptions", "Brand", "Pods", "PodMenus", "Unsuccessful", + "Sources"}, Typeset`pod1$$ = XMLElement[ + "pod", {"title" -> "Input interpretation", "scanner" -> "Identity", "id" -> + "Input", "position" -> "100", "error" -> "false", "numsubpods" -> "1"}, { + XMLElement["subpod", {"title" -> ""}, { + XMLElement["cell", {"compressed" -> False, "string" -> True}, { + Cell[ + BoxData[ + FormBox[ + TagBox[ + FormBox[ + TagBox[ + GridBox[{{ + PaneBox[ + StyleBox[ + TagBox[ + GridBox[{{ + StyleBox[ + TagBox[ + TagBox["\"Moon\"", + $CellContext`TagBoxWrapper[ + "Entity" -> {AstronomicalData, "Moon"}]], Identity], { + LineIndent -> 0, LineSpacing -> {0.9, 0, 1.5}}], + "\"distance from Earth\""}}, + GridBoxBackground -> {"Columns" -> { + GrayLevel[0.949], None}, "Rows" -> {{None}}}, + GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, + ColumnsEqual -> False, RowsEqual -> False, + GridBoxDividers -> {"Columns" -> { + GrayLevel[0.84], + GrayLevel[0.84], + GrayLevel[0.84]}, "Rows" -> {{ + GrayLevel[0.84]}}, + "RowsIndexed" -> { + 1 -> GrayLevel[0.84], -1 -> GrayLevel[0.84]}}, + GridBoxSpacings -> { + "Columns" -> {1, 1, 1}, "Rows" -> {{0.3}}}, + GridBoxAlignment -> { + "Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, + AllowScriptLevelChange -> False, BaselinePosition -> 1], + $CellContext`TagBoxWrapper["Separator" -> " | "]], + LineSpacing -> {1, 0, 1.5}, LineIndent -> 0], + BaselinePosition -> Center]}}, + GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, + ColumnsEqual -> False, RowsEqual -> False, + GridBoxSpacings -> {"Columns" -> {{ + AbsoluteThickness[-1]}}, "Rows" -> {{0}}}, + AllowScriptLevelChange -> False], + $CellContext`TagBoxWrapper["Separator" -> " | "]], + TraditionalForm], + PolynomialForm[#, TraditionalOrder -> False]& ], + TraditionalForm]], "Output", {}]}], + XMLElement[ + "dataformats", {}, {"plaintext,computabledata,formatteddata"}]}]}], + Typeset`pod2$$ = XMLElement[ + "pod", {"title" -> "Current result", "scanner" -> "Data", "id" -> "Result", + "position" -> "200", "error" -> "false", "numsubpods" -> "1", "primary" -> + "true"}, { + XMLElement["subpod", {"title" -> ""}, { + XMLElement["cell", {"compressed" -> False, "string" -> True}, { + Cell[ + BoxData[ + FormBox[ + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox["239\[ThinSpace]262", + $CellContext`TagBoxWrapper["StringBoxes" -> "239262"]], + "\[InvisibleSpace]", " ", + StyleBox[ + "\"miles\"", LinebreakAdjustments -> {1, 100, 1, 0, 100}, + LineIndent -> 0, { + FontFamily :> $CellContext`$UnitFontFamily, FontSize -> + Smaller}, StripOnInput -> False]}], Identity], #& , + SyntaxForm -> Dot], "Unit", SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> 0, + ZeroWidthTimes -> False], TraditionalForm]], "Output", {}]}], + XMLElement[ + "dataformats", {}, { + "plaintext,moutput,computabledata,formatteddata,numberdata,\ +quantitydata"}]}], + XMLElement["states", {"count" -> "1"}, { + XMLElement[ + "state", { + "name" -> "Show metric", "input" -> "Result__Show metric"}, {}]}]}], + Typeset`pod3$$ = XMLElement[ + "pod", {"title" -> "History", "scanner" -> "Data", "id" -> + "DistanceHistory:AstronomicalData", "position" -> "300", "error" -> + "false", "numsubpods" -> "1"}, { + XMLElement["subpod", {"title" -> ""}, { + XMLElement["cell", {"compressed" -> True, "string" -> False}, { + Cell[ + BoxData[ + FormBox[ + TemplateBox[{ + GraphicsBox[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Vu6uF6qd2e/5a7yfLx+Kfdz3okfxjvg1Vn37D+9IXsx+5x31vfy +MtKM1+Nj8W94ft6p0P//L17Ih+mn+VZdU1fP+cADs1fwbXgrnoH744dwpezn +7EPdw7wlnoH3leW8TL6Z2cV8Ax6Z/SX1zcaZ/Y4X5TvyZ3gtWYn/zB7RNXLG +9H+6xHgr + "]]}, { + Hue[0.9060679774997897, 0.6, 0.6], + Directive[ + RGBColor[0.24720000000000014`, 0.24, 0.6], + Dashing[{0, Small}]], + LineBox[CompressedData[" +1:eJwl1XccjfUbxvFjr8y0JFmhLRooZEUKEUpTIUqhkEppokFSycwMGVFWu2hv +7ZSGSlvSFEq/9/X6/XG9rs91388553m+z/d7n1oXDu42qEihUNinWKFQiWqW +KBROK14ofMJfkifzl+Wh+CJ8H65AreWT5avxNnw/bS9aKJRWa6K2TD6besm3 +yUXoELmJPAB/zr+Q5/J35XF4OJ6Pa1BluZbcFW/MPchT+Cvyf3yY3J9PlitS +G7mjfA3+kv8qL+Eb5WIlC4WZ8k3yCvlQ+tu9lpGb4g18uf4E/qy8m58jn8Vv +l4vmM3JT+WK8Cc/D76Xnu8fLV8oL5N/4gfwV/jevolcbd0sNT8Wv4uF4AJ6C +t/BKfC3fxtvqnYJH5vvwLNrhfsuqNVN7WD6XDqM9aadeOb3j9R6Rz6PDqSrV +UT9d/dXcI7WjXa7fQ/0E9RXy+XQENVO7JOuH76S9qK5ad7XX8DT8Gi545hHy +xfLUvCs6ST5Vvhb/jpfiT3Fx186Wb5ZXZt35Yfwf91AeN8cr9e/Ca3Hv7Bt8 +B/6GF+OP8u/4kXrH44H4K/wAfh9PwCPwwvw2r5nn5Tv43noH4R74dTwdv46v +wpfgafhnXoWvy77h7fU64evwH/gh/Bmeg2/Bq/AOfjh/mxfoX89TgbdQW+W6 +C+gceZz8LS/OH+Pf84Z6J+BL8dd59mL/P3/11HqqvYGvpg602/dWVG+pvlq+ +kI6ifam++hnqb+Jrch6ps9ootT/xMvw5notH49X4iJw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Eeh59K +nR+T95jZm/nuc+X0q+NTM+uzX6mPfE/eZ/YY3prz6toWeifJV8qb8ozyIv6x +PC2zBC/HDXJmM3vlvvgz/ok8h78jj8VD8Ty8P/WUz5DH4s1ZB3kN/1Yu4XeX +yOPlpzPv8rzyAXKnzKucPfwSHoL74ntzDbWU28sj8Fa8OPeBp+Mb8MP4YKqX +uS/3wxsz13I/VJ5qqHfOuc2+yayl+nSs+kWZRTmvdCZVyAxR75IzkfdF/eRJ +cvnscfwLL+OZWul1kK/KbMAzMm/kR+RDaD3+j1dybQO94+T+WcucJxomPyBX +p5fx9vyGa3vlXuRb5f/wUrpTfibzNucp/x9U1bUV9f4HQ42TxQ== + "]]}}}], {GridLines -> Dynamic[ + Join[{{{3605299200, + GrayLevel[0.9]}, {3607891200, + GrayLevel[0.9]}, {3610569600, + GrayLevel[0.9]}, {3613161600, + GrayLevel[0.9]}, {3615840000, + GrayLevel[0.9]}, {3618518400, + GrayLevel[0.9]}}, {210, 220, 230, 240, 250, 260}}, + Replace[ + MousePosition[{"Graphics", Graphics}, None], { + None -> {{}, {}}, { + Pattern[CalculateUtilities`GraphicsUtilities`Private`x$, + Blank[]], + Pattern[CalculateUtilities`GraphicsUtilities`Private`y$, + Blank[]]} :> {{{ + CalculateUtilities`GraphicsUtilities`Private`x$, + GrayLevel[0.7]}}, {{ + CalculateUtilities`GraphicsUtilities`Private`y$, + GrayLevel[0.7]}}}}], 2]], Epilog -> {{ + Directive[ + AbsoluteThickness[0.5], + RGBColor[1, 0, 0]], + + LineBox[{{3611188800, 212.72879241512837`}, { + 3611188800, 257.21097084166985`}}], { + CapForm[None], { + GrayLevel[1], + PolygonBox[{ + Offset[{-4.6, -4.25}, + Scaled[{0, 0.08}]], + Offset[{-4.6, -0.34999999999999987`}, + Scaled[{0, 0.08}]], + Offset[{4.6, 4.25}, + Scaled[{0, 0.08}]], + Offset[{4.6, 0.34999999999999987`}, + Scaled[{0, 0.08}]]}]}, { + AbsoluteThickness[1], + GrayLevel[0], + LineBox[{{ + Offset[{-4.6, -4.25}, + Scaled[{0, 0.08}]], + Offset[{4.6, 0.34999999999999987`}, + Scaled[{0, 0.08}]]}, { + Offset[{-4.6, -0.34999999999999987`}, + Scaled[{0, 0.08}]], + Offset[{4.6, 4.25}, + Scaled[{0, 0.08}]]}}]}}}, + DynamicBox[ + Typeset`ToBoxes[ + + DynamicModule[{ + CalculateUtilities`GraphicsUtilities`Private`pt = ( + NearestFunction[1, {1541, 1}, 3, CompressedData[" +1:eJwl2nc41t//B3AjQshKdjbZO1lRZIayV0kI2clKSkZKJDIiq0QhK0miRCER +4SNlZCWUmZXE7/n+/v5wPf64Xec8X6/zHufc183n5HPChYyEhIQUfxSUJCRz +2jQj8/0zWrnhYypL8ERNbcoyrBY/Z/gHXmZqryb7MqMlZ5TPSAEnosM8d0K9 +PxL8tHBDjuISPSzxHPrMABlG4uP3wEZ216m9MMBM4wgHFI5nzeaC/c1z6zzw +BkmLGR9UU8kpFYC5T0ycReGJHyKvxeAOPhIOSeh2p7xTFnJ8jBVTgO07T0cr +QdmLjKqqRJ6q6RR1mDr3ZuEQkUs0w/Awkeu0f4E2kSvTgFQXnvyP316fyKXX +w2hM5Lpa7GlK5KqLbDlB5JFWuGRFzM+aMuVIzG/qdeQMrL6uk+1C5Gji/nOW +yPFvxcyDyKH0sdQThvsWUPtAmaJwZz84Pm75+jyRh1uaI5DIY7XzQjCRo+25 +2CVi3gq21BiYJFEgcB2WFcpXxMGZLOP2REjFPmiTDIXuuP9IgY43osgyiXko +mBKzYOaVHO5c2BdYq/wQGp5Z8C4j8g1f2qyAMTa7blTBBhPhhy+gkpr9QBPk +39Oq2w81Ey3++woddo07DcF00q1LY5BuTr7qF1xvzuEl/Tqj1Rkc9Gc/pH/w +zE4CGnf8rpeCH/l8r8rD9ja3XeqwlcuW2xQ2NqhpBcJqKrLrjTCmXvfbW2jh +H6/YApcH2MY+QLkyadX/YKmFw+wPWHC/5jjdwIxWoNVW4W6oQ6u9xQgnLn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Offh1heCwwSucKYJw/eMut3yf0Lgwx0hRoWwdo98SWuMwwSVq40WQxntqq+ +c55kEM3UmmvPYJmGslnHMQbpDnXdWgYXVZgJ2g8zSLA7b+sLuFs/aMb+I4Oo +WaT4VsL5fzPLPAYY5N0OvTU18/TzUUyvByIvKnEFODbCkSel1B8iT9bf/DX6 +Dk66U+D+o4tBTvnHh3XQ85MWR0RgKQcdtW74YN4FETnkU7aC/6l+2LLWONsQ ++VVMUFxsEFZp2XbOoZ1BSmcePxmGD/dImHgi77q1WtqPwRpjHNLBbQyyrHju +9wS8dH5wKhb5+H+PylPO + "]]]][ + Part[#, 1]]& )[ + MousePosition[{"Graphics", Graphics}, {0, 0}]], + CalculateUtilities`GraphicsUtilities`Private`scaled = + MousePosition[{"GraphicsScaled", Graphics}, None]}, + If[ + CalculateUtilities`GraphicsUtilities`Private`scaled === + None, {}, { + Text[ + Style[ + Row[{ + ( + DateString[#, { + "DayShort", " ", "MonthNameShort", " ", "Year"}]& )[ + Part[ + CalculateUtilities`GraphicsUtilities`Private`pt, 1, 1]], + ( + Function[{ + CalculateUtilities`GraphicsUtilities`Private`a, + CalculateUtilities`GraphicsUtilities`Private`acc}, + Quiet[ + RawBoxes[ + ToBoxes[ + NumberForm[CalculateUtilities`GraphicsUtilities`Private`a, + Max[1, + Ceiling[ + RealExponent[ + CalculateUtilities`GraphicsUtilities`Private`a] + + CalculateUtilities`GraphicsUtilities`Private`acc]], + ExponentFunction -> (Null& ), + NumberFormat -> (StringReplace[#, StringExpression[ + Pattern[CalculateUtilities`GraphicsUtilities`Private`s, + BlankSequence[]], ".", EndOfString] -> + CalculateUtilities`GraphicsUtilities`Private`s]& )]]]]][#, + 0]& )[ + Part[ + CalculateUtilities`GraphicsUtilities`Private`pt, 1, 2]]}, + ","], 12], + Part[ + CalculateUtilities`GraphicsUtilities`Private`pt, 1], { + 1.5 Sign[ + Part[CalculateUtilities`GraphicsUtilities`Private`scaled, + 1] - 0.5], 0}, Background -> White], + AbsolutePointSize[7], + Point[CalculateUtilities`GraphicsUtilities`Private`pt], + White, + AbsolutePointSize[5], + Point[CalculateUtilities`GraphicsUtilities`Private`pt]}]], + TraditionalForm, Graphics]]}, FrameTicks -> {{{{220., + FormBox[ + TagBox["220", #& ], TraditionalForm], {0.00625, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.25]}}, {230., + FormBox[ + TagBox["230", #& ], TraditionalForm], {0.00625, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.25]}}, {240., + FormBox[ + TagBox["240", #& ], TraditionalForm], {0.00625, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.25]}}, {250., + FormBox[ + TagBox["250", #& ], TraditionalForm], {0.00625, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.25]}}, {222., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {224., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {226., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {228., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {232., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {234., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {236., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {238., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {242., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {244., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {246., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {248., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {252., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {254., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {256., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}}, {{220., + FormBox["\"\"", TraditionalForm], {0.00625, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.25]}}, {230., + FormBox["\"\"", TraditionalForm], {0.00625, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.25]}}, {240., + FormBox["\"\"", TraditionalForm], {0.00625, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.25]}}, {250., + FormBox["\"\"", TraditionalForm], {0.00625, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.25]}}, {222., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {224., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {226., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {228., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {232., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {234., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {236., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {238., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {242., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {244., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {246., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {248., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {218., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {216., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {214., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {252., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {254., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}, {256., + FormBox["\"\"", TraditionalForm], {0.00375, 0.}, { + GrayLevel[0.], + AbsoluteThickness[0.125]}}}}, {{{3605299200, + FormBox["\"Apr\"", TraditionalForm], { + 0.020601132958329826`, 0}}, {3607891200, + FormBox["\"May\"", TraditionalForm], { + 0.020601132958329826`, 0}}, {3610569600, + FormBox["\"Jun\"", TraditionalForm], { + 0.020601132958329826`, 0}}, {3613161600, + FormBox["\"Jul\"", TraditionalForm], { + 0.020601132958329826`, 0}}, {3615840000, + FormBox["\"Aug\"", TraditionalForm], { + 0.020601132958329826`, 0}}, {3618518400, + FormBox["\"Sep\"", TraditionalForm], { + 0.020601132958329826`, 0}}, {3603830400, + FormBox["\"\"", TraditionalForm], { + 0.012360679774997897`, 0}}, {3606508800, + FormBox["\"\"", TraditionalForm], { + 0.012360679774997897`, 0}}, {3609100800, + FormBox["\"\"", TraditionalForm], { + 0.012360679774997897`, 0}}, {3611779200, + FormBox["\"\"", TraditionalForm], { + 0.012360679774997897`, 0}}, {3614371200, + FormBox["\"\"", TraditionalForm], { + 0.012360679774997897`, 0}}, {3617049600, + FormBox["\"\"", TraditionalForm], { + 0.012360679774997897`, 0}}}, {{3605299200, + FormBox[ + StyleBox["\"\"", 0, StripOnInput -> False], + TraditionalForm], {0.020601132958329826`, 0}}, { + 3607891200, + FormBox[ + StyleBox["\"\"", 0, StripOnInput -> False], + TraditionalForm], {0.020601132958329826`, 0}}, { + 3610569600, + FormBox[ + StyleBox["\"\"", 0, StripOnInput -> False], + TraditionalForm], {0.020601132958329826`, 0}}, { + 3613161600, + FormBox[ + StyleBox["\"\"", 0, StripOnInput -> False], + TraditionalForm], {0.020601132958329826`, 0}}, { + 3615840000, + FormBox[ + StyleBox["\"\"", 0, StripOnInput -> False], + TraditionalForm], {0.020601132958329826`, 0}}, { + 3618518400, + FormBox[ + StyleBox["\"\"", 0, StripOnInput -> False], + TraditionalForm], {0.020601132958329826`, 0}}, { + 3603830400, + FormBox[ + StyleBox["\"\"", 0, StripOnInput -> False], + TraditionalForm], {0.012360679774997897`, 0}}, { + 3606508800, + FormBox[ + StyleBox["\"\"", 0, StripOnInput -> False], + TraditionalForm], {0.012360679774997897`, 0}}, { + 3609100800, + FormBox[ + StyleBox["\"\"", 0, StripOnInput -> False], + TraditionalForm], {0.012360679774997897`, 0}}, { + 3611779200, + FormBox[ + StyleBox["\"\"", 0, StripOnInput -> False], + TraditionalForm], {0.012360679774997897`, 0}}, { + 3614371200, + FormBox[ + StyleBox["\"\"", 0, StripOnInput -> False], + TraditionalForm], {0.012360679774997897`, 0}}, { + 3617049600, + FormBox[ + StyleBox["\"\"", 0, StripOnInput -> False], + TraditionalForm], {0.012360679774997897`, 0}}}}}, + ImagePadding -> All, GridLines -> {{{3605299200, + GrayLevel[0.9]}, {3607891200, + GrayLevel[0.9]}, {3610569600, + GrayLevel[0.9]}, {3613161600, + GrayLevel[0.9]}, {3615840000, + GrayLevel[0.9]}, {3618518400, + GrayLevel[0.9]}}, Automatic}, Epilog -> { + Directive[ + AbsoluteThickness[0.5], + RGBColor[1, 0, 0]], + + LineBox[{{3611188800, 212.72879241512837`}, { + 3611188800, 257.21097084166985`}}], { + CapForm[None], { + GrayLevel[1], + PolygonBox[{ + Offset[{-4.6, -4.25}, + Scaled[{0, 0.08}]], + Offset[{-4.6, -0.34999999999999987`}, + Scaled[{0, 0.08}]], + Offset[{4.6, 4.25}, + Scaled[{0, 0.08}]], + Offset[{4.6, 0.34999999999999987`}, + Scaled[{0, 0.08}]]}]}, { + AbsoluteThickness[1], + GrayLevel[0], + LineBox[{{ + Offset[{-4.6, -4.25}, + Scaled[{0, 0.08}]], + Offset[{4.6, 0.34999999999999987`}, + Scaled[{0, 0.08}]]}, { + Offset[{-4.6, -0.34999999999999987`}, + Scaled[{0, 0.08}]], + Offset[{4.6, 4.25}, + Scaled[{0, 0.08}]]}}]}}}, PlotRangeClipping -> False, + PlotRangePadding -> None, AspectRatio -> 0.3, + AxesOrigin -> {3.604*^9, 214.}, AxesStyle -> Directive[ + GrayLevel[0, 0.35], FontColor -> GrayLevel[0.25], + FontOpacity -> 1], BaseStyle -> AbsoluteThickness[1], + Epilog -> { + Directive[ + AbsoluteThickness[0.5], + RGBColor[1, 0, 0]], + + LineBox[{{3611188800, 212.72879241512837`}, { + 3611188800, 257.21097084166985`}}]}, Frame -> True, + FrameLabel -> {None, None}, FrameStyle -> Directive[ + GrayLevel[0, 0.35], FontColor -> GrayLevel[0.25], + FontOpacity -> 1], FrameTicksStyle -> + Directive[FontFamily -> "Times", FontSize -> 10], + GridLines -> {{{3605299200, + GrayLevel[0.9]}, {3607891200, + GrayLevel[0.9]}, {3610569600, + GrayLevel[0.9]}, {3613161600, + GrayLevel[0.9]}, {3615840000, + GrayLevel[0.9]}, {3618518400, + GrayLevel[0.9]}}, Automatic}, GridLinesStyle -> + GrayLevel[0.9], ImageSize -> Full, + LabelStyle -> {FontFamily -> "Verdana", FontSize -> 10}, + Method -> {"AxesInFront" -> True}, + PlotRange -> {{3603398400, 3619123200}, {212.72879241512837`, + 257.21097084166985`}}, PlotRangeClipping -> True, + PlotRangePadding -> None, Prolog -> { + Opacity[0], + TagBox[ + RectangleBox[ + Scaled[{0, 0}], + Scaled[{1, 1}]], Annotation[#, "DatePlot", "Frame"]& ]}, + TicksStyle -> + Directive[FontFamily -> "Times", FontSize -> 10]}], + TagBox[ + GridBox[{{ + TagBox[ + GridBox[{{ + StyleBox[ + RowBox[{"\"(\"", "\[NoBreak]", + FormBox[ + TagBox[ + FormBox[ + TemplateBox[{"\"from \"", + FormBox[ + TagBox["\"Mar 10, 2014\"", Identity], TraditionalForm], + "\" to \"", + FormBox[ + TagBox["\"Sep 8, 2014\"", Identity], TraditionalForm]}, + "RowDefault"], TraditionalForm], + Format[#, TraditionalForm]& ], TraditionalForm], + "\[NoBreak]", "\")\""}], { + FontFamily -> "Verdana", FontSize -> 10, + GrayLevel[0.5], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0}, StripOnInput -> False]}}, + GridBoxAlignment -> {"Columns" -> {{Left}}}, + DefaultBaseStyle -> "Column", + GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], + "Column"], + TagBox[ + GridBox[{{ + StyleBox[ + RowBox[{"\"(\"", "\[NoBreak]", + + TemplateBox[{ + "\"in \"", "\"thousands\"", "\" of \"", "\"miles\""}, + "RowDefault"], "\[NoBreak]", "\")\""}], { + FontFamily -> "Verdana", FontSize -> 10, + GrayLevel[0.5], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0}, StripOnInput -> False]}}, + GridBoxAlignment -> {"Columns" -> {{Left}}}, + DefaultBaseStyle -> "Column", + GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], + "Column"]}}, + GridBoxAlignment -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Baseline}}}, + AutoDelete -> False, + GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, + GridBoxSpacings -> {"Columns" -> {{0.5}}}], "Grid"]}, + "Labeled", DisplayFunction -> (FormBox[ + GridBox[{{ + TagBox[ + ItemBox[ + PaneBox[ + TagBox[#, "SkipImageSizeLevel"], + Alignment -> {Center, Baseline}, BaselinePosition -> + Baseline], DefaultBaseStyle -> "Labeled"], + "SkipImageSizeLevel"]}, { + + ItemBox[#2, Alignment -> {Left, Inherited}, + DefaultBaseStyle -> "LabeledLabel"]}}, + GridBoxAlignment -> { + "Columns" -> {{Center}}, "Rows" -> {{Center}}}, AutoDelete -> + False, GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, + BaselinePosition -> {1, 1}], TraditionalForm]& ), + InterpretationFunction -> (RowBox[{ + StyleBox[ + "Labeled", FontFamily -> "Bitstream Vera Sans", + FontSize -> -1 + Inherited], "[", + RowBox[{#, ",", + RowBox[{"{", #2, "}"}], ",", + RowBox[{"(", "\[NoBreak]", + GridBox[{{ + StyleBox[ + "Bottom", FontFamily -> "Bitstream Vera Sans", + FontSize -> -1 + Inherited], + StyleBox[ + "Left", FontFamily -> "Bitstream Vera Sans", + FontSize -> -1 + Inherited]}}, RowSpacings -> 1, + ColumnSpacings -> 1, RowAlignments -> Baseline, + ColumnAlignments -> Center], "\[NoBreak]", ")"}]}], + "]"}]& )], TraditionalForm]], "Output", { + Background -> None}]}], + XMLElement[ + "dataformats", {}, {"computabledata,formatteddata,timeseriesdata"}]}], + XMLElement["states", {"count" -> "2"}, { + XMLElement[ + "state", { + "name" -> "Use Metric", "input" -> + "DistanceHistory:AstronomicalData__Use Metric"}, {}], + XMLElement[ + "statelist", { + "count" -> "5", "value" -> "\[PlusMinus]3 months", "delimiters" -> + ""}, { + XMLElement[ + "state", { + "name" -> "\[PlusMinus]3 months", "input" -> + "DistanceHistory:AstronomicalData__\[PlusMinus]3 months"}, {}], + XMLElement[ + "state", { + "name" -> "\[PlusMinus]6 months", "input" -> + "DistanceHistory:AstronomicalData__\[PlusMinus]6 months"}, {}], + XMLElement[ + "state", { + "name" -> "\[PlusMinus]1 year", "input" -> + "DistanceHistory:AstronomicalData__\[PlusMinus]1 year"}, {}], + XMLElement[ + "state", { + "name" -> "\[PlusMinus]5 years", "input" -> + "DistanceHistory:AstronomicalData__\[PlusMinus]5 years"}, {}], + XMLElement[ + "state", { + "name" -> "\[PlusMinus]10 years", "input" -> + "DistanceHistory:AstronomicalData__\[PlusMinus]10 years"}, \ +{}]}]}]}], Typeset`pod4$$ = XMLElement[ + "pod", {"title" -> "Unit conversions", "scanner" -> "Unit", "id" -> + "UnitConversion", "position" -> "400", "error" -> "false", "numsubpods" -> + "2"}, { + XMLElement["subpod", {"title" -> ""}, { + XMLElement["cell", {"compressed" -> False, "string" -> True}, { + Cell[ + BoxData[ + FormBox[ + StyleBox[ + TagBox[ + RowBox[{ + TagBox[ + TagBox[ + RowBox[{ + TagBox["385\[ThinSpace]056", + $CellContext`TagBoxWrapper["StringBoxes" -> "385056"]], + "\[NoBreak]", + StyleBox[ + RowBox[{}], FontFamily -> "Helvetica", FontSize -> + Smaller], "\[InvisibleSpace]", "\[ThickSpace]", + "\[InvisibleSpace]", + StyleBox[ + "\"km\"", FontFamily -> "Helvetica", FontSize -> + Smaller]}], Identity], #& , SyntaxForm -> Dot], " ", + StyleBox[ + + RowBox[{ + "\"(\"", "\[NoBreak]", "\"kilometers\"", "\[NoBreak]", + "\")\""}], { + FontFamily :> $CellContext`$UnitFontFamily, FontSize -> + Smaller, + GrayLevel[0.6], LinebreakAdjustments -> {1, 100, 1, 0, 100}, + LineIndent -> 0}, StripOnInput -> False]}], "Unit", + SyntaxForm -> Dot], LinebreakAdjustments -> {1, 100, 1, 0, 100}, + LineIndent -> 0, ZeroWidthTimes -> False], TraditionalForm]], + "Output", {}]}], + XMLElement[ + "dataformats", {}, { + "plaintext,computabledata,formatteddata,numberdata,quantitydata"}]}], + XMLElement["subpod", {"title" -> ""}, { + XMLElement["cell", {"compressed" -> False, "string" -> True}, { + Cell[ + BoxData[ + FormBox[ + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox[ + RowBox[{"3.851", + StyleBox["\[Times]", + GrayLevel[0.5]], + SuperscriptBox["10", "8"]}], + $CellContext`TagBoxWrapper[ + "StringBoxes" -> RowBox[{"3.851", "\[Times]", + SuperscriptBox["10", "8"]}]], SyntaxForm -> CenterDot], + "\[InvisibleSpace]", " ", + StyleBox[ + "\"meters\"", LinebreakAdjustments -> {1, 100, 1, 0, 100}, + LineIndent -> 0, { + FontFamily :> $CellContext`$UnitFontFamily, FontSize -> + Smaller}, StripOnInput -> False]}], Identity], #& , + SyntaxForm -> Dot], "Unit", SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> 0, + ZeroWidthTimes -> False], TraditionalForm]], "Output", {}]}], + XMLElement[ + "dataformats", {}, { + "plaintext,computabledata,formatteddata,numberdata,quantitydata"}]}]}]\ +, Typeset`pod5$$ = XMLElement[ + "pod", {"title" -> "Comparison as distance", "scanner" -> "Unit", "id" -> + "ComparisonAsDistance", "position" -> "500", "error" -> "false", + "numsubpods" -> "1"}, { + XMLElement["subpod", {"title" -> ""}, { + XMLElement["cell", {"compressed" -> False, "string" -> True}, { + Cell[ + BoxData[ + FormBox[ + FormBox[ + + TemplateBox[{ + "\" \[TildeTilde] \"", + "1.00017081986198578379799203020065608125`4.767535813146223", + "\" \"", + StyleBox["\"\[Times]\"", + GrayLevel[0.3], FontSize -> 10.219999999999999`, StripOnInput -> + False], "\"\[MediumSpace]\"", + StyleBox[ + "\"mean Moon\[Hyphen]Earth distance\"", FontFamily -> + "Helvetica", FontSize -> Smaller, StripOnInput -> False], + "\" \"", + StyleBox[ + RowBox[{"\"(\"", "\[NoBreak]", + TemplateBox[{"\"\[MediumSpace]\"", + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox[ + RowBox[{"3.85", + StyleBox["\[Times]", + GrayLevel[0.5]], + SuperscriptBox["10", "8"]}], + $CellContext`TagBoxWrapper[ + "StringBoxes" -> RowBox[{"3.85", "\[Times]", + SuperscriptBox["10", "8"]}]], SyntaxForm -> CenterDot], + "\[NoBreak]", + StyleBox[ + RowBox[{}], FontFamily -> "Helvetica", FontSize -> + Smaller], "\[InvisibleSpace]", "\[ThickSpace]", + "\[InvisibleSpace]", + StyleBox[ + "\"m\"", FontFamily -> "Helvetica", FontSize -> + Smaller]}], Identity], #& , SyntaxForm -> Dot], "Unit", + SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False], "\"\[MediumSpace]\""}, + "RowDefault"], "\[NoBreak]", "\")\""}], { + FontFamily -> "Verdana", FontSize -> 10, + GrayLevel[0.5], LinebreakAdjustments -> {1, 100, 1, 0, 100}, + LineIndent -> 0}, StripOnInput -> False]}, "RowDefault"], + TraditionalForm], TraditionalForm]], "Output", {}]}], + XMLElement["dataformats", {}, {"plaintext"}]}]}], Typeset`pod6$$ = + XMLElement[ + "pod", {"title" -> "Corresponding quantities", "scanner" -> "Unit", "id" -> + "CorrespondingQuantity", "position" -> "600", "error" -> "false", + "numsubpods" -> "2"}, { + XMLElement["subpod", {"title" -> ""}, { + XMLElement["cell", {"compressed" -> False, "string" -> True}, { + Cell[ + BoxData[ + FormBox[ + TagBox[ + GridBox[{{ + InterpretationBox[ + Cell[ + TextData[{"Light travel time ", + Cell[ + BoxData[ + FormBox["t", TraditionalForm]]], " in vacuum from ", + Cell[ + BoxData[ + FormBox[ + FormBox[ + TemplateBox[{ + TagBox[ + RowBox[{"t", "\[LongEqual]", + + RowBox[{"x", "\[InvisibleSpace]", "\"/\"", + "\[InvisibleSpace]", "c"}]}], + PolynomialForm[#, TraditionalOrder -> False]& ]}, + "RowDefault"], TraditionalForm], TraditionalForm]]], + ":"}]], + TextCell[ + Row[{"Light travel time ", + $CellContext`CalculateSymbol["t"], " in vacuum from ", + $CellContext`InlineForm["t \[LongEqual] x/c"], ":"}]]]}, { + TagBox[ + GridBox[{{ + InterpretationBox[ + StyleBox[ + + GraphicsBox[{}, ImageSize -> {10, 0}, BaselinePosition -> + Baseline], "CacheGraphics" -> False], + Spacer[10]], + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox["1.3", + $CellContext`TagBoxWrapper["StringBoxes" -> "1.3"]], + "\[InvisibleSpace]", " ", + StyleBox[ + "\"seconds\"", + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, {FontFamily :> $CellContext`$UnitFontFamily, FontSize -> + Smaller}, StripOnInput -> False]}], Identity], #& , + SyntaxForm -> Dot], "Unit", SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False]}}, + GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> + False, GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], + "Grid"]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, + DefaultBaseStyle -> "Column", + GridBoxItemSize -> {"ColumnsIndexed" -> {1 -> 0}}], "Column"], + TraditionalForm]], "Output", {}]}], + XMLElement[ + "dataformats", {}, { + "plaintext,computabledata,formatteddata,numberdata,quantitydata"}]}], + XMLElement["subpod", {"title" -> ""}, { + XMLElement["cell", {"compressed" -> False, "string" -> True}, { + Cell[ + BoxData[ + FormBox[ + TagBox[ + GridBox[{{ + InterpretationBox[ + Cell[ + TextData[{"Light travel time ", + Cell[ + BoxData[ + FormBox["t", TraditionalForm]]], " in an optical fiber ", + Cell[ + BoxData[ + FormBox[ + FormBox[ + TemplateBox[{ + TagBox[ + RowBox[{"t", "\[LongEqual]", + RowBox[{ + RowBox[{"1.48`", "\[InvisibleSpace]", "x"}], + "\[InvisibleSpace]", "\"/\"", "\[InvisibleSpace]", + "c"}]}], PolynomialForm[#, TraditionalOrder -> False]& ]}, + "RowDefault"], TraditionalForm], TraditionalForm]]], + ":"}]], + TextCell[ + Row[{"Light travel time ", + $CellContext`CalculateSymbol["t"], + " in an optical fiber ", + $CellContext`InlineForm["t \[LongEqual] 1.48x/c"], + ":"}]]]}, { + TagBox[ + GridBox[{{ + InterpretationBox[ + StyleBox[ + + GraphicsBox[{}, ImageSize -> {10, 0}, BaselinePosition -> + Baseline], "CacheGraphics" -> False], + Spacer[10]], + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox["1.9", + $CellContext`TagBoxWrapper["StringBoxes" -> "1.9"]], + "\[InvisibleSpace]", " ", + StyleBox[ + "\"seconds\"", + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, {FontFamily :> $CellContext`$UnitFontFamily, FontSize -> + Smaller}, StripOnInput -> False]}], Identity], #& , + SyntaxForm -> Dot], "Unit", SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False]}}, + GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> + False, GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], + "Grid"]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, + DefaultBaseStyle -> "Column", + GridBoxItemSize -> {"ColumnsIndexed" -> {1 -> 0}}], "Column"], + TraditionalForm]], "Output", {}]}], + XMLElement[ + "dataformats", {}, { + "plaintext,computabledata,formatteddata,numberdata,quantitydata"}]}]}]\ +, Typeset`pod7$$ = XMLElement[ + "pod", {"title" -> "Orbital properties", "scanner" -> "Data", "id" -> + "BasicPlanetOrbitalProperties:AstronomicalData", "position" -> "700", + "error" -> "false", "numsubpods" -> "1"}, { + XMLElement["subpod", {"title" -> ""}, { + XMLElement["cell", {"compressed" -> True, "string" -> False}, { + Cell[ + BoxData[ + FormBox[ + StyleBox[ + TagBox[ + GridBox[{{ + TagBox[ + PaneBox[ + "\"current distance from Earth\"", + BaseStyle -> {{ + BaselinePosition -> Baseline, FontColor -> + GrayLevel[0.3]}, LineSpacing -> {0.9, 0, 1.5}, + LinebreakAdjustments -> {1, 10, 10000, 0, 100}, + TextAlignment -> Left}, BaselinePosition -> Baseline], + $CellContext`TagBoxWrapper["Label"]], + TagBox[ + GridBox[{{ + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox["239\[ThinSpace]262", + $CellContext`TagBoxWrapper["StringBoxes" -> "239262"]], + "\[NoBreak]", + StyleBox[ + RowBox[{}], FontFamily -> "Helvetica", FontSize -> + Smaller], "\[InvisibleSpace]", "\[ThickSpace]", + "\[InvisibleSpace]", + StyleBox[ + "\"mi\"", FontFamily -> "Helvetica", FontSize -> + Smaller]}], Identity], #& , SyntaxForm -> Dot], "Unit", + SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False]}, { + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox["60.37", + $CellContext`TagBoxWrapper["StringBoxes" -> "60.37"]], + "\[NoBreak]", + StyleBox[ + RowBox[{}], FontFamily -> "Helvetica", FontSize -> + Smaller], "\[InvisibleSpace]", "\[ThickSpace]", + "\[InvisibleSpace]", + StyleBox[ + SubscriptBox[ + StyleBox["\"a\"", Italic, StripOnInput -> False], + "\"\[Earth]\""], FontFamily -> "Helvetica", FontSize -> + Smaller]}], Identity], #& , SyntaxForm -> Dot], "Unit", + SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False]}}, + GridBoxAlignment -> {"Columns" -> {{Left}}}, + BaselinePosition -> 1, DefaultBaseStyle -> "Column", + GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, + GridBoxSpacings -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], + "Column"]}, { + TagBox[ + PaneBox[ + TagBox["\"average distance from Earth\"", Identity], + BaseStyle -> {{ + BaselinePosition -> Baseline, FontColor -> + GrayLevel[0.3]}, LineSpacing -> {0.9, 0, 1.5}, + LinebreakAdjustments -> {1, 10, 10000, 0, 100}, + TextAlignment -> Left}, BaselinePosition -> Baseline], + $CellContext`TagBoxWrapper["Label"]], + TagBox[ + GridBox[{{ + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox["239\[ThinSpace]200", + $CellContext`TagBoxWrapper["StringBoxes" -> "239200"]], + "\[NoBreak]", + StyleBox[ + RowBox[{}], FontFamily -> "Helvetica", FontSize -> + Smaller], "\[InvisibleSpace]", "\[ThickSpace]", + "\[InvisibleSpace]", + StyleBox[ + "\"mi\"", FontFamily -> "Helvetica", FontSize -> + Smaller]}], Identity], #& , SyntaxForm -> Dot], "Unit", + SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False]}, { + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox["60.36", + $CellContext`TagBoxWrapper["StringBoxes" -> "60.36"]], + "\[NoBreak]", + StyleBox[ + RowBox[{}], FontFamily -> "Helvetica", FontSize -> + Smaller], "\[InvisibleSpace]", "\[ThickSpace]", + "\[InvisibleSpace]", + StyleBox[ + SubscriptBox[ + StyleBox["\"a\"", Italic, StripOnInput -> False], + "\"\[Earth]\""], FontFamily -> "Helvetica", FontSize -> + Smaller]}], Identity], #& , SyntaxForm -> Dot], "Unit", + SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False]}}, + GridBoxAlignment -> {"Columns" -> {{Left}}}, + BaselinePosition -> 1, DefaultBaseStyle -> "Column", + GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, + GridBoxSpacings -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], + "Column"]}, { + TagBox[ + PaneBox[ + "\"largest distance from orbit center\"", + BaseStyle -> {{ + BaselinePosition -> Baseline, FontColor -> + GrayLevel[0.3]}, LineSpacing -> {0.9, 0, 1.5}, + LinebreakAdjustments -> {1, 10, 10000, 0, 100}, + TextAlignment -> Left}, BaselinePosition -> Baseline], + $CellContext`TagBoxWrapper["Label"]], + TagBox[ + GridBox[{{ + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox["252\[ThinSpace]100", + $CellContext`TagBoxWrapper["StringBoxes" -> "252100"]], + "\[NoBreak]", + StyleBox[ + RowBox[{}], FontFamily -> "Helvetica", FontSize -> + Smaller], "\[InvisibleSpace]", "\[ThickSpace]", + "\[InvisibleSpace]", + StyleBox[ + "\"mi\"", FontFamily -> "Helvetica", FontSize -> + Smaller]}], Identity], #& , SyntaxForm -> Dot], "Unit", + SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False]}, { + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox["63.61", + $CellContext`TagBoxWrapper["StringBoxes" -> "63.61"]], + "\[NoBreak]", + StyleBox[ + RowBox[{}], FontFamily -> "Helvetica", FontSize -> + Smaller], "\[InvisibleSpace]", "\[ThickSpace]", + "\[InvisibleSpace]", + StyleBox[ + SubscriptBox[ + StyleBox["\"a\"", Italic, StripOnInput -> False], + "\"\[Earth]\""], FontFamily -> "Helvetica", FontSize -> + Smaller]}], Identity], #& , SyntaxForm -> Dot], "Unit", + SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False]}}, + GridBoxAlignment -> {"Columns" -> {{Left}}}, + BaselinePosition -> 1, DefaultBaseStyle -> "Column", + GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, + GridBoxSpacings -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], + "Column"]}, { + TagBox[ + PaneBox[ + "\"nearest distance from orbit center\"", + BaseStyle -> {{ + BaselinePosition -> Baseline, FontColor -> + GrayLevel[0.3]}, LineSpacing -> {0.9, 0, 1.5}, + LinebreakAdjustments -> {1, 10, 10000, 0, 100}, + TextAlignment -> Left}, BaselinePosition -> Baseline], + $CellContext`TagBoxWrapper["Label"]], + TagBox[ + GridBox[{{ + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox["225\[ThinSpace]600", + $CellContext`TagBoxWrapper["StringBoxes" -> "225600"]], + "\[NoBreak]", + StyleBox[ + RowBox[{}], FontFamily -> "Helvetica", FontSize -> + Smaller], "\[InvisibleSpace]", "\[ThickSpace]", + "\[InvisibleSpace]", + StyleBox[ + "\"mi\"", FontFamily -> "Helvetica", FontSize -> + Smaller]}], Identity], #& , SyntaxForm -> Dot], "Unit", + SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False]}, { + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox["56.93", + $CellContext`TagBoxWrapper["StringBoxes" -> "56.93"]], + "\[NoBreak]", + StyleBox[ + RowBox[{}], FontFamily -> "Helvetica", FontSize -> + Smaller], "\[InvisibleSpace]", "\[ThickSpace]", + "\[InvisibleSpace]", + StyleBox[ + SubscriptBox[ + StyleBox["\"a\"", Italic, StripOnInput -> False], + "\"\[Earth]\""], FontFamily -> "Helvetica", FontSize -> + Smaller]}], Identity], #& , SyntaxForm -> Dot], "Unit", + SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False]}}, + GridBoxAlignment -> {"Columns" -> {{Left}}}, + BaselinePosition -> 1, DefaultBaseStyle -> "Column", + GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, + GridBoxSpacings -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], + "Column"]}, { + TagBox[ + PaneBox[ + TagBox["\"orbital period\"", Identity], + BaseStyle -> {{ + BaselinePosition -> Baseline, FontColor -> + GrayLevel[0.3]}, LineSpacing -> {0.9, 0, 1.5}, + LinebreakAdjustments -> {1, 10, 10000, 0, 100}, + TextAlignment -> Left}, BaselinePosition -> Baseline], + $CellContext`TagBoxWrapper["Label"]], + StyleBox[ + TagBox[ + TagBox[ + TagBox[ + RowBox[{ + TagBox["27.322", + $CellContext`TagBoxWrapper["StringBoxes" -> "27.322"]], + "\[InvisibleSpace]", " ", + StyleBox[ + "\"days\"", LinebreakAdjustments -> {1, 100, 1, 0, 100}, + LineIndent -> 0, { + FontFamily :> $CellContext`$UnitFontFamily, FontSize -> + Smaller}, StripOnInput -> False]}], Identity], #& , + SyntaxForm -> Dot], "Unit", SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False]}}, + GridBoxAlignment -> { + "Columns" -> {Left, Left}, "Rows" -> {{Baseline}}}, + AutoDelete -> False, + GridBoxBackground -> {"Columns" -> {None, None}}, + GridBoxFrame -> {"Columns" -> {{True}}, "Rows" -> {{True}}}, + GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, + GridBoxSpacings -> {"Columns" -> {{1.5}, 2}, "Rows" -> {{1}}}, + FrameStyle -> GrayLevel[0.84], BaselinePosition -> Automatic, + AllowScriptLevelChange -> False], "Grid"], + LineSpacing -> {0.9, 0, 1.5}, LineIndent -> 0, StripOnInput -> + False], TraditionalForm]], "Output", {}]}], + XMLElement[ + "dataformats", {}, { + "plaintext,computabledata,formatteddata,numberdata,quantitydata"}]}], + XMLElement["states", {"count" -> "2"}, { + XMLElement[ + "state", { + "name" -> "Show metric", "input" -> + "BasicPlanetOrbitalProperties:AstronomicalData__Show metric"}, {}], + XMLElement[ + "state", { + "name" -> "More", "input" -> + "BasicPlanetOrbitalProperties:AstronomicalData__More"}, {}]}], + XMLElement["infos", {"count" -> "1"}, { + XMLElement["info", {}, { + XMLElement["units", {"count" -> "2"}, { + XMLElement[ + "unit", { + "short" -> "a_\[Earth]", "long" -> + "equatorial radii of Earth"}, {}], + XMLElement["unit", {"short" -> "mi", "long" -> "miles"}, {}], + XMLElement["cell", {"compressed" -> False, "string" -> True}, { + Cell[ + BoxData[ + FormBox[ + StyleBox[ + TagBox[ + GridBox[{{ + StyleBox[ + StyleBox[ + TagBox[ + TagBox[ + RowBox[{ + StyleBox[ + SubscriptBox[ + StyleBox["\"a\"", Italic, StripOnInput -> False], + "\"\[Earth]\""], FontFamily -> "Helvetica", FontSize -> + Smaller]}], Identity], "UnitOnly", SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False], 10, StripOnInput -> False], + StyleBox[ + "\"equatorial radii of Earth\"", FontSize -> 10, + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, {FontFamily :> $CellContext`$UnitFontFamily, FontSize -> + Smaller}, + GrayLevel[0.6], StripOnInput -> False]}, { + StyleBox[ + StyleBox[ + TagBox[ + TagBox[ + RowBox[{ + StyleBox[ + "\"mi\"", FontFamily -> "Helvetica", FontSize -> + Smaller]}], Identity], "UnitOnly", SyntaxForm -> Dot], + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, ZeroWidthTimes -> False], 10, StripOnInput -> False], + StyleBox[ + "\"miles\"", FontSize -> 10, + LinebreakAdjustments -> {1, 100, 1, 0, 100}, LineIndent -> + 0, {FontFamily :> $CellContext`$UnitFontFamily, FontSize -> + Smaller}, + GrayLevel[0.6], StripOnInput -> False]}}, + GridBoxAlignment -> { + "Columns" -> {Left, Left}, "Rows" -> {{Baseline}}}, + AutoDelete -> False, + GridBoxBackground -> {"Columns" -> {{None}}}, + GridBoxFrame -> { + "Columns" -> {{True}}, "Rows" -> {{True}}}, + GridBoxItemSize -> { + "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, + GridBoxSpacings -> { + "Columns" -> {{1.5}}, "Rows" -> {{0.5}}}, FrameStyle -> + GrayLevel[0.84], BaselinePosition -> Automatic, + AllowScriptLevelChange -> False], "Grid"], + LineSpacing -> {0.9, 0, 1.5}, LineIndent -> 0, StripOnInput -> + False], TraditionalForm]], "Output", {}]}]}]}]}]}], + Typeset`aux1$$ = {True, False, {False}, True}, Typeset`aux2$$ = { + True, False, {False}, True}, Typeset`aux3$$ = {True, False, {False}, True}, + Typeset`aux4$$ = {True, False, {False, False}, True}, Typeset`aux5$$ = { + True, False, {False}, True}, Typeset`aux6$$ = { + True, False, {False, False}, True}, Typeset`aux7$$ = { + True, False, {False}, True}, Typeset`asyncpods$$ = {}, Typeset`nonpods$$ = { + XMLElement["sources", {"count" -> "1"}, { + XMLElement[ + "source", { + "url" -> + "http://www.wolframalpha.com/sources/\ +AstronomicalDataSourceInformationNotes.html", "text" -> + "Astronomical data"}, {}]}]}, Typeset`initdone$$ = True, + Typeset`queryinfo$$ = { + "success" -> "true", "error" -> "false", "numpods" -> "7", "datatypes" -> + "Astronomical", "timedout" -> "", "timedoutpods" -> "", "timing" -> + "2.573", "parsetiming" -> "0.486", "parsetimedout" -> "false", + "recalculate" -> "", "id" -> + "MSPa79522303fg0608bh95i00004h41i28eicg1ci5g", "host" -> + "http://www3.wolframalpha.com", "server" -> "20", "related" -> + "http://www3.wolframalpha.com/api/v2/relatedQueries.jsp?id=\ +MSPa79622303fg0608bh95i000037d20g9h7ib3ec64&s=20", "version" -> "2.6"}, + Typeset`sessioninfo$$ = { + "TimeZone" -> -4., + "Date" -> {2014, 6, 8, 23, 7, 20.2144277`9.058236384941416}, "Line" -> 3, + "SessionID" -> 25552092645876612485}, Typeset`showpods$$ = {1, 2, 3, 4, 5, + 6, 7}, Typeset`failedpods$$ = {}, Typeset`chosen$$ = {}, Typeset`open$$ = + False, Typeset`newq$$ = "How far is the Earth from the Moon?"}, + DynamicBox[ToBoxes[ + AlphaIntegration`FormatAlphaResults[ + Dynamic[{ + 1, {Typeset`pod1$$, Typeset`pod2$$, Typeset`pod3$$, Typeset`pod4$$, + Typeset`pod5$$, Typeset`pod6$$, Typeset`pod7$$}, { + Typeset`aux1$$, Typeset`aux2$$, Typeset`aux3$$, Typeset`aux4$$, + Typeset`aux5$$, Typeset`aux6$$, Typeset`aux7$$}, Typeset`chosen$$, + Typeset`open$$, Typeset`elements$$, Typeset`q$$, Typeset`opts$$, + Typeset`nonpods$$, Typeset`queryinfo$$, Typeset`sessioninfo$$, + Typeset`showpods$$, Typeset`failedpods$$, Typeset`newq$$}]], + StandardForm], + ImageSizeCache->{648., {478., 483.}}, + TrackedSymbols:>{Typeset`showpods$$, Typeset`failedpods$$}], + DynamicModuleValues:>{}, + Initialization:>If[ + Not[Typeset`initdone$$], Null; WolframAlphaClient`Private`doAsyncUpdates[ + Hold[{ + Typeset`pod1$$, Typeset`pod2$$, Typeset`pod3$$, Typeset`pod4$$, + Typeset`pod5$$, Typeset`pod6$$, Typeset`pod7$$}], + Typeset`asyncpods$$, + Dynamic[Typeset`failedpods$$]]; Typeset`asyncpods$$ = {}; + Typeset`initdone$$ = True], + SynchronousInitialization->False], + BaseStyle->{Deployed -> True}, + DeleteWithContents->True, + Editable->False, + SelectWithContents->True]], "Print", + CellMargins->{{20, 10}, {Inherited, Inherited}}, + CellChangeTimes->{3.611272040233429*^9}] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"Plot3D", "[", + RowBox[{ + RowBox[{ + RowBox[{"Power", "[", + RowBox[{"x", ",", " ", "2"}], "]"}], " ", "+", " ", "y", " ", "+", " ", + "z"}], ",", " ", + RowBox[{"{", + RowBox[{"x", ",", " ", "0", ",", " ", "10"}], "}"}], " ", ",", " ", + RowBox[{"{", + RowBox[{"y", ",", " ", "0", ",", " ", "10"}], "}"}]}], "]"}]], "Input", + CellChangeTimes->{{3.6112720578024335`*^9, 3.6112721112124887`*^9}}], + +Cell[BoxData[ + Graphics3DBox[{}, + Axes->True, + BoxRatios->{1, 1, 0.4}, + Method->{"RotationControl" -> "Globe"}, + PlotRange->{{0, 10}, {0, 10}, {0., 0.}}, + PlotRangePadding->{ + Scaled[0.02], + Scaled[0.02], + Scaled[0.02]}]], "Output", + CellChangeTimes->{3.6112721144606743`*^9}] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"Plot3D", "[", + RowBox[{ + RowBox[{ + SuperscriptBox["x", "2"], "+", "y", "+", "z"}], ",", + RowBox[{"{", + RowBox[{"x", ",", "0", ",", "10"}], "}"}], ",", + RowBox[{"{", + RowBox[{"y", ",", "0", ",", "10"}], "}"}], ",", + RowBox[{"Mesh", "\[Rule]", "Automatic"}], ",", + RowBox[{"MeshFunctions", "\[Rule]", "Automatic"}]}], "]"}]], "Input", + NumberMarks->False], + +Cell[BoxData[ + Graphics3DBox[{}, + Axes->True, + BoxRatios->{1, 1, 0.4}, + Method->{"RotationControl" -> "Globe"}, + PlotRange->{{0, 10}, {0, 10}, {0., 0.}}, + PlotRangePadding->{ + Scaled[0.02], + Scaled[0.02], + Scaled[0.02]}]], "Output", + CellChangeTimes->{3.6112721290995116`*^9}] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"Plot3D", "[", + RowBox[{ + RowBox[{ + SuperscriptBox["x", "2"], "+", "y", "+", "z"}], ",", + RowBox[{"{", + RowBox[{"x", ",", "0", ",", "10"}], "}"}], ",", + RowBox[{"{", + RowBox[{"y", ",", "0", ",", "10"}], "}"}], ",", + RowBox[{"MeshStyle", "\[Rule]", + RowBox[{"Directive", "[", + RowBox[{ + RowBox[{"RGBColor", "[", + RowBox[{"0.05`", ",", "1.`", ",", "0.98`"}], "]"}], ",", + RowBox[{"Opacity", "[", "0.11`", "]"}], ",", + RowBox[{"AbsoluteThickness", "[", "1.555`", "]"}]}], "]"}]}], ",", + RowBox[{"Mesh", "\[Rule]", "Automatic"}], ",", + RowBox[{"MeshFunctions", "\[Rule]", "Automatic"}]}], "]"}]], "Input", + NumberMarks->False], + +Cell[BoxData[ + Graphics3DBox[{}, + Axes->True, + BoxRatios->{1, 1, 0.4}, + Method->{"RotationControl" -> "Globe"}, + PlotRange->{{0, 10}, {0, 10}, {0., 0.}}, + PlotRangePadding->{ + Scaled[0.02], + Scaled[0.02], + Scaled[0.02]}]], "Output", + CellChangeTimes->{3.6112721409161873`*^9}] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"Manipulate", "[", + RowBox[{ + RowBox[{"Plot", "[", + RowBox[{ + RowBox[{"Derivative", "[", + RowBox[{"Power", "[", + RowBox[{"x", ",", " ", "3"}], "]"}], "]"}], ",", " ", + RowBox[{"{", + RowBox[{"x", ",", " ", "0", ",", " ", "10"}], "}"}]}], "]"}], ",", " ", + RowBox[{"{", + RowBox[{"x", ",", " ", "0", ",", " ", "100"}], "}"}]}], "]"}]], "Input", + CellChangeTimes->{{3.611272144379386*^9, 3.61127220827404*^9}}], + +Cell[BoxData[ + TagBox[ + StyleBox[ + DynamicModuleBox[{$CellContext`x$$ = 74.60000000000001, Typeset`show$$ = + True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", + Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = + "\"untitled\"", Typeset`specs$$ = {{ + Hold[$CellContext`x$$], 0, 100}}, Typeset`size$$ = {360., {106., 110.}}, + Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = + True, $CellContext`x$5214$$ = 0}, + DynamicBox[Manipulate`ManipulateBoxes[ + 1, StandardForm, "Variables" :> {$CellContext`x$$ = 0}, + "ControllerVariables" :> { + Hold[$CellContext`x$$, $CellContext`x$5214$$, 0]}, + "OtherVariables" :> { + Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, + Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, + Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, + Typeset`skipInitDone$$}, "Body" :> Plot[ + Derivative[$CellContext`x$$^3], {$CellContext`x$$, 0, 10}], + "Specifications" :> {{$CellContext`x$$, 0, 100}}, "Options" :> {}, + "DefaultOptions" :> {}], + ImageSizeCache->{411., {152., 157.}}, + SingleEvaluation->True], + Deinitialization:>None, + DynamicModuleValues:>{}, + SynchronousInitialization->True, + UnsavedVariables:>{Typeset`initDone$$}, + UntrackedVariables:>{Typeset`size$$}], "Manipulate", + Deployed->True, + StripOnInput->False], + Manipulate`InterpretManipulate[1]]], "Output", + CellChangeTimes->{3.611272211487224*^9}] +}, Open ]] +}, +WindowSize->{716, 833}, +WindowMargins->{{Automatic, 275}, {Automatic, 64}}, +FrontEndVersion->"9.0 for Microsoft Windows (64-bit) (January 25, 2013)", +StyleDefinitions->"Default.nb" +] +(* End of Notebook Content *) + +(* Internal cache information *) +(*CellTagsOutline +CellTagsIndex->{} +*) +(*CellTagsIndex +CellTagsIndex->{} +*) +(*NotebookFileOutline +Notebook[{ +Cell[CellGroupData[{ +Cell[579, 22, 138, 3, 41, "WolframAlphaLong"], +Cell[720, 27, 194311, 3452, 971, "Print"] +}, Open ]], +Cell[CellGroupData[{ +Cell[195068, 3484, 441, 11, 31, "Input"], +Cell[195512, 3497, 292, 10, 306, "Output"] +}, Open ]], +Cell[CellGroupData[{ +Cell[195841, 3512, 404, 11, 55, "Input"], +Cell[196248, 3525, 292, 10, 306, "Output"] +}, Open ]], +Cell[CellGroupData[{ +Cell[196577, 3540, 708, 18, 76, "Input"], +Cell[197288, 3560, 292, 10, 306, "Output"] +}, Open ]], +Cell[CellGroupData[{ +Cell[197617, 3575, 472, 12, 31, "Input"], +Cell[198092, 3589, 1549, 32, 358, "Output"] +}, Open ]] +} +] +*) + +(* End of internal cache information *) + diff --git a/samples/Mathematica/PacletInfo.m b/samples/Mathematica/PacletInfo.m new file mode 100644 index 00000000..489b58c7 --- /dev/null +++ b/samples/Mathematica/PacletInfo.m @@ -0,0 +1,17 @@ +(* Paclet Info File *) + +(* created 2014/02/07*) + +Paclet[ + Name -> "Foobar", + Version -> "0.0.1", + MathematicaVersion -> "8+", + Description -> "Example of an automatically generated PacletInfo file.", + Creator -> "Chris Granade", + Extensions -> + { + {"Documentation", Language -> "English", MainPage -> "Guides/Foobar"} + } +] + + diff --git a/samples/Mathematica/Predicates.m b/samples/Mathematica/Predicates.m new file mode 100644 index 00000000..3c569691 --- /dev/null +++ b/samples/Mathematica/Predicates.m @@ -0,0 +1,150 @@ +(* ::Package:: *) + +BeginPackage["Predicates`"]; + + +(* ::Title:: *) +(*Predicates*) + + +(* ::Section::Closed:: *) +(*Fuzzy Logic*) + + +(* ::Subsection:: *) +(*Documentation*) + + +PossiblyTrueQ::usage="Returns True if the argument is not definitely False."; +PossiblyFalseQ::usage="Returns True if the argument is not definitely True."; +PossiblyNonzeroQ::usage="Returns True if and only if its argument is not definitely zero."; + + +(* ::Subsection:: *) +(*Implimentation*) + + +Begin["`Private`"]; + + +PossiblyTrueQ[expr_]:=\[Not]TrueQ[\[Not]expr] + + +PossiblyFalseQ[expr_]:=\[Not]TrueQ[expr] + + +End[]; + + +(* ::Section::Closed:: *) +(*Numbers and Lists*) + + +(* ::Subsection:: *) +(*Documentation*) + + +AnyQ::usage="Given a predicate and a list, retuns True if and only if that predicate is True for at least one element of the list."; +AnyElementQ::usage="Returns True if cond matches any element of L."; +AllQ::usage="Given a predicate and a list, retuns True if and only if that predicate is True for all elements of the list."; +AllElementQ::usage="Returns True if cond matches any element of L."; + + +AnyNonzeroQ::usage="Returns True if L is a list such that at least one element is definitely not zero."; +AnyPossiblyNonzeroQ::usage="Returns True if expr is a list such that at least one element is not definitely zero."; + + +RealQ::usage="Returns True if and only if the argument is a real number"; +PositiveQ::usage="Returns True if and only if the argument is a positive real number"; +NonnegativeQ::usage="Returns True if and only if the argument is a non-negative real number"; +PositiveIntegerQ::usage="Returns True if and only if the argument is a positive integer"; +NonnegativeIntegerQ::usage="Returns True if and only if the argument is a non-negative integer"; + + +IntegerListQ::usage="Returns True if and only if the input is a list of integers."; +PositiveIntegerListQ::usage="Returns True if and only if the input is a list of positive integers."; +NonnegativeIntegerListQ::usage="Returns True if and only if the input is a list of non-negative integers."; +IntegerOrListQ::usage="Returns True if and only if the input is a list of integers or an integer."; +PositiveIntegerOrListQ::usage="Returns True if and only if the input is a list of positive integers or a positive integer."; +NonnegativeIntegerOrListQ::usage="Returns True if and only if the input is a list of positive integers or a positive integer."; + + +SymbolQ::usage="Returns True if argument is an unassigned symbol."; +SymbolOrNumberQ::usage="Returns True if argument is a number of has head 'Symbol'"; + + +(* ::Subsection:: *) +(*Implimentation*) + + +Begin["`Private`"]; + + +AnyQ[cond_, L_] := Fold[Or, False, cond /@ L] + + +AnyElementQ[cond_,L_]:=AnyQ[cond,Flatten[L]] + + +AllQ[cond_, L_] := Fold[And, True, cond /@ L] + + +AllElementQ[cond_, L_] := Fold[And, True, cond /@ L] + + +AnyNonzeroQ[L_]:=AnyElementQ[#!=0&,L] + + +PossiblyNonzeroQ[expr_]:=PossiblyTrueQ[expr!=0] + + +AnyPossiblyNonzeroQ[expr_]:=AnyElementQ[PossiblyNonzeroQ,expr] + + +RealQ[n_]:=TrueQ[Im[n]==0]; + + +PositiveQ[n_]:=Positive[n]; + + +PositiveIntegerQ[n_]:=PositiveQ[n]\[And]IntegerQ[n]; + + +NonnegativeQ[n_]:=TrueQ[RealQ[n]&&n>=0]; + + +NonnegativeIntegerQ[n_]:=NonnegativeQ[n]\[And]IntegerQ[n]; + + +IntegerListQ[input_]:=ListQ[input]&&Not[MemberQ[IntegerQ/@input,False]]; + + +IntegerOrListQ[input_]:=IntegerListQ[input]||IntegerQ[input]; + + +PositiveIntegerListQ[input_]:=IntegerListQ[input]&&Not[MemberQ[Positive[input],False]]; + + +PositiveIntegerOrListQ[input_]:=PositiveIntegerListQ[input]||PositiveIntegerQ[input]; + + +NonnegativeIntegerListQ[input_]:=IntegerListQ[input]&&Not[MemberQ[NonnegativeIntegerQ[input],False]]; + + +NonnegativeIntegerOrListQ[input_]:=NonnegativeIntegerListQ[input]||NonnegativeIntegerQ[input]; + + +SymbolQ[a_]:=Head[a]===Symbol; + + +SymbolOrNumberQ[a_]:=NumericQ[a]||Head[a]===Symbol; + + +End[]; + + +(* ::Section:: *) +(*Epilogue*) + + +EndPackage[]; diff --git a/samples/Mathematica/Problem12.m b/samples/Mathematica/Problem12.m new file mode 100644 index 00000000..2e8e0ac7 --- /dev/null +++ b/samples/Mathematica/Problem12.m @@ -0,0 +1,8 @@ +(* ::Package:: *) + +(* Problem12.m *) +(* Author: William Woodruff *) +(* Problem: What is the value of the first triangle number to have over five hundred divisors? *) + +Do[If[Length[Divisors[Binomial[i + 1, 2]]] > 500, + Print[Binomial[i + 1, 2]]; Break[]], {i, 1000000}] diff --git a/samples/Matlab/cross_validation.m b/samples/Matlab/cross_validation.m new file mode 100644 index 00000000..034182e5 --- /dev/null +++ b/samples/Matlab/cross_validation.m @@ -0,0 +1,31 @@ +function [ error ] = cross_validation(x,y,hyper_parameter) + + num_data = size(x,1); + + K = 10; + indices = crossvalind('Kfold', num_data, K); + + errors = zeros(K,1); + for i = 1:K + % get indices + test_idx = (indices == i); + train_idx = ~test_idx; + + % get training data + x_train = x(train_idx,:); + y_train = y(train_idx,:); + + % train + w = train(x_train, y_train, hyper_parameter); + + % get test data + x_test = x(test_idx,:); + y_test = y(test_idx,:); + + % calculate error + errors(i) = calc_cost(x_test, y_test, w, hyper_parameter); %calc_error + %errors(i) = calc_error(x_test, y_test, w); + end + + error = mean(errors); +end diff --git a/samples/Matlab/normalize.m b/samples/Matlab/normalize.m new file mode 100644 index 00000000..f4f33493 --- /dev/null +++ b/samples/Matlab/normalize.m @@ -0,0 +1,6 @@ +function [ d, d_mean, d_std ] = normalize( d ) + d_mean = mean(d); + d = d - repmat(d_mean, size(d,1), 1); + d_std = std(d); + d = d./ repmat(d_std, size(d,1), 1); +end diff --git a/samples/JSON/Hello.maxhelp b/samples/Max/Hello.maxhelp similarity index 100% rename from samples/JSON/Hello.maxhelp rename to samples/Max/Hello.maxhelp diff --git a/samples/JSON/Hello.maxpat b/samples/Max/Hello.maxpat similarity index 100% rename from samples/JSON/Hello.maxpat rename to samples/Max/Hello.maxpat diff --git a/samples/MediaWiki/mediawiki.mediawiki b/samples/MediaWiki/mediawiki.mediawiki new file mode 100644 index 00000000..088c955c --- /dev/null +++ b/samples/MediaWiki/mediawiki.mediawiki @@ -0,0 +1,90 @@ + += Overview = + +The GDB Tracepoint Analysis feature is an extension to the Tracing and Monitoring Framework that allows the visualization and analysis of C/C++ tracepoint data collected by GDB and stored to a log file. + += Getting Started = + +The feature can be installed from the Eclipse update site by selecting '''Linux Tools''' > '''GDB Tracepoint Analysis'''. + +The feature requires GDB version 7.2 or later to be installed on the local host. The executable program 'gdb' must be found in the path. + += GDB Trace Perspective = + +To open the perspective, select '''Window''' > '''Open Perspective''' > '''Other...''' > '''GDB Trace'''. + +The perspective includes the following views by default: + +* '''Project Explorer''': This view shows the projects in the workspace and is used to create and manage Tracing projects. +* '''Debug''': This view shows the running C/C++ Postmortem Debugger instances and displays the thread and stack trace associated with a tracepoint. +* '''Trace Control''': This view shows the status of the debugger and allows navigation of trace records. +* '''Console''': This view displays console output of the C/C++ Postmortem Debugger. + +The editor area contains the '''Events''' and '''C/C++''' editors when a GDB Trace is opened. + +[[Image:images/GDBTracePerspective.png]] + += Collecting Tracepoint Data = + +Collecting the C/C++ tracepoint data is outside the scope of this feature. It can be done from the GDB command line or by using the CDT debug component within Eclipse. See the CDT FAQ entry in the [[#References | References]] section. + += Importing Tracepoint Data = + +Some information in this section is redundant with the LTTng User Guide. For further details, see the LTTng User Guide entry in the [[#References | References]] section. + +== Creating a Tracing Project == + +In the '''Project Explorer''' view, right-click and select '''New''' > '''Project...''' from the context menu. In the '''New Project''' dialog, select '''Tracing''' > '''Tracing Project''', click '''Next''', name your project and click '''Finish'''. + +== Importing a GDB Trace == + +In your tracing project, right-click on the '''Traces''' folder and select '''Import...'''. Browse to, or enter, a source directory. Select the trace file in the tree. Optionally set the trace type to '''GDB : GDB Trace'''. Click '''Finish'''. + +Alternatively, the trace can be drag & dropped to the '''Traces''' folder from any external file manager. + +== Selecting the GDB Trace Type == + +Right-click the imported trace in the '''Traces''' folder and choose '''Select Trace Type...''' > '''GDB''' > '''GDB Trace''' from the context menu. This step can be omitted if the trace type was selected at import. + +The trace will be updated with the GDB icon [[Image:images/gdb_icon16.png]]. + +== Selecting the Trace Executable == + +The executable file that created the tracepoint data must be identified so that the C/C++ Postmortem Debugger can be launched properly. + +Right-click the GDB trace in the '''Traces''' folder and choose '''Select Trace Executable...''' from the context menu. Browse to, or enter, the path of the executable file and press '''OK'''. + +The selected file must be recognized by GDB as an executable. + += Visualizing Tracepoint Data = + +== Opening a GDB Trace == + +In the '''Traces''' folder, double-click the GDB trace or right-click it and select '''Open''' from the context menu. + +The tracepoint data will be opened in an Events editor, and a C/C++ Postmortem Debugger instance will be launched. + +If available in the workspace, the source code corresponding to the first trace record will also be opened in a C/C++ editor. + +At this point it is recommended to relocate the Events editor outside of the default editor area, so that it is not hidden by the C/C++ editor. + +== Viewing Trace Data == + +In the Events editor, a table is shown with one row for each trace record. The '''Trace Frame''' column shows the sequential trace record number. The '''Tracepoint''' column shows the number assigned by GDB at collection time for this tracepoint. The '''File''' column shows the file name, line number and method where the tracepoint was set. The '''Content''' column shows the data collected at run-time by the tracepoint. + +Searching and filtering can be done on any column by entering a regular expression in the column header. + +== Navigating the GDB Trace == + +Trace records can be selected in the Events editor using the keyboard or mouse. The C/C++ Postmortem Debugger in the '''Debug''' view will be updated to show the stack trace of the current trace record. + +The trace can also be navigated from the '''Trace Control''' view by clicking the '''Next Trace Record''' or '''Previous Trace Record''' buttons. The Events editor and '''Debug''' views will be updated. + += References = + +* [http://wiki.eclipse.org/index.php/Linux_Tools_Project/LTTng2/User_Guide LTTng User Guide] +* [http://wiki.eclipse.org/CDT/User/FAQ#How_can_I_trace_my_application_using_C.2FC.2B.2B_Tracepoints.3F CDT FAQ - How can I trace my application using C/C++ Tracepoints?] + += Updating This Document = + +This document is maintained in a collaborative wiki. If you wish to update or modify this document please visit [http://wiki.eclipse.org/index.php/Linux_Tools_Project/GDB_Tracepoint_Analysis/User_Guide http://wiki.eclipse.org/Linux_Tools_Project/GDB_Tracepoint_Analysis/User_Guide] diff --git a/samples/Mercury/code_info.m b/samples/Mercury/code_info.m new file mode 100644 index 00000000..59f8eee4 --- /dev/null +++ b/samples/Mercury/code_info.m @@ -0,0 +1,4843 @@ +%---------------------------------------------------------------------------% +% vim: ft=mercury ts=4 sw=4 et +%---------------------------------------------------------------------------% +% Copyright (C) 1994-2012 The University of Melbourne. +% This file may only be copied under the terms of the GNU General +% Public License - see the file COPYING in the Mercury distribution. +%---------------------------------------------------------------------------% +% +% File: code_info.m. +% Main authors: conway, zs. +% +% This file defines the code_info type and various operations on it. +% The code_info structure is the 'state' of the code generator. +% +% This file is organized into ten submodules: +% +% - the code_info structure and its access predicates +% - simple wrappers around access predicates +% - handling branched control structures +% - handling failure continuations +% - handling liveness issues +% - saving and restoring heap pointers, trail tickets etc +% - interfacing to var_locn +% - managing the info required by garbage collection and value numbering +% - managing stack slots +% - support for debugging the code generator itself. +% +%---------------------------------------------------------------------------% + +:- module ll_backend.code_info. +:- interface. + +:- import_module check_hlds.type_util. +:- import_module hlds.code_model. +:- import_module hlds.hlds_data. +:- import_module hlds.hlds_goal. +:- import_module hlds.hlds_llds. +:- import_module hlds.hlds_module. +:- import_module hlds.hlds_pred. +:- import_module hlds.instmap. +:- import_module libs.globals. +:- import_module ll_backend.continuation_info. +:- import_module ll_backend.global_data. +:- import_module ll_backend.layout. +:- import_module ll_backend.llds. +:- import_module ll_backend.trace_gen. +:- import_module mdbcomp.prim_data. +:- import_module mdbcomp.goal_path. +:- import_module parse_tree.prog_data. +:- import_module parse_tree.set_of_var. + +:- import_module assoc_list. +:- import_module bool. +:- import_module counter. +:- import_module io. +:- import_module list. +:- import_module map. +:- import_module maybe. +:- import_module set. +:- import_module set_tree234. +:- import_module term. + +%----------------------------------------------------------------------------% +%----------------------------------------------------------------------------% + +:- implementation. + +:- import_module backend_libs.builtin_ops. +:- import_module backend_libs.proc_label. +:- import_module hlds.arg_info. +:- import_module hlds.hlds_desc. +:- import_module hlds.hlds_rtti. +:- import_module libs.options. +:- import_module libs.trace_params. +:- import_module ll_backend.code_util. +:- import_module ll_backend.opt_debug. +:- import_module ll_backend.var_locn. +:- import_module parse_tree.builtin_lib_types. +:- import_module parse_tree.prog_type. +:- import_module parse_tree.mercury_to_mercury. + +:- import_module cord. +:- import_module int. +:- import_module pair. +:- import_module require. +:- import_module set. +:- import_module stack. +:- import_module string. +:- import_module varset. + +%---------------------------------------------------------------------------% + + % Submodule for the code_info type and its access predicates. + % + % This submodule has the following components: + % + % declarations for exported access predicates + % declarations for non-exported access predicates + % the definition of the type and the init predicate + % the definition of the get access predicates + % the definition of the set access predicates + % + % Please keep the order of mention of the various fields + % consistent in each of these five components. + +:- interface. + +:- type code_info. + + % Create a new code_info structure. Also return the + % outermost resumption point, and info about the non-fixed + % stack slots used for tracing purposes. + % +:- pred code_info_init(bool::in, globals::in, pred_id::in, proc_id::in, + pred_info::in, proc_info::in, abs_follow_vars::in, module_info::in, + static_cell_info::in, const_struct_map::in, resume_point_info::out, + trace_slot_info::out, maybe(containing_goal_map)::in, + list(string)::in, int::in, code_info::out) is det. + + % Get the globals table. + % +:- pred get_globals(code_info::in, globals::out) is det. + + % Get the exprn_opts. + % +:- pred get_exprn_opts(code_info::in, exprn_opts::out) is det. + + % Get the HLDS of the entire module. + % +:- pred get_module_info(code_info::in, module_info::out) is det. + + % Get the id of the predicate we are generating code for. + % +:- pred get_pred_id(code_info::in, pred_id::out) is det. + + % Get the id of the procedure we are generating code for. + % +:- pred get_proc_id(code_info::in, proc_id::out) is det. + + % Get the HLDS of the predicate containing the procedure + % we are generating code for. + % +:- pred get_pred_info(code_info::in, pred_info::out) is det. + + % Get the HLDS of the procedure we are generating code for. + % +:- pred get_proc_info(code_info::in, proc_info::out) is det. + + % Get the variables for the current procedure. + % +:- pred get_varset(code_info::in, prog_varset::out) is det. + +:- func get_var_types(code_info) = vartypes. + +:- pred get_maybe_trace_info(code_info::in, maybe(trace_info)::out) is det. + +:- pred get_emit_trail_ops(code_info::in, add_trail_ops::out) is det. + +:- pred get_emit_region_ops(code_info::in, add_region_ops::out) is det. + + % Get the set of currently forward-live variables. + % +:- pred get_forward_live_vars(code_info::in, set_of_progvar::out) is det. + + % Set the set of currently forward-live variables. + % +:- pred set_forward_live_vars(set_of_progvar::in, + code_info::in, code_info::out) is det. + + % Get the table mapping variables to the current + % instantiation states. + % +:- pred get_instmap(code_info::in, instmap::out) is det. + + % Set the table mapping variables to the current + % instantiation states. + % +:- pred set_instmap(instmap::in, code_info::in, code_info::out) is det. + + % Get the current nesting depth for parallel conjunctions. + % +:- pred get_par_conj_depth(code_info::in, int::out) is det. + + % Set the current nesting depth for parallel conjunctions. + % +:- pred set_par_conj_depth(int::in, code_info::in, code_info::out) is det. + + % The number of the last local label allocated. + % +:- pred get_label_counter(code_info::in, counter::out) is det. + + % Get the flag that indicates whether succip is used or not. + % +:- pred get_succip_used(code_info::in, bool::out) is det. + + % Get the label layout information created by tracing + % during code generation. + % +:- pred get_layout_info(code_info::in, proc_label_layout_info::out) is det. + +:- pred get_proc_trace_events(code_info::in, bool::out) is det. + +:- pred set_proc_trace_events(bool::in, code_info::in, code_info::out) is det. + + % Get the global static data structures that have + % been created during code generation for closure layouts. + % +:- pred get_closure_layouts(code_info::in, list(closure_proc_id_data)::out) + is det. + +:- pred get_max_reg_in_use_at_trace(code_info::in, int::out, int::out) is det. + +:- pred set_max_reg_in_use_at_trace(int::in, int::in, + code_info::in, code_info::out) is det. + + % Get the flag which is true iff the procedure has so far + % emitted code that creates a temporary nondet stack frame. + % +:- pred get_created_temp_frame(code_info::in, bool::out) is det. + +:- pred get_static_cell_info(code_info::in, static_cell_info::out) is det. + +:- pred set_static_cell_info(static_cell_info::in, + code_info::in, code_info::out) is det. + +:- pred get_alloc_sites(code_info::in, set_tree234(alloc_site_info)::out) + is det. + +:- pred set_alloc_sites(set_tree234(alloc_site_info)::in, + code_info::in, code_info::out) is det. + +:- pred get_used_env_vars(code_info::in, set(string)::out) is det. + +:- pred set_used_env_vars(set(string)::in, code_info::in, code_info::out) + is det. + +:- pred get_opt_trail_ops(code_info::in, bool::out) is det. + +:- pred get_opt_region_ops(code_info::in, bool::out) is det. + +:- pred get_auto_comments(code_info::in, bool::out) is det. + +:- pred get_lcmc_null(code_info::in, bool::out) is det. + +:- pred get_containing_goal_map(code_info::in, maybe(containing_goal_map)::out) + is det. + +:- pred get_containing_goal_map_det(code_info::in, containing_goal_map::out) + is det. + +:- pred get_const_struct_map(code_info::in, const_struct_map::out) is det. + +:- pred add_out_of_line_code(llds_code::in, code_info::in, code_info::out) + is det. + +:- pred get_out_of_line_code(code_info::in, llds_code::out) is det. + +%---------------------------------------------------------------------------% + +:- implementation. + +:- pred get_var_slot_count(code_info::in, int::out) is det. + +:- pred set_maybe_trace_info(maybe(trace_info)::in, + code_info::in, code_info::out) is det. + +:- pred get_opt_no_return_calls(code_info::in, bool::out) is det. + +:- pred get_zombies(code_info::in, set_of_progvar::out) is det. + +:- pred set_zombies(set_of_progvar::in, code_info::in, code_info::out) is det. + +:- pred get_var_locn_info(code_info::in, var_locn_info::out) is det. + +:- pred set_var_locn_info(var_locn_info::in, + code_info::in, code_info::out) is det. + +:- pred get_temps_in_use(code_info::in, set(lval)::out) is det. + +:- pred set_temps_in_use(set(lval)::in, code_info::in, code_info::out) is det. + +:- pred get_fail_info(code_info::in, fail_info::out) is det. + +:- pred set_fail_info(fail_info::in, code_info::in, code_info::out) is det. + +:- pred set_label_counter(counter::in, code_info::in, code_info::out) is det. + +:- pred set_succip_used(bool::in, code_info::in, code_info::out) is det. + +:- pred set_layout_info(proc_label_layout_info::in, + code_info::in, code_info::out) is det. + +:- pred get_max_temp_slot_count(code_info::in, int::out) is det. + +:- pred set_max_temp_slot_count(int::in, code_info::in, code_info::out) is det. + +:- pred get_temp_content_map(code_info::in, + map(lval, slot_contents)::out) is det. + +:- pred set_temp_content_map(map(lval, slot_contents)::in, + code_info::in, code_info::out) is det. + +:- pred get_persistent_temps(code_info::in, set(lval)::out) is det. + +:- pred set_persistent_temps(set(lval)::in, + code_info::in, code_info::out) is det. + +:- pred set_closure_layouts(list(closure_proc_id_data)::in, + code_info::in, code_info::out) is det. + +:- pred get_closure_seq_counter(code_info::in, counter::out) is det. + +:- pred set_closure_seq_counter(counter::in, + code_info::in, code_info::out) is det. + +:- pred set_created_temp_frame(bool::in, code_info::in, code_info::out) is det. + +%---------------------------------------------------------------------------% + + % The code_info structure has three groups of fields. + % + % Some fields are static; they are set when the code_info structure + % is initialized, and never changed afterwards. + % + % Some fields record information about the state of the code generator + % at a particular location in the HLDS code of the current procedure. + % At the start of the branched control structure, the code generator + % remembers the values of these fields, and starts generating code + % for each branch from the same location-dependent state. + % + % Some fields record persistent information that does not depend + % on a code location. Updates to these fields must remain effective + % even when the code generator resets its location-dependent state. + +:- type code_info + ---> code_info( + code_info_static :: code_info_static, + code_info_loc_dep :: code_info_loc_dep, + code_info_persistent :: code_info_persistent + ). + +:- type code_info_static + ---> code_info_static( + % For the code generation options. + cis_globals :: globals, + cis_exprn_opts :: exprn_opts, + + % The module_info structure - you just never know + % when you might need it. + cis_module_info :: module_info, + + % The id of the current predicate. + cis_pred_id :: pred_id, + + % The id of the current procedure. + cis_proc_id :: proc_id, + + % The pred_info for the predicate containing this procedure. + cis_pred_info :: pred_info, + + % The proc_info for this procedure. + cis_proc_info :: proc_info, + + % The proc_label for this procedure. + cis_proc_label :: proc_label, + + % The variables in this procedure. + cis_varset :: prog_varset, + + % The number of stack slots allocated. for storing variables. + % (Some extra stack slots are used for saving and restoring + % registers.) + cis_var_slot_count :: int, + + % Information about which stack slots the call sequence number + % and depth are stored in, provided tracing is switched on. + cis_maybe_trace_info :: maybe(trace_info), + + % Should we optimize calls that cannot return? + cis_opt_no_resume_calls :: bool, + + % Should we emit trail operations? + cis_emit_trail_ops :: add_trail_ops, + + % Should we try to avoid generating trail operations? + cis_opt_trail_ops :: bool, + + % Should we emit region operations? + cis_emit_region_ops :: add_region_ops, + + % Should we try to avoid generating region operations? + cis_opt_region_ops :: bool, + + % The setting of --auto-comments. + cis_auto_comments :: bool, + + % The setting of --optimize-constructor-last-call-null. + cis_lcmc_null :: bool, + + cis_containing_goal_map :: maybe(containing_goal_map), + + % Maps the number of an entry in the module's const_struct_db + % to its rval. + cis_const_struct_map :: const_struct_map + ). + +:- type code_info_loc_dep + ---> code_info_loc_dep( + % Variables that are forward live after this goal. + cild_forward_live_vars :: set_of_progvar, + + % Current insts of the live variables. + cild_instmap :: instmap, + + % Zombie variables; variables that are not forward live + % but which are protected by an enclosing resume point. + cild_zombies :: set_of_progvar, + + % A map storing the information about the status of each known + % variable. (Known vars = forward live vars + zombies.) + cild_var_locn_info :: var_locn_info, + + % The set of temporary locations currently in use. These lvals + % must be all be keys in the map of temporary locations ever + % used, which is one of the persistent fields below. Any keys + % in that map which are not in this set are free for reuse. + cild_temps_in_use :: set(lval), + + % Information about how to manage failures. + cild_fail_info :: fail_info, + + % How deep in a nested parallel conjunction we are. + % This is zero at the beginning of a procedure and + % is incremented as we enter parallel conjunctions. + cild_par_conj_depth :: int + ). + +:- type code_info_persistent + ---> code_info_persistent( + % Counter for the local labels used by this procedure. + cip_label_num_src :: counter, + + % do we need to store succip? + cip_store_succip :: bool, + + % Information on which values are live and where at which + % labels, for tracing and/or accurate gc. + cip_label_info :: proc_label_layout_info, + + % Did the procedure have any trace events? + cip_proc_trace_events :: bool, + + % The maximum number of extra temporary stackslots that + % have been used during the procedure. + cip_stackslot_max :: int, + + % The temporary locations that have ever been used on the + % stack, and what they contain. Once we have used a stack slot + % to store e.g. a ticket, we never reuse that slot to hold + % something else, e.g. a saved hp. This policy prevents us + % from making such conflicting choices in parallel branches, + % which would make it impossible to describe to gc what the + % slot contains after the end of the branched control + % structure. + cip_temp_contents :: map(lval, slot_contents), + + % Stack slot locations that should not be released even when + % the code generator resets its location-dependent state. + cip_persistent_temps :: set(lval), + + cip_closure_layout_seq :: counter, + + % Closure layout structures generated by this procedure. + cip_closure_layouts :: list(closure_proc_id_data), + + % At each call to MR_trace, we compute the highest rN and fN + % registers that contain useful values. These slot contain the + % maximum of these highest values. Therefore at all calls to + % MR_trace in the procedure, we need only save the registers + % whose numbers are equal to or smaller than this field. + % This slot contains -1 if tracing is not enabled. + cip_max_reg_r_used :: int, + cip_max_reg_f_used :: int, + + % True iff the procedure has created one or more temporary + % nondet frames. + cip_created_temp_frame :: bool, + + cip_static_cell_info :: static_cell_info, + + cip_alloc_sites :: set_tree234(alloc_site_info), + + cip_used_env_vars :: set(string), + + % A counter and table for allocating and maintaining slots + % where string IDs will be placed at runtime for threadscope + % profiling. The actual string IDs are allocated at runtime + % and their IDs are placed in an array slot which can be + % referred to statically. + cip_ts_string_table_size :: int, + cip_ts_rev_string_table :: list(string), + + % Code that is part of this procedure, but that can be placed + % after the procedure without a cache penalty. For example, + % code that is spawned off by loop control is placed here. + cip_out_of_line_code :: llds_code + ). + +%---------------------------------------------------------------------------% + +code_info_init(SaveSuccip, Globals, PredId, ProcId, PredInfo, ProcInfo, + FollowVars, ModuleInfo, StaticCellInfo, ConstStructMap, ResumePoint, + TraceSlotInfo, MaybeContainingGoalMap, + TSRevStringTable, TSStringTableSize, CodeInfo) :- + ProcLabel = make_proc_label(ModuleInfo, PredId, ProcId), + proc_info_get_initial_instmap(ProcInfo, ModuleInfo, InstMap), + proc_info_get_liveness_info(ProcInfo, Liveness), + CodeModel = proc_info_interface_code_model(ProcInfo), + build_input_arg_list(ProcInfo, ArgList), + proc_info_get_varset(ProcInfo, VarSet), + proc_info_get_vartypes(ProcInfo, VarTypes), + proc_info_get_stack_slots(ProcInfo, StackSlots), + ExprnOpts = init_exprn_opts(Globals), + globals.lookup_bool_option(Globals, use_float_registers, UseFloatRegs), + ( + UseFloatRegs = yes, + FloatRegType = reg_f + ; + UseFloatRegs = no, + FloatRegType = reg_r + ), + globals.get_trace_level(Globals, TraceLevel), + ( + eff_trace_level_is_none(ModuleInfo, PredInfo, ProcInfo, TraceLevel) + = no + -> + trace_fail_vars(ModuleInfo, ProcInfo, FailVars), + MaybeFailVars = yes(FailVars), + set_of_var.union(Liveness, FailVars, EffLiveness) + ; + MaybeFailVars = no, + EffLiveness = Liveness + ), + init_var_locn_state(ArgList, EffLiveness, VarSet, VarTypes, FloatRegType, + StackSlots, FollowVars, VarLocnInfo), + stack.init(ResumePoints), + globals.lookup_bool_option(Globals, allow_hijacks, AllowHijack), + ( + AllowHijack = yes, + Hijack = allowed + ; + AllowHijack = no, + Hijack = not_allowed + ), + DummyFailInfo = fail_info(ResumePoints, resume_point_unknown, + may_be_different, not_inside_non_condition, Hijack), + map.init(TempContentMap), + set.init(PersistentTemps), + set.init(TempsInUse), + Zombies = set_of_var.init, + map.init(LayoutMap), + max_var_slot(StackSlots, VarSlotMax), + trace_reserved_slots(ModuleInfo, PredInfo, ProcInfo, Globals, + FixedSlots, _), + int.max(VarSlotMax, FixedSlots, SlotMax), + globals.lookup_bool_option(Globals, opt_no_return_calls, + OptNoReturnCalls), + globals.lookup_bool_option(Globals, use_trail, UseTrail), + globals.lookup_bool_option(Globals, disable_trail_ops, DisableTrailOps), + ( + UseTrail = yes, + DisableTrailOps = no + -> + EmitTrailOps = add_trail_ops + ; + EmitTrailOps = do_not_add_trail_ops + ), + globals.lookup_bool_option(Globals, optimize_trail_usage, OptTrailOps), + globals.lookup_bool_option(Globals, optimize_region_ops, OptRegionOps), + globals.lookup_bool_option(Globals, region_analysis, UseRegions), + ( + UseRegions = yes, + EmitRegionOps = add_region_ops + ; + UseRegions = no, + EmitRegionOps = do_not_add_region_ops + ), + globals.lookup_bool_option(Globals, auto_comments, AutoComments), + globals.lookup_bool_option(Globals, optimize_constructor_last_call_null, + LCMCNull), + CodeInfo0 = code_info( + code_info_static( + Globals, + ExprnOpts, + ModuleInfo, + PredId, + ProcId, + PredInfo, + ProcInfo, + ProcLabel, + VarSet, + SlotMax, + no, + OptNoReturnCalls, + EmitTrailOps, + OptTrailOps, + EmitRegionOps, + OptRegionOps, + AutoComments, + LCMCNull, + MaybeContainingGoalMap, + ConstStructMap + ), + code_info_loc_dep( + Liveness, + InstMap, + Zombies, + VarLocnInfo, + TempsInUse, + DummyFailInfo, % init_fail_info will override this dummy value + 0 % nested parallel conjunction depth + ), + code_info_persistent( + counter.init(1), + SaveSuccip, + LayoutMap, + no, + 0, + TempContentMap, + PersistentTemps, + counter.init(1), + [], + -1, + -1, + no, + StaticCellInfo, + set_tree234.init, + set.init, + TSStringTableSize, + TSRevStringTable, + cord.empty + ) + ), + init_maybe_trace_info(TraceLevel, Globals, ModuleInfo, + PredInfo, ProcInfo, TraceSlotInfo, CodeInfo0, CodeInfo1), + init_fail_info(CodeModel, MaybeFailVars, ResumePoint, + CodeInfo1, CodeInfo). + +:- func init_exprn_opts(globals) = exprn_opts. + +init_exprn_opts(Globals) = ExprnOpts :- + globals.lookup_bool_option(Globals, gcc_non_local_gotos, OptNLG), + ( + OptNLG = yes, + NLG = have_non_local_gotos + ; + OptNLG = no, + NLG = do_not_have_non_local_gotos + ), + globals.lookup_bool_option(Globals, asm_labels, OptASM), + ( + OptASM = yes, + ASM = have_asm_labels + ; + OptASM = no, + ASM = do_not_have_asm_labels + ), + globals.lookup_bool_option(Globals, static_ground_cells, OptSGCell), + ( + OptSGCell = yes, + SGCell = have_static_ground_cells + ; + OptSGCell = no, + SGCell = do_not_have_static_ground_cells + ), + globals.lookup_bool_option(Globals, unboxed_float, OptUBF), + ( + OptUBF = yes, + UBF = have_unboxed_floats + ; + OptUBF = no, + UBF = do_not_have_unboxed_floats + ), + globals.lookup_bool_option(Globals, use_float_registers, OptFloatRegs), + ( + OptFloatRegs = yes, + UseFloatRegs = use_float_registers + ; + OptFloatRegs = no, + UseFloatRegs = do_not_use_float_registers + ), + globals.lookup_bool_option(Globals, static_ground_floats, OptSGFloat), + ( + OptSGFloat = yes, + SGFloat = have_static_ground_floats + ; + OptSGFloat = no, + SGFloat = do_not_have_static_ground_floats + ), + globals.lookup_bool_option(Globals, static_code_addresses, + OptStaticCodeAddr), + ( + OptStaticCodeAddr = yes, + StaticCodeAddrs = have_static_code_addresses + ; + OptStaticCodeAddr = no, + StaticCodeAddrs = do_not_have_static_code_addresses + ), + ExprnOpts = exprn_opts(NLG, ASM, UBF, UseFloatRegs, SGCell, SGFloat, + StaticCodeAddrs). + +:- pred init_maybe_trace_info(trace_level::in, globals::in, + module_info::in, pred_info::in, proc_info::in, trace_slot_info::out, + code_info::in, code_info::out) is det. + +init_maybe_trace_info(TraceLevel, Globals, ModuleInfo, PredInfo, + ProcInfo, TraceSlotInfo, !CI) :- + ( + eff_trace_level_is_none(ModuleInfo, PredInfo, ProcInfo, TraceLevel) + = no + -> + proc_info_get_has_tail_call_events(ProcInfo, HasTailCallEvents), + ( + HasTailCallEvents = tail_call_events, + get_next_label(TailRecLabel, !CI), + MaybeTailRecLabel = yes(TailRecLabel) + ; + HasTailCallEvents = no_tail_call_events, + MaybeTailRecLabel = no + ), + trace_setup(ModuleInfo, PredInfo, ProcInfo, Globals, MaybeTailRecLabel, + TraceSlotInfo, TraceInfo, !CI), + set_maybe_trace_info(yes(TraceInfo), !CI) + ; + TraceSlotInfo = trace_slot_info(no, no, no, no, no, no) + ). + +%---------------------------------------------------------------------------% + +get_globals(CI, CI ^ code_info_static ^ cis_globals). +get_module_info(CI, CI ^ code_info_static ^ cis_module_info). +get_exprn_opts(CI, CI ^ code_info_static ^ cis_exprn_opts). +get_pred_id(CI, CI ^ code_info_static ^ cis_pred_id). +get_proc_id(CI, CI ^ code_info_static ^ cis_proc_id). +get_pred_info(CI, CI ^ code_info_static ^ cis_pred_info). +get_proc_info(CI, CI ^ code_info_static ^ cis_proc_info). +get_varset(CI, CI ^ code_info_static ^ cis_varset). +get_var_slot_count(CI, CI ^ code_info_static ^ cis_var_slot_count). +get_maybe_trace_info(CI, CI ^ code_info_static ^ cis_maybe_trace_info). +get_opt_no_return_calls(CI, CI ^ code_info_static ^ cis_opt_no_resume_calls). +get_emit_trail_ops(CI, CI ^ code_info_static ^ cis_emit_trail_ops). +get_opt_trail_ops(CI, CI ^ code_info_static ^ cis_opt_trail_ops). +get_emit_region_ops(CI, CI ^ code_info_static ^ cis_emit_region_ops). +get_opt_region_ops(CI, CI ^ code_info_static ^ cis_opt_region_ops). +get_auto_comments(CI, CI ^ code_info_static ^ cis_auto_comments). +get_lcmc_null(CI, CI ^ code_info_static ^ cis_lcmc_null). +get_containing_goal_map(CI, CI ^ code_info_static ^ cis_containing_goal_map). +get_const_struct_map(CI, CI ^ code_info_static ^ cis_const_struct_map). +get_forward_live_vars(CI, CI ^ code_info_loc_dep ^ cild_forward_live_vars). +get_instmap(CI, CI ^ code_info_loc_dep ^ cild_instmap). +get_zombies(CI, CI ^ code_info_loc_dep ^ cild_zombies). +get_var_locn_info(CI, CI ^ code_info_loc_dep ^ cild_var_locn_info). +get_temps_in_use(CI, CI ^ code_info_loc_dep ^ cild_temps_in_use). +get_fail_info(CI, CI ^ code_info_loc_dep ^ cild_fail_info). +get_par_conj_depth(CI, CI ^ code_info_loc_dep ^ cild_par_conj_depth). +get_label_counter(CI, CI ^ code_info_persistent ^ cip_label_num_src). +get_succip_used(CI, CI ^ code_info_persistent ^ cip_store_succip). +get_layout_info(CI, CI ^ code_info_persistent ^ cip_label_info). +get_proc_trace_events(CI, CI ^ code_info_persistent ^ cip_proc_trace_events). +get_max_temp_slot_count(CI, CI ^ code_info_persistent ^ cip_stackslot_max). +get_temp_content_map(CI, CI ^ code_info_persistent ^ cip_temp_contents). +get_persistent_temps(CI, CI ^ code_info_persistent ^ cip_persistent_temps). +get_closure_seq_counter(CI, + CI ^ code_info_persistent ^ cip_closure_layout_seq). +get_closure_layouts(CI, CI ^ code_info_persistent ^ cip_closure_layouts). +get_max_reg_in_use_at_trace(CI, MaxRegR, MaxRegF) :- + MaxRegR = CI ^ code_info_persistent ^ cip_max_reg_r_used, + MaxRegF = CI ^ code_info_persistent ^ cip_max_reg_f_used. +get_created_temp_frame(CI, CI ^ code_info_persistent ^ cip_created_temp_frame). +get_static_cell_info(CI, CI ^ code_info_persistent ^ cip_static_cell_info). +get_alloc_sites(CI, CI ^ code_info_persistent ^ cip_alloc_sites). +get_used_env_vars(CI, CI ^ code_info_persistent ^ cip_used_env_vars). + +%---------------------------------------------------------------------------% + +set_maybe_trace_info(TI, CI, + CI ^ code_info_static ^ cis_maybe_trace_info := TI). +set_forward_live_vars(LV, CI, + CI ^ code_info_loc_dep ^ cild_forward_live_vars := LV). +set_instmap(IM, CI, CI ^ code_info_loc_dep ^ cild_instmap := IM). +set_zombies(Zs, CI, CI ^ code_info_loc_dep ^ cild_zombies := Zs). +set_var_locn_info(EI, CI, CI ^ code_info_loc_dep ^ cild_var_locn_info := EI). +set_temps_in_use(TI, CI, CI ^ code_info_loc_dep ^ cild_temps_in_use := TI). +set_fail_info(FI, CI, CI ^ code_info_loc_dep ^ cild_fail_info := FI). +set_par_conj_depth(N, CI, CI ^ code_info_loc_dep ^ cild_par_conj_depth := N). +set_label_counter(LC, CI, CI ^ code_info_persistent ^ cip_label_num_src := LC). +set_succip_used(SU, CI, CI ^ code_info_persistent ^ cip_store_succip := SU). +set_layout_info(LI, CI, CI ^ code_info_persistent ^ cip_label_info := LI). +set_proc_trace_events(PTE, CI, + CI ^ code_info_persistent ^ cip_proc_trace_events := PTE). +set_max_temp_slot_count(TM, CI, + CI ^ code_info_persistent ^ cip_stackslot_max := TM). +set_temp_content_map(CM, CI, + CI ^ code_info_persistent ^ cip_temp_contents := CM). +set_persistent_temps(PT, CI, + CI ^ code_info_persistent ^ cip_persistent_temps := PT). +set_closure_seq_counter(CLS, CI, + CI ^ code_info_persistent ^ cip_closure_layout_seq := CLS). +set_closure_layouts(CG, CI, + CI ^ code_info_persistent ^ cip_closure_layouts := CG). +set_max_reg_in_use_at_trace(MR, MF, !CI) :- + !CI ^ code_info_persistent ^ cip_max_reg_r_used := MR, + !CI ^ code_info_persistent ^ cip_max_reg_f_used := MF. +set_created_temp_frame(MR, CI, + CI ^ code_info_persistent ^ cip_created_temp_frame := MR). +set_static_cell_info(SCI, CI, + CI ^ code_info_persistent ^ cip_static_cell_info := SCI). +set_alloc_sites(ASI, CI, + CI ^ code_info_persistent ^ cip_alloc_sites := ASI). +set_used_env_vars(UEV, CI, + CI ^ code_info_persistent ^ cip_used_env_vars := UEV). + +get_containing_goal_map_det(CI, ContainingGoalMap) :- + get_containing_goal_map(CI, MaybeContainingGoalMap), + ( + MaybeContainingGoalMap = yes(ContainingGoalMap) + ; + MaybeContainingGoalMap = no, + unexpected($module, $pred, "no map") + ). + +add_out_of_line_code(NewCode, !CI) :- + Code0 = !.CI ^ code_info_persistent ^ cip_out_of_line_code, + Code = Code0 ++ NewCode, + !CI ^ code_info_persistent ^ cip_out_of_line_code := Code. + +get_out_of_line_code(CI, CI ^ code_info_persistent ^ cip_out_of_line_code). + +%---------------------------------------------------------------------------% +%---------------------------------------------------------------------------% + + % Submodule for simple wrappers around access predicates. + +:- interface. + + % Get the hlds mapping from variables to stack slots + % +:- pred get_stack_slots(code_info::in, stack_slots::out) is det. + + % Get the table that contains advice about where + % variables should be put. + % +:- pred get_follow_var_map(code_info::in, abs_follow_vars_map::out) is det. + + % Get the integer that gives the number of the next + % non-reserved register. + % +:- pred get_next_non_reserved(code_info::in, reg_type::in, int::out) is det. + + % Set the table that contains advice about where + % variables should be put. +:- pred set_follow_vars(abs_follow_vars::in, + code_info::in, code_info::out) is det. + + % pre_goal_update(GoalInfo, HasSubGoal, OldCodeInfo, NewCodeInfo) + % updates OldCodeInfo to produce NewCodeInfo with the changes + % specified by GoalInfo. + % +:- pred pre_goal_update(hlds_goal_info::in, has_subgoals::in, + code_info::in, code_info::out) is det. + + % post_goal_update(GoalInfo, OldCodeInfo, NewCodeInfo) + % updates OldCodeInfo to produce NewCodeInfo with the changes described + % by GoalInfo. + % +:- pred post_goal_update(hlds_goal_info::in, + code_info::in, code_info::out) is det. + + % Find out whether the body of the current procedure should use + % typeinfo liveness. + % +:- func body_typeinfo_liveness(code_info) = bool. + + % Find out the type of the given variable. + % +:- func variable_type(code_info, prog_var) = mer_type. + +:- func variable_is_of_dummy_type(code_info, prog_var) = is_dummy_type. + + % Compute the principal type constructor of the given type, and return the + % definition of this type constructor, if it has one (some type + % constructors are built in, and some are hidden behind abstraction + % barriers). + % +:- pred search_type_defn(code_info::in, mer_type::in, hlds_type_defn::out) is + semidet. + + % Compute the principal type constructor of the given type, and return the + % definition of this type constructor. Abort if it doesn't have a + % definition (e.g. because it is a builtin). + % +:- func lookup_type_defn(code_info, mer_type) = hlds_type_defn. + +:- func lookup_cheaper_tag_test(code_info, mer_type) = maybe_cheaper_tag_test. + +:- func filter_region_vars(code_info, set_of_progvar) = set_of_progvar. + + % Get the code model of the current procedure. + % +:- func get_proc_model(code_info) = code_model. + + % Get the list of the head variables of the current procedure. + % +:- func get_headvars(code_info) = list(prog_var). + + % Get the call argument information for the current procedure + % +:- func get_arginfo(code_info) = list(arg_info). + + % Get the call argument info for a given mode of a given predicate + % +:- func get_pred_proc_arginfo(code_info, pred_id, proc_id) = list(arg_info). + + % Get the set of variables currently needed by the resume + % points of enclosing goals. + % +:- func current_resume_point_vars(code_info) = set_of_progvar. + +:- func variable_name(code_info, prog_var) = string. + + % Create a code address which holds the address of the specified + % procedure. + % The fourth argument should be `no' if the the caller wants the + % returned address to be valid from everywhere in the program. + % If being valid from within the current procedure is enough, + % this argument should be `yes' wrapped around the value of the + % --procs-per-c-function option and the current procedure id. + % Using an address that is only valid from within the current + % procedure may make jumps more efficient. + % + % If the procs_per_c_function option tells us to put more than one + % procedure into each C function, but not all procedures in the module + % are in one function, then we would like to be able to use the + % fast form of reference to a procedure for references not only from + % within the same procedure but also from other procedures within + % the same C function. However, at the time of code generation, + % we do not yet know which procedures will be put into the same + % C functions, and so we cannot do this. + % +:- func make_proc_entry_label(code_info, module_info, pred_id, proc_id, bool) + = code_addr. + + % Generate the next local label in sequence. + % +:- pred get_next_label(label::out, code_info::in, code_info::out) + is det. + + % Note that the succip slot is used, and thus cannot be optimized away. + % +:- pred succip_is_used(code_info::in, code_info::out) is det. + +:- pred add_trace_layout_for_label(label::in, term.context::in, trace_port::in, + bool::in, forward_goal_path::in, maybe(user_event_info)::in, + layout_label_info::in, code_info::in, code_info::out) is det. + +:- pred get_cur_proc_label(code_info::in, proc_label::out) is det. + +:- pred get_next_closure_seq_no(int::out, + code_info::in, code_info::out) is det. + +:- pred add_closure_layout(closure_proc_id_data::in, + code_info::in, code_info::out) is det. + +:- pred add_threadscope_string(string::in, int::out, + code_info::in, code_info::out) is det. + +:- pred get_threadscope_rev_string_table(code_info::in, + list(string)::out, int::out) is det. + +:- pred add_scalar_static_cell(list(typed_rval)::in, + data_id::out, code_info::in, code_info::out) is det. + +:- pred add_scalar_static_cell_natural_types(list(rval)::in, + data_id::out, code_info::in, code_info::out) is det. + +:- pred add_vector_static_cell(list(llds_type)::in, list(list(rval))::in, + data_id::out, code_info::in, code_info::out) is det. + +:- pred add_alloc_site_info(prog_context::in, string::in, int::in, + alloc_site_id::out, code_info::in, code_info::out) is det. + +%---------------------------------------------------------------------------% + +:- implementation. + +:- pred add_resume_layout_for_label(label::in, + layout_label_info::in, code_info::in, code_info::out) is det. + +get_stack_slots(CI, StackSlots) :- + get_var_locn_info(CI, VarLocnInfo), + var_locn_get_stack_slots(VarLocnInfo, StackSlots). + +get_follow_var_map(CI, FollowVarMap) :- + get_var_locn_info(CI, VarLocnInfo), + var_locn_get_follow_var_map(VarLocnInfo, FollowVarMap). + +get_next_non_reserved(CI, RegType, NextNonReserved) :- + get_var_locn_info(CI, VarLocnInfo), + var_locn_get_next_non_reserved(VarLocnInfo, RegType, NextNonReserved). + +set_follow_vars(FollowVars, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + var_locn_set_follow_vars(FollowVars, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +%-----------------------------------------------------------------------------% + +pre_goal_update(GoalInfo, HasSubGoals, !CI) :- + % The liveness pass puts resume_point annotations on some kinds + % of goals. The parts of the code generator that handle those kinds + % of goals should handle the resume point annotation as well; + % when they do, they remove the annotation. The following code + % is a sanity check to make sure that this has in fact been done. + goal_info_get_resume_point(GoalInfo, ResumePoint), + ( + ResumePoint = no_resume_point + ; + ResumePoint = resume_point(_, _), + unexpected($module, $pred, "pre_goal_update with resume point") + ), + goal_info_get_follow_vars(GoalInfo, MaybeFollowVars), + ( + MaybeFollowVars = yes(FollowVars), + set_follow_vars(FollowVars, !CI) + ; + MaybeFollowVars = no + ), + % NOTE: we must be careful to apply deaths before births + goal_info_get_pre_deaths(GoalInfo, PreDeaths), + rem_forward_live_vars(PreDeaths, !CI), + maybe_make_vars_forward_dead(PreDeaths, no, !CI), + goal_info_get_pre_births(GoalInfo, PreBirths), + add_forward_live_vars(PreBirths, !CI), + ( + HasSubGoals = does_not_have_subgoals, + goal_info_get_post_deaths(GoalInfo, PostDeaths), + rem_forward_live_vars(PostDeaths, !CI) + ; + HasSubGoals = has_subgoals + ). + +post_goal_update(GoalInfo, !CI) :- + % note: we must be careful to apply deaths before births + goal_info_get_post_deaths(GoalInfo, PostDeaths), + rem_forward_live_vars(PostDeaths, !CI), + maybe_make_vars_forward_dead(PostDeaths, no, !CI), + goal_info_get_post_births(GoalInfo, PostBirths), + add_forward_live_vars(PostBirths, !CI), + make_vars_forward_live(PostBirths, !CI), + InstMapDelta = goal_info_get_instmap_delta(GoalInfo), + get_instmap(!.CI, InstMap0), + instmap.apply_instmap_delta(InstMap0, InstMapDelta, InstMap), + set_instmap(InstMap, !CI). + +%---------------------------------------------------------------------------% + +body_typeinfo_liveness(CI) = TypeInfoLiveness :- + get_module_info(CI, ModuleInfo), + get_pred_id(CI, PredId), + module_info_pred_info(ModuleInfo, PredId, PredInfo), + get_globals(CI, Globals), + body_should_use_typeinfo_liveness(PredInfo, Globals, TypeInfoLiveness). + +get_var_types(CI) = VarTypes :- + get_proc_info(CI, ProcInfo), + proc_info_get_vartypes(ProcInfo, VarTypes). + +variable_type(CI, Var) = Type :- + lookup_var_type(get_var_types(CI), Var, Type). + +variable_is_of_dummy_type(CI, Var) = IsDummy :- + VarType = variable_type(CI, Var), + get_module_info(CI, ModuleInfo), + IsDummy = check_dummy_type(ModuleInfo, VarType). + +search_type_defn(CI, Type, TypeDefn) :- + get_module_info(CI, ModuleInfo), + type_to_ctor_det(Type, TypeCtor), + module_info_get_type_table(ModuleInfo, TypeTable), + search_type_ctor_defn(TypeTable, TypeCtor, TypeDefn). + +lookup_type_defn(CI, Type) = TypeDefn :- + ( search_type_defn(CI, Type, TypeDefnPrime) -> + TypeDefn = TypeDefnPrime + ; + unexpected($module, $pred, "type ctor has no definition") + ). + +lookup_cheaper_tag_test(CI, Type) = CheaperTagTest :- + ( + search_type_defn(CI, Type, TypeDefn), + get_type_defn_body(TypeDefn, TypeBody), + TypeBody = hlds_du_type(_, _, CheaperTagTestPrime, _, _, _, _, _, _) + -> + CheaperTagTest = CheaperTagTestPrime + ; + CheaperTagTest = no_cheaper_tag_test + ). + +filter_region_vars(CI, ForwardLiveVarsBeforeGoal) = RegionVars :- + VarTypes = code_info.get_var_types(CI), + RegionVars = set_of_var.filter(is_region_var(VarTypes), + ForwardLiveVarsBeforeGoal). + +%---------------------------------------------------------------------------% + +get_proc_model(CI) = CodeModel :- + get_proc_info(CI, ProcInfo), + CodeModel = proc_info_interface_code_model(ProcInfo). + +get_headvars(CI) = HeadVars :- + get_module_info(CI, ModuleInfo), + get_pred_id(CI, PredId), + get_proc_id(CI, ProcId), + module_info_pred_proc_info(ModuleInfo, PredId, ProcId, _, ProcInfo), + proc_info_get_headvars(ProcInfo, HeadVars). + +get_arginfo(CI) = ArgInfo :- + get_pred_id(CI, PredId), + get_proc_id(CI, ProcId), + ArgInfo = get_pred_proc_arginfo(CI, PredId, ProcId). + +get_pred_proc_arginfo(CI, PredId, ProcId) = ArgInfo :- + get_module_info(CI, ModuleInfo), + module_info_pred_proc_info(ModuleInfo, PredId, ProcId, _, ProcInfo), + proc_info_arg_info(ProcInfo, ArgInfo). + +current_resume_point_vars(CI) = ResumeVars :- + get_fail_info(CI, FailInfo), + FailInfo = fail_info(ResumePointStack, _, _, _, _), + stack.det_top(ResumePointStack, ResumePointInfo), + pick_first_resume_point(ResumePointInfo, ResumeMap, _), + map.keys(ResumeMap, ResumeMapVarList), + ResumeVars = set_of_var.list_to_set(ResumeMapVarList). + +variable_name(CI, Var) = Name :- + get_varset(CI, Varset), + varset.lookup_name(Varset, Var, Name). + +%---------------------------------------------------------------------------% + +make_proc_entry_label(CI, ModuleInfo, PredId, ProcId, Immed0) = CodeAddr :- + ( + Immed0 = no, + Immed = no + ; + Immed0 = yes, + get_globals(CI, Globals), + globals.lookup_int_option(Globals, procs_per_c_function, ProcsPerFunc), + get_pred_id(CI, CurPredId), + get_proc_id(CI, CurProcId), + Immed = yes(ProcsPerFunc - proc(CurPredId, CurProcId)) + ), + CodeAddr = make_entry_label(ModuleInfo, PredId, ProcId, Immed). + +get_next_label(Label, !CI) :- + get_cur_proc_label(!.CI, ProcLabel), + get_label_counter(!.CI, C0), + counter.allocate(N, C0, C), + set_label_counter(C, !CI), + Label = internal_label(N, ProcLabel). + +succip_is_used(!CI) :- + set_succip_used(yes, !CI). + +add_trace_layout_for_label(Label, Context, Port, IsHidden, GoalPath, + MaybeSolverEventInfo, Layout, !CI) :- + get_layout_info(!.CI, Internals0), + Exec = yes(trace_port_layout_info(Context, Port, IsHidden, GoalPath, + MaybeSolverEventInfo, Layout)), + ( + Label = internal_label(LabelNum, _) + ; + Label = entry_label(_, _), + unexpected($module, $pred, "entry") + ), + ( map.search(Internals0, LabelNum, Internal0) -> + Internal0 = internal_layout_info(Exec0, Resume, Return), + ( + Exec0 = no + ; + Exec0 = yes(_), + unexpected($module, $pred, "already known label") + ), + Internal = internal_layout_info(Exec, Resume, Return), + map.det_update(LabelNum, Internal, Internals0, Internals) + ; + Internal = internal_layout_info(Exec, no, no), + map.det_insert(LabelNum, Internal, Internals0, Internals) + ), + set_layout_info(Internals, !CI). + +add_resume_layout_for_label(Label, LayoutInfo, !CI) :- + get_layout_info(!.CI, Internals0), + Resume = yes(LayoutInfo), + ( + Label = internal_label(LabelNum, _) + ; + Label = entry_label(_, _), + unexpected($module, $pred, "entry") + ), + ( map.search(Internals0, LabelNum, Internal0) -> + Internal0 = internal_layout_info(Exec, Resume0, Return), + ( + Resume0 = no + ; + Resume0 = yes(_), + unexpected($module, $pred, "already known label") + ), + Internal = internal_layout_info(Exec, Resume, Return), + map.det_update(LabelNum, Internal, Internals0, Internals) + ; + Internal = internal_layout_info(no, Resume, no), + map.det_insert(LabelNum, Internal, Internals0, Internals) + ), + set_layout_info(Internals, !CI). + +:- pred get_active_temps_data(code_info::in, + assoc_list(lval, slot_contents)::out) is det. + +get_active_temps_data(CI, Temps) :- + get_temps_in_use(CI, TempsInUse), + get_temp_content_map(CI, TempContentMap), + map.select(TempContentMap, TempsInUse, TempsInUseContentMap), + map.to_assoc_list(TempsInUseContentMap, Temps). + +get_cur_proc_label(CI, ProcLabel) :- + ProcLabel = CI ^ code_info_static ^ cis_proc_label. + +get_next_closure_seq_no(SeqNo, !CI) :- + get_closure_seq_counter(!.CI, C0), + counter.allocate(SeqNo, C0, C), + set_closure_seq_counter(C, !CI). + +add_closure_layout(ClosureLayout, !CI) :- + get_closure_layouts(!.CI, ClosureLayouts), + set_closure_layouts([ClosureLayout | ClosureLayouts], !CI). + +add_threadscope_string(String, SlotNum, !CI) :- + Size0 = !.CI ^ code_info_persistent ^ cip_ts_string_table_size, + RevTable0 = !.CI ^ code_info_persistent ^ cip_ts_rev_string_table, + SlotNum = Size0, + Size = Size0 + 1, + RevTable = [String | RevTable0], + !CI ^ code_info_persistent ^ cip_ts_string_table_size := Size, + !CI ^ code_info_persistent ^ cip_ts_rev_string_table := RevTable. + +get_threadscope_rev_string_table(CI, RevTable, TableSize) :- + RevTable = CI ^ code_info_persistent ^ cip_ts_rev_string_table, + TableSize = CI ^ code_info_persistent ^ cip_ts_string_table_size. + +add_scalar_static_cell(RvalsTypes, DataAddr, !CI) :- + get_static_cell_info(!.CI, StaticCellInfo0), + global_data.add_scalar_static_cell(RvalsTypes, DataAddr, + StaticCellInfo0, StaticCellInfo), + set_static_cell_info(StaticCellInfo, !CI). + +add_scalar_static_cell_natural_types(Rvals, DataAddr, !CI) :- + get_static_cell_info(!.CI, StaticCellInfo0), + global_data.add_scalar_static_cell_natural_types(Rvals, DataAddr, + StaticCellInfo0, StaticCellInfo), + set_static_cell_info(StaticCellInfo, !CI). + +add_vector_static_cell(Types, Vector, DataAddr, !CI) :- + get_static_cell_info(!.CI, StaticCellInfo0), + global_data.add_vector_static_cell(Types, Vector, DataAddr, + StaticCellInfo0, StaticCellInfo), + set_static_cell_info(StaticCellInfo, !CI). + +add_alloc_site_info(Context, Type, Size, AllocId, !CI) :- + get_cur_proc_label(!.CI, ProcLabel), + AllocSite = alloc_site_info(ProcLabel, Context, Type, Size), + AllocId = alloc_site_id(AllocSite), + get_alloc_sites(!.CI, AllocSites0), + set_tree234.insert(AllocSite, AllocSites0, AllocSites), + set_alloc_sites(AllocSites, !CI). + +%---------------------------------------------------------------------------% +%---------------------------------------------------------------------------% + + % Submodule for handling branched control structures. + +:- interface. + +:- type position_info. +:- type branch_end_info. + +:- type branch_end == maybe(branch_end_info). + +:- pred remember_position(code_info::in, position_info::out) is det. + +:- pred reset_to_position(position_info::in, + code_info::in, code_info::out) is det. + +:- pred reset_resume_known(position_info::in, + code_info::in, code_info::out) is det. + +:- pred generate_branch_end(abs_store_map::in, branch_end::in, branch_end::out, + llds_code::out, code_info::in, code_info::out) is det. + +:- pred after_all_branches(abs_store_map::in, branch_end::in, + code_info::in, code_info::out) is det. + +:- pred save_hp_in_branch(llds_code::out, lval::out, + position_info::in, position_info::out, code_info::in, code_info::out) + is det. + +:- implementation. + +:- type position_info + ---> position_info( + % The location-dependent part of the code_info + % at a given position. + code_info_loc_dep + ). + +:- type branch_end_info + ---> branch_end_info( + % The code_info at the end of a branch. + code_info + ). + +:- func pos_get_fail_info(position_info) = fail_info. + +pos_get_fail_info(position_info(LocDep)) = LocDep ^ cild_fail_info. + +remember_position(CI, position_info(CI ^ code_info_loc_dep)). + +reset_to_position(position_info(LocDep), CurCI, NextCI) :- + CurCI = code_info(Static, _, Persistent), + NextCI0 = code_info(Static, LocDep, Persistent), + + get_persistent_temps(NextCI0, PersistentTemps), + get_temps_in_use(NextCI0, TempsInUse0), + set.union(PersistentTemps, TempsInUse0, TempsInUse), + set_temps_in_use(TempsInUse, NextCI0, NextCI). + +reset_resume_known(BranchStart, !CI) :- + BranchStartFailInfo = pos_get_fail_info(BranchStart), + BranchStartFailInfo = fail_info(_, BSResumeKnown, _, _, _), + get_fail_info(!.CI, CurFailInfo), + CurFailInfo = fail_info(CurFailStack, _, CurCurfMaxfr, CurCondEnv, + CurHijack), + NewFailInfo = fail_info(CurFailStack, BSResumeKnown, CurCurfMaxfr, + CurCondEnv, CurHijack), + set_fail_info(NewFailInfo, !CI). + +generate_branch_end(StoreMap, MaybeEnd0, MaybeEnd, Code, !CI) :- + % The code generator generates better code if it knows in advance where + % each variable should go. We don't need to reset the follow_vars + % afterwards, since every goal following a branched control structure + % must in any case be annotated with its own follow_var set. + map.to_assoc_list(StoreMap, AbsVarLocs), + assoc_list.values(AbsVarLocs, AbsLocs), + code_util.max_mentioned_abs_regs(AbsLocs, MaxRegR, MaxRegF), + set_follow_vars(abs_follow_vars(StoreMap, MaxRegR + 1, MaxRegF + 1), !CI), + get_instmap(!.CI, InstMap), + ( instmap_is_reachable(InstMap) -> + VarLocs = assoc_list.map_values_only(abs_locn_to_lval, AbsVarLocs), + place_vars(VarLocs, Code, !CI) + ; + % With --opt-no-return-call, the variables that we would have + % saved across a call that cannot return have had the last + % of their code generation state destroyed, so calling + % place_vars would cause a code generator abort. However, + % pretending that all the variables are where the store map + % says they should be is perfectly fine, since we can never + % reach the end of *this* branch anyway. + remake_with_store_map(StoreMap, !CI), + Code = empty + ), + EndCodeInfo1 = !.CI, + ( + MaybeEnd0 = no, + MaybeEnd = yes(branch_end_info(EndCodeInfo1)) + ; + MaybeEnd0 = yes(branch_end_info(EndCodeInfo0)), + + % Make sure the left context we leave the branched structure with + % is valid for all branches. + get_fail_info(EndCodeInfo0, FailInfo0), + get_fail_info(EndCodeInfo1, FailInfo1), + FailInfo0 = fail_info(_, ResumeKnown0, CurfrMaxfr0, CondEnv0, Hijack0), + FailInfo1 = fail_info(R, ResumeKnown1, CurfrMaxfr1, CondEnv1, Hijack1), + ( + ResumeKnown0 = resume_point_known(Redoip0), + ResumeKnown1 = resume_point_known(Redoip1) + -> + ResumeKnown = resume_point_known(Redoip0), + expect(unify(Redoip0, Redoip1), $module, $pred, "redoip mismatch") + ; + ResumeKnown = resume_point_unknown + ), + ( + CurfrMaxfr0 = must_be_equal, + CurfrMaxfr1 = must_be_equal + -> + CurfrMaxfr = must_be_equal + ; + CurfrMaxfr = may_be_different + ), + ( + Hijack0 = allowed, + Hijack1 = allowed + -> + Hijack = allowed + ; + Hijack = not_allowed + ), + expect(unify(CondEnv0, CondEnv1), $module, $pred, + "some but not all branches inside a non condition"), + FailInfo = fail_info(R, ResumeKnown, CurfrMaxfr, CondEnv0, Hijack), + set_fail_info(FailInfo, EndCodeInfo1, EndCodeInfoA), + + % Make sure the "temps in use" set at the end of the branched control + % structure includes every slot in use at the end of any branch. + get_temps_in_use(EndCodeInfo0, TempsInUse0), + get_temps_in_use(EndCodeInfo1, TempsInUse1), + set.union(TempsInUse0, TempsInUse1, TempsInUse), + set_temps_in_use(TempsInUse, EndCodeInfoA, EndCodeInfo), + + MaybeEnd = yes(branch_end_info(EndCodeInfo)) + ). + +after_all_branches(StoreMap, MaybeEnd, !CI) :- + ( + MaybeEnd = yes(BranchEnd), + BranchEnd = branch_end_info(BranchEndCodeInfo), + BranchEndLocDep = BranchEndCodeInfo ^ code_info_loc_dep, + reset_to_position(position_info(BranchEndLocDep), !CI), + remake_with_store_map(StoreMap, !CI) + ; + MaybeEnd = no, + unexpected($module, $pred, "no branches in branched control structure") + ). + + % remake_with_store_map throws away the var_info data structure, forgetting + % the current locations of all variables, and rebuilds it from scratch + % based on the given store map. The new var_info will know about only + % the variables present in the store map, and will believe they are + % where the store map says they are. + % +:- pred remake_with_store_map(abs_store_map::in, + code_info::in, code_info::out) is det. + +remake_with_store_map(StoreMap, !CI) :- + map.to_assoc_list(StoreMap, VarLocns), + VarLvals = assoc_list.map_values_only(abs_locn_to_lval, VarLocns), + get_var_locn_info(!.CI, VarLocnInfo0), + reinit_var_locn_state(VarLvals, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +save_hp_in_branch(Code, Slot, Pos0, Pos, CI0, CI) :- + CI0 = code_info(CIStatic0, CILocDep0, CIPersistent0), + Pos0 = position_info(LocDep0), + CI1 = code_info(CIStatic0, LocDep0, CIPersistent0), + save_hp(Code, Slot, CI1, CI2), + CI2 = code_info(CIStatic, LocDep, CIPersistent), + Pos = position_info(LocDep), + % Reset the location dependent part to the original. + CI = code_info(CIStatic, CILocDep0, CIPersistent). + +%---------------------------------------------------------------------------% +%---------------------------------------------------------------------------% + + % Submodule for the handling of failure continuations. + + % The principles underlying this submodule of code_info.m are + % documented in the file compiler/notes/failure.html, which also + % defines terms such as "quarter hijack"). Some parts of the submodule + % also require knowledge of compiler/notes/allocation.html. + +:- interface. + +:- type resume_map. + +:- type resume_point_info. + + % `prepare_for_disj_hijack' should be called before entering + % a disjunction. It saves the values of any nondet stack slots + % the disjunction may hijack, and if necessary, sets the redofr + % slot of the top frame to point to this frame. The code at the + % start of the individual disjuncts will override the redoip slot. + % + % `undo_disj_hijack' should be called before entering the last disjunct + % of a disjunction. It undoes the effects of `prepare_for_disj_hijack'. + % +:- type disj_hijack_info. + +:- pred prepare_for_disj_hijack(code_model::in, + disj_hijack_info::out, llds_code::out, + code_info::in, code_info::out) is det. + +:- pred undo_disj_hijack(disj_hijack_info::in, + llds_code::out, code_info::in, code_info::out) is det. + + % `prepare_for_ite_hijack' should be called before entering + % an if-then-else. It saves the values of any nondet stack slots + % the if-then-else may hijack, and if necessary, sets the redofr + % slot of the top frame to point to this frame. Our caller + % will then override the redoip slot to point to the start of + % the else part before generating the code of the condition. + % The maybe(lval) argument, if set to `yes', specifies the slot + % holding the success record to use in deciding whether to execute + % a region_ite_nondet_cond_fail operation at the start of the else branch. + % + % `ite_enter_then', which should be called after generating code for + % the condition, sets up the failure state of the code generator + % for generating the then-part, and returns the code sequences + % to be used at the starts of the then-part and the else-part + % to undo the effects of any hijacking. + % +:- type ite_hijack_info. + +:- pred prepare_for_ite_hijack(code_model::in, + maybe(embedded_stack_frame_id)::in, ite_hijack_info::out, llds_code::out, + code_info::in, code_info::out) is det. + +:- pred ite_enter_then(ite_hijack_info::in, resume_point_info::in, + llds_code::out, llds_code::out, code_info::in, code_info::out) is det. + + % `enter_simple_neg' and `leave_simple_neg' should be called before + % and after generating the code for a negated unification, in + % situations where failure is a direct branch. We handle this case + % specially, because it occurs frequently and should not require + % a flushing of the expression cache, whereas the general way of + % handling negations does require a flush. These two predicates + % handle all aspects of the negation except for the unification itself. + % +:- type simple_neg_info. + +:- pred enter_simple_neg(list(prog_var)::in, hlds_goal_info::in, + simple_neg_info::out, code_info::in, code_info::out) is det. + +:- pred leave_simple_neg(hlds_goal_info::in, simple_neg_info::in, + code_info::in, code_info::out) is det. + + % `prepare_for_det_commit' and `generate_det_commit' should be + % called before and after generating the code for the multi goal + % being cut across. If the goal succeeds, the commit will cut away + % any choice points generated in the goal. + % + % The set_of_progvar should be the set of variables live before + % the scope goal. + % +:- type det_commit_info. + +:- pred prepare_for_det_commit(add_trail_ops::in, add_region_ops::in, + set_of_progvar::in, hlds_goal_info::in, det_commit_info::out, + llds_code::out, code_info::in, code_info::out) is det. + +:- pred generate_det_commit(det_commit_info::in, + llds_code::out, code_info::in, code_info::out) is det. + + % `prepare_for_semi_commit' and `generate_semi_commit' should be + % called before and after generating the code for the nondet goal + % being cut across. If the goal succeeds, the commit will cut + % any choice points generated in the goal. + % + % The set_of_progvar should be the set of variables live before + % the scope goal. + % +:- type semi_commit_info. + +:- pred prepare_for_semi_commit(add_trail_ops::in, add_region_ops::in, + set_of_progvar::in, hlds_goal_info::in, semi_commit_info::out, + llds_code::out, code_info::in, code_info::out) is det. + +:- pred generate_semi_commit(semi_commit_info::in, + llds_code::out, code_info::in, code_info::out) is det. + + % Put the given resume point into effect, by pushing it on to + % the resume point stack, and if necessary generating code to + % override the redoip of the top nondet stack frame. + % +:- pred effect_resume_point(resume_point_info::in, code_model::in, + llds_code::out, code_info::in, code_info::out) is det. + +:- pred pop_resume_point(code_info::in, code_info::out) is det. + + % Return the details of the resume point currently on top of the + % failure continuation stack. + % +:- pred top_resume_point(code_info::in, resume_point_info::out) is det. + + % Call this predicate to say "we have just left a disjunction; + % we don't know what address the following code will need to + % backtrack to". + % +:- pred set_resume_point_to_unknown(code_info::in, code_info::out) is det. + + % Call this predicate to say "we have just returned from a model_non + % call; we don't know what address the following code will need to + % backtrack to, and there may now be nondet frames on top of ours + % that do not have their redofr slots pointing to our frame". + % +:- pred set_resume_point_and_frame_to_unknown(code_info::in, code_info::out) + is det. + + % Generate code for executing a failure that is appropriate for the + % current failure environment. + % +:- pred generate_failure(llds_code::out, code_info::in, code_info::out) is det. + + % Generate code that checks if the given rval is false, and if yes, + % executes a failure that is appropriate for the current failure + % environment. + % +:- pred fail_if_rval_is_false(rval::in, llds_code::out, + code_info::in, code_info::out) is det. + + % Checks whether the appropriate code for failure in the current + % failure environment is a direct branch. + % +:- pred failure_is_direct_branch(code_info::in, code_addr::out) is semidet. + + % Checks under what circumstances the current failure environment + % would allow a model_non call at this point to be turned into a + % tail call, provided of course that the return from the call is + % followed immediately by succeed(). + % +:- pred may_use_nondet_tailcall(code_info::in, nondet_tail_call::out) is det. + + % Materialize the given variables into registers or stack slots. + % +:- pred produce_vars(list(prog_var)::in, resume_map::out, llds_code::out, + code_info::in, code_info::out) is det. + + % Put the variables needed in enclosing failure continuations + % into their stack slots. + % +:- pred flush_resume_vars_to_stack(llds_code::out, + code_info::in, code_info::out) is det. + + % Set up the resume_point_info structure. + % The ResumeVars passed as the first arguments should be a sorted list + % without duplicates. + % +:- pred make_resume_point(list(prog_var)::in, resume_locs::in, resume_map::in, + resume_point_info::out, code_info::in, code_info::out) is det. + + % Generate the code for a resume point. + % +:- pred generate_resume_point(resume_point_info::in, llds_code::out, + code_info::in, code_info::out) is det. + + % List the variables that need to be preserved for the given resume point. + % +:- pred resume_point_vars(resume_point_info::in, list(prog_var)::out) is det. + + % See whether the given resume point includes a code address that presumes + % all the resume point variables to be in their stack slots. If yes, + % return that code address; otherwise, abort the compiler. + % +:- pred resume_point_stack_addr(resume_point_info::in, code_addr::out) is det. + +%---------------------------------------------------------------------------% + +:- implementation. + + % The part of the code generator state that says how to handle + % failures; also called the failure continuation stack. + +:- type fail_info + ---> fail_info( + stack(resume_point_info), + resume_point_known, + curfr_vs_maxfr, + condition_env, + hijack_allowed + ). + + % A resumption point has one or two labels associated with it. + % Backtracking can arrive at either label. The code following + % each label will assume that the variables needed at the resumption + % point are in the locations given by the resume_map associated with + % the given label and nowhere else. Any code that can cause + % backtracking to a label must make sure that those variables are + % in the positions expected by the label. + % + % The only time when a code_addr in a resume_point info is not a label + % is when the code_addr is do_redo or do_fail, which indicate that + % the resumption point is either unknown or not in (this invocation of) + % this procedure. + % +:- type resume_point_info + ---> orig_only(resume_map, code_addr) + ; stack_only(resume_map, code_addr) + ; orig_and_stack(resume_map, code_addr, resume_map, code_addr) + ; stack_and_orig(resume_map, code_addr, resume_map, code_addr). + + % A resume map maps the variables that will be needed at a resumption + % point to the locations in which they will be. + % +:- type resume_map == map(prog_var, set(lval)). + +:- type redoip_update + ---> has_been_done + ; wont_be_done. + +:- type resume_point_known + ---> resume_point_known(redoip_update) + ; resume_point_unknown. + +:- type curfr_vs_maxfr + ---> must_be_equal + ; may_be_different. + +:- type condition_env + ---> inside_non_condition + ; not_inside_non_condition. + +:- type hijack_allowed + ---> allowed + ; not_allowed. + +%---------------------------------------------------------------------------% + +:- type disj_hijack_info + ---> disj_no_hijack + ; disj_temp_frame + ; disj_quarter_hijack + ; disj_half_hijack( + % The stack slot in which we saved the value + % of the hijacked redoip. + lval + ) + ; disj_full_hijack( + % The stack slot in which we saved the value + % of the hijacked redoip. + lval, + + % The stack slot in which we saved the value + % of the hijacked redofr. + lval + ). + +prepare_for_disj_hijack(CodeModel, HijackInfo, Code, !CI) :- + get_fail_info(!.CI, FailInfo), + FailInfo = fail_info(ResumePoints, ResumeKnown, CurfrMaxfr, CondEnv, + Allow), + ( + ( CodeModel = model_det + ; CodeModel = model_semi + ), + HijackInfo = disj_no_hijack, + Code = singleton( + llds_instr(comment("disj no hijack"), "") + ) + ; + CodeModel = model_non, + ( + CondEnv = inside_non_condition, + HijackInfo = disj_temp_frame, + create_temp_frame(do_fail, "prepare for disjunction", Code, !CI) + ; + CondEnv = not_inside_non_condition, + ( + Allow = not_allowed, + ( + CurfrMaxfr = must_be_equal, + ResumeKnown = resume_point_known(has_been_done), + stack.pop(TopResumePoint, ResumePoints, RestResumePoints), + stack.is_empty(RestResumePoints), + TopResumePoint = stack_only(_, do_fail) + -> + HijackInfo = disj_quarter_hijack, + Code = singleton( + llds_instr(comment("disj quarter hijack of do_fail"), + "") + ) + ; + HijackInfo = disj_temp_frame, + create_temp_frame(do_fail, "prepare for disjunction", Code, + !CI) + ) + ; + Allow = allowed, + ( + CurfrMaxfr = must_be_equal, + ( + ResumeKnown = resume_point_known(has_been_done), + HijackInfo = disj_quarter_hijack, + Code = singleton( + llds_instr(comment("disj quarter hijack"), "") + ) + ; + ( ResumeKnown = resume_point_known(wont_be_done) + ; ResumeKnown = resume_point_unknown + ), + acquire_temp_slot(slot_lval(redoip_slot(lval(curfr))), + non_persistent_temp_slot, RedoipSlot, !CI), + HijackInfo = disj_half_hijack(RedoipSlot), + Code = singleton( + llds_instr(assign(RedoipSlot, + lval(redoip_slot(lval(curfr)))), + "prepare for half disj hijack") + ) + ) + ; + CurfrMaxfr = may_be_different, + acquire_temp_slot(slot_lval(redoip_slot(lval(maxfr))), + non_persistent_temp_slot, RedoipSlot, !CI), + acquire_temp_slot(slot_lval(redofr_slot(lval(maxfr))), + non_persistent_temp_slot, RedofrSlot, !CI), + HijackInfo = disj_full_hijack(RedoipSlot, RedofrSlot), + Code = from_list([ + llds_instr( + assign(RedoipSlot, lval(redoip_slot(lval(maxfr)))), + "prepare for full disj hijack"), + llds_instr( + assign(RedofrSlot, lval(redofr_slot(lval(maxfr)))), + "prepare for full disj hijack"), + llds_instr( + assign(redofr_slot(lval(maxfr)), lval(curfr)), + "prepare for full disj hijack") + ]) + ) + ) + ) + ). + +undo_disj_hijack(HijackInfo, Code, !CI) :- + get_fail_info(!.CI, FailInfo0), + FailInfo0 = fail_info(ResumePoints, ResumeKnown, CurfrMaxfr, CondEnv, + Allow), + ( + HijackInfo = disj_no_hijack, + Code = empty + ; + HijackInfo = disj_temp_frame, + Code = singleton( + llds_instr(assign(maxfr, lval(prevfr_slot(lval(maxfr)))), + "restore maxfr for temp frame disj") + ) + ; + HijackInfo = disj_quarter_hijack, + expect(unify(CurfrMaxfr, must_be_equal), $module, $pred, + "maxfr may differ from curfr in disj_quarter_hijack"), + stack.det_top(ResumePoints, ResumePoint), + pick_stack_resume_point(ResumePoint, _, StackLabel), + LabelConst = const(llconst_code_addr(StackLabel)), + % peephole.m looks for the "curfr==maxfr" pattern in the comment. + Code = singleton( + llds_instr(assign(redoip_slot(lval(curfr)), LabelConst), + "restore redoip for quarter disj hijack (curfr==maxfr)") + ) + ; + HijackInfo = disj_half_hijack(RedoipSlot), + expect(unify(ResumeKnown, resume_point_unknown), $module, $pred, + "resume point known in disj_half_hijack"), + expect(unify(CurfrMaxfr, must_be_equal), $module, $pred, + "maxfr may differ from curfr in disj_half_hijack"), + % peephole.m looks for the "curfr==maxfr" pattern in the comment. + Code = singleton( + llds_instr(assign(redoip_slot(lval(curfr)), lval(RedoipSlot)), + "restore redoip for half disj hijack (curfr==maxfr)") + ) + ; + HijackInfo = disj_full_hijack(RedoipSlot, RedofrSlot), + expect(unify(CurfrMaxfr, may_be_different), $module, $pred, + "maxfr same as curfr in disj_full_hijack"), + Code = from_list([ + llds_instr(assign(redoip_slot(lval(maxfr)), lval(RedoipSlot)), + "restore redoip for full disj hijack"), + llds_instr(assign(redofr_slot(lval(maxfr)), lval(RedofrSlot)), + "restore redofr for full disj hijack") + ]) + ), + ( + % HijackInfo \= disj_no_hijack if and only if the disjunction + % is model_non. + HijackInfo \= disj_no_hijack, + CondEnv = inside_non_condition + -> + FailInfo = fail_info(ResumePoints, resume_point_unknown, CurfrMaxfr, + CondEnv, Allow), + set_fail_info(FailInfo, !CI) + ; + true + ). + +%---------------------------------------------------------------------------% + + % For model_non if-then-elses, we need to clean up the embedded stack frame + % we create for the if-then-else when the condition fails after succeeding. + % For such if-then-elses, we record the id of the embedded frame we need to + % clean up, and the id of the slot that is initialized to false, and set to + % true each time the condition succeeds. +:- type ite_region_info + ---> ite_region_info( + embedded_stack_frame_id, + lval + ). + +:- type ite_hijack_info + ---> ite_info( + resume_point_known, + condition_env, + ite_hijack_type, + maybe(ite_region_info) + ). + +:- type ite_hijack_type + ---> ite_no_hijack + ; ite_temp_frame( + % The stack slot in which we saved the value of maxfr. + lval + ) + ; ite_quarter_hijack + ; ite_half_hijack( + % The stack slot in which we saved the value + % of the hijacked redoip. + lval + ) + ; ite_full_hijack( + % The stack slot in which we saved the value + % of the hijacked redoip. + lval, + + % The stack slot in which we saved the value + % of the hijacked redofr. + lval, + + % The stack slot in which we saved the value of maxfr. + lval + ). + +prepare_for_ite_hijack(CondCodeModel, MaybeEmbeddedFrameId, HijackInfo, Code, + !CI) :- + get_fail_info(!.CI, FailInfo), + FailInfo = fail_info(_, ResumeKnown, CurfrMaxfr, CondEnv, Allow), + ( + % It is possible for a negated goal (which is the "Condition" of the + % equivalent if-then-else) to be det, if it is also impure. + ( CondCodeModel = model_det + ; CondCodeModel = model_semi + ), + expect(unify(MaybeEmbeddedFrameId, no), $module, $pred, + "MaybeEmbeddedFrameId in model_semi"), + HijackType = ite_no_hijack, + Code = singleton( + llds_instr(comment("ite no hijack"), "") + ), + MaybeRegionInfo = no + ; + CondCodeModel = model_non, + ( + ( Allow = not_allowed + ; CondEnv = inside_non_condition + ; MaybeEmbeddedFrameId = yes(_) + ) + -> + acquire_temp_slot(slot_lval(maxfr), non_persistent_temp_slot, + MaxfrSlot, !CI), + HijackType = ite_temp_frame(MaxfrSlot), + create_temp_frame(do_fail, "prepare for ite", TempFrameCode, !CI), + MaxfrCode = singleton( + llds_instr(assign(MaxfrSlot, lval(maxfr)), "prepare for ite") + ), + ( + MaybeEmbeddedFrameId = yes(EmbeddedFrameId), + % Note that this slot is intentionally not released anywhere. + acquire_temp_slot(slot_success_record, persistent_temp_slot, + SuccessRecordSlot, !CI), + InitSuccessCode = singleton( + llds_instr( + assign(SuccessRecordSlot, const(llconst_false)), + "record no success of the condition yes") + ), + MaybeRegionInfo = + yes(ite_region_info(EmbeddedFrameId, SuccessRecordSlot)) + ; + MaybeEmbeddedFrameId = no, + InitSuccessCode = empty, + MaybeRegionInfo = no + ), + Code = TempFrameCode ++ MaxfrCode ++ InitSuccessCode + ; + ( + CurfrMaxfr = must_be_equal, + ( + ResumeKnown = resume_point_known(_), + HijackType = ite_quarter_hijack, + Code = singleton( + llds_instr(comment("ite quarter hijack"), "") + ) + ; + ResumeKnown = resume_point_unknown, + acquire_temp_slot(slot_lval(redoip_slot(lval(curfr))), + non_persistent_temp_slot, RedoipSlot, !CI), + HijackType = ite_half_hijack(RedoipSlot), + Code = singleton( + llds_instr( + assign(RedoipSlot, lval(redoip_slot(lval(curfr)))), + "prepare for half ite hijack") + ) + ) + ; + CurfrMaxfr = may_be_different, + acquire_temp_slot(slot_lval(redoip_slot(lval(maxfr))), + non_persistent_temp_slot, RedoipSlot, !CI), + acquire_temp_slot(slot_lval(redofr_slot(lval(maxfr))), + non_persistent_temp_slot, RedofrSlot, !CI), + acquire_temp_slot(slot_lval(maxfr), + non_persistent_temp_slot, MaxfrSlot, !CI), + HijackType = ite_full_hijack(RedoipSlot, RedofrSlot, + MaxfrSlot), + Code = from_list([ + llds_instr( + assign(MaxfrSlot, lval(maxfr)), + "prepare for full ite hijack"), + llds_instr( + assign(RedoipSlot, lval(redoip_slot(lval(maxfr)))), + "prepare for full ite hijack"), + llds_instr( + assign(RedofrSlot, lval(redofr_slot(lval(maxfr)))), + "prepare for full ite hijack"), + llds_instr( + assign(redofr_slot(lval(maxfr)), lval(curfr)), + "prepare for full ite hijack") + ]) + ), + MaybeRegionInfo = no + ), + inside_non_condition(!CI) + ), + HijackInfo = ite_info(ResumeKnown, CondEnv, HijackType, MaybeRegionInfo). + +ite_enter_then(HijackInfo, ITEResumePoint, ThenCode, ElseCode, !CI) :- + get_fail_info(!.CI, FailInfo0), + FailInfo0 = fail_info(ResumePoints0, ResumeKnown0, CurfrMaxfr, _, Allow), + stack.det_pop(_, ResumePoints0, ResumePoints), + HijackInfo = ite_info(HijackResumeKnown, OldCondEnv, HijackType, + MaybeRegionInfo), + ( + HijackType = ite_no_hijack, + expect(unify(MaybeRegionInfo, no), $module, $pred, + "MaybeRegionInfo ite_no_hijack"), + ThenCode = empty, + ElseCode = empty + ; + HijackType = ite_temp_frame(MaxfrSlot), + ( + MaybeRegionInfo = no, + ThenCode = singleton( + % We can't remove the frame, it may not be on top. + llds_instr(assign(redoip_slot(lval(MaxfrSlot)), + const(llconst_code_addr(do_fail))), + "soft cut for temp frame ite") + ), + ElseCode = singleton( + % XXX search for assignments to maxfr + llds_instr(assign(maxfr, lval(prevfr_slot(lval(MaxfrSlot)))), + "restore maxfr for temp frame ite") + ) + ; + MaybeRegionInfo = yes(RegionInfo), + RegionInfo = ite_region_info(EmbeddedStackFrameId, + SuccessRecordSlot), + % XXX replace do_fail with ref to ResumePoint stack label + resume_point_stack_addr(ITEResumePoint, ITEStackResumeCodeAddr), + ThenCode = from_list([ + llds_instr(assign(SuccessRecordSlot, const(llconst_true)), + "record success of the condition"), + llds_instr(assign(redoip_slot(lval(MaxfrSlot)), + const(llconst_code_addr(ITEStackResumeCodeAddr))), + "redirect to cut for temp frame ite") + ]), + get_next_label(AfterRegionOp, !CI), + ElseCode = from_list([ + llds_instr(assign(maxfr, lval(prevfr_slot(lval(MaxfrSlot)))), + "restore maxfr for temp frame ite"), + llds_instr(if_val(unop(logical_not, lval(SuccessRecordSlot)), + code_label(AfterRegionOp)), + "jump around if the condition never succeeded"), + llds_instr(use_and_maybe_pop_region_frame( + region_ite_nondet_cond_fail, EmbeddedStackFrameId), + "cleanup after the post-success failure of the condition"), + llds_instr(goto(do_fail), + "the condition succeeded, so don't execute else branch"), + llds_instr(label(AfterRegionOp), + "after region op") + ]) + ) + ; + HijackType = ite_quarter_hijack, + expect(unify(MaybeRegionInfo, no), $module, $pred, + "MaybeRegionInfo ite_quarter_hijack"), + stack.det_top(ResumePoints, ResumePoint), + ( maybe_pick_stack_resume_point(ResumePoint, _, StackLabel) -> + LabelConst = const(llconst_code_addr(StackLabel)), + ThenCode = singleton( + llds_instr(assign(redoip_slot(lval(curfr)), LabelConst), + "restore redoip for quarter ite hijack") + ) + ; + % This can happen only if ResumePoint is unreachable from here. + ThenCode = empty + ), + ElseCode = ThenCode + ; + HijackType = ite_half_hijack(RedoipSlot), + expect(unify(MaybeRegionInfo, no), $module, $pred, + "MaybeRegionInfo ite_half_hijack"), + ThenCode = singleton( + llds_instr(assign(redoip_slot(lval(curfr)), lval(RedoipSlot)), + "restore redoip for half ite hijack") + ), + ElseCode = ThenCode + ; + HijackType = ite_full_hijack(RedoipSlot, RedofrSlot, MaxfrSlot), + expect(unify(MaybeRegionInfo, no), $module, $pred, + "MaybeRegionInfo ite_full_hijack"), + ThenCode = from_list([ + llds_instr(assign(redoip_slot(lval(MaxfrSlot)), lval(RedoipSlot)), + "restore redoip for full ite hijack"), + llds_instr(assign(redofr_slot(lval(MaxfrSlot)), lval(RedofrSlot)), + "restore redofr for full ite hijack") + ]), + ElseCode = from_list([ + llds_instr(assign(redoip_slot(lval(maxfr)), lval(RedoipSlot)), + "restore redoip for full ite hijack"), + llds_instr(assign(redofr_slot(lval(maxfr)), lval(RedofrSlot)), + "restore redofr for full ite hijack") + ]) + ), + ( + ResumeKnown0 = resume_point_unknown, + ResumeKnown = resume_point_unknown + ; + ResumeKnown0 = resume_point_known(_), + ResumeKnown = HijackResumeKnown + ), + FailInfo = fail_info(ResumePoints, ResumeKnown, CurfrMaxfr, OldCondEnv, + Allow), + set_fail_info(FailInfo, !CI). + +%---------------------------------------------------------------------------% + +:- type simple_neg_info == fail_info. + +enter_simple_neg(ResumeVars, GoalInfo, FailInfo0, !CI) :- + get_fail_info(!.CI, FailInfo0), + % The only reason why we push a resume point at all is to protect + % the variables in ResumeVars from becoming unknown; by including them + % in the domain of the resume point, we guarantee that they will become + % zombies instead of unknown if they die in the pre- or post-goal updates. + % Therefore the only part of ResumePoint that matters is the set of + % variables in the resume map; the other parts of ResumePoint + % (the locations, the code address) will not be referenced. + map.init(ResumeMap0), + make_fake_resume_map(ResumeVars, ResumeMap0, ResumeMap), + ResumePoint = orig_only(ResumeMap, do_redo), + effect_resume_point(ResumePoint, model_semi, Code, !CI), + expect(is_empty(Code), $module, $pred, "nonempty code for simple neg"), + pre_goal_update(GoalInfo, does_not_have_subgoals, !CI). + +leave_simple_neg(GoalInfo, FailInfo, !CI) :- + post_goal_update(GoalInfo, !CI), + set_fail_info(FailInfo, !CI). + +:- pred make_fake_resume_map(list(prog_var)::in, + map(prog_var, set(lval))::in, map(prog_var, set(lval))::out) is det. + +make_fake_resume_map([], !ResumeMap). +make_fake_resume_map([Var | Vars], !ResumeMap) :- + % A visibly fake location. + Locns = set.make_singleton_set(reg(reg_r, -1)), + map.det_insert(Var, Locns, !ResumeMap), + make_fake_resume_map(Vars, !ResumeMap). + +%---------------------------------------------------------------------------% + +:- type det_commit_info + ---> det_commit_info( + % Location of saved maxfr. + maybe(lval), + + % Location of saved ticket % counter and trail pointer. + maybe(pair(lval)), + + maybe(region_commit_stack_frame) + ). + +:- type region_commit_stack_frame + ---> region_commit_stack_frame( + % The id of the region commit stack frame, which is emdedded + % in the current procedure's stack frame, and whose layout is: + + % saved region_commit_stack_pointer + % saved region sequence number + % number of live nonprotected regions + % space reserved for the ids of live nonprotected regions + + embedded_stack_frame_id, + + % The list of temporary slots that constitute + % this embedded stack frame. + list(lval) + ). + +prepare_for_det_commit(AddTrailOps, AddRegionOps, ForwardLiveVarsBeforeGoal, + CommitGoalInfo, DetCommitInfo, Code, !CI) :- + get_fail_info(!.CI, FailInfo0), + FailInfo0 = fail_info(_, _, CurfrMaxfr, _, _), + ( + CurfrMaxfr = may_be_different, + acquire_temp_slot(slot_lval(maxfr), non_persistent_temp_slot, + MaxfrSlot, !CI), + SaveMaxfrCode = singleton( + llds_instr(save_maxfr(MaxfrSlot), "save the value of maxfr") + ), + MaybeMaxfrSlot = yes(MaxfrSlot) + ; + CurfrMaxfr = must_be_equal, + SaveMaxfrCode = empty, + MaybeMaxfrSlot = no + ), + maybe_save_trail_info(AddTrailOps, MaybeTrailSlots, SaveTrailCode, !CI), + maybe_save_region_commit_frame(AddRegionOps, ForwardLiveVarsBeforeGoal, + CommitGoalInfo, MaybeRegionCommitFrameInfo, SaveRegionCommitFrameCode, + !CI), + DetCommitInfo = det_commit_info(MaybeMaxfrSlot, MaybeTrailSlots, + MaybeRegionCommitFrameInfo), + Code = SaveMaxfrCode ++ SaveTrailCode ++ SaveRegionCommitFrameCode. + +generate_det_commit(DetCommitInfo, Code, !CI) :- + DetCommitInfo = det_commit_info(MaybeMaxfrSlot, MaybeTrailSlots, + MaybeRegionCommitFrameInfo), + ( + MaybeMaxfrSlot = yes(MaxfrSlot), + RestoreMaxfrCode = singleton( + llds_instr(restore_maxfr(MaxfrSlot), + "restore the value of maxfr - perform commit") + ), + release_temp_slot(MaxfrSlot, non_persistent_temp_slot, !CI) + ; + MaybeMaxfrSlot = no, + RestoreMaxfrCode = singleton( + llds_instr(assign(maxfr, lval(curfr)), + "restore the value of maxfr - perform commit") + ) + ), + maybe_restore_trail_info(MaybeTrailSlots, CommitTrailCode, _, !CI), + maybe_restore_region_commit_frame(MaybeRegionCommitFrameInfo, + SuccessRegionCode, _FailureRegionCode, !CI), + Code = RestoreMaxfrCode ++ CommitTrailCode ++ SuccessRegionCode. + +%---------------------------------------------------------------------------% + +:- type semi_commit_info + ---> semi_commit_info( + % Fail_info on entry. + fail_info, + + resume_point_info, + commit_hijack_info, + + % Location of saved ticket counter and trail pointer. + maybe(pair(lval)), + + maybe(region_commit_stack_frame) + ). + +:- type commit_hijack_info + ---> commit_temp_frame( + % The stack slot in which we saved the old value of maxfr. + lval, + + % Do we bracket the goal with MR_commit_mark and MR_commit_cut? + bool + ) + ; commit_quarter_hijack + ; commit_half_hijack( + % The stack slot in which we saved the value + % of the hijacked redoip. + lval + ) + ; commit_full_hijack( + % The stack slot in which we saved the value + % of the hijacked redoip. + lval, + + % The stack slot in which we saved the value + % of the hijacked redofr. + lval, + + % The stack slot in which we saved the value of maxfr. + lval + ). + +prepare_for_semi_commit(AddTrailOps, AddRegionOps, ForwardLiveVarsBeforeGoal, + CommitGoalInfo, SemiCommitInfo, Code, !CI) :- + get_fail_info(!.CI, FailInfo0), + FailInfo0 = fail_info(ResumePoints0, ResumeKnown, CurfrMaxfr, CondEnv, + Allow), + stack.det_top(ResumePoints0, TopResumePoint), + clone_resume_point(TopResumePoint, NewResumePoint, !CI), + stack.push(NewResumePoint, ResumePoints0, ResumePoints), + FailInfo = fail_info(ResumePoints, resume_point_known(has_been_done), + CurfrMaxfr, CondEnv, Allow), + set_fail_info(FailInfo, !CI), + + pick_stack_resume_point(NewResumePoint, _, StackLabel), + StackLabelConst = const(llconst_code_addr(StackLabel)), + ( + ( Allow = not_allowed ; CondEnv = inside_non_condition ) + -> + acquire_temp_slot(slot_lval(maxfr), non_persistent_temp_slot, + MaxfrSlot, !CI), + MaxfrCode = singleton( + llds_instr(save_maxfr(MaxfrSlot), + "prepare for temp frame commit") + ), + create_temp_frame(StackLabel, + "prepare for temp frame commit", TempFrameCode, !CI), + get_globals(!.CI, Globals), + globals.lookup_bool_option(Globals, use_minimal_model_stack_copy_cut, + UseMinimalModelStackCopyCut), + HijackInfo = commit_temp_frame(MaxfrSlot, UseMinimalModelStackCopyCut), + ( + UseMinimalModelStackCopyCut = yes, + % If the code we are committing across starts but does not complete + % the evaluation of a tabled subgoal, the cut will remove the + % generator's choice point, so that the evaluation of the subgoal + % will never be completed. We handle such "dangling" generators + % by removing them from the subgoal trie of the tabled procedure. + % This requires knowing what tabled subgoals are started inside + % commits, which is why we wrap the goal being committed across + % inside MR_commit_{mark,cut}. + Components = [ + foreign_proc_raw_code(cannot_branch_away, + proc_affects_liveness, live_lvals_info(set.init), + "\t\tMR_save_transient_registers();\n"), + foreign_proc_raw_code(cannot_branch_away, + proc_does_not_affect_liveness, live_lvals_info(set.init), + "\t\tMR_commit_mark();\n"), + foreign_proc_raw_code(cannot_branch_away, + proc_affects_liveness, live_lvals_info(set.init), + "\t\tMR_restore_transient_registers();\n") + ], + MD = proc_may_duplicate, + MarkCode = singleton( + llds_instr(foreign_proc_code([], Components, + proc_will_not_call_mercury, no, no, no, no, no, no, MD), + "") + ) + ; + UseMinimalModelStackCopyCut = no, + MarkCode = empty + ), + HijackCode = MaxfrCode ++ TempFrameCode ++ MarkCode + ; + ( + CurfrMaxfr = must_be_equal, + ( + ResumeKnown = resume_point_known(has_been_done), + HijackInfo = commit_quarter_hijack, + HijackCode = singleton( + llds_instr(assign(redoip_slot(lval(curfr)), + StackLabelConst), + "hijack the redofr slot") + ) + ; + ( ResumeKnown = resume_point_known(wont_be_done) + ; ResumeKnown = resume_point_unknown + ), + acquire_temp_slot(slot_lval(redoip_slot(lval(curfr))), + non_persistent_temp_slot, RedoipSlot, !CI), + HijackInfo = commit_half_hijack(RedoipSlot), + HijackCode = from_list([ + llds_instr(assign(RedoipSlot, + lval(redoip_slot(lval(curfr)))), + "prepare for half commit hijack"), + llds_instr(assign(redoip_slot(lval(curfr)), + StackLabelConst), + "hijack the redofr slot") + ]) + ) + ; + CurfrMaxfr = may_be_different, + acquire_temp_slot(slot_lval(redoip_slot(lval(maxfr))), + non_persistent_temp_slot, RedoipSlot, !CI), + acquire_temp_slot(slot_lval(redofr_slot(lval(maxfr))), + non_persistent_temp_slot, RedofrSlot, !CI), + acquire_temp_slot(slot_lval(maxfr), + non_persistent_temp_slot, MaxfrSlot, !CI), + HijackInfo = commit_full_hijack(RedoipSlot, RedofrSlot, MaxfrSlot), + HijackCode = from_list([ + llds_instr(assign(RedoipSlot, lval(redoip_slot(lval(maxfr)))), + "prepare for full commit hijack"), + llds_instr(assign(RedofrSlot, lval(redofr_slot(lval(maxfr)))), + "prepare for full commit hijack"), + llds_instr(save_maxfr(MaxfrSlot), + "prepare for full commit hijack"), + llds_instr(assign(redofr_slot(lval(maxfr)), lval(curfr)), + "hijack the redofr slot"), + llds_instr(assign(redoip_slot(lval(maxfr)), StackLabelConst), + "hijack the redoip slot") + ]) + ) + ), + maybe_save_trail_info(AddTrailOps, MaybeTrailSlots, SaveTrailCode, !CI), + maybe_save_region_commit_frame(AddRegionOps, ForwardLiveVarsBeforeGoal, + CommitGoalInfo, MaybeRegionCommitFrameInfo, SaveRegionCommitFrameCode, + !CI), + SemiCommitInfo = semi_commit_info(FailInfo0, NewResumePoint, + HijackInfo, MaybeTrailSlots, MaybeRegionCommitFrameInfo), + Code = HijackCode ++ SaveTrailCode ++ SaveRegionCommitFrameCode. + +generate_semi_commit(SemiCommitInfo, Code, !CI) :- + SemiCommitInfo = semi_commit_info(FailInfo, ResumePoint, + HijackInfo, MaybeTrailSlots, MaybeRegionCommitFrameInfo), + + set_fail_info(FailInfo, !CI), + % XXX Should release the temp slots in each arm of the switch. + ( + HijackInfo = commit_temp_frame(MaxfrSlot, UseMinimalModel), + MaxfrCode = singleton( + llds_instr(restore_maxfr(MaxfrSlot), + "restore maxfr for temp frame hijack") + ), + ( + UseMinimalModel = yes, + % See the comment in prepare_for_semi_commit above. + Components = [ + foreign_proc_raw_code(cannot_branch_away, + proc_does_not_affect_liveness, live_lvals_info(set.init), + "\t\tMR_commit_cut();\n") + ], + MD = proc_may_duplicate, + CutCode = singleton( + llds_instr(foreign_proc_code([], Components, + proc_will_not_call_mercury, no, no, no, no, no, no, MD), + "commit for temp frame hijack") + ) + ; + UseMinimalModel = no, + CutCode = empty + ), + SuccessUndoCode = MaxfrCode ++ CutCode, + FailureUndoCode = MaxfrCode ++ CutCode + ; + HijackInfo = commit_quarter_hijack, + FailInfo = fail_info(ResumePoints, _, _, _, _), + stack.det_top(ResumePoints, TopResumePoint), + pick_stack_resume_point(TopResumePoint, _, StackLabel), + StackLabelConst = const(llconst_code_addr(StackLabel)), + SuccessUndoCode = from_list([ + llds_instr(assign(maxfr, lval(curfr)), + "restore maxfr for quarter commit hijack"), + llds_instr(assign(redoip_slot(lval(maxfr)), StackLabelConst), + "restore redoip for quarter commit hijack") + ]), + FailureUndoCode = singleton( + llds_instr(assign(redoip_slot(lval(maxfr)), StackLabelConst), + "restore redoip for quarter commit hijack") + ) + ; + HijackInfo = commit_half_hijack(RedoipSlot), + SuccessUndoCode = from_list([ + llds_instr(assign(maxfr, lval(curfr)), + "restore maxfr for half commit hijack"), + llds_instr(assign(redoip_slot(lval(maxfr)), lval(RedoipSlot)), + "restore redoip for half commit hijack") + ]), + FailureUndoCode = singleton( + llds_instr(assign(redoip_slot(lval(maxfr)), lval(RedoipSlot)), + "restore redoip for half commit hijack") + ) + ; + HijackInfo = commit_full_hijack(RedoipSlot, RedofrSlot, MaxfrSlot), + SuccessUndoCode = from_list([ + llds_instr(restore_maxfr(MaxfrSlot), + "restore maxfr for full commit hijack"), + llds_instr(assign(redoip_slot(lval(maxfr)), lval(RedoipSlot)), + "restore redoip for full commit hijack"), + llds_instr(assign(redofr_slot(lval(maxfr)), lval(RedofrSlot)), + "restore redofr for full commit hijack") + ]), + FailureUndoCode = from_list([ + llds_instr(assign(redoip_slot(lval(maxfr)), lval(RedoipSlot)), + "restore redoip for full commit hijack"), + llds_instr(assign(redofr_slot(lval(maxfr)), lval(RedofrSlot)), + "restore redofr for full commit hijack") + ]) + ), + + remember_position(!.CI, AfterCommit), + generate_resume_point(ResumePoint, ResumePointCode, !CI), + generate_failure(FailCode, !CI), + reset_to_position(AfterCommit, !CI), + + maybe_restore_trail_info(MaybeTrailSlots, CommitTrailCode, + RestoreTrailCode, !CI), + maybe_restore_region_commit_frame(MaybeRegionCommitFrameInfo, + SuccessRegionCode, FailureRegionCode, !CI), + + get_next_label(SuccLabel, !CI), + GotoSuccLabel = singleton( + llds_instr(goto(code_label(SuccLabel)), "Jump to success continuation") + ), + SuccLabelCode = singleton( + llds_instr(label(SuccLabel), "Success continuation") + ), + SuccessCode = SuccessUndoCode ++ CommitTrailCode ++ SuccessRegionCode, + FailureCode = ResumePointCode ++ FailureUndoCode ++ RestoreTrailCode ++ + FailureRegionCode ++ FailCode, + Code = SuccessCode ++ GotoSuccLabel ++ FailureCode ++ SuccLabelCode. + +%---------------------------------------------------------------------------% + +:- pred maybe_save_region_commit_frame(add_region_ops::in, set_of_progvar::in, + hlds_goal_info::in, maybe(region_commit_stack_frame)::out, llds_code::out, + code_info::in, code_info::out) is det. + +maybe_save_region_commit_frame(AddRegionOps, _ForwardLiveVarsBeforeGoal, + CommitGoalInfo, MaybeRegionCommitFrameInfo, Code, !CI) :- + ( + AddRegionOps = do_not_add_region_ops, + MaybeRegionCommitFrameInfo = no, + Code = empty + ; + AddRegionOps = add_region_ops, + MaybeRbmmInfo = goal_info_get_maybe_rbmm(CommitGoalInfo), + ( + MaybeRbmmInfo = no, + MaybeRegionCommitFrameInfo = no, + Code = empty + ; + MaybeRbmmInfo = yes(RbmmInfo), + RbmmInfo = rbmm_goal_info(_, CommitRemovedRegionVars, _, _, _), + + RemovedRegionVarList = set.to_sorted_list(CommitRemovedRegionVars), + + NumRemovedRegionVars = list.length(RemovedRegionVarList), + + code_info.get_globals(!.CI, Globals), + globals.lookup_int_option(Globals, size_region_commit_fixed, + FixedSize), + globals.lookup_int_option(Globals, size_region_commit_entry, + EntrySize), + FrameSize = FixedSize + EntrySize * NumRemovedRegionVars, + Items = list.duplicate(FrameSize, slot_region_commit), + acquire_several_temp_slots(Items, non_persistent_temp_slot, + StackVars, MainStackId, FirstSlotNum, LastSlotNum, !CI), + EmbeddedStackFrame = embedded_stack_frame_id(MainStackId, + FirstSlotNum, LastSlotNum), + FirstSavedRegionAddr = first_nonfixed_embedded_slot_addr( + EmbeddedStackFrame, FixedSize), + acquire_reg(reg_r, NumRegLval, !CI), + acquire_reg(reg_r, AddrRegLval, !CI), + PushInitCode = from_list([ + llds_instr( + push_region_frame(region_stack_commit, EmbeddedStackFrame), + "Save stack pointer of embedded region commit stack"), + llds_instr( + assign(NumRegLval, const(llconst_int(0))), + "Initialize number of unprotected live regions"), + llds_instr( + assign(AddrRegLval, FirstSavedRegionAddr), + "Initialize pointer to the next unprotected live" ++ + " region slot") + ]), + save_unprotected_live_regions(NumRegLval, AddrRegLval, + EmbeddedStackFrame, RemovedRegionVarList, FillCode, !CI), + SetCode = singleton( + llds_instr( + region_set_fixed_slot(region_set_commit_num_entries, + EmbeddedStackFrame, lval(NumRegLval)), + "Store the number of unprotected live regions") + ), + release_reg(NumRegLval, !CI), + release_reg(AddrRegLval, !CI), + + RegionCommitFrameInfo = + region_commit_stack_frame(EmbeddedStackFrame, StackVars), + MaybeRegionCommitFrameInfo = yes(RegionCommitFrameInfo), + + Code = PushInitCode ++ FillCode ++ SetCode + ) + ). + +:- pred save_unprotected_live_regions(lval::in, lval::in, + embedded_stack_frame_id::in, list(prog_var)::in, llds_code::out, + code_info::in, code_info::out) is det. + +save_unprotected_live_regions(_, _, _, [], empty, !CI). +save_unprotected_live_regions(NumLval, AddrLval, EmbeddedStackFrame, + [RegionVar | RegionVars], Code ++ Codes, !CI) :- + produce_variable(RegionVar, ProduceVarCode, RegionVarRval, !CI), + SaveCode = singleton( + llds_instr( + region_fill_frame(region_fill_commit, EmbeddedStackFrame, + RegionVarRval, NumLval, AddrLval), + "Save the region in the commit stack frame if it is unprotected") + ), + Code = ProduceVarCode ++ SaveCode, + save_unprotected_live_regions(NumLval, AddrLval, EmbeddedStackFrame, + RegionVars, Codes, !CI). + +:- pred maybe_restore_region_commit_frame(maybe(region_commit_stack_frame)::in, + llds_code::out, llds_code::out, code_info::in, code_info::out) is det. + +maybe_restore_region_commit_frame(MaybeRegionCommitFrameInfo, + SuccessCode, FailureCode, !CI) :- + ( + MaybeRegionCommitFrameInfo = no, + SuccessCode = empty, + FailureCode = empty + ; + MaybeRegionCommitFrameInfo = yes(RegionCommitFrameInfo), + RegionCommitFrameInfo = region_commit_stack_frame(EmbeddedStackFrame, + StackVars), + SuccessCode = singleton( + llds_instr( + use_and_maybe_pop_region_frame(region_commit_success, + EmbeddedStackFrame), + "Destroy removed regions protected by cut away disjunctions") + ), + FailureCode = singleton( + llds_instr( + use_and_maybe_pop_region_frame(region_commit_failure, + EmbeddedStackFrame), + "Undo the creation of the commit frame") + ), + release_several_temp_slots(StackVars, non_persistent_temp_slot, !CI) + ). + +%---------------------------------------------------------------------------% + +:- pred inside_non_condition(code_info::in, code_info::out) is det. + +inside_non_condition(!CI) :- + get_fail_info(!.CI, FailInfo0), + FailInfo0 = fail_info(ResumePoints, ResumeKnown, CurfrMaxfr, _, Allow), + FailInfo = fail_info(ResumePoints, ResumeKnown, CurfrMaxfr, + inside_non_condition, Allow), + set_fail_info(FailInfo, !CI). + +:- pred create_temp_frame(code_addr::in, string::in, llds_code::out, + code_info::in, code_info::out) is det. + +create_temp_frame(Redoip, Comment, Code, !CI) :- + ( get_proc_model(!.CI) = model_non -> + Kind = nondet_stack_proc + ; + Kind = det_stack_proc + ), + Code = singleton( + llds_instr(mkframe(temp_frame(Kind), yes(Redoip)), Comment) + ), + set_created_temp_frame(yes, !CI), + get_fail_info(!.CI, FailInfo0), + FailInfo0 = fail_info(ResumePoints, ResumeKnown, _, CondEnv, Allow), + FailInfo = fail_info(ResumePoints, ResumeKnown, may_be_different, + CondEnv, Allow), + set_fail_info(FailInfo, !CI). + +%---------------------------------------------------------------------------% + +effect_resume_point(ResumePoint, CodeModel, Code, !CI) :- + get_fail_info(!.CI, FailInfo0), + FailInfo0 = fail_info(ResumePoints0, _ResumeKnown, CurfrMaxfr, + CondEnv, Allow), + ( stack.top(ResumePoints0, OldResumePoint) -> + pick_first_resume_point(OldResumePoint, OldMap, _), + pick_first_resume_point(ResumePoint, NewMap, _), + map.keys(OldMap, OldKeys), + map.keys(NewMap, NewKeys), + set.list_to_set(OldKeys, OldKeySet), + set.list_to_set(NewKeys, NewKeySet), + expect(set.subset(OldKeySet, NewKeySet), $module, $pred, + "non-nested resume point variable sets") + ; + true + ), + stack.push(ResumePoint, ResumePoints0, ResumePoints), + ( + CodeModel = model_non, + pick_stack_resume_point(ResumePoint, _, StackLabel), + LabelConst = const(llconst_code_addr(StackLabel)), + Code = singleton( + llds_instr(assign(redoip_slot(lval(maxfr)), LabelConst), + "hijack redoip to effect resume point") + ), + RedoipUpdate = has_been_done + ; + ( CodeModel = model_det + ; CodeModel = model_semi + ), + Code = empty, + RedoipUpdate = wont_be_done + ), + FailInfo = fail_info(ResumePoints, resume_point_known(RedoipUpdate), + CurfrMaxfr, CondEnv, Allow), + set_fail_info(FailInfo, !CI). + +pop_resume_point(!CI) :- + get_fail_info(!.CI, FailInfo0), + FailInfo0 = fail_info(ResumePoints0, ResumeKnown, CurfrMaxfr, + CondEnv, Allow), + stack.det_pop(_, ResumePoints0, ResumePoints), + FailInfo = fail_info(ResumePoints, ResumeKnown, CurfrMaxfr, + CondEnv, Allow), + set_fail_info(FailInfo, !CI). + +%---------------------------------------------------------------------------% + +top_resume_point(CI, ResumePoint) :- + get_fail_info(CI, FailInfo), + FailInfo = fail_info(ResumePoints, _, _, _, _), + stack.det_top(ResumePoints, ResumePoint). + +set_resume_point_to_unknown(!CI) :- + get_fail_info(!.CI, FailInfo0), + FailInfo0 = fail_info(ResumePoints, _, CurfrMaxfr, CondEnv, Allow), + FailInfo = fail_info(ResumePoints, resume_point_unknown, + CurfrMaxfr, CondEnv, Allow), + set_fail_info(FailInfo, !CI). + +set_resume_point_and_frame_to_unknown(!CI) :- + get_fail_info(!.CI, FailInfo0), + FailInfo0 = fail_info(ResumePoints, _, _, CondEnv, Allow), + FailInfo = fail_info(ResumePoints, resume_point_unknown, may_be_different, + CondEnv, Allow), + set_fail_info(FailInfo, !CI). + +%---------------------------------------------------------------------------% + +generate_failure(Code, !CI) :- + get_fail_info(!.CI, FailInfo), + FailInfo = fail_info(ResumePoints, ResumeKnown, _, _, _), + ( + ResumeKnown = resume_point_known(_), + stack.det_top(ResumePoints, TopResumePoint), + ( pick_matching_resume_addr(!.CI, TopResumePoint, FailureAddress0) -> + FailureAddress = FailureAddress0, + PlaceCode = empty + ; + pick_first_resume_point(TopResumePoint, Map, FailureAddress), + map.to_assoc_list(Map, AssocList), + remember_position(!.CI, CurPos), + pick_and_place_vars(AssocList, _, PlaceCode, !CI), + reset_to_position(CurPos, !CI) + ), + BranchCode = singleton(llds_instr(goto(FailureAddress), "fail")), + Code = PlaceCode ++ BranchCode + ; + ResumeKnown = resume_point_unknown, + Code = singleton(llds_instr(goto(do_redo), "fail")) + ). + +fail_if_rval_is_false(Rval0, Code, !CI) :- + get_fail_info(!.CI, FailInfo), + FailInfo = fail_info(ResumePoints, ResumeKnown, _, _, _), + ( + ResumeKnown = resume_point_known(_), + stack.det_top(ResumePoints, TopResumePoint), + ( pick_matching_resume_addr(!.CI, TopResumePoint, FailureAddress0) -> + % We branch away if the test *fails* + code_util.neg_rval(Rval0, Rval), + Code = singleton( + llds_instr(if_val(Rval, FailureAddress0), "Test for failure") + ) + ; + pick_first_resume_point(TopResumePoint, Map, FailureAddress), + map.to_assoc_list(Map, AssocList), + get_next_label(SuccessLabel, !CI), + remember_position(!.CI, CurPos), + pick_and_place_vars(AssocList, _, PlaceCode, !CI), + reset_to_position(CurPos, !CI), + SuccessAddress = code_label(SuccessLabel), + % We branch away if the test *fails*, therefore if the test + % succeeds, we branch around the code that moves variables to + % their failure locations and branches away to the failure + % continuation. + TestCode = singleton( + llds_instr(if_val(Rval0, SuccessAddress), "Test for failure") + ), + TailCode = from_list([ + llds_instr(goto(FailureAddress), "Goto failure"), + llds_instr(label(SuccessLabel), "Success continuation") + ]), + Code = TestCode ++ PlaceCode ++ TailCode + ) + ; + ResumeKnown = resume_point_unknown, + % We branch away if the test *fails* + code_util.neg_rval(Rval0, Rval), + Code = singleton( + llds_instr(if_val(Rval, do_redo), "Test for failure") + ) + ). + +%---------------------------------------------------------------------------% + +failure_is_direct_branch(CI, CodeAddr) :- + get_fail_info(CI, FailInfo), + FailInfo = fail_info(ResumePoints, resume_point_known(_), _, _, _), + stack.top(ResumePoints, TopResumePoint), + pick_matching_resume_addr(CI, TopResumePoint, CodeAddr). + +may_use_nondet_tailcall(CI, TailCallStatus) :- + get_fail_info(CI, FailInfo), + FailInfo = fail_info(ResumePoints0, ResumeKnown, _, _, _), + ( + stack.pop(ResumePoint1, ResumePoints0, ResumePoints1), + stack.is_empty(ResumePoints1), + ResumePoint1 = stack_only(_, do_fail) + -> + ( + ResumeKnown = resume_point_known(_), + TailCallStatus = unchecked_tail_call + ; + ResumeKnown = resume_point_unknown, + TailCallStatus = checked_tail_call + ) + ; + TailCallStatus = no_tail_call + ). + +%---------------------------------------------------------------------------% + + % See whether the current locations of variables match the locations + % associated with any of the options in the given failure map. + % If yes, return the code_addr of that option. + % +:- pred pick_matching_resume_addr(code_info::in, + resume_point_info::in, code_addr::out) is semidet. + +pick_matching_resume_addr(CI, ResumeMaps, Addr) :- + variable_locations(CI, CurLocs), + ( + ResumeMaps = orig_only(Map1, Addr1), + ( match_resume_loc(Map1, CurLocs) -> + Addr = Addr1 + ; + fail + ) + ; + ResumeMaps = stack_only(Map1, Addr1), + ( match_resume_loc(Map1, CurLocs) -> + Addr = Addr1 + ; + fail + ) + ; + ResumeMaps = orig_and_stack(Map1, Addr1, Map2, Addr2), + ( match_resume_loc(Map1, CurLocs) -> + Addr = Addr1 + ; match_resume_loc(Map2, CurLocs) -> + Addr = Addr2 + ; + fail + ) + ; + ResumeMaps = stack_and_orig(Map1, Addr1, Map2, Addr2), + ( match_resume_loc(Map1, CurLocs) -> + Addr = Addr1 + ; match_resume_loc(Map2, CurLocs) -> + Addr = Addr2 + ; + fail + ) + ). + +:- pred match_resume_loc(resume_map::in, resume_map::in) is semidet. + +match_resume_loc(Map, Locations0) :- + map.keys(Map, KeyList), + set.list_to_set(KeyList, Keys), + map.select(Locations0, Keys, Locations), + map.to_assoc_list(Locations, List), + all_vars_match_resume_map(Map, List). + +:- pred all_vars_match_resume_map(resume_map::in, + assoc_list(prog_var, set(lval))::in) is semidet. + +all_vars_match_resume_map(_Map, []). +all_vars_match_resume_map(Map, [Var - Actual | VarsActuals]) :- + map.search(Map, Var, Lvals), + set.subset(Lvals, Actual), + all_vars_match_resume_map(Map, VarsActuals). + +:- pred pick_first_resume_point(resume_point_info::in, + resume_map::out, code_addr::out) is det. + +pick_first_resume_point(orig_only(Map, Addr), Map, Addr). +pick_first_resume_point(stack_only(Map, Addr), Map, Addr). +pick_first_resume_point(orig_and_stack(Map, Addr, _, _), Map, Addr). +pick_first_resume_point(stack_and_orig(Map, Addr, _, _), Map, Addr). + +:- pred pick_stack_resume_point(resume_point_info::in, + resume_map::out, code_addr::out) is det. + +pick_stack_resume_point(ResumePoint, Map, Addr) :- + ( maybe_pick_stack_resume_point(ResumePoint, Map1, Addr1) -> + Map = Map1, + Addr = Addr1 + ; + unexpected($module, $pred, "no stack resume point") + ). + +:- pred maybe_pick_stack_resume_point(resume_point_info::in, + resume_map::out, code_addr::out) is semidet. + +maybe_pick_stack_resume_point(stack_only(Map, Addr), Map, Addr). +maybe_pick_stack_resume_point(orig_and_stack(_, _, Map, Addr), + Map, Addr). +maybe_pick_stack_resume_point(stack_and_orig(Map, Addr, _, _), + Map, Addr). + +%---------------------------------------------------------------------------% + +produce_vars([], Map, empty, !CI) :- + map.init(Map). +produce_vars([Var | Vars], Map, Code, !CI) :- + produce_vars(Vars, Map0, CodeVars, !CI), + produce_variable_in_reg_or_stack(Var, CodeVar, Lval, !CI), + Lvals = set.make_singleton_set(Lval), + map.set(Var, Lvals, Map0, Map), + Code = CodeVars ++ CodeVar. + +flush_resume_vars_to_stack(Code, !CI) :- + compute_resume_var_stack_locs(!.CI, VarLocs), + place_vars(VarLocs, Code, !CI). + +:- pred compute_resume_var_stack_locs(code_info::in, + assoc_list(prog_var, lval)::out) is det. + +compute_resume_var_stack_locs(CI, VarLocs) :- + get_fail_info(CI, FailInfo), + FailInfo = fail_info(ResumePointStack, _, _, _, _), + stack.det_top(ResumePointStack, ResumePoint), + pick_stack_resume_point(ResumePoint, StackMap, _), + map.to_assoc_list(StackMap, VarLocSets), + pick_var_places(VarLocSets, VarLocs). + +%---------------------------------------------------------------------------% + +:- pred init_fail_info(code_model::in, maybe(set_of_progvar)::in, + resume_point_info::out, code_info::in, code_info::out) is det. + +init_fail_info(CodeModel, MaybeFailVars, ResumePoint, !CI) :- + ( + CodeModel = model_det, + get_next_label(ResumeLabel, !CI), + ResumeAddress = code_label(ResumeLabel), + ResumeKnown = resume_point_unknown, + CurfrMaxfr = may_be_different + ; + CodeModel = model_semi, + % The resume point for this label will be part of the procedure epilog. + get_next_label(ResumeLabel, !CI), + ResumeAddress = code_label(ResumeLabel), + ResumeKnown = resume_point_known(wont_be_done), + CurfrMaxfr = may_be_different + ; + CodeModel = model_non, + ( + MaybeFailVars = yes(_), + get_next_label(ResumeLabel, !CI), + ResumeAddress = code_label(ResumeLabel) + ; + MaybeFailVars = no, + ResumeAddress = do_fail + ), + ResumeKnown = resume_point_known(has_been_done), + CurfrMaxfr = must_be_equal + ), + ( + MaybeFailVars = yes(FailVars), + get_stack_slots(!.CI, StackSlots), + map.select_sorted_list(StackSlots, set_of_var.to_sorted_list(FailVars), + AbsStackMap), + map.to_assoc_list(AbsStackMap, AbsStackList), + StackList0 = assoc_list.map_values_only(stack_slot_to_lval, + AbsStackList), + make_singleton_sets(StackList0, StackList), + map.from_sorted_assoc_list(StackList, StackMap) + ; + MaybeFailVars = no, + map.init(StackMap) + ), + ResumePoint = stack_only(StackMap, ResumeAddress), + stack.init(ResumeStack0), + stack.push(ResumePoint, ResumeStack0, ResumeStack), + get_fail_info(!.CI, FailInfo0), + FailInfo0 = fail_info(_, _, _, _, Allow), + FailInfo = fail_info(ResumeStack, ResumeKnown, CurfrMaxfr, + not_inside_non_condition, Allow), + set_fail_info(FailInfo, !CI). + +%---------------------------------------------------------------------------% + +make_resume_point(ResumeVars, ResumeLocs, FullMap, ResumePoint, !CI) :- + get_stack_slots(!.CI, StackSlots), + map.select_sorted_list(FullMap, ResumeVars, OrigMap), + ( + ResumeLocs = resume_locs_orig_only, + get_next_label(OrigLabel, !CI), + OrigAddr = code_label(OrigLabel), + ResumePoint = orig_only(OrigMap, OrigAddr), + trace [compiletime(flag("codegen_goal")), io(!IO)] ( + ( should_trace_code_gen(!.CI) -> + code_info.get_varset(!.CI, VarSet), + io.write_string("orig_only\n", !IO), + output_resume_map(VarSet, OrigMap, !IO), + io.flush_output(!IO) + ; + true + ) + ) + ; + ResumeLocs = resume_locs_stack_only, + make_stack_resume_map(ResumeVars, StackSlots, StackMap), + get_next_label(StackLabel, !CI), + StackAddr = code_label(StackLabel), + ResumePoint = stack_only(StackMap, StackAddr), + trace [compiletime(flag("codegen_goal")), io(!IO)] ( + ( should_trace_code_gen(!.CI) -> + code_info.get_varset(!.CI, VarSet), + io.write_string("stack_only\n", !IO), + output_resume_map(VarSet, StackMap, !IO), + io.flush_output(!IO) + ; + true + ) + ) + ; + ResumeLocs = resume_locs_orig_and_stack, + make_stack_resume_map(ResumeVars, StackSlots, StackMap), + get_next_label(OrigLabel, !CI), + OrigAddr = code_label(OrigLabel), + get_next_label(StackLabel, !CI), + StackAddr = code_label(StackLabel), + ResumePoint = orig_and_stack(OrigMap, OrigAddr, StackMap, StackAddr), + trace [compiletime(flag("codegen_goal")), io(!IO)] ( + ( should_trace_code_gen(!.CI) -> + code_info.get_varset(!.CI, VarSet), + io.write_string("stack_and_orig\n", !IO), + io.write_string("orig:\n", !IO), + output_resume_map(VarSet, OrigMap, !IO), + io.write_string("stack:\n", !IO), + output_resume_map(VarSet, StackMap, !IO), + io.flush_output(!IO) + ; + true + ) + ) + ; + ResumeLocs = resume_locs_stack_and_orig, + make_stack_resume_map(ResumeVars, StackSlots, StackMap), + get_next_label(StackLabel, !CI), + StackAddr = code_label(StackLabel), + get_next_label(OrigLabel, !CI), + OrigAddr = code_label(OrigLabel), + ResumePoint = stack_and_orig(StackMap, StackAddr, OrigMap, OrigAddr), + trace [compiletime(flag("codegen_goal")), io(!IO)] ( + ( should_trace_code_gen(!.CI) -> + code_info.get_varset(!.CI, VarSet), + io.write_string("stack_and_orig\n", !IO), + io.write_string("stack:\n", !IO), + output_resume_map(VarSet, StackMap, !IO), + io.write_string("orig:\n", !IO), + output_resume_map(VarSet, OrigMap, !IO), + io.flush_output(!IO) + ; + true + ) + ) + ). + +:- pred make_stack_resume_map(list(prog_var)::in, stack_slots::in, + map(prog_var, set(lval))::out) is det. + +make_stack_resume_map(ResumeVars, StackSlots, StackMap) :- + map.select_sorted_list(StackSlots, ResumeVars, StackMap0), + map.to_assoc_list(StackMap0, AbsStackList), + StackList0 = assoc_list.map_values_only(stack_slot_to_lval, AbsStackList), + make_singleton_sets(StackList0, StackList), + map.from_sorted_assoc_list(StackList, StackMap). + +:- pred make_singleton_sets(assoc_list(prog_var, lval)::in, + assoc_list(prog_var, set(lval))::out) is det. + +make_singleton_sets([], []). +make_singleton_sets([Var - Lval | Tail], [Var - Lvals | SetTail]) :- + Lvals = set.make_singleton_set(Lval), + make_singleton_sets(Tail, SetTail). + +%---------------------------------------------------------------------------% + + % The code we generate for a resumption point looks like this: + % + % label(StackLabel) + % + % + % label(OrigLabel) + % + % + % Failures at different points may cause control to arrive at + % the resumption point via either label, which is why the last + % line is necessary. + % + % The idea is that failures from other procedures will go to + % StackLabel, and that failures from this procedure while + % everything is in its original place will go to OrigLabel. + % Failures from this procedure where not everything is in its + % original place can go to either, after moving the resume variables + % to the places where the label expects them. + % + % The above layout (stack, then orig) is the most common. However, + % liveness.m may decide that one or other of the two labels will + % never be referred to (e.g. because there are no calls inside + % the range of effect of the resumption point or because a call + % follows immediately after the establishment of the resumption + % point), or that it would be more efficient to put the two labels + % in the other order (e.g. because the code after the resumption point + % needs most of the variables in their stack slots). + +generate_resume_point(ResumePoint, Code, !CI) :- + ( + ResumePoint = orig_only(Map1, Addr1), + extract_label_from_code_addr(Addr1, Label1), + Code = singleton( + llds_instr(label(Label1), "orig only failure continuation") + ), + set_var_locations(Map1, !CI) + ; + ResumePoint = stack_only(Map1, Addr1), + extract_label_from_code_addr(Addr1, Label1), + Code = singleton( + llds_instr(label(Label1), "stack only failure continuation") + ), + set_var_locations(Map1, !CI), + generate_resume_layout(Label1, Map1, !CI) + ; + ResumePoint = stack_and_orig(Map1, Addr1, Map2, Addr2), + extract_label_from_code_addr(Addr1, Label1), + extract_label_from_code_addr(Addr2, Label2), + Label1Code = singleton( + llds_instr(label(Label1), "stack failure continuation before orig") + ), + set_var_locations(Map1, !CI), + generate_resume_layout(Label1, Map1, !CI), + map.to_assoc_list(Map2, AssocList2), + place_resume_vars(AssocList2, PlaceCode, !CI), + Label2Code = singleton( + llds_instr(label(Label2), "orig failure continuation after stack") + ), + set_var_locations(Map2, !CI), + Code = Label1Code ++ PlaceCode ++ Label2Code + ; + ResumePoint = orig_and_stack(Map1, Addr1, Map2, Addr2), + extract_label_from_code_addr(Addr1, Label1), + extract_label_from_code_addr(Addr2, Label2), + Label1Code = singleton( + llds_instr(label(Label1), "orig failure continuation before stack") + ), + set_var_locations(Map1, !CI), + map.to_assoc_list(Map2, AssocList2), + place_resume_vars(AssocList2, PlaceCode, !CI), + Label2Code = singleton( + llds_instr(label(Label2), "stack failure continuation after orig") + ), + set_var_locations(Map2, !CI), + generate_resume_layout(Label2, Map2, !CI), + Code = Label1Code ++ PlaceCode ++ Label2Code + ). + +:- pred extract_label_from_code_addr(code_addr::in, label::out) is det. + +extract_label_from_code_addr(CodeAddr, Label) :- + ( CodeAddr = code_label(Label0) -> + Label = Label0 + ; + unexpected($module, $pred, "non-label") + ). + +:- pred place_resume_vars(assoc_list(prog_var, set(lval))::in, + llds_code::out, code_info::in, code_info::out) is det. + +place_resume_vars([], empty, !CI). +place_resume_vars([Var - TargetSet | Rest], Code, !CI) :- + set.to_sorted_list(TargetSet, Targets), + place_resume_var(Var, Targets, FirstCode, !CI), + place_resume_vars(Rest, RestCode, !CI), + Code = FirstCode ++ RestCode. + +:- pred place_resume_var(prog_var::in, list(lval)::in, + llds_code::out, code_info::in, code_info::out) is det. + +place_resume_var(_Var, [], empty, !CI). +place_resume_var(Var, [Target | Targets], Code, !CI) :- + place_var(Var, Target, FirstCode, !CI), + place_resume_var(Var, Targets, RestCode, !CI), + Code = FirstCode ++ RestCode. + + % Reset the code generator's database of what is where. + % Remember that the variables in the map are available in their + % associated rvals; forget about all other variables. + % +:- pred set_var_locations(resume_map::in, + code_info::in, code_info::out) is det. + +set_var_locations(Map, !CI) :- + map.to_assoc_list(Map, LvalList0), + flatten_varlval_list(LvalList0, LvalList), + get_var_locn_info(!.CI, VarLocnInfo0), + reinit_var_locn_state(LvalList, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +:- pred flatten_varlval_list(assoc_list(prog_var, set(lval))::in, + assoc_list(prog_var, lval)::out) is det. + +flatten_varlval_list([], []). +flatten_varlval_list([V - Rvals | Rest0], All) :- + flatten_varlval_list(Rest0, Rest), + set.to_sorted_list(Rvals, RvalList), + flatten_varlval_list_2(RvalList, V, Rest1), + list.append(Rest1, Rest, All). + +:- pred flatten_varlval_list_2(list(lval)::in, prog_var::in, + assoc_list(prog_var, lval)::out) is det. + +flatten_varlval_list_2([], _V, []). +flatten_varlval_list_2([R | Rs], V, [V - R | Rest]) :- + flatten_varlval_list_2(Rs, V, Rest). + +resume_point_vars(ResumePoint, Vars) :- + pick_first_resume_point(ResumePoint, ResumeMap, _), + map.keys(ResumeMap, Vars). + +resume_point_stack_addr(ResumePoint, StackAddr) :- + pick_stack_resume_point(ResumePoint, _, StackAddr). + +%---------------------------------------------------------------------------% + +:- pred maybe_save_trail_info(add_trail_ops::in, maybe(pair(lval))::out, + llds_code::out, code_info::in, code_info::out) is det. + +maybe_save_trail_info(AddTrailOps, MaybeTrailSlots, SaveTrailCode, !CI) :- + ( + AddTrailOps = add_trail_ops, + acquire_temp_slot(slot_ticket_counter, non_persistent_temp_slot, + CounterSlot, !CI), + acquire_temp_slot(slot_ticket, non_persistent_temp_slot, + TrailPtrSlot, !CI), + MaybeTrailSlots = yes(CounterSlot - TrailPtrSlot), + SaveTrailCode = from_list([ + llds_instr(mark_ticket_stack(CounterSlot), + "save the ticket counter"), + llds_instr(store_ticket(TrailPtrSlot), + "save the trail pointer") + ]) + ; + AddTrailOps = do_not_add_trail_ops, + MaybeTrailSlots = no, + SaveTrailCode = empty + ). + +:- pred maybe_restore_trail_info(maybe(pair(lval))::in, + llds_code::out, llds_code::out, code_info::in, code_info::out) is det. + +maybe_restore_trail_info(MaybeTrailSlots, CommitCode, RestoreCode, !CI) :- + ( + MaybeTrailSlots = no, + CommitCode = empty, + RestoreCode = empty + ; + MaybeTrailSlots = yes(CounterSlot - TrailPtrSlot), + CommitCode = from_list([ + llds_instr(reset_ticket(lval(TrailPtrSlot), reset_reason_commit), + "discard trail entries and restore trail ptr"), + llds_instr(prune_tickets_to(lval(CounterSlot)), + "restore ticket counter (but not high water mark)") + ]), + RestoreCode = from_list([ + llds_instr(reset_ticket(lval(TrailPtrSlot), reset_reason_undo), + "apply trail entries and restore trail ptr"), + llds_instr(discard_ticket, + "restore ticket counter and high water mark") + ]), + release_temp_slot(CounterSlot, non_persistent_temp_slot, !CI), + release_temp_slot(TrailPtrSlot, non_persistent_temp_slot, !CI) + ). + +%---------------------------------------------------------------------------% + +:- pred clone_resume_point(resume_point_info::in, + resume_point_info::out, code_info::in, code_info::out) is det. + +clone_resume_point(ResumePoint0, ResumePoint, !CI) :- + ( + ResumePoint0 = orig_only(_, _), + unexpected($module, $pred, "cloning orig_only resume point") + ; + ResumePoint0 = stack_only(Map1, _), + get_next_label(Label1, !CI), + Addr1 = code_label(Label1), + ResumePoint = stack_only(Map1, Addr1) + ; + ResumePoint0 = stack_and_orig(Map1, _, Map2, _), + get_next_label(Label1, !CI), + Addr1 = code_label(Label1), + get_next_label(Label2, !CI), + Addr2 = code_label(Label2), + ResumePoint = stack_and_orig(Map1, Addr1, Map2, Addr2) + ; + ResumePoint0 = orig_and_stack(Map1, _, Map2, _), + get_next_label(Label2, !CI), + Addr2 = code_label(Label2), + get_next_label(Label1, !CI), + Addr1 = code_label(Label1), + ResumePoint = stack_and_orig(Map2, Addr2, Map1, Addr1) + ). + +%---------------------------------------------------------------------------% +%---------------------------------------------------------------------------% + + % Submodule to deal with liveness issues. + + % The principles underlying this submodule of code_info.m are + % documented in the file compiler/notes/allocation.html. + +:- interface. + +:- pred add_forward_live_vars(set_of_progvar::in, + code_info::in, code_info::out) is det. + +:- pred get_known_variables(code_info::in, list(prog_var)::out) is det. + +:- pred variable_is_forward_live(code_info::in, prog_var::in) is semidet. + +:- pred make_vars_forward_dead(set_of_progvar::in, + code_info::in, code_info::out) is det. + +:- pred maybe_make_vars_forward_dead(set_of_progvar::in, bool::in, + code_info::in, code_info::out) is det. + +:- pred pickup_zombies(set_of_progvar::out, + code_info::in, code_info::out) is det. + +%---------------------------------------------------------------------------% + +:- implementation. + +:- pred rem_forward_live_vars(set_of_progvar::in, + code_info::in, code_info::out) is det. + + % Make these variables appear magically live. + % We don't care where they are put. + % +:- pred make_vars_forward_live(set_of_progvar::in, + code_info::in, code_info::out) is det. + +get_known_variables(CI, VarList) :- + get_forward_live_vars(CI, ForwardLiveVars), + ResumeVars = current_resume_point_vars(CI), + set_of_var.union(ForwardLiveVars, ResumeVars, Vars), + VarList = set_of_var.to_sorted_list(Vars). + +variable_is_forward_live(CI, Var) :- + get_forward_live_vars(CI, Liveness), + set_of_var.member(Liveness, Var). + +add_forward_live_vars(Births, !CI) :- + get_forward_live_vars(!.CI, Liveness0), + set_of_var.union(Liveness0, Births, Liveness), + set_forward_live_vars(Liveness, !CI). + +rem_forward_live_vars(Deaths, !CI) :- + get_forward_live_vars(!.CI, Liveness0), + set_of_var.difference(Liveness0, Deaths, Liveness), + set_forward_live_vars(Liveness, !CI). + +make_vars_forward_live(Vars, !CI) :- + get_stack_slots(!.CI, StackSlots), + get_var_locn_info(!.CI, VarLocnInfo0), + VarList = set_of_var.to_sorted_list(Vars), + make_vars_forward_live_2(VarList, StackSlots, 1, + VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +:- pred make_vars_forward_live_2(list(prog_var)::in, + stack_slots::in, int::in, var_locn_info::in, var_locn_info::out) + is det. + +make_vars_forward_live_2([], _, _, !VarLocnInfo). +make_vars_forward_live_2([Var | Vars], StackSlots, N0, !VarLocnInfo) :- + ( map.search(StackSlots, Var, Slot) -> + Lval = stack_slot_to_lval(Slot), + N1 = N0 + ; + % reg_r is fine since we don't care where the variables are put. + RegType = reg_r, + find_unused_reg(!.VarLocnInfo, RegType, N0, N1), + Lval = reg(RegType, N1) + ), + var_locn_set_magic_var_location(Var, Lval, !VarLocnInfo), + make_vars_forward_live_2(Vars, StackSlots, N1, !VarLocnInfo). + +:- pred find_unused_reg(var_locn_info::in, reg_type::in, int::in, int::out) + is det. + +find_unused_reg(VLI, RegType, N0, N) :- + ( var_locn_lval_in_use(VLI, reg(RegType, N0)) -> + find_unused_reg(VLI, RegType, N0 + 1, N) + ; + N = N0 + ). + +make_vars_forward_dead(Vars, !CI) :- + maybe_make_vars_forward_dead(Vars, yes, !CI). + +maybe_make_vars_forward_dead(Vars0, FirstTime, !CI) :- + ResumeVars = current_resume_point_vars(!.CI), + set_of_var.intersect(Vars0, ResumeVars, FlushVars), + get_zombies(!.CI, Zombies0), + set_of_var.union(Zombies0, FlushVars, Zombies), + set_zombies(Zombies, !CI), + set_of_var.difference(Vars0, Zombies, Vars), + VarList = set_of_var.to_sorted_list(Vars), + get_var_locn_info(!.CI, VarLocnInfo0), + maybe_make_vars_forward_dead_2(VarList, FirstTime, + VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +:- pred maybe_make_vars_forward_dead_2(list(prog_var)::in, bool::in, + var_locn_info::in, var_locn_info::out) is det. + +maybe_make_vars_forward_dead_2([], _, !VLI). +maybe_make_vars_forward_dead_2([Var | Vars], FirstTime, !VLI) :- + var_locn_var_becomes_dead(Var, FirstTime, !VLI), + maybe_make_vars_forward_dead_2(Vars, FirstTime, !VLI). + +pickup_zombies(Zombies, !CI) :- + get_zombies(!.CI, Zombies), + set_zombies(set_of_var.init, !CI). + +%---------------------------------------------------------------------------% +%---------------------------------------------------------------------------% + + % Submodule for handling the saving and restoration + % of trail tickets, heap pointers, stack pointers etc. + +:- interface. + +:- pred save_hp(llds_code::out, lval::out, + code_info::in, code_info::out) is det. + +:- pred restore_hp(lval::in, llds_code::out) is det. + +:- pred release_hp(lval::in, code_info::in, code_info::out) is det. + +:- pred restore_and_release_hp(lval::in, llds_code::out, + code_info::in, code_info::out) is det. + +:- pred maybe_save_hp(bool::in, llds_code::out, maybe(lval)::out, + code_info::in, code_info::out) is det. + +:- pred maybe_restore_hp(maybe(lval)::in, llds_code::out) is det. + +:- pred maybe_release_hp(maybe(lval)::in, + code_info::in, code_info::out) is det. + +:- pred maybe_restore_and_release_hp(maybe(lval)::in, + llds_code::out, code_info::in, code_info::out) is det. + +:- pred save_ticket(llds_code::out, lval::out, + code_info::in, code_info::out) is det. + +:- pred reset_ticket(lval::in, reset_trail_reason::in, llds_code::out) is det. + +:- pred release_ticket(lval::in, code_info::in, code_info::out) is det. + +:- pred reset_and_prune_ticket(lval::in, reset_trail_reason::in, + llds_code::out) is det. + +:- pred reset_prune_and_release_ticket(lval::in, reset_trail_reason::in, + llds_code::out, code_info::in, code_info::out) is det. + +:- pred reset_and_discard_ticket(lval::in, reset_trail_reason::in, + llds_code::out) is det. + +:- pred reset_discard_and_release_ticket(lval::in, reset_trail_reason::in, + llds_code::out, code_info::in, code_info::out) is det. + +:- pred discard_and_release_ticket(lval::in, llds_code::out, + code_info::in, code_info::out) is det. + +:- pred maybe_save_ticket(add_trail_ops::in, llds_code::out, + maybe(lval)::out, code_info::in, code_info::out) is det. + +:- pred maybe_reset_ticket(maybe(lval)::in, reset_trail_reason::in, + llds_code::out) is det. + +:- pred maybe_release_ticket(maybe(lval)::in, + code_info::in, code_info::out) is det. + +:- pred maybe_reset_and_prune_ticket(maybe(lval)::in, + reset_trail_reason::in, llds_code::out) is det. + +:- pred maybe_reset_prune_and_release_ticket(maybe(lval)::in, + reset_trail_reason::in, llds_code::out, code_info::in, code_info::out) + is det. + +:- pred maybe_reset_and_discard_ticket(maybe(lval)::in, + reset_trail_reason::in, llds_code::out) is det. + +:- pred maybe_reset_discard_and_release_ticket(maybe(lval)::in, + reset_trail_reason::in, llds_code::out, code_info::in, code_info::out) + is det. + +:- pred maybe_discard_and_release_ticket(maybe(lval)::in, llds_code::out, + code_info::in, code_info::out) is det. + + % Should we add trail ops to the code we generate for the goal with the + % given goal_info. This will be 'no' unless we are in a trailing grade. + % +:- func should_add_trail_ops(code_info, hlds_goal_info) = add_trail_ops. + + % Should we add region ops to the code we generate for the goal with the + % given goal_info. This will be 'no' unless we are in a rbmm grade. + % +:- func should_add_region_ops(code_info, hlds_goal_info) = add_region_ops. + +%---------------------------------------------------------------------------% + +:- implementation. + +save_hp(Code, HpSlot, !CI) :- + acquire_temp_slot(slot_lval(hp), non_persistent_temp_slot, HpSlot, !CI), + Code = singleton( + llds_instr(mark_hp(HpSlot), "Save heap pointer") + ). + +restore_hp(HpSlot, Code) :- + Code = singleton( + llds_instr(restore_hp(lval(HpSlot)), "Restore heap pointer") + ). + +release_hp(HpSlot, !CI) :- + release_temp_slot(HpSlot, non_persistent_temp_slot, !CI). + +restore_and_release_hp(HpSlot, Code, !CI) :- + restore_hp(HpSlot, Code), + release_hp(HpSlot, !CI). + +%---------------------------------------------------------------------------% + +maybe_save_hp(Maybe, Code, MaybeHpSlot, !CI) :- + ( + Maybe = yes, + save_hp(Code, HpSlot, !CI), + MaybeHpSlot = yes(HpSlot) + ; + Maybe = no, + Code = empty, + MaybeHpSlot = no + ). + +maybe_restore_hp(MaybeHpSlot, Code) :- + ( + MaybeHpSlot = yes(HpSlot), + restore_hp(HpSlot, Code) + ; + MaybeHpSlot = no, + Code = empty + ). + +maybe_release_hp(MaybeHpSlot, !CI) :- + ( + MaybeHpSlot = yes(HpSlot), + release_hp(HpSlot, !CI) + ; + MaybeHpSlot = no + ). + +maybe_restore_and_release_hp(MaybeHpSlot, Code, !CI) :- + ( + MaybeHpSlot = yes(HpSlot), + restore_and_release_hp(HpSlot, Code, !CI) + ; + MaybeHpSlot = no, + Code = empty + ). + +%---------------------------------------------------------------------------% + +save_ticket(Code, TicketSlot, !CI) :- + acquire_temp_slot(slot_ticket, non_persistent_temp_slot, TicketSlot, !CI), + Code = singleton( + llds_instr(store_ticket(TicketSlot), "Save trail state") + ). + +reset_ticket(TicketSlot, Reason, Code) :- + Code = singleton( + llds_instr(reset_ticket(lval(TicketSlot), Reason), "Reset trail") + ). + +release_ticket(TicketSlot, !CI) :- + release_temp_slot(TicketSlot, non_persistent_temp_slot, !CI). + +reset_and_prune_ticket(TicketSlot, Reason, Code) :- + Code = from_list([ + llds_instr(reset_ticket(lval(TicketSlot), Reason), "Restore trail"), + llds_instr(prune_ticket, "Prune ticket stack") + ]). + +reset_prune_and_release_ticket(TicketSlot, Reason, Code, !CI) :- + Code = from_list([ + llds_instr(reset_ticket(lval(TicketSlot), Reason), "Release trail"), + llds_instr(prune_ticket, "Prune ticket stack") + ]), + release_temp_slot(TicketSlot, non_persistent_temp_slot, !CI). + +reset_and_discard_ticket(TicketSlot, Reason, Code) :- + Code = from_list([ + llds_instr(reset_ticket(lval(TicketSlot), Reason), "Restore trail"), + llds_instr(discard_ticket, "Pop ticket stack") + ]). + +reset_discard_and_release_ticket(TicketSlot, Reason, Code, !CI) :- + Code = from_list([ + llds_instr(reset_ticket(lval(TicketSlot), Reason), "Release trail"), + llds_instr(discard_ticket, "Pop ticket stack") + ]), + release_temp_slot(TicketSlot, non_persistent_temp_slot, !CI). + +discard_and_release_ticket(TicketSlot, Code, !CI) :- + Code = singleton( + llds_instr(discard_ticket, "Pop ticket stack") + ), + release_temp_slot(TicketSlot, non_persistent_temp_slot, !CI). + +%---------------------------------------------------------------------------% + +maybe_save_ticket(AddTrailOps, Code, MaybeTicketSlot, !CI) :- + ( + AddTrailOps = add_trail_ops, + save_ticket(Code, TicketSlot, !CI), + MaybeTicketSlot = yes(TicketSlot) + ; + AddTrailOps = do_not_add_trail_ops, + Code = empty, + MaybeTicketSlot = no + ). + +maybe_reset_ticket(MaybeTicketSlot, Reason, Code) :- + ( + MaybeTicketSlot = yes(TicketSlot), + reset_ticket(TicketSlot, Reason, Code) + ; + MaybeTicketSlot = no, + Code = empty + ). + +maybe_release_ticket(MaybeTicketSlot, !CI) :- + ( + MaybeTicketSlot = yes(TicketSlot), + release_ticket(TicketSlot, !CI) + ; + MaybeTicketSlot = no + ). + +maybe_reset_and_prune_ticket(MaybeTicketSlot, Reason, Code) :- + ( + MaybeTicketSlot = yes(TicketSlot), + reset_and_prune_ticket(TicketSlot, Reason, Code) + ; + MaybeTicketSlot = no, + Code = empty + ). + +maybe_reset_prune_and_release_ticket(MaybeTicketSlot, Reason, + Code, !CI) :- + ( + MaybeTicketSlot = yes(TicketSlot), + reset_prune_and_release_ticket(TicketSlot, Reason, + Code, !CI) + ; + MaybeTicketSlot = no, + Code = empty + ). + +maybe_reset_and_discard_ticket(MaybeTicketSlot, Reason, Code) :- + ( + MaybeTicketSlot = yes(TicketSlot), + reset_and_discard_ticket(TicketSlot, Reason, Code) + ; + MaybeTicketSlot = no, + Code = empty + ). + +maybe_reset_discard_and_release_ticket(MaybeTicketSlot, Reason, + Code, !CI) :- + ( + MaybeTicketSlot = yes(TicketSlot), + reset_discard_and_release_ticket(TicketSlot, Reason, + Code, !CI) + ; + MaybeTicketSlot = no, + Code = empty + ). + +maybe_discard_and_release_ticket(MaybeTicketSlot, Code, !CI) :- + ( + MaybeTicketSlot = yes(TicketSlot), + discard_and_release_ticket(TicketSlot, Code, !CI) + ; + MaybeTicketSlot = no, + Code = empty + ). + + % XXX We will eventually need to make use of GoalInfo here. + % +should_add_trail_ops(CodeInfo, _GoalInfo) = AddTrailOps :- + get_emit_trail_ops(CodeInfo, AddTrailOps). + + % XXX We will eventually need to make use of GoalInfo here. + % +should_add_region_ops(CodeInfo, _GoalInfo) = AddRegionOps :- + get_emit_region_ops(CodeInfo, AddRegionOps). + +%---------------------------------------------------------------------------% +%---------------------------------------------------------------------------% + + % Submodule to deal with var_locn. + + % Most of these procedures just forward to the var_locn module. + % See var_locn for documentation. + +:- interface. + +:- pred variable_locations(code_info::in, + map(prog_var, set(lval))::out) is det. + +:- pred set_var_location(prog_var::in, lval::in, + code_info::in, code_info::out) is det. + +:- pred assign_var_to_var(prog_var::in, prog_var::in, + code_info::in, code_info::out) is det. + +:- pred assign_lval_to_var(prog_var::in, lval::in, llds_code::out, + code_info::in, code_info::out) is det. + +:- pred assign_const_to_var(prog_var::in, rval::in, + code_info::in, code_info::out) is det. + +:- pred assign_expr_to_var(prog_var::in, rval::in, llds_code::out, + code_info::in, code_info::out) is det. + +:- pred reassign_mkword_hole_var(prog_var::in, tag::in, rval::in, + llds_code::out, code_info::in, code_info::out) is det. + +:- pred assign_field_lval_expr_to_var(prog_var::in, list(lval)::in, rval::in, + llds_code::out, code_info::in, code_info::out) is det. + + % assign_cell_to_var(Var, ReserveWordAtStart, Ptag, MaybeRvals, + % AllFilled, MaybeSize, FieldAddrs, TypeMsg, MayUseAtomic, Where, + % Code, !CI). + % +:- pred assign_cell_to_var(prog_var::in, bool::in, tag::in, + list(cell_arg)::in, how_to_construct::in, maybe(term_size_value)::in, + maybe(alloc_site_id)::in, may_use_atomic_alloc::in, + llds_code::out, code_info::in, code_info::out) is det. + +:- pred save_reused_cell_fields(prog_var::in, lval::in, llds_code::out, + list(lval)::out, code_info::in, code_info::out) is det. + +:- pred place_var(prog_var::in, lval::in, llds_code::out, + code_info::in, code_info::out) is det. + +:- pred produce_variable(prog_var::in, llds_code::out, rval::out, + code_info::in, code_info::out) is det. + +:- pred produce_variable_in_reg(prog_var::in, llds_code::out, + lval::out, code_info::in, code_info::out) is det. + +:- pred produce_variable_in_reg_or_stack(prog_var::in, + llds_code::out, lval::out, code_info::in, code_info::out) is det. + +:- pred materialize_vars_in_lval(lval::in, lval::out, + llds_code::out, code_info::in, code_info::out) is det. + +:- pred acquire_reg_for_var(prog_var::in, reg_type::in, lval::out, + code_info::in, code_info::out) is det. + +:- pred acquire_reg_not_in_storemap(abs_store_map::in, reg_type::in, lval::out, + code_info::in, code_info::out) is det. + +:- pred acquire_reg(reg_type::in, lval::out, + code_info::in, code_info::out) is det. + +:- pred release_reg(lval::in, code_info::in, code_info::out) is det. + +:- pred reserve_r1(llds_code::out, code_info::in, code_info::out) is det. + +:- pred clear_r1(llds_code::out, code_info::in, code_info::out) is det. + +:- type call_direction + ---> caller + ; callee. + + % Move variables to where they need to be at the time of the call: + % + % - The variables that need to be saved across the call (either because + % they are forward live after the call or because they are protected + % by an enclosing resumption point) will be saved on the stack. + % Note that if the call cannot succeed and the trace level is none, + % then no variables need to be saved across the call. (If the call + % cannot succeed but the trace level is not none, then we still + % save the usual variables on the stack to make them available + % for up-level printing in the debugger.) + % + % - The input arguments will be moved to their registers. + % +:- pred setup_call(hlds_goal_info::in, assoc_list(prog_var, arg_info)::in, + set(lval)::out, llds_code::out, code_info::in, code_info::out) is det. + + % Move the output arguments of the current procedure to where + % they need to be at return. + % +:- pred setup_return(assoc_list(prog_var, arg_info)::in, + set(lval)::out, llds_code::out, code_info::in, code_info::out) is det. + +:- pred lock_regs(int::in, int::in, assoc_list(prog_var, lval)::in, + code_info::in, code_info::out) is det. + +:- pred unlock_regs(code_info::in, code_info::out) is det. + + % Record the fact that all the registers have been clobbered (as by a + % call). If the bool argument is true, then the call cannot return, and + % thus it is OK for this action to delete the last record of the state + % of a variable. + % +:- pred clear_all_registers(bool::in, code_info::in, code_info::out) is det. + +:- pred clobber_regs(list(lval)::in, code_info::in, code_info::out) is det. + +:- pred save_variables(set_of_progvar::in, set(lval)::out, llds_code::out, + code_info::in, code_info::out) is det. + +:- pred save_variables_on_stack(list(prog_var)::in, llds_code::out, + code_info::in, code_info::out) is det. + +:- pred max_reg_in_use(code_info::in, int::out, int::out) is det. + +:- pred magically_put_var_in_unused_reg(prog_var::in, + code_info::in, code_info::out) is det. + +%---------------------------------------------------------------------------% + +:- implementation. + +variable_locations(CI, Lvals) :- + get_var_locn_info(CI, VarLocnInfo), + var_locn_get_var_locations(VarLocnInfo, Lvals). + +:- func rval_map_to_lval_map(prog_var, set(rval)) = set(lval). + +rval_map_to_lval_map(_Var, Rvals) = + set.filter_map(rval_is_lval, Rvals). + +:- func rval_is_lval(rval) = lval is semidet. + +rval_is_lval(lval(Lval)) = Lval. + +set_var_location(Var, Lval, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + var_locn_check_and_set_magic_var_location(Var, Lval, + VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +assign_var_to_var(Var, AssignedVar, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + var_locn_assign_var_to_var(Var, AssignedVar, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +assign_lval_to_var(Var, Lval, Code, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + get_static_cell_info(!.CI, StaticCellInfo), + get_module_info(!.CI, ModuleInfo), + var_locn_assign_lval_to_var(ModuleInfo, Var, Lval, + StaticCellInfo, Code, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +assign_const_to_var(Var, ConstRval, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + get_exprn_opts(!.CI, ExprnOpts), + var_locn_assign_const_to_var(ExprnOpts, Var, ConstRval, + VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +assign_expr_to_var(Var, Rval, Code, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + Lvals = lvals_in_rval(Rval), + ( + Lvals = [], + var_locn_assign_expr_to_var(Var, Rval, Code, + VarLocnInfo0, VarLocnInfo) + ; + Lvals = [_ | _], + unexpected($module, $pred, "non-var lvals") + ), + set_var_locn_info(VarLocnInfo, !CI). + +reassign_mkword_hole_var(Var, Ptag, Rval, Code, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + Lvals = lvals_in_rval(Rval), + ( + Lvals = [], + var_locn_reassign_mkword_hole_var(Var, Ptag, Rval, Code, + VarLocnInfo0, VarLocnInfo) + ; + Lvals = [_ | _], + unexpected($module, $pred, "non-var lvals") + ), + set_var_locn_info(VarLocnInfo, !CI). + +assign_field_lval_expr_to_var(Var, FieldLvals, Rval, Code, !CI) :- + ( + FieldLvals = [field(MaybeTag, var(BaseVar), _) | RestFieldLvals], + list.all_true(is_var_field(MaybeTag, BaseVar), RestFieldLvals) + -> + ( + Lvals = lvals_in_rval(Rval), + all [Lval] ( + list.member(Lval, Lvals) + => + list.member(Lval, FieldLvals) + ) + -> + get_var_locn_info(!.CI, VarLocnInfo0), + var_locn_assign_field_lval_expr_to_var(Var, BaseVar, Rval, Code, + VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI) + ; + unexpected($module, $pred, "rval contains unexpected lval") + ) + ; + unexpected($module, $pred, + "FieldLvals not all fields of the same base variable") + ). + +:- pred is_var_field(maybe(tag)::in, prog_var::in, lval::in) is semidet. + +is_var_field(MaybeTag, Var, field(MaybeTag, var(Var), _)). + +assign_cell_to_var(Var, ReserveWordAtStart, Ptag, CellArgs, HowToConstruct, + MaybeSize, MaybeAllocId, MayUseAtomic, Code, !CI) :- + get_next_label(Label, !CI), + get_var_locn_info(!.CI, VarLocnInfo0), + get_static_cell_info(!.CI, StaticCellInfo0), + get_module_info(!.CI, ModuleInfo), + get_exprn_opts(!.CI, ExprnOpts), + var_locn_assign_cell_to_var(ModuleInfo, ExprnOpts, Var, ReserveWordAtStart, + Ptag, CellArgs, HowToConstruct, MaybeSize, MaybeAllocId, MayUseAtomic, + Label, Code, StaticCellInfo0, StaticCellInfo, + VarLocnInfo0, VarLocnInfo), + set_static_cell_info(StaticCellInfo, !CI), + set_var_locn_info(VarLocnInfo, !CI). + +save_reused_cell_fields(Var, Lval, Code, Regs, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + get_module_info(!.CI, ModuleInfo), + var_locn_save_cell_fields(ModuleInfo, Var, Lval, Code, Regs, + VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +place_var(Var, Lval, Code, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + get_module_info(!.CI, ModuleInfo), + var_locn_place_var(ModuleInfo, Var, Lval, Code, + VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +:- pred pick_and_place_vars(assoc_list(prog_var, set(lval))::in, + set(lval)::out, llds_code::out, code_info::in, code_info::out) is det. + +pick_and_place_vars(VarLocSets, LiveLocs, Code, !CI) :- + pick_var_places(VarLocSets, VarLocs), + assoc_list.values(VarLocs, Locs), + set.list_to_set(Locs, LiveLocs), + place_vars(VarLocs, Code, !CI). + +:- pred pick_var_places(assoc_list(prog_var, set(lval))::in, + assoc_list(prog_var, lval)::out) is det. + +pick_var_places([], []). +pick_var_places([Var - LvalSet | VarLvalSets], VarLvals) :- + pick_var_places(VarLvalSets, VarLvals0), + ( + set.to_sorted_list(LvalSet, LvalList), + LvalList = [Lval | _] + -> + VarLvals = [Var - Lval | VarLvals0] + ; + VarLvals = VarLvals0 + ). + +:- pred place_vars(assoc_list(prog_var, lval)::in, + llds_code::out, code_info::in, code_info::out) is det. + +place_vars(VarLocs, Code, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + get_module_info(!.CI, ModuleInfo), + var_locn_place_vars(ModuleInfo, VarLocs, Code, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +produce_variable(Var, Code, Rval, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + get_module_info(!.CI, ModuleInfo), + var_locn_produce_var(ModuleInfo, Var, Rval, Code, + VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +produce_variable_in_reg(Var, Code, Lval, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + get_module_info(!.CI, ModuleInfo), + var_locn_produce_var_in_reg(ModuleInfo, Var, Lval, Code, + VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +produce_variable_in_reg_or_stack(Var, Code, Lval, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + get_module_info(!.CI, ModuleInfo), + var_locn_produce_var_in_reg_or_stack(ModuleInfo, Var, Lval, Code, + VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +materialize_vars_in_lval(Lval0, Lval, Code, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + get_module_info(!.CI, ModuleInfo), + var_locn_materialize_vars_in_lval(ModuleInfo, Lval0, Lval, Code, + VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +acquire_reg_for_var(Var, RegType, Lval, !CI) :- + get_follow_var_map(!.CI, FollowVarsMap), + get_next_non_reserved(!.CI, RegType, NextNonReserved), + get_var_locn_info(!.CI, VarLocnInfo0), + ( + map.search(FollowVarsMap, Var, PrefLocn), + PrefLocn = abs_reg(RegType, PrefRegNum), + PrefRegNum >= 1 + -> + var_locn_acquire_reg_prefer_given(RegType, PrefRegNum, Lval, + VarLocnInfo0, VarLocnInfo) + ; + % XXX We should only get a register if the map.search succeeded; + % otherwise we should put the var in its stack slot. + var_locn_acquire_reg_start_at_given(RegType, NextNonReserved, Lval, + VarLocnInfo0, VarLocnInfo) + ), + set_var_locn_info(VarLocnInfo, !CI). + +acquire_reg_not_in_storemap(StoreMap, RegType, Lval, !CI) :- + map.foldl2(record_highest_used_reg, StoreMap, 0, HighestUsedRegR, + 0, HighestUsedRegF), + get_var_locn_info(!.CI, VarLocnInfo0), + ( + RegType = reg_r, + NextRegNum = HighestUsedRegR + 1 + ; + RegType = reg_f, + NextRegNum = HighestUsedRegF + 1 + ), + var_locn_acquire_reg_start_at_given(RegType, NextRegNum, Lval, + VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +:- pred record_highest_used_reg(prog_var::in, abs_locn::in, int::in, int::out, + int::in, int::out) is det. + +record_highest_used_reg(_, AbsLocn, !HighestUsedRegR, !HighestUsedRegF) :- + ( + AbsLocn = any_reg + ; + AbsLocn = abs_reg(reg_r, N), + int.max(N, !HighestUsedRegR) + ; + AbsLocn = abs_reg(reg_f, N), + int.max(N, !HighestUsedRegF) + ; + AbsLocn = abs_stackvar(_, _) + ; + AbsLocn = abs_parent_stackvar(_, _) + ; + AbsLocn = abs_framevar(_, _) + ). + +acquire_reg(Type, Lval, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + var_locn_acquire_reg(Type, Lval, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +release_reg(Lval, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + var_locn_release_reg(Lval, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +reserve_r1(Code, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + get_module_info(!.CI, ModuleInfo), + var_locn_clear_r1(ModuleInfo, Code, VarLocnInfo0, VarLocnInfo1), + var_locn_acquire_reg_require_given(reg(reg_r, 1), + VarLocnInfo1, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +clear_r1(empty, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + var_locn_release_reg(reg(reg_r, 1), VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +%---------------------------------------------------------------------------% + +setup_return(VarArgInfos, OutLocs, Code, !CI) :- + setup_call_args(VarArgInfos, callee, OutLocs, Code, !CI). + +setup_call(GoalInfo, ArgInfos, LiveLocs, Code, !CI) :- + partition_args(ArgInfos, InArgInfos, OutArgInfos, _UnusedArgInfos), + assoc_list.keys(OutArgInfos, OutVars), + set.list_to_set(OutVars, OutVarSet), + Detism = goal_info_get_determinism(GoalInfo), + get_opt_no_return_calls(!.CI, OptNoReturnCalls), + get_module_info(!.CI, ModuleInfo), + VarTypes = get_var_types(!.CI), + ( + Detism = detism_erroneous, + OptNoReturnCalls = yes + -> + RealStackVarLocs = [], + DummyStackVarLocs = [] + ; + compute_forward_live_var_saves(!.CI, set_to_bitset(OutVarSet), + ForwardVarLocs), + CodeModel = goal_info_get_code_model(GoalInfo), + ( + CodeModel = model_non, + % Save variables protected by the nearest resumption point on the + % stack. + % XXX This should be unnecessary; with the current setup, the code + % that established the resume point should have saved those + % variables on the stack already. However, later we should arrange + % things so that this saving of the resume vars on the stack + % is delayed until the first call after the setup of the + % resume point. + compute_resume_var_stack_locs(!.CI, ResumeVarLocs), + list.append(ResumeVarLocs, ForwardVarLocs, StackVarLocs) + ; + ( CodeModel = model_det + ; CodeModel = model_semi + ), + StackVarLocs = ForwardVarLocs + ), + list.filter(valid_stack_slot(ModuleInfo, VarTypes), StackVarLocs, + RealStackVarLocs, DummyStackVarLocs) + ), + get_var_locn_info(!.CI, VarLocnInfo0), + list.filter(key_var_is_of_non_dummy_type(ModuleInfo, VarTypes), + InArgInfos, RealInArgInfos), + var_arg_info_to_lval(RealInArgInfos, RealInArgLocs), + AllRealLocs = RealStackVarLocs ++ RealInArgLocs, + AllLocs = DummyStackVarLocs ++ AllRealLocs, + var_locn_place_vars(ModuleInfo, AllLocs, Code, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI), + assoc_list.values(AllRealLocs, LiveLocList), + set.list_to_set(LiveLocList, LiveLocs). + +:- pred key_var_is_of_non_dummy_type(module_info::in, vartypes::in, + pair(prog_var, arg_info)::in) is semidet. + +key_var_is_of_non_dummy_type(ModuleInfo, VarTypes, Var - _ArgInfo) :- + var_is_of_non_dummy_type(ModuleInfo, VarTypes, Var). + +:- pred valid_stack_slot(module_info::in, vartypes::in, + pair(prog_var, lval)::in) is semidet. + +valid_stack_slot(ModuleInfo, VarTypes, Var - Lval) :- + lookup_var_type(VarTypes, Var, Type), + check_dummy_type(ModuleInfo, Type) = is_not_dummy_type, + ( + ( Lval = stackvar(N) + ; Lval = parent_stackvar(N) + ; Lval = framevar(N) + ), + N < 0 + -> + unexpected($module, $pred, "nondummy var in dummy stack slot") + ; + true + ). + +:- pred setup_call_args(assoc_list(prog_var, arg_info)::in, + call_direction::in, set(lval)::out, llds_code::out, + code_info::in, code_info::out) is det. + +setup_call_args(AllArgsInfos, Direction, LiveLocs, Code, !CI) :- + list.filter(call_arg_in_selected_dir(Direction), AllArgsInfos, ArgsInfos), + var_arg_info_to_lval(ArgsInfos, ArgsLocns), + get_module_info(!.CI, ModuleInfo), + get_var_locn_info(!.CI, VarLocnInfo0), + var_locn_place_vars(ModuleInfo, ArgsLocns, Code, + VarLocnInfo0, VarLocnInfo1), + set_var_locn_info(VarLocnInfo1, !CI), + assoc_list.values(ArgsLocns, LiveLocList), + set.list_to_set(LiveLocList, LiveLocs), + assoc_list.keys(ArgsLocns, ArgVars), + which_variables_are_forward_live(!.CI, ArgVars, set_of_var.init, DeadVars), + make_vars_forward_dead(DeadVars, !CI). + +:- pred var_arg_info_to_lval(assoc_list(prog_var, arg_info)::in, + assoc_list(prog_var, lval)::out) is det. + +var_arg_info_to_lval([], []). +var_arg_info_to_lval([Var - ArgInfo | RestInfos], [Var - Lval | RestLvals]) :- + ArgInfo = arg_info(Loc, _Mode), + code_util.arg_loc_to_register(Loc, Lval), + var_arg_info_to_lval(RestInfos, RestLvals). + +:- pred which_variables_are_forward_live(code_info::in, + list(prog_var)::in, set_of_progvar::in, set_of_progvar::out) is det. + +which_variables_are_forward_live(_, [], !DeadVars). +which_variables_are_forward_live(CI, [Var | Vars], !DeadVars) :- + ( variable_is_forward_live(CI, Var) -> + true + ; + set_of_var.insert(Var, !DeadVars) + ), + which_variables_are_forward_live(CI, Vars, !DeadVars). + +:- pred call_arg_in_selected_dir(call_direction::in, + pair(prog_var, arg_info)::in) is semidet. + +call_arg_in_selected_dir(Direction, _ - arg_info(_, Mode)) :- + ( + Mode = top_in, + Direction = caller + ; + Mode = top_out, + Direction = callee + ). + +lock_regs(R, F, Exceptions, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + var_locn_lock_regs(R, F, Exceptions, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +unlock_regs(!CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + var_locn_unlock_regs(VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +clear_all_registers(OkToDeleteAny, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + var_locn_clobber_all_regs(OkToDeleteAny, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +clobber_regs(Regs, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + var_locn_clobber_regs(Regs, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +save_variables(OutArgs, SavedLocs, Code, !CI) :- + compute_forward_live_var_saves(!.CI, OutArgs, VarLocs), + assoc_list.values(VarLocs, SavedLocList), + set.list_to_set(SavedLocList, SavedLocs), + place_vars(VarLocs, Code, !CI). + +save_variables_on_stack(Vars, Code, !CI) :- + list.map(associate_stack_slot(!.CI), Vars, VarLocs), + place_vars(VarLocs, Code, !CI). + +:- pred compute_forward_live_var_saves(code_info::in, + set_of_progvar::in, assoc_list(prog_var, lval)::out) is det. + +compute_forward_live_var_saves(CI, OutArgs, VarLocs) :- + get_known_variables(CI, Variables0), + Vars0 = set_of_var.list_to_set(Variables0), + TypeInfoLiveness = body_typeinfo_liveness(CI), + get_proc_info(CI, ProcInfo), + proc_info_get_vartypes(ProcInfo, VarTypes), + proc_info_get_rtti_varmaps(ProcInfo, RttiVarMaps), + maybe_complete_with_typeinfo_vars(Vars0, TypeInfoLiveness, VarTypes, + RttiVarMaps, Vars1), + set_of_var.difference(Vars1, OutArgs, Vars), + Variables = set_of_var.to_sorted_list(Vars), + list.map(associate_stack_slot(CI), Variables, VarLocs). + +:- pred associate_stack_slot(code_info::in, prog_var::in, + pair(prog_var, lval)::out) is det. + +associate_stack_slot(CI, Var, Var - Slot) :- + get_variable_slot(CI, Var, Slot). + +max_reg_in_use(CI, MaxR, MaxF) :- + get_var_locn_info(CI, VarLocnInfo), + var_locn_max_reg_in_use(VarLocnInfo, MaxR, MaxF). + +magically_put_var_in_unused_reg(Var, !CI) :- + get_var_locn_info(!.CI, VarLocnInfo0), + make_vars_forward_live_2([Var], map.init, 1, VarLocnInfo0, VarLocnInfo), + set_var_locn_info(VarLocnInfo, !CI). + +%---------------------------------------------------------------------------% +%---------------------------------------------------------------------------% + + % Submodule for dealing with the recording of variable liveness + % information around calls. + % + % Value numbering needs to know what locations are live before calls; + % the garbage collector and the debugger need to know what locations + % are live containing what types of values after calls. + +:- interface. + +:- pred generate_call_vn_livevals(code_info::in, list(arg_loc)::in, + set_of_progvar::in, set(lval)::out) is det. + +:- pred generate_return_live_lvalues(code_info::in, + assoc_list(prog_var, arg_loc)::in, instmap::in, bool::in, + list(liveinfo)::out) is det. + +%---------------------------------------------------------------------------% + +:- implementation. + +generate_call_vn_livevals(CI, InputArgLocs, OutputArgs, LiveVals) :- + generate_call_stack_vn_livevals(CI, OutputArgs, StackLiveVals), + generate_input_var_vn(InputArgLocs, StackLiveVals, LiveVals). + +:- pred generate_call_stack_vn_livevals(code_info::in, + set_of_progvar::in, set(lval)::out) is det. + +generate_call_stack_vn_livevals(CI, OutputArgs, LiveVals) :- + get_known_variables(CI, KnownVarList0), + get_module_info(CI, ModuleInfo), + VarTypes = get_var_types(CI), + list.filter(var_is_of_non_dummy_type(ModuleInfo, VarTypes), + KnownVarList0, KnownVarList), + set_of_var.list_to_set(KnownVarList, KnownVars), + set_of_var.difference(KnownVars, OutputArgs, LiveVars), + set_of_var.to_sorted_list(LiveVars, LiveVarList), + generate_stack_var_vn(CI, LiveVarList, set.init, LiveVals1), + get_active_temps_data(CI, Temps), + generate_call_temp_vn(Temps, LiveVals1, LiveVals). + +:- pred generate_stack_var_vn(code_info::in, list(prog_var)::in, + set(lval)::in, set(lval)::out) is det. + +generate_stack_var_vn(_, [], !Vals). +generate_stack_var_vn(CI, [V | Vs], !Vals) :- + get_variable_slot(CI, V, Lval), + set.insert(Lval, !Vals), + generate_stack_var_vn(CI, Vs, !Vals). + +:- pred generate_call_temp_vn(assoc_list(lval, slot_contents)::in, + set(lval)::in, set(lval)::out) is det. + +generate_call_temp_vn([], !Vals). +generate_call_temp_vn([Lval - _ | Temps], !Vals) :- + set.insert(Lval, !Vals), + generate_call_temp_vn(Temps, !Vals). + +:- pred generate_input_var_vn(list(arg_loc)::in, + set(lval)::in, set(lval)::out) is det. + +generate_input_var_vn([], !Vals). +generate_input_var_vn([InputArgLoc | InputArgLocs], !Vals) :- + code_util.arg_loc_to_register(InputArgLoc, Lval), + set.insert(Lval, !Vals), + generate_input_var_vn(InputArgLocs, !Vals). + +%---------------------------------------------------------------------------% + +generate_return_live_lvalues(CI, OutputArgLocs, ReturnInstMap, + OkToDeleteAny, LiveLvalues) :- + variable_locations(CI, VarLocs), + get_known_variables(CI, Vars0), + get_module_info(CI, ModuleInfo), + VarTypes = get_var_types(CI), + list.filter(var_is_of_non_dummy_type(ModuleInfo, VarTypes), Vars0, Vars), + get_active_temps_data(CI, Temps), + get_proc_info(CI, ProcInfo), + get_globals(CI, Globals), + continuation_info.generate_return_live_lvalues(OutputArgLocs, + ReturnInstMap, Vars, VarLocs, Temps, ProcInfo, ModuleInfo, + Globals, OkToDeleteAny, LiveLvalues). + +:- pred generate_resume_layout(label::in, resume_map::in, + code_info::in, code_info::out) is det. + +generate_resume_layout(Label, ResumeMap, !CI) :- + get_globals(!.CI, Globals), + globals.lookup_bool_option(Globals, agc_stack_layout, AgcStackLayout), + ( + AgcStackLayout = yes, + get_active_temps_data(!.CI, Temps), + get_instmap(!.CI, InstMap), + get_proc_info(!.CI, ProcInfo), + get_module_info(!.CI, ModuleInfo), + continuation_info.generate_resume_layout(ResumeMap, Temps, InstMap, + ProcInfo, ModuleInfo, Layout), + add_resume_layout_for_label(Label, Layout, !CI) + ; + AgcStackLayout = no + ). + +%---------------------------------------------------------------------------% +%---------------------------------------------------------------------------% + + % Submodule for managing stack slots. + + % Det stack frames are organized as follows. + % + % ... unused ... + % sp ---> + % + % ... local vars ... + % + % + % ... temporaries ... + % + % + % + % The stack pointer points to the first free location at the + % top of the stack. + % + % `succip_is_used' determines whether we need a slot to + % hold the succip. + % + % Nondet stack frames also have the local variables above the + % temporaries, but contain several fixed slots on top, and the + % saved succip is stored in one of these. + % + % For both kinds of stack frames, the slots holding variables + % are allocated during the live_vars pass, while the slots holding + % temporaries are acquired (and if possible, released) on demand + % during code generation. + +:- interface. + + % Returns the total stackslot count, but not including space for + % succip. This total can change in the future if this call is + % followed by further allocations of temp slots. + % +:- pred get_total_stackslot_count(code_info::in, int::out) is det. + + % If a stack slot is persistent, then the stack slot is not implicitly + % released when the code generator resets its location-dependent state, + % usually when entering the next arm of a disjunction, switch, etc. + +:- type temp_slot_persistence + ---> persistent_temp_slot + ; non_persistent_temp_slot. + + % Acquire a stack slot for storing a temporary. The slot_contents + % description is for accurate gc. + % +:- pred acquire_temp_slot(slot_contents::in, temp_slot_persistence::in, + lval::out, code_info::in, code_info::out) is det. + + % Release a stack slot acquired earlier for a temporary value. + % The persistence argument should match the acquire operation. + % +:- pred release_temp_slot(lval::in, temp_slot_persistence::in, + code_info::in, code_info::out) is det. + + % acquire_several_temp_slots(Items, Persistence, StackVars, + % StackId, N, M, !Info): + % + % Perform an acquire_temp_slot operation for each element of the + % input list, all with the same persistence. + % + % The slots will be the ones from stack_slot_num_to_lval(StackId, N) + % consecutively to stack_slot_num_to_lval(StackId, M), with N < M. + % These will also be returned as StackVars. + % +:- pred acquire_several_temp_slots(list(slot_contents)::in, + temp_slot_persistence::in, list(lval)::out, + main_stack::out, int::out, int::out, code_info::in, code_info::out) is det. + + % Release the stack slots acquired by an earlier acquire_several_temp_slots + % operation. The persistence argument should match the acquire operation. + % +:- pred release_several_temp_slots(list(lval)::in, temp_slot_persistence::in, + code_info::in, code_info::out) is det. + + % Return the lval of the stack slot in which the given variable is stored. + % Aborts if the variable does not have a stack slot an assigned to it. + % +:- pred get_variable_slot(code_info::in, prog_var::in, lval::out) is det. + +%---------------------------------------------------------------------------% +%---------------------------------------------------------------------------% + +:- implementation. + +acquire_temp_slot(Item, Persistence, StackVar, !CI) :- + get_temp_content_map(!.CI, TempContentMap0), + map.to_assoc_list(TempContentMap0, TempContentList), + get_temps_in_use(!.CI, TempsInUse0), + ( + find_unused_slot_for_item(TempContentList, Item, TempsInUse0, + ChosenStackVar, _) + -> + StackVar = ChosenStackVar + ; + new_temp_slot(Item, StackVar, !CI) + ), + set.insert(StackVar, TempsInUse0, TempsInUse), + set_temps_in_use(TempsInUse, !CI), + ( + Persistence = persistent_temp_slot, + get_persistent_temps(!.CI, PersistentTemps0), + set.insert(StackVar, PersistentTemps0, PersistentTemps), + set_persistent_temps(PersistentTemps, !CI) + ; + Persistence = non_persistent_temp_slot + ). + +acquire_several_temp_slots([], _, _, _, _, _, !CI) :- + % We could return an empty list of stack vars for StackVars, but there is + % nothing meaningful we can return for the other outputs. + unexpected($module, $pred, "[]"). +acquire_several_temp_slots([HeadItem | TailItems], Persistence, StackVars, + StackId, FirstSlotNum, LastSlotNum, !CI) :- + get_temp_content_map(!.CI, TempContentMap0), + map.to_assoc_list(TempContentMap0, TempContentList), + get_temps_in_use(!.CI, TempsInUse0), + ( + find_unused_slots_for_items(TempContentList, HeadItem, TailItems, + TempsInUse0, StackVarsPrime, + StackIdPrime, FirstSlotNumPrime, LastSlotNumPrime) + -> + StackVars = StackVarsPrime, + StackId = StackIdPrime, + FirstSlotNum = FirstSlotNumPrime, + LastSlotNum = LastSlotNumPrime + ; + new_temp_slots([HeadItem | TailItems], StackVars, + StackId, FirstSlotNum, LastSlotNum, !CI) + ), + set.insert_list(StackVars, TempsInUse0, TempsInUse), + set_temps_in_use(TempsInUse, !CI), + ( + Persistence = persistent_temp_slot, + get_persistent_temps(!.CI, PersistentTemps0), + set.insert_list(StackVars, PersistentTemps0, PersistentTemps), + set_persistent_temps(PersistentTemps, !CI) + ; + Persistence = non_persistent_temp_slot + ). + +:- pred new_temp_slot(slot_contents::in, lval::out, + code_info::in, code_info::out) is det. + +new_temp_slot(Item, StackVar, !CI) :- + get_var_slot_count(!.CI, VarSlotCount), + get_max_temp_slot_count(!.CI, TempSlotCount0), + TempSlotCount = TempSlotCount0 + 1, + SlotNum = VarSlotCount + TempSlotCount, + CodeModel = get_proc_model(!.CI), + StackId = code_model_to_main_stack(CodeModel), + StackVar = stack_slot_num_to_lval(StackId, SlotNum), + set_max_temp_slot_count(TempSlotCount, !CI), + + get_temp_content_map(!.CI, TempContentMap0), + map.det_insert(StackVar, Item, TempContentMap0, TempContentMap), + set_temp_content_map(TempContentMap, !CI). + +:- pred new_temp_slots(list(slot_contents)::in, list(lval)::out, + main_stack::out, int::out, int::out, code_info::in, code_info::out) is det. + +new_temp_slots(Items, StackVars, StackId, FirstSlotNum, LastSlotNum, !CI) :- + get_var_slot_count(!.CI, VarSlotCount), + get_max_temp_slot_count(!.CI, TempSlotCount0), + FirstSlotNum = VarSlotCount + TempSlotCount0 + 1, + CodeModel = get_proc_model(!.CI), + StackId = code_model_to_main_stack(CodeModel), + get_temp_content_map(!.CI, TempContentMap0), + record_new_temp_slots(Items, StackId, FirstSlotNum, FirstUnusedSlotNum, + TempSlotCount0, TempSlotCount, TempContentMap0, TempContentMap, + StackVars), + LastSlotNum = FirstUnusedSlotNum - 1, + set_max_temp_slot_count(TempSlotCount, !CI), + set_temp_content_map(TempContentMap, !CI). + +:- pred record_new_temp_slots(list(slot_contents)::in, + main_stack::in, int::in, int::out, int::in, int::out, + map(lval, slot_contents)::in, map(lval, slot_contents)::out, + list(lval)::out) is det. + +record_new_temp_slots([], _, !CurSlotNum, !TempSlotCount, !TempContentMap, []). +record_new_temp_slots([Item | Items], StackId, !CurSlotNum, + !TempSlotCount, !TempContentMap, [StackVar | StackVars]) :- + StackVar = stack_slot_num_to_lval(StackId, !.CurSlotNum), + map.det_insert(StackVar, Item, !TempContentMap), + !:CurSlotNum = !.CurSlotNum + 1, + !:TempSlotCount = !.TempSlotCount + 1, + record_new_temp_slots(Items, StackId, !CurSlotNum, + !TempSlotCount, !TempContentMap, StackVars). + +:- pred find_unused_slot_for_item(assoc_list(lval, slot_contents)::in, + slot_contents::in, set(lval)::in, lval::out, + assoc_list(lval, slot_contents)::out) is semidet. + +find_unused_slot_for_item([Head | Tail], Item, TempsInUse, + ChosenStackVar, Remainder) :- + Head = HeadStackVar - HeadSlotType, + ( + HeadSlotType = Item, + \+ set.member(HeadStackVar, TempsInUse) + -> + ChosenStackVar = HeadStackVar, + Remainder = Tail + ; + find_unused_slot_for_item(Tail, Item, TempsInUse, + ChosenStackVar, Remainder) + ). + +:- pred find_unused_slots_for_items(assoc_list(lval, slot_contents)::in, + slot_contents::in, list(slot_contents)::in, set(lval)::in, list(lval)::out, + main_stack::out, int::out, int::out) is semidet. + +find_unused_slots_for_items([Head | Tail], HeadItem, TailItems, TempsInUse, + ChosenStackVars, StackId, FirstSlotNum, LastSlotNum) :- + ( + find_unused_slot_for_item([Head | Tail], HeadItem, TempsInUse, + ChosenHeadStackVar, Remainder), + ( ChosenHeadStackVar = stackvar(N) -> + StackId0 = det_stack, + FirstSlotNum0 = N + ; ChosenHeadStackVar = framevar(N) -> + StackId0 = nondet_stack, + FirstSlotNum0 = N + ; + unexpected($module, $pred, "not stackvar or framevar") + ), + StackId1 = StackId0, + FirstSlotNum1 = FirstSlotNum0, + find_next_slots_for_items(Remainder, TailItems, TempsInUse, + ChosenTailStackVars, StackId1, FirstSlotNum1, LastSlotNum1) + -> + ChosenStackVars = [ChosenHeadStackVar | ChosenTailStackVars], + StackId = StackId1, + FirstSlotNum = FirstSlotNum1, + LastSlotNum = LastSlotNum1 + ; + find_unused_slots_for_items(Tail, HeadItem, TailItems, TempsInUse, + ChosenStackVars, StackId, FirstSlotNum, LastSlotNum) + ). + +:- pred find_next_slots_for_items(assoc_list(lval, slot_contents)::in, + list(slot_contents)::in, set(lval)::in, list(lval)::out, + main_stack::in, int::in, int::out) is semidet. + +find_next_slots_for_items([], [], _, [], _, !SlotNum). +find_next_slots_for_items([Head | Tail], [HeadItem | TailItems], TempsInUse, + [HeadStackVar | TailStackVars], StackId, !SlotNum) :- + Head = HeadStackVar - HeadSlotType, + !:SlotNum = !.SlotNum + 1, + HeadStackVar = stack_slot_num_to_lval(StackId, !.SlotNum), + HeadSlotType = HeadItem, + \+ set.member(HeadStackVar, TempsInUse), + find_next_slots_for_items(Tail, TailItems, TempsInUse, + TailStackVars, StackId, !SlotNum). + +release_temp_slot(StackVar, Persistence, !CI) :- + get_temps_in_use(!.CI, TempsInUse0), + set.delete(StackVar, TempsInUse0, TempsInUse), + set_temps_in_use(TempsInUse, !CI), + + get_persistent_temps(!.CI, PersistentTemps0), + set.is_member(StackVar, PersistentTemps0, IsInPersistentTemps0), + ( + Persistence = persistent_temp_slot, + expect(unify(IsInPersistentTemps0, yes), + $module, $pred, "released stack slot should be persistent"), + set.delete(StackVar, PersistentTemps0, PersistentTemps), + set_persistent_temps(PersistentTemps, !CI) + ; + Persistence = non_persistent_temp_slot, + expect(unify(IsInPersistentTemps0, no), + $module, $pred, "released stack slot should not be persistent") + ). + +release_several_temp_slots([], _Persistence, !CI). +release_several_temp_slots([StackVar | StackVars], Persistence, !CI) :- + release_temp_slot(StackVar, Persistence, !CI), + release_several_temp_slots(StackVars, Persistence, !CI). + +%---------------------------------------------------------------------------% + +get_variable_slot(CI, Var, Slot) :- + get_stack_slots(CI, StackSlots), + ( map.search(StackSlots, Var, SlotLocn) -> + Slot = stack_slot_to_lval(SlotLocn) + ; + Name = variable_name(CI, Var), + term.var_to_int(Var, Num), + string.int_to_string(Num, NumStr), + Str = "variable `" ++ Name ++ "' " ++ "(" ++ NumStr ++ ") not found", + unexpected($module, $pred, Str) + ). + +get_total_stackslot_count(CI, NumSlots) :- + get_var_slot_count(CI, SlotsForVars), + get_max_temp_slot_count(CI, SlotsForTemps), + NumSlots = SlotsForVars + SlotsForTemps. + +:- pred max_var_slot(stack_slots::in, int::out) is det. + +max_var_slot(StackSlots, SlotCount) :- + map.values(StackSlots, StackSlotList), + max_var_slot_2(StackSlotList, 0, SlotCount). + +:- pred max_var_slot_2(list(stack_slot)::in, int::in, int::out) is det. + +max_var_slot_2([], !Max). +max_var_slot_2([L | Ls], !Max) :- + ( + L = det_slot(N, Width) + ; + L = parent_det_slot(N, Width) + ; + L = nondet_slot(N, Width) + ), + ( + Width = single_width, + int.max(N, !Max) + ; + Width = double_width, + int.max(N + 1, !Max) + ), + max_var_slot_2(Ls, !Max). + +%---------------------------------------------------------------------------% + + % Submodule for debugging the code generator itself. + +:- interface. + + % Should we trace the operation of the code generator. + % +:- pred should_trace_code_gen(code_info::in) is semidet. + +:- type code_info_component + ---> cic_forward_live_vars + ; cic_zombies + ; cic_temps_in_use + ; cic_par_conj_depth. + + % Print the selected parts of the code_info. + % + % If you need to print a part that is not currently selectable, make it + % selectable. + % +:- pred output_code_info(list(code_info_component)::in, code_info::in, + io::di, io::uo) is det. + +:- implementation. + +should_trace_code_gen(CI) :- + code_info.get_pred_id(CI, PredId), + pred_id_to_int(PredId, PredIdInt), + code_info.get_module_info(CI, ModuleInfo), + module_info_get_globals(ModuleInfo, Globals), + globals.lookup_int_option(Globals, debug_code_gen_pred_id, DebugPredIdInt), + PredIdInt = DebugPredIdInt. + +output_code_info(Components, CI, !IO) :- + CI = code_info(Static, LocDep, _Persistent), + VarSet = Static ^ cis_varset, + LocDep = code_info_loc_dep(ForwardLiveVars, _InstMap, Zombies, + _VarLocnInfo, TempsInUse, _FailInfo, ParConjDepth), + ( list.member(cic_forward_live_vars, Components) -> + io.write_string("forward live vars: ", !IO), + mercury_output_vars(VarSet, yes, + set_of_var.to_sorted_list(ForwardLiveVars), !IO), + io.nl(!IO) + ; + true + ), + ( list.member(cic_zombies, Components) -> + io.write_string("zombies: ", !IO), + mercury_output_vars(VarSet, yes, + set_of_var.to_sorted_list(Zombies), !IO), + io.nl(!IO) + ; + true + ), + ( list.member(cic_temps_in_use, Components) -> + io.write_string("temps_in_use: ", !IO), + io.write_string(dump_lvals(no, set.to_sorted_list(TempsInUse)), !IO), + io.nl(!IO) + ; + true + ), + ( list.member(cic_par_conj_depth, Components) -> + io.format("par_conj_depth: %d\n", [i(ParConjDepth)], !IO) + ; + true + ). + +:- pred output_resume_map(prog_varset::in, map(prog_var, set(lval))::in, + io::di, io::uo) is det. + +output_resume_map(VarSet, ResumeMap, !IO) :- + map.to_assoc_list(ResumeMap, ResumeAssocList), + list.foldl(output_resume_map_element(VarSet), ResumeAssocList, !IO). + +:- pred output_resume_map_element(prog_varset::in, + pair(prog_var, set(lval))::in, io::di, io::uo) is det. + +output_resume_map_element(VarSet, Var - LvalSet, !IO) :- + io.write_string(describe_var(VarSet, Var), !IO), + io.write_string(": ", !IO), + Lvals = set.to_sorted_list(LvalSet), + LvalDescs = list.map(dump_lval(no), Lvals), + SpaceLvalDescs = list.map(string.append(" "), LvalDescs), + io.write_string(string.append_list(SpaceLvalDescs), !IO), + io.nl(!IO). + +%---------------------------------------------------------------------------% +:- end_module ll_backend.code_info. +%---------------------------------------------------------------------------% diff --git a/samples/Mercury/expr.moo b/samples/Mercury/expr.moo new file mode 100644 index 00000000..30a140ab --- /dev/null +++ b/samples/Mercury/expr.moo @@ -0,0 +1,72 @@ +:- module expr. + +:- interface. + +:- import_module char, int, list. + +:- type token + ---> ('+') + ; ('-') + ; ('*') + ; ('/') + ; num(int) + ; ('(') + ; (')') + ; eof + . + +:- parse(exprn/1, token, eof, xx, in, out). + +:- pred scan(list(char), list(token)). +:- mode scan(in, out) is det. + +:- implementation. + +:- import_module string, require. + +:- rule exprn(int). +exprn(Num) ---> exprn(A), [+], term(B), { Num = A + B }. +exprn(Num) ---> exprn(A), [-], term(B), { Num = A - B }. +exprn(Num) ---> term(Num). + +:- rule term(int). +term(Num) ---> term(A), [*], factor(B), { Num = A * B }. +term(Num) ---> term(A), [/], factor(B), { Num = A // B }. +term(Num) ---> factor(Num). + +:- rule factor(int). +factor(Num) ---> ['('], exprn(Num), [')']. +factor(Num) ---> [num(Num)]. + +scan(Chars, Toks) :- + scan(Chars, [], Toks0), + list__reverse(Toks0, Toks). + +:- pred scan(list(char), list(token), list(token)). +:- mode scan(in, in, out) is det. + +scan([], Toks, [eof|Toks]). +scan([C|Cs], Toks0, Toks) :- + ( char__is_whitespace(C) -> + scan(Cs, Toks0, Toks) + ; char__is_digit(C) -> + takewhile(char__is_digit, [C|Cs], Digits, Rest), + string__from_char_list(Digits, NumStr), + Num = string__det_to_int(NumStr), + scan(Rest, [num(Num)|Toks0], Toks) + ; C = ('+') -> + scan(Cs, ['+'|Toks0], Toks) + ; C = ('-') -> + scan(Cs, ['-'|Toks0], Toks) + ; C = ('*') -> + scan(Cs, ['*'|Toks0], Toks) + ; C = ('/') -> + scan(Cs, ['/'|Toks0], Toks) + ; C = ('(') -> + scan(Cs, ['('|Toks0], Toks) + ; C = (')') -> + scan(Cs, [')'|Toks0], Toks) + ; + error("expr: syntax error in input") + ). + diff --git a/samples/Mercury/hello.m b/samples/Mercury/hello.m new file mode 100644 index 00000000..c73f65ca --- /dev/null +++ b/samples/Mercury/hello.m @@ -0,0 +1,14 @@ +% "Hello World" in Mercury. + +% This source file is hereby placed in the public domain. -fjh (the author). + +:- module hello. +:- interface. +:- import_module io. + +:- pred main(io::di, io::uo) is det. + +:- implementation. + +main(!IO) :- + io.write_string("Hello, world\n", !IO). diff --git a/samples/Mercury/options.m b/samples/Mercury/options.m new file mode 100644 index 00000000..ceee077c --- /dev/null +++ b/samples/Mercury/options.m @@ -0,0 +1,5884 @@ +%-----------------------------------------------------------------------------% +% vim: ft=mercury ts=4 sw=4 et +%-----------------------------------------------------------------------------% +% Copyright (C) 1994-2012 The University of Melbourne. +% This file may only be copied under the terms of the GNU General +% Public License - see the file COPYING in the Mercury distribution. +%-----------------------------------------------------------------------------% +% +% File: options.m. +% Main author: fjh. +% +% This defines the stuff necessary so that getopt_io.m can parse the +% command-line options. +% +% IMPORTANT NOTE: any changes to the options should be reflected in both the +% help message produced below, and in the Mercury User's Guide +% (../doc/user_guide.texi). +% +%-----------------------------------------------------------------------------% + +:- module libs.options. +:- interface. + +:- import_module char. +:- import_module getopt_io. +:- import_module io. +:- import_module set. + +%-----------------------------------------------------------------------------% + +:- pred short_option(char::in, option::out) is semidet. +:- pred long_option(string::in, option::out) is semidet. +:- pred option_defaults(option::out, option_data::out) is nondet. + + % special_handler(Option, ValueForThatOption, OptionTableIn, + % MaybeOptionTableOut): + % + % This predicate is invoked whenever getopt finds an option + % (long or short) designated as special, with special_data holding + % the argument of the option (if any). The predicate can change the + % option table in arbitrary ways in the course of handling the option, + % or it can return an error message. + % The canonical examples of special options are -O options in + % compilers, which set many other options at once. + % The MaybeOptionTableOut may either be ok(OptionTableOut), or it may + % be error(ErrorString). + % +:- pred special_handler(option::in, special_data::in, option_table::in, + maybe_option_table::out) is semidet. + + % Return the set of options which are inconsequential as far as the + % `--track-flags' option is concerned. That is, adding or removing such + % an option to a module should not force the module to be recompiled. + % +:- pred inconsequential_options(set(option)::out) is det. + +:- pred options_help(io::di, io::uo) is det. + +:- type option_table == option_table(option). +:- type maybe_option_table == maybe_option_table(option). + + % Add a directory to search for Mercury libraries. This + % adds `--search-directory', `--c-include-directory', + % `--erlang-include-directory', + % `--library-directory' and `--init-file-directory' options. + % +:- func option_table_add_mercury_library_directory(option_table, string) + = option_table. + + % Add a directory using all of the + % `--search-directory', `--intermod-directory', + % `--library-directory', `--init-file-directory' and + % `--c-include-directory', `--erlang-include-directory' + % options. + % +:- func option_table_add_search_library_files_directory(option_table, + string) = option_table. + + % Quote an argument to a shell command. + % +:- func quote_arg(string) = string. + + % NOTE: ALL OPTIONS SHOULD BE DOCUMENTED! + % + % Officially supported options should be documented both in the + % help message output by options_help/2, and also in the + % "invocation" chapter of doc/user_guide.texi. + % + % Options which are not officially supported (e.g. those used + % internally by the Mercury implementation, those which are not + % sufficiently useful to be worth mentioning in the User Guide, + % or options for experimental features that are not yet stable + % enough to be officially supported should still be documented. + % The documentation can go either next to the option definition + % here, or as commented-out code in the appropriate subroutine + % of options_help/2. +:- type option + + % Warning options + ---> inhibit_warnings + ; inhibit_accumulator_warnings + ; halt_at_warn + ; halt_at_syntax_errors + ; halt_at_auto_parallel_failure + ; warn_singleton_vars + ; warn_overlapping_scopes + ; warn_det_decls_too_lax + ; warn_inferred_erroneous + ; warn_nothing_exported + ; warn_unused_args + ; warn_interface_imports + ; warn_missing_opt_files + ; warn_missing_trans_opt_files + ; warn_missing_trans_opt_deps + ; warn_non_contiguous_clauses + ; warn_non_contiguous_foreign_procs + ; warn_non_stratification + ; warn_unification_cannot_succeed + ; warn_simple_code + ; warn_duplicate_calls + ; warn_missing_module_name + ; warn_wrong_module_name + ; warn_smart_recompilation + ; warn_undefined_options_variables + ; warn_non_tail_recursion + ; warn_target_code + ; warn_up_to_date + ; warn_stubs + ; warn_dead_procs + ; warn_table_with_inline + ; warn_non_term_special_preds + ; warn_known_bad_format_calls + ; warn_unknown_format_calls + ; warn_obsolete + ; warn_insts_without_matching_type + ; warn_unused_imports + ; inform_ite_instead_of_switch + ; warn_unresolved_polymorphism + ; warn_suspicious_foreign_procs + ; warn_state_var_shadowing + ; inform_inferred + ; inform_inferred_types + ; inform_inferred_modes + + % Verbosity options + ; verbose + ; very_verbose + ; verbose_errors + ; verbose_recompilation + ; find_all_recompilation_reasons + ; verbose_make + ; verbose_commands + ; output_compile_error_lines + ; report_cmd_line_args + ; report_cmd_line_args_in_doterr + ; statistics + ; detailed_statistics + ; proc_size_statistics + ; debug_types + ; debug_modes + ; debug_modes_statistics + ; debug_modes_minimal + ; debug_modes_verbose + ; debug_modes_pred_id + ; debug_dep_par_conj + ; debug_det + ; debug_code_gen_pred_id + ; debug_opt + ; debug_term % term = constraint termination analysis + ; debug_opt_pred_id + ; debug_opt_pred_name + ; debug_pd % pd = partial deduction/deforestation + ; debug_il_asm % il_asm = IL generation via asm + ; debug_liveness + ; debug_stack_opt + ; debug_make + ; debug_closure + ; debug_trail_usage + ; debug_mode_constraints + ; debug_intermodule_analysis + ; debug_mm_tabling_analysis + ; debug_indirect_reuse + ; debug_type_rep + + % Output options + ; make_short_interface + ; make_interface + ; make_private_interface + ; make_optimization_interface + ; make_transitive_opt_interface + ; make_analysis_registry + ; make_xml_documentation + ; generate_source_file_mapping + ; generate_dependency_file + ; generate_dependencies + ; generate_module_order + ; generate_standalone_interface + ; convert_to_mercury + ; typecheck_only + ; errorcheck_only + ; target_code_only + ; compile_only + ; compile_to_shared_lib + ; output_grade_string + ; output_link_command + ; output_shared_lib_link_command + ; output_libgrades + ; output_cc + ; output_c_compiler_type + ; output_csharp_compiler_type + ; output_cflags + ; output_library_link_flags + ; output_grade_defines + ; output_c_include_directory_flags + + % Auxiliary output options + ; smart_recompilation + % Even if this option is set to `yes', smart recompilation may + % have been disabled with io_set_disable_smart_recompilation. + % Before using the value of this option, call + % io_get_disable_smart_recompilation to see whether this + % has been done. + + ; generate_item_version_numbers + % This option is used to control output of version numbers + % in interface files. It is implied by --smart-recompilation, + % and cannot be set explicitly by the user. + + % Even if this option is set to `yes', version numbers may have + % been disabled with io_set_disable_generate_item_version_numbers. + % Before using the value of this option, call + % io_get_disable_generate_item_version_numbers to see whether this + % has been done. + + ; generate_mmc_make_module_dependencies + ; assume_gmake + ; trace_level + ; trace_optimized + ; trace_prof + ; trace_table_io + ; trace_table_io_only_retry + ; trace_table_io_states + ; trace_table_io_require + ; trace_table_io_all + ; trace_goal_flags + ; prof_optimized + ; exec_trace_tail_rec + ; suppress_trace + ; force_disable_tracing + % Force no tracing, even in .debug grades. This is used to turn off + % tracing in the browser directory while still allowing the browser + % library to be linked in with an executable compiled in a .debug + % grade. + ; delay_death + ; delay_death_max_vars + + ; stack_trace_higher_order + ; force_disable_ssdebug + ; generate_bytecode + ; line_numbers + ; auto_comments + ; frameopt_comments + ; max_error_line_width + ; show_dependency_graph + ; imports_graph + ; dump_trace_counts + ; dump_hlds + ; dump_hlds_pred_id + ; dump_hlds_pred_name + ; dump_hlds_alias + ; dump_hlds_options + ; dump_hlds_inst_limit + ; dump_hlds_file_suffix + ; dump_same_hlds + ; dump_mlds + ; verbose_dump_mlds + ; mode_constraints + ; simple_mode_constraints + ; prop_mode_constraints + ; benchmark_modes + ; benchmark_modes_repeat + ; sign_assembly + ; separate_assemblies + + % Language semantics options + ; reorder_conj + ; reorder_disj + ; fully_strict + ; strict_sequential + ; allow_stubs + ; infer_types + ; infer_modes + ; infer_det + ; infer_all + ; type_inference_iteration_limit + ; mode_inference_iteration_limit + ; event_set_file_name + + % Compilation Model options + ; grade + + % Target selection options + ; target + ; il % target il + ; il_only % target il + target_code_only + ; compile_to_c % target c + target_code_only + ; java % target java + ; java_only % target java + target_code_only + ; csharp % target csharp + ; csharp_only % target csharp + target_code_only + % XXX The following options need to be documented. + ; x86_64 % target x86_64 + ; x86_64_only % target x86_64 + target_code_only + ; erlang % target erlang + ; erlang_only % target erlang + target_code_only + + % Compilation model options for optional features: + + % (a) Debugging + % For documentation of the exec_trace and decl_debug options, see the + % documentation for MR_EXEC_TRACE and MR_DECL_DEBUG in + % runtime/mercury_conf_param.h. + ; exec_trace + ; decl_debug + + % (b) Profiling + ; profiling % profile_time + profile_calls + ; time_profiling % profile_time + profile_calls + ; memory_profiling % profile_mem + profile_calls + ; deep_profiling % profile_deep + ; profile_calls + ; profile_time + ; profile_memory + ; profile_deep + ; use_activation_counts + % Use_activation_counts is used to determine which mechanism for + % cycle detection should be used for deep profiling. Actually, + % we only want to use the `yes' value, but we keep support for + % the `no' value for benchmarks for the paper. + + ; pre_prof_transforms_simplify + % Run the simplification pass at before profiling (stage 215) this + % is implied by some of the profiling settings. Specifying this + % option causes this simplification pass to run even when profiling + % is not enabled. + + ; pre_implicit_parallelism_simplify + % Run the simplification pass before the implicit parallelism pass + % to ensure that the HLDS more closely matches the feedback data. + + % Perform coverage profiling, this affects only deep profiling + % grades. + ; coverage_profiling + ; coverage_profiling_via_calls + ; coverage_profiling_static + + % What types of coverage points to instrument the code with. + ; profile_deep_coverage_after_goal + ; profile_deep_coverage_branch_ite + ; profile_deep_coverage_branch_switch + ; profile_deep_coverage_branch_disj + + % Tunables for the coverage profiling pass. + % XXX: Currently both these options are unsupported. + ; profile_deep_coverage_use_portcounts + ; profile_deep_coverage_use_trivial + + % Turn on flags relevant for profiler directed feedback analysis. + % Currently the only feedback analysis is automatic parallelism. + ; profile_for_feedback + + ; use_zeroing_for_ho_cycles + ; use_lots_of_ho_specialization + + % We should always handle tail recursion specially in deep + % profiling; the option is only for benchmarks for the paper, + % except that this is currently broken, and not supported with + % coverage profiling. + ; deep_profile_tail_recursion + ; record_term_sizes_as_words + ; record_term_sizes_as_cells + ; experimental_complexity + + % (c) Miscellaneous + ; gc + ; parallel + ; threadscope + ; use_trail + ; trail_segments + ; use_minimal_model_stack_copy + ; use_minimal_model_own_stacks + ; minimal_model_debug + ; single_prec_float + ; type_layout + ; maybe_thread_safe_opt + ; extend_stacks_when_needed + ; stack_segments + ; use_regions + ; use_alloc_regions + ; use_regions_debug + ; use_regions_profiling + ; source_to_source_debug + ; ssdb_trace_level + ; link_ssdb_libs + + % Data representation compilation model options + ; tags + ; num_tag_bits + ; num_reserved_addresses + ; num_reserved_objects + ; bits_per_word + ; bytes_per_word + % The undocumented conf_low_tag_bits option is used by the `mmc' + % script to pass the default value for num_tag_bits assuming + % --tags low. The reason that `mmc' doesn't just pass a default + % value for --num-tag-bits is that we want to be able to give an + % error message if the user specifies `--tags high' and doesn't + % specify `--num-tag-bits'. + + ; conf_low_tag_bits + ; unboxed_float + ; unboxed_enums + ; unboxed_no_tag_types + ; sync_term_size % in words + + % LLDS back-end compilation model options + ; gcc_non_local_gotos + ; gcc_global_registers + ; asm_labels + ; pic_reg + ; use_float_registers + + % MLDS back-end compilation model options + ; highlevel_code + ; highlevel_data + ; gcc_nested_functions + ; det_copy_out + ; nondet_copy_out + ; put_commit_in_own_func + ; put_nondet_env_on_heap + + % IL back-end compilation model options + ; verifiable_code + ; il_refany_fields + ; il_funcptr_types + ; il_byref_tailcalls + % Currently this is not really a compilation model option, i.e. + % it doesn't affect the ABI. In future it might become one, though + % -- we should return multiple values in value types, rather than + % using byrefs. Also it's nicer to keep it with the other IL + % back-end options here. + + % Options for internal use only (the values of these options are implied + % by the settings of other options) + + ; backend_foreign_languages + % The foreign programming languages that this backend can + % interface to. + + ; stack_trace + % Stack layout information required to do a stack trace. + + ; basic_stack_layout + % Stack layout information required to do accurate GC. + + ; agc_stack_layout + % Stack layout information required to do procedure identification. + + ; procid_stack_layout + % Stack layout information required to do execution tracing. + + ; trace_stack_layout + + ; body_typeinfo_liveness + % Use an alternate calculation of liveness where the typeinfo + % for a type variable must live at any point in the body of the + % procedure at which a live variable's type includes that type + % variable. + % + % Although this option governs whether the body of a procedure + % uses this liveness calculation, it is not the only consideration + % we have to take into account when deciding on the interface + % of any procedure whose address may be taken. We must include + % typeinfos describing the types of all arguments in the interface + % of a procedure if either this option is set *or* the procedure's + % address may be taken, otherwise, the layout structure we include + % in closures using that procedure may not have all the information + % required to reconstruct the types of all the values inside the + % closure. + % + % The only place in the compiler that should look at this option + % is the predicate body_should_use_typeinfo_liveness in + % hlds_pred.m; everything else, including the predicates deciding + % interface typeinfo liveness, should go through there. + + ; can_compare_constants_as_ints + % Should be set to yes if the target back end guarantees that + % comparing two values for equality, at least one of which is a + % constant, can be done by casting them both to integers and + % comparing the integers for equality. + + ; pretest_equality_cast_pointers + % Should be set to yes if the test of whether two input arguments + % are object identical should be done by casting the arguments to a + % generic pointer type. Otherwise they will be cast to integers. + + ; can_compare_compound_values + % Should be set to yes if the target back end supports comparison + % of non-atomic values with builtin operators. + + ; lexically_order_constructors + % Should be set to yes if we need to order functors + % lexically when generating comparison predicates, + % e.g. to match the natural order that functors will be compared + % on the backend. + + ; mutable_always_boxed + + ; delay_partial_instantiations + + % Options for internal use only (setting these options to non-default + % values can result in programs that do not link, or programs that dump + % core) + ; allow_defn_of_builtins + % Do not generate errors for definitions of builtin predicates. + % When a new builtin is introduced, the installed compiler won't + % know about it, and thus when it sees its declaration, it wants a + % definition, but when the modified compiler is bootstrapped, + % it would normally generate an error when it sees that very same + % definition in the library (usually in builtin.m or + % private_builtin.m). When this option is set, it allows such + % definitions. Once the modified compiler is installed on all + % relevant machines, the option can be turned off again. + + ; special_preds + % Generate unify and compare preds. For measurement only. + % Code generated with this set to `no' is unlikely to actually + % work. + + ; type_ctor_info + % Generate type_ctor_info structures. For measurement only -- + % if you turn this off, then you're unlikely to be able to link. + + ; type_ctor_layout + % Generate type_ctor_layout structures. For measurement only -- + % if you turn this off, then you're unlikely to be able to link. + + ; type_ctor_functors + % Generate type_ctor_functors structures. For measurement only -- + % if you turn this off, then you're unlikely to be able to link. + + ; new_type_class_rtti + % XXX temporary option: enables the generation of new style static + % data structures for runtime information about type classes. + % These are not yet used. When we add code to generate the matching + % dynamic data structures and switch over to use them, we won't + % need this option anymore. + + ; rtti_line_numbers + % Generate line number information in the RTTI when debugging is + % enabled. For measurement only -- if you turn this off, then the + % debugger may dereference garbage pointers. + + ; disable_minimal_model_stack_copy_pneg + ; disable_minimal_model_stack_copy_cut + ; use_minimal_model_stack_copy_pneg + ; use_minimal_model_stack_copy_cut + % These four are used to analyze the performance effects + % of minimal model tabling. + + ; disable_trail_ops + % This is used to analyze the performance effects of trailing. + + ; size_region_ite_fixed + ; size_region_disj_fixed + ; size_region_semi_disj_fixed + ; size_region_commit_fixed + + ; size_region_ite_protect + ; size_region_ite_snapshot + ; size_region_semi_disj_protect + ; size_region_disj_snapshot + ; size_region_commit_entry + + ; solver_type_auto_init + % Insert calls to solver type initialisation predicates when + % the inst of solver type variables changes from free to any. + + ; allow_multi_arm_switches + + ; type_check_constraints + + ; allow_argument_packing + + % Code generation options + ; low_level_debug + ; table_debug + ; trad_passes + ; parallel_liveness + ; parallel_code_gen + ; polymorphism + ; reclaim_heap_on_failure + ; reclaim_heap_on_semidet_failure + ; reclaim_heap_on_nondet_failure + ; have_delay_slot + ; num_real_r_regs + ; num_real_f_regs + ; num_real_r_temps + ; num_real_f_temps + ; max_jump_table_size + ; max_specialized_do_call_closure + ; max_specialized_do_call_class_method + ; compare_specialization + ; should_pretest_equality + ; fact_table_max_array_size + % Maximum number of elements in a single fact table data array. + + ; fact_table_hash_percent_full + % How full the fact table hash tables should be allowed to get, + % given as an integer percentage. + + ; gcc_local_labels + ; prefer_switch + ; opt_no_return_calls + + % Optimization Options + ; opt_level + ; opt_level_number + ; opt_space % Default is to optimize time. + ; intermodule_optimization + ; read_opt_files_transitively + ; use_opt_files + ; use_trans_opt_files + ; transitive_optimization + ; intermodule_analysis + ; analysis_repeat + ; analysis_file_cache + + % - HLDS + ; allow_inlining + ; inlining + ; inline_simple + ; inline_builtins + ; inline_single_use + ; inline_call_cost + ; inline_compound_threshold + ; inline_simple_threshold + ; inline_vars_threshold + ; intermod_inline_simple_threshold + ; from_ground_term_threshold + ; enable_const_struct + ; common_struct + ; common_struct_preds + ; common_goal + ; constraint_propagation + ; local_constraint_propagation + ; optimize_unused_args + ; intermod_unused_args + ; optimize_higher_order + ; higher_order_size_limit + ; higher_order_arg_limit + ; unneeded_code + ; unneeded_code_copy_limit + ; unneeded_code_debug + ; unneeded_code_debug_pred_name + ; type_specialization + ; user_guided_type_specialization + ; introduce_accumulators + ; optimize_constructor_last_call_accumulator + ; optimize_constructor_last_call_null + ; optimize_constructor_last_call + ; optimize_duplicate_calls + ; constant_propagation + ; excess_assign + ; optimize_format_calls + ; optimize_saved_vars_const + ; optimize_saved_vars_cell + ; optimize_saved_vars_cell_loop + ; optimize_saved_vars_cell_full_path + ; optimize_saved_vars_cell_on_stack + ; optimize_saved_vars_cell_candidate_headvars + ; optimize_saved_vars_cell_cv_store_cost + ; optimize_saved_vars_cell_cv_load_cost + ; optimize_saved_vars_cell_fv_store_cost + ; optimize_saved_vars_cell_fv_load_cost + ; optimize_saved_vars_cell_op_ratio + ; optimize_saved_vars_cell_node_ratio + ; optimize_saved_vars_cell_all_path_node_ratio + ; optimize_saved_vars_cell_include_all_candidates + ; optimize_saved_vars + ; loop_invariants + ; delay_construct + ; follow_code + ; optimize_dead_procs + ; deforestation + ; deforestation_depth_limit + ; deforestation_cost_factor + ; deforestation_vars_threshold + ; deforestation_size_threshold + ; analyse_trail_usage + ; optimize_trail_usage + ; optimize_region_ops + ; analyse_mm_tabling + ; untuple + ; tuple + ; tuple_trace_counts_file + ; tuple_costs_ratio + ; tuple_min_args + ; inline_par_builtins + ; always_specialize_in_dep_par_conjs + ; allow_some_paths_only_waits + ; region_analysis + + % Stuff for the CTGC system (structure sharing / structure reuse). + ; structure_sharing_analysis + ; structure_sharing_widening + ; structure_reuse_analysis + ; structure_reuse_constraint + ; structure_reuse_constraint_arg + ; structure_reuse_max_conditions + ; structure_reuse_repeat + ; structure_reuse_free_cells + + % Stuff for the old termination analyser. + ; termination + ; termination_check + ; verbose_check_termination + ; termination_single_args + ; termination_norm + ; termination_error_limit + ; termination_path_limit + + % Stuff for the new termination analyser. + ; termination2 + ; check_termination2 + ; verbose_check_termination2 + ; termination2_norm + ; widening_limit + ; arg_size_analysis_only + ; propagate_failure_constrs + ; term2_maximum_matrix_size + ; analyse_exceptions + ; analyse_closures + + % - HLDS->LLDS + ; smart_indexing + ; dense_switch_req_density + ; lookup_switch_req_density + ; dense_switch_size + ; lookup_switch_size + ; string_hash_switch_size + ; string_binary_switch_size + ; tag_switch_size + ; try_switch_size + ; binary_switch_size + ; switch_single_rec_base_first + ; switch_multi_rec_base_first + + ; static_ground_cells + ; static_ground_floats + ; static_code_addresses + + ; use_atomic_cells + ; middle_rec + ; simple_neg + ; allow_hijacks + + % - MLDS + ; optimize_tailcalls + ; optimize_initializations + ; eliminate_local_vars + ; generate_trail_ops_inline + + % - LLDS + ; common_data + ; common_layout_data + ; optimize % Also used for MLDS->MLDS optimizations. + ; optimize_peep + ; optimize_peep_mkword + ; optimize_jumps + ; optimize_fulljumps + ; pessimize_tailcalls + ; checked_nondet_tailcalls + ; use_local_vars + ; local_var_access_threshold + ; standardize_labels + ; optimize_labels + ; optimize_dups + ; optimize_proc_dups + ; optimize_frames + ; optimize_delay_slot + ; optimize_reassign + ; optimize_repeat + ; layout_compression_limit + + % - C + ; use_macro_for_redo_fail + ; emit_c_loops + ; procs_per_c_function + ; everything_in_one_c_function + ; local_thread_engine_base + + % - IL + % (none yet) + + % - Erlang + ; erlang_switch_on_strings_as_atoms + + % Target code compilation options + ; target_debug + + % C + ; cc + ; cflags + ; quoted_cflag + ; c_include_directory + ; c_optimize + ; ansi_c + ; inline_alloc + + % Flags for specific C compilers. + ; gcc_flags + ; quoted_gcc_flag + ; clang_flags + ; quoted_clang_flag + ; msvc_flags + ; quoted_msvc_flag + + % Auto-configured C compilation options. + ; cflags_for_warnings + ; cflags_for_optimization + ; cflags_for_ansi + ; cflags_for_regs + ; cflags_for_gotos + ; cflags_for_threads + ; cflags_for_debug + ; cflags_for_pic + ; c_flag_to_name_object_file + ; object_file_extension + ; pic_object_file_extension + ; link_with_pic_object_file_extension + ; c_compiler_type + ; csharp_compiler_type + + % Java + ; java_compiler + ; java_interpreter + ; java_flags + ; quoted_java_flag + ; java_classpath + ; java_object_file_extension + + % IL + ; il_assembler + ; ilasm_flags + ; quoted_ilasm_flag + ; dotnet_library_version + ; support_ms_clr + ; support_rotor_clr + + % C# + ; csharp_compiler + ; csharp_flags + ; quoted_csharp_flag + ; cli_interpreter + + % Erlang + ; erlang_compiler + ; erlang_interpreter + ; erlang_flags + ; quoted_erlang_flag + ; erlang_include_directory + ; erlang_object_file_extension + ; erlang_native_code + ; erlang_inhibit_trivial_warnings + + % Link options + ; output_file_name + ; ld_flags + ; quoted_ld_flag + ; ld_libflags + ; quoted_ld_libflag + ; link_library_directories + ; runtime_link_library_directories + ; link_libraries + ; link_objects + ; mercury_library_directories + ; mercury_library_directory_special + ; search_library_files_directories + ; search_library_files_directory_special + ; mercury_libraries + ; mercury_library_special + ; mercury_standard_library_directory + ; mercury_standard_library_directory_special + ; init_file_directories + ; init_files + ; trace_init_files + ; linkage + ; linkage_special + ; mercury_linkage + ; mercury_linkage_special + ; strip + ; demangle + ; main + ; allow_undefined + ; use_readline + ; runtime_flags + ; extra_initialization_functions + ; frameworks + ; framework_directories + + % Auto-configured options. + ; shared_library_extension + ; library_extension + ; executable_file_extension + ; link_executable_command + ; link_shared_lib_command + ; create_archive_command + ; create_archive_command_output_flag + ; create_archive_command_flags + ; ranlib_command + ; ranlib_flags + ; mkinit_command + ; mkinit_erl_command + ; demangle_command + ; filtercc_command + ; trace_libs + ; thread_libs + ; hwloc_libs + ; hwloc_static_libs + ; shared_libs + ; math_lib + ; readline_libs + ; linker_opt_separator + ; linker_thread_flags + ; shlib_linker_thread_flags + ; linker_static_flags + ; linker_strip_flag + ; linker_link_lib_flag + ; linker_link_lib_suffix + ; shlib_linker_link_lib_flag + ; shlib_linker_link_lib_suffix + ; linker_debug_flags + ; shlib_linker_debug_flags + ; linker_trace_flags + ; shlib_linker_trace_flags + ; linker_path_flag + ; linker_rpath_flag + ; linker_rpath_separator + ; shlib_linker_rpath_flag + ; shlib_linker_rpath_separator + ; linker_allow_undefined_flag + ; linker_error_undefined_flag + ; shlib_linker_use_install_name + ; shlib_linker_install_name_flag + ; shlib_linker_install_name_path + ; java_archive_command + + % Build system options + ; make + ; keep_going + ; rebuild + ; jobs + ; track_flags + ; invoked_by_mmc_make + ; extra_init_command + ; pre_link_command + ; install_prefix + ; use_symlinks + ; mercury_configuration_directory + ; mercury_configuration_directory_special + ; install_command + ; install_command_dir_option + ; libgrades + ; libgrades_include_components + ; libgrades_exclude_components + ; lib_linkages + ; flags_file + ; options_files + ; config_file + ; options_search_directories + ; use_subdirs + ; use_grade_subdirs + ; search_directories + ; intermod_directories + ; use_search_directories_for_intermod + ; libgrade_install_check + ; order_make_by_timestamp + ; show_make_times + ; extra_library_header + ; restricted_command_line + ; env_type + ; host_env_type + ; target_env_type + + % Miscellaneous Options + ; filenames_from_stdin + ; typecheck_ambiguity_warn_limit + ; typecheck_ambiguity_error_limit + ; help + ; version + ; fullarch + ; cross_compiling + ; local_module_id + ; analysis_file_cache_dir + ; compiler_sufficiently_recent + % This option is used to test that the compiler is sufficiently + % recent when no other test can easily be constructed in + % configure.in. + + ; experiment + % This option is provided for use by implementors who want to + % compare a new way of doing something with the old way. The idea + % is that the code that switches between the two ways should + % consult this option and make its decision accordingly. + % + % The intention is that all use of this option is within developer + % workspaces; no code using this option should be committed. + % + % Of course, a developer could always create a purpose-specific + % option to control their code, but adding an option requires + % recompiling most of the modules in the compiler. Having this + % option permanently here should reduce the need for that. + + ; ignore_par_conjunctions + ; control_granularity + ; distance_granularity + ; implicit_parallelism + ; feedback_file + ; par_loop_control + ; par_loop_control_preserve_tail_recursion. + +%----------------------------------------------------------------------------% +%----------------------------------------------------------------------------% + +:- implementation. + +:- import_module libs.handle_options. + +:- import_module assoc_list. +:- import_module bool. +:- import_module dir. +:- import_module int. +:- import_module list. +:- import_module map. +:- import_module maybe. +:- import_module pair. +:- import_module require. +:- import_module string. + +%----------------------------------------------------------------------------% + +:- type option_category + ---> warning_option + ; verbosity_option + ; output_option + ; aux_output_option + ; language_semantics_option + ; compilation_model_option + ; internal_use_option + ; code_gen_option + ; special_optimization_option + ; optimization_option + ; target_code_compilation_option + ; link_option + ; build_system_option + ; miscellaneous_option. + +option_defaults(Option, Default) :- + option_defaults_2(_Category, OptionsList), + list.member(Option - Default, OptionsList). + +:- pred option_defaults_2(option_category, list(pair(option, option_data))). +:- mode option_defaults_2(in, out) is det. +:- mode option_defaults_2(out, out) is multi. + +option_defaults_2(warning_option, [ + % Warning Options + inhibit_warnings - bool_special, + inhibit_accumulator_warnings - bool(no), + halt_at_warn - bool(no), + halt_at_syntax_errors - bool(no), + halt_at_auto_parallel_failure - bool(no), + + % IMPORTANT NOTE: + % if you add any new warning options, or if you change the default + % for an existing warning option to `yes', then you will need to modify + % the handling of inhibit_warnings. + + warn_singleton_vars - bool(yes), + warn_overlapping_scopes - bool(yes), + warn_det_decls_too_lax - bool(yes), + warn_inferred_erroneous - bool(yes), + warn_nothing_exported - bool(yes), + warn_unused_args - bool(no), + warn_interface_imports - bool(yes), + warn_non_contiguous_clauses - bool(no), % XXX should be yes + warn_non_contiguous_foreign_procs - bool(no), + warn_non_stratification - bool(no), + warn_missing_opt_files - bool(yes), + warn_missing_trans_opt_files - bool(no), + warn_missing_trans_opt_deps - bool(yes), + warn_unification_cannot_succeed - bool(yes), + warn_simple_code - bool(yes), + warn_duplicate_calls - bool(no), + warn_missing_module_name - bool(yes), + warn_wrong_module_name - bool(yes), + warn_smart_recompilation - bool(yes), + warn_undefined_options_variables - bool(yes), + warn_non_tail_recursion - bool(no), + warn_target_code - bool(yes), + warn_up_to_date - bool(yes), + warn_stubs - bool(yes), + warn_dead_procs - bool(no), + warn_table_with_inline - bool(yes), + warn_non_term_special_preds - bool(yes), + warn_known_bad_format_calls - bool(yes), + warn_unknown_format_calls - bool(no), + warn_obsolete - bool(yes), + warn_insts_without_matching_type - bool(yes), + % XXX disabled by default until someone + % removes all the unused imports from + % the compiler itself which is compiled + % with --halt-at-warn by default. + warn_unused_imports - bool(no), + inform_ite_instead_of_switch - bool(no), + warn_unresolved_polymorphism - bool(yes), + warn_suspicious_foreign_procs - bool(no), + warn_state_var_shadowing - bool(yes), + inform_inferred - bool_special, + inform_inferred_types - bool(yes), + inform_inferred_modes - bool(yes) +]). +option_defaults_2(verbosity_option, [ + % Verbosity Options + verbose - bool(no), + very_verbose - bool(no), + verbose_errors - bool(no), + verbose_recompilation - bool(no), + find_all_recompilation_reasons - bool(no), + verbose_make - bool(yes), + verbose_commands - bool(no), + output_compile_error_lines - int(15), + report_cmd_line_args - bool(no), + report_cmd_line_args_in_doterr - bool(no), + statistics - bool(no), + detailed_statistics - bool(no), + proc_size_statistics - string(""), + debug_types - bool(no), + debug_modes - bool(no), + debug_modes_statistics - bool(no), + debug_modes_minimal - bool(no), + debug_modes_verbose - bool(no), + debug_modes_pred_id - int(-1), + debug_dep_par_conj - accumulating([]), + debug_det - bool(no), + debug_code_gen_pred_id - int(-1), + debug_term - bool(no), + debug_opt - bool(no), + debug_opt_pred_id - accumulating([]), + debug_opt_pred_name - accumulating([]), + debug_pd - bool(no), + debug_il_asm - bool(no), + debug_liveness - int(-1), + debug_stack_opt - int(-1), + debug_make - bool(no), + debug_closure - bool(no), + debug_trail_usage - bool(no), + debug_mode_constraints - bool(no), + debug_intermodule_analysis - bool(no), + debug_mm_tabling_analysis - bool(no), + debug_indirect_reuse - bool(no), + debug_type_rep - bool(no) +]). +option_defaults_2(output_option, [ + % Output Options (mutually exclusive) + generate_source_file_mapping - bool(no), + generate_dependency_file - bool(no), + generate_dependencies - bool(no), + generate_module_order - bool(no), + generate_standalone_interface - maybe_string(no), + make_short_interface - bool(no), + make_interface - bool(no), + make_private_interface - bool(no), + make_optimization_interface - bool(no), + make_transitive_opt_interface - bool(no), + make_analysis_registry - bool(no), + make_xml_documentation - bool(no), + convert_to_mercury - bool(no), + typecheck_only - bool(no), + errorcheck_only - bool(no), + target_code_only - bool(no), + compile_only - bool(no), + compile_to_shared_lib - bool(no), + output_grade_string - bool(no), + output_link_command - bool(no), + output_shared_lib_link_command - bool(no), + output_libgrades - bool(no), + output_cc - bool(no), + output_c_compiler_type - bool(no), + output_csharp_compiler_type - bool(no), + output_cflags - bool(no), + output_library_link_flags - bool(no), + output_grade_defines - bool(no), + output_c_include_directory_flags - bool(no) +]). +option_defaults_2(aux_output_option, [ + % Auxiliary Output Options + smart_recompilation - bool(no), + generate_item_version_numbers - bool(no), + generate_mmc_make_module_dependencies - bool(no), + assume_gmake - bool(yes), + trace_level - string("default"), + trace_optimized - bool(no), + trace_prof - bool(no), + trace_table_io - bool(no), + trace_table_io_only_retry - bool(no), + trace_table_io_states - bool(no), + trace_table_io_require - bool(no), + trace_table_io_all - bool(no), + trace_goal_flags - accumulating([]), + prof_optimized - bool(no), + exec_trace_tail_rec - bool(no), + suppress_trace - string(""), + force_disable_tracing - bool(no), + delay_death - bool(yes), + delay_death_max_vars - int(1000), + stack_trace_higher_order - bool(no), + force_disable_ssdebug - bool(no), + generate_bytecode - bool(no), + line_numbers - bool(yes), + auto_comments - bool(no), + frameopt_comments - bool(no), + max_error_line_width - int(79), + show_dependency_graph - bool(no), + imports_graph - bool(no), + dump_trace_counts - accumulating([]), + dump_hlds - accumulating([]), + dump_hlds_pred_id - accumulating([]), + dump_hlds_pred_name - accumulating([]), + dump_hlds_alias - string(""), + dump_hlds_options - string(""), + dump_hlds_inst_limit - int(100), + dump_hlds_file_suffix - string(""), + dump_same_hlds - bool(no), + dump_mlds - accumulating([]), + verbose_dump_mlds - accumulating([]), + mode_constraints - bool(no), + simple_mode_constraints - bool(no), + prop_mode_constraints - bool(no), + benchmark_modes - bool(no), + benchmark_modes_repeat - int(1), + sign_assembly - bool(no), + % XXX should default to no but currently broken + separate_assemblies - bool(yes) +]). +option_defaults_2(language_semantics_option, [ + strict_sequential - special, + reorder_conj - bool(yes), + reorder_disj - bool(yes), + fully_strict - bool(yes), + allow_stubs - bool(no), + infer_types - bool(no), + infer_modes - bool(no), + infer_det - bool(yes), + infer_all - bool_special, + type_inference_iteration_limit - int(60), + mode_inference_iteration_limit - int(30), + event_set_file_name - string("") +]). +option_defaults_2(compilation_model_option, [ + % Compilation model options (ones that affect binary compatibility). + grade - string_special, + % The `mmc' script will pass the default grade determined + % at configuration time. + + % Target selection compilation model options + target - string("c"), + il - special, + il_only - special, + compile_to_c - special, + csharp - special, + csharp_only - special, + java - special, + java_only - special, + x86_64 - special, + x86_64_only - special, + erlang - special, + erlang_only - special, + + % Optional feature compilation model options: + % (a) Debuggging + exec_trace - bool(no), + decl_debug - bool(no), + % (b) Profiling + profiling - bool_special, + time_profiling - special, + memory_profiling - special, + deep_profiling - special, + profile_calls - bool(no), + profile_time - bool(no), + profile_memory - bool(no), + profile_deep - bool(no), + use_activation_counts - bool(no), + pre_prof_transforms_simplify - bool(no), + pre_implicit_parallelism_simplify - bool(no), + coverage_profiling - bool(yes), + coverage_profiling_via_calls - bool(no), + coverage_profiling_static - bool(no), + profile_deep_coverage_after_goal - bool(yes), + profile_deep_coverage_branch_ite - bool(yes), + profile_deep_coverage_branch_switch - bool(yes), + profile_deep_coverage_branch_disj - bool(yes), + profile_deep_coverage_use_portcounts - bool(no), + profile_deep_coverage_use_trivial - bool(no), + profile_for_feedback - bool(no), + use_zeroing_for_ho_cycles - bool(yes), + use_lots_of_ho_specialization - bool(no), + deep_profile_tail_recursion - bool(no), + record_term_sizes_as_words - bool(no), + record_term_sizes_as_cells - bool(no), + experimental_complexity - string(""), + % (c) Miscellaneous optional features + gc - string("boehm"), + parallel - bool(no), + threadscope - bool(no), + use_trail - bool(no), + trail_segments - bool(no), + maybe_thread_safe_opt - string("no"), + extend_stacks_when_needed - bool(no), + stack_segments - bool(no), + use_regions - bool(no), + use_alloc_regions - bool(yes), + use_regions_debug - bool(no), + use_regions_profiling - bool(no), + use_minimal_model_stack_copy - bool(no), + use_minimal_model_own_stacks - bool(no), + minimal_model_debug - bool(no), + single_prec_float - bool(no), + type_layout - bool(yes), + source_to_source_debug - bool(no), + ssdb_trace_level - string("default"), + link_ssdb_libs - bool(no), + + % Data representation compilation model options + pic_reg - bool(no), + tags - string("low"), + num_tag_bits - int(-1), + % -1 is a special value which means + % use the value of conf_low_tag_bits + % instead + num_reserved_addresses - int(0), + num_reserved_objects - int(0), + bits_per_word - int(32), + % A good default for the current + % generation of architectures. + bytes_per_word - int(4), + % A good default for the current + % generation of architectures. + conf_low_tag_bits - int(2), + % The `mmc' script will override the + % above default with a value determined + % at configuration time. + sync_term_size - int(8), + % 8 is the size on linux (at the time + % of writing) - will usually be + % overridden by a value from configure. + unboxed_float - bool(no), + unboxed_enums - bool(yes), + unboxed_no_tag_types - bool(yes), + + % LLDS back-end compilation model options + gcc_non_local_gotos - bool(yes), + gcc_global_registers - bool(yes), + asm_labels - bool(yes), + use_float_registers - bool(yes), + + % MLDS back-end compilation model options + highlevel_code - bool(no), + highlevel_data - bool(no), + gcc_nested_functions - bool(no), + det_copy_out - bool(no), + nondet_copy_out - bool(no), + put_commit_in_own_func - bool(no), + put_nondet_env_on_heap - bool(no), + + % IL back-end compilation model options + verifiable_code - bool(no), + il_funcptr_types - bool(no), + il_refany_fields - bool(no), + il_byref_tailcalls - bool(no) +]). +option_defaults_2(internal_use_option, [ + % Options for internal use only + backend_foreign_languages - accumulating([]), + % The backend_foreign_languages option + % depends on the target and is set in + % handle_options. + stack_trace - bool(no), + basic_stack_layout - bool(no), + agc_stack_layout - bool(no), + procid_stack_layout - bool(no), + trace_stack_layout - bool(no), + body_typeinfo_liveness - bool(no), + can_compare_constants_as_ints - bool(no), + pretest_equality_cast_pointers - bool(no), + can_compare_compound_values - bool(no), + lexically_order_constructors - bool(no), + mutable_always_boxed - bool(yes), + delay_partial_instantiations - bool(no), + allow_defn_of_builtins - bool(no), + special_preds - bool(yes), + type_ctor_info - bool(yes), + type_ctor_layout - bool(yes), + type_ctor_functors - bool(yes), + rtti_line_numbers - bool(yes), + new_type_class_rtti - bool(no), + disable_minimal_model_stack_copy_pneg - bool(no), + disable_minimal_model_stack_copy_cut - bool(no), + use_minimal_model_stack_copy_pneg - bool(no), + use_minimal_model_stack_copy_cut - bool(no), + disable_trail_ops - bool(no), + % The size_* values below *must* be consistent with the corresponding + % values or data structures in mercury_region.h. + size_region_ite_fixed - int(4), + size_region_disj_fixed - int(4), + size_region_commit_fixed - int(5), + size_region_ite_protect - int(1), + size_region_ite_snapshot - int(3), + size_region_semi_disj_protect - int(1), + size_region_disj_snapshot - int(3), + size_region_commit_entry - int(1), + solver_type_auto_init - bool(no), + allow_multi_arm_switches - bool(yes), + type_check_constraints - bool(no), + allow_argument_packing - bool(yes) +]). +option_defaults_2(code_gen_option, [ + % Code Generation Options + low_level_debug - bool(no), + table_debug - bool(no), + trad_passes - bool(yes), + parallel_liveness - bool(no), + parallel_code_gen - bool(no), + polymorphism - bool(yes), + reclaim_heap_on_failure - bool_special, + reclaim_heap_on_semidet_failure - bool(yes), + reclaim_heap_on_nondet_failure - bool(yes), + have_delay_slot - bool(no), + % The `mmc' script may override the + % above default if configure says + % the machine has branch delay slots. + num_real_r_regs - int(5), + num_real_f_regs - int(0), + num_real_r_temps - int(5), + num_real_f_temps - int(0), + % The `mmc' script will override the + % above defaults with values determined + % at configuration time. + max_jump_table_size - int(0), + % 0 indicates any size. + max_specialized_do_call_closure - int(5), + % mercury.do_call_closure_N + % exists for N <= option_value; + % set to -1 to disable. + % Should be less than or equal to + % max_spec_explicit_arg + % in tools/make_spec_ho_call. + max_specialized_do_call_class_method - int(6), + % mercury.do_call_class_method_N + % exists for N <= option_value; + % set to -1 to disable. + % Should be less than or equal to + % max_spec_explicit_arg + % in tools/make_spec_method_call. + compare_specialization - int(-1), + % -1 asks handle_options.m to give + % the value, which may be grade + % dependent. + should_pretest_equality - bool(yes), + fact_table_max_array_size - int(1024), + fact_table_hash_percent_full - int(90), + gcc_local_labels - bool(no), + prefer_switch - bool(yes), + opt_no_return_calls - bool(yes) +]). +option_defaults_2(special_optimization_option, [ + % Special optimization options. + % These ones are not affected by `-O'. + opt_level - int_special, + opt_level_number - int(-2), + opt_space - special, + intermodule_optimization - bool(no), + read_opt_files_transitively - bool(yes), + use_opt_files - bool(no), + use_trans_opt_files - bool(no), + transitive_optimization - bool(no), + intermodule_analysis - bool(no), + analysis_repeat - int(0), + analysis_file_cache - bool(no), + termination_check - bool(no), + verbose_check_termination - bool(no), + structure_sharing_analysis - bool(no), + structure_sharing_widening - int(0), + structure_reuse_analysis - bool(no), + structure_reuse_constraint - string("within_n_cells_difference"), + structure_reuse_constraint_arg - int(0), + structure_reuse_max_conditions - int(10), + structure_reuse_repeat - int(0), + structure_reuse_free_cells - bool(no), + termination - bool(no), + termination_single_args - int(0), + termination_norm - string("total"), + termination_error_limit - int(3), + termination_path_limit - int(256), + termination2 - bool(no), + termination2_norm - string("total"), + check_termination2 - bool(no), + verbose_check_termination2 - bool(no), + widening_limit - int(4), + arg_size_analysis_only - bool(no), + propagate_failure_constrs - bool(yes), + % XXX This is just a guess - I'm not sure what sensible + % value for this is. + term2_maximum_matrix_size - int(70), + analyse_exceptions - bool(no), + analyse_closures - bool(no), + analyse_trail_usage - bool(no), + optimize_trail_usage - bool(no), + optimize_region_ops - bool(no), + analyse_mm_tabling - bool(no) +]). +option_defaults_2(optimization_option, [ + % Optimization options + % + % IMPORTANT: the default here should be all optimizations OFF. + % Optimizations should be enabled by the appropriate + % optimization level in the opt_level table. + + % HLDS + allow_inlining - bool(yes), + inlining - bool_special, + inline_simple - bool(no), + inline_builtins - bool(yes), + inline_single_use - bool(no), + inline_call_cost - int(0), + inline_compound_threshold - int(0), + inline_simple_threshold - int(5), + % Has no effect until + % --inline-simple is enabled. + inline_vars_threshold - int(100), + intermod_inline_simple_threshold - int(5), + % Has no effect until + % --intermodule-optimization. + from_ground_term_threshold - int(5), + enable_const_struct - bool(yes), + common_struct - bool(no), + common_struct_preds - string(""), + common_goal - bool(yes), + % common_goal is not really an + % optimization, since it affects + % the semantics. + + constraint_propagation - bool(no), + local_constraint_propagation - bool(no), + optimize_duplicate_calls - bool(no), + constant_propagation - bool(no), + excess_assign - bool(no), + optimize_format_calls - bool(yes), + loop_invariants - bool(no), + optimize_saved_vars_const - bool(no), + optimize_saved_vars_cell - bool(no), + optimize_saved_vars_cell_loop - bool(yes), + optimize_saved_vars_cell_full_path - bool(yes), + optimize_saved_vars_cell_on_stack - bool(yes), + optimize_saved_vars_cell_candidate_headvars - bool(yes), + optimize_saved_vars_cell_cv_store_cost - int(3), + optimize_saved_vars_cell_cv_load_cost - int(1), + optimize_saved_vars_cell_fv_store_cost - int(1), + optimize_saved_vars_cell_fv_load_cost - int(1), + optimize_saved_vars_cell_op_ratio - int(100), + optimize_saved_vars_cell_node_ratio - int(100), + optimize_saved_vars_cell_all_path_node_ratio - int(100), + optimize_saved_vars_cell_include_all_candidates - bool(yes), + optimize_saved_vars - bool_special, + delay_construct - bool(no), + follow_code - bool(no), + optimize_unused_args - bool(no), + intermod_unused_args - bool(no), + optimize_higher_order - bool(no), + higher_order_size_limit - int(20), + higher_order_arg_limit - int(10), + unneeded_code - bool(no), + unneeded_code_copy_limit - int(10), + unneeded_code_debug - bool(no), + unneeded_code_debug_pred_name - accumulating([]), + type_specialization - bool(no), + user_guided_type_specialization - bool(no), + introduce_accumulators - bool(no), + optimize_constructor_last_call_accumulator - bool(no), + optimize_constructor_last_call_null - bool(no), + optimize_constructor_last_call - bool(no), + optimize_dead_procs - bool(no), + deforestation - bool(no), + deforestation_depth_limit - int(4), + deforestation_cost_factor - int(1000), + deforestation_vars_threshold - int(200), + deforestation_size_threshold - int(15), + untuple - bool(no), + tuple - bool(no), + tuple_trace_counts_file - string(""), + tuple_costs_ratio - int(100), + tuple_min_args - int(4), + inline_par_builtins - bool(no), + always_specialize_in_dep_par_conjs - bool(no), + allow_some_paths_only_waits - bool(yes), + region_analysis - bool(no), + + % HLDS -> LLDS + smart_indexing - bool(no), + dense_switch_req_density - int(25), + % Minimum density before using + % a dense switch. + lookup_switch_req_density - int(25), + % Minimum density before using + % a lookup switch. + dense_switch_size - int(4), + lookup_switch_size - int(4), + string_hash_switch_size - int(8), + string_binary_switch_size - int(4), + tag_switch_size - int(3), + try_switch_size - int(3), + binary_switch_size - int(4), + switch_single_rec_base_first - bool(no), + switch_multi_rec_base_first - bool(yes), + static_ground_cells - bool(no), + static_ground_floats - bool(no), + static_code_addresses - bool(no), + use_atomic_cells - bool(no), + middle_rec - bool(no), + simple_neg - bool(no), + allow_hijacks - bool(yes), + + % MLDS + optimize_tailcalls - bool(no), + optimize_initializations - bool(no), + eliminate_local_vars - bool(no), + generate_trail_ops_inline - bool(yes), + + % LLDS + common_data - bool(no), + common_layout_data - bool(yes), + optimize - bool(no), + optimize_peep - bool(no), + optimize_peep_mkword - bool(no), + optimize_jumps - bool(no), + optimize_fulljumps - bool(no), + pessimize_tailcalls - bool(no), + checked_nondet_tailcalls - bool(no), + use_local_vars - bool(no), + local_var_access_threshold - int(2), + standardize_labels - bool(no), + optimize_labels - bool(no), + optimize_dups - bool(no), + optimize_proc_dups - bool(no), + optimize_frames - bool(no), + optimize_delay_slot - bool(no), + optimize_reassign - bool(no), + optimize_repeat - int(0), + layout_compression_limit - int(4000), + + % LLDS -> C + use_macro_for_redo_fail - bool(no), + emit_c_loops - bool(no), + procs_per_c_function - int(1), + everything_in_one_c_function - special, + local_thread_engine_base - bool(yes), + + % Erlang + erlang_switch_on_strings_as_atoms - bool(no) +]). +option_defaults_2(target_code_compilation_option, [ + % Target code compilation options + target_debug - bool(no), + + % C + cc - string("gcc"), + % The `mmc' script will override the + % default with a value determined at + % configuration time. + c_include_directory - accumulating([]), + % The `mmc' script will override the + % default with a value determined at + % configuration time. + c_optimize - bool(no), + ansi_c - bool(yes), + inline_alloc - bool(no), + cflags - accumulating([]), + quoted_cflag - string_special, + + gcc_flags - accumulating([]), + quoted_gcc_flag - string_special, + clang_flags - accumulating([]), + quoted_clang_flag - string_special, + msvc_flags - accumulating([]), + quoted_msvc_flag - string_special, + + cflags_for_warnings - string(""), + % The `mmc' script will override the + % default with values determined at + % configuration time. + cflags_for_optimization - string("-O"), + cflags_for_ansi - string(""), + cflags_for_regs - string(""), + cflags_for_gotos - string(""), + cflags_for_threads - string(""), + cflags_for_debug - string("-g"), + cflags_for_pic - string(""), + c_flag_to_name_object_file - string("-o "), + object_file_extension - string(".o"), + pic_object_file_extension - string(".o"), + link_with_pic_object_file_extension - string(".o"), + c_compiler_type - string("gcc"), + csharp_compiler_type - string("mono"), + % The `mmc' script will override the + % default with a value determined at + % configuration time for the above + % two options + % Java + java_compiler - string("javac"), + java_interpreter - string("java"), + java_flags - accumulating([]), + quoted_java_flag - string_special, + java_classpath - accumulating([]), + java_object_file_extension - string(".class"), + + % IL + il_assembler - string("ilasm"), + ilasm_flags - accumulating([]), + quoted_ilasm_flag - string_special, + dotnet_library_version - string("1.0.3300.0"), + % We default to the version of the + % library that came with Beta2. + support_ms_clr - bool(yes), + support_rotor_clr - bool(no), + + % C# + csharp_compiler - string("csc"), + csharp_flags - accumulating([]), + quoted_csharp_flag - string_special, + cli_interpreter - string(""), + + % Erlang + erlang_compiler - string("erlc"), + erlang_interpreter - string("erl"), + erlang_flags - accumulating([]), + quoted_erlang_flag - string_special, + erlang_include_directory - accumulating([]), + erlang_object_file_extension - string(".beam"), + erlang_native_code - bool(no), + erlang_inhibit_trivial_warnings - bool(yes) +]). +option_defaults_2(link_option, [ + % Link Options + output_file_name - string(""), + % If the output_file_name is an empty + % string, we use the name of the first + % module on the command line. + ld_flags - accumulating([]), + quoted_ld_flag - string_special, + ld_libflags - accumulating([]), + quoted_ld_libflag - string_special, + link_library_directories - accumulating([]), + runtime_link_library_directories - accumulating([]), + link_libraries - accumulating([]), + link_objects - accumulating([]), + mercury_library_directory_special - string_special, + mercury_library_directories - accumulating([]), + search_library_files_directory_special - string_special, + search_library_files_directories - accumulating([]), + mercury_library_special - string_special, + mercury_libraries - accumulating([]), + mercury_standard_library_directory - maybe_string(no), + % The Mercury.config file will set the + % default standard library directory. + mercury_standard_library_directory_special - maybe_string_special, + init_file_directories - accumulating([]), + init_files - accumulating([]), + trace_init_files - accumulating([]), + linkage - string("shared"), + linkage_special - string_special, + mercury_linkage - string("shared"), + mercury_linkage_special - string_special, + demangle - bool(yes), + strip - bool(yes), + main - bool(yes), + allow_undefined - bool(yes), + use_readline - bool(yes), + runtime_flags - accumulating([]), + extra_initialization_functions - bool(no), + frameworks - accumulating([]), + framework_directories - accumulating([]), + + shared_library_extension - string(".so"), + % The `mmc' script will override the + % default with a value determined at + % configuration time. + library_extension - string(".a"), + executable_file_extension - string(""), + link_executable_command - string("gcc"), + link_shared_lib_command - string("gcc -shared"), + create_archive_command - string("ar"), + create_archive_command_output_flag - string(""), + create_archive_command_flags - accumulating([]), % "cr" + ranlib_command - string(""), + ranlib_flags - string(""), + mkinit_command - string("mkinit"), + mkinit_erl_command - string("mkinit_erl"), + demangle_command - string("mdemangle"), + filtercc_command - string("mfiltercc"), + trace_libs - string(""), + thread_libs - string(""), + hwloc_libs - string(""), + hwloc_static_libs - string(""), + shared_libs - string(""), + math_lib - string(""), + readline_libs - string(""), + linker_opt_separator - string(""), + linker_debug_flags - string("-g"), + shlib_linker_debug_flags - string("-g"), + linker_trace_flags - string("-g"), + shlib_linker_trace_flags - string("-g"), + linker_thread_flags - string(""), + shlib_linker_thread_flags - string(""), + linker_static_flags - string("-static"), + linker_strip_flag - string("-s"), + linker_link_lib_flag - string("-l"), + linker_link_lib_suffix - string(""), + shlib_linker_link_lib_flag - string("-l"), + shlib_linker_link_lib_suffix - string(""), + linker_path_flag - string("-L"), + linker_rpath_flag - string("-Wl,-rpath"), + linker_rpath_separator - string(" -Wl,-rpath"), + shlib_linker_rpath_flag - string("-Wl,-rpath"), + shlib_linker_rpath_separator - string(" -Wl,-rpath"), + linker_allow_undefined_flag - string(""), + linker_error_undefined_flag - string("-Wl,-no-undefined"), + shlib_linker_use_install_name - bool(no), + shlib_linker_install_name_flag - string("-install_name "), + shlib_linker_install_name_path - string(""), + java_archive_command - string("jar") +]). +option_defaults_2(build_system_option, [ + % Build System Options + make - bool(no), + keep_going - bool(no), + rebuild - bool(no), + jobs - int(1), + track_flags - bool(no), + invoked_by_mmc_make - bool(no), + pre_link_command - maybe_string(no), + extra_init_command - maybe_string(no), + install_prefix - string("/usr/local/"), + use_symlinks - bool(yes), + + % If `--mercury-stdlib-dir' is set, `--mercury-config-dir' + % must also be set. This invariant is maintained by the + % `special' variants of the options. + mercury_configuration_directory_special - string_special, + mercury_configuration_directory - maybe_string(no), + install_command - string("cp"), + install_command_dir_option - string("-r"), + libgrades - accumulating([]), + libgrades_include_components - accumulating([]), + libgrades_exclude_components - accumulating([]), + lib_linkages - accumulating([]), + flags_file - file_special, + options_files - accumulating(["Mercury.options"]), + + config_file - maybe_string(yes("")), + % yes("") means unset. + options_search_directories - accumulating(["."]), + use_subdirs - bool(no), + use_grade_subdirs - bool(no), + search_directories - accumulating(["."]), + intermod_directories - accumulating([]), + use_search_directories_for_intermod - bool(yes), + libgrade_install_check - bool(yes), + order_make_by_timestamp - bool(no), + show_make_times - bool(no), + extra_library_header - accumulating([]), + restricted_command_line - bool(no), + env_type - string_special, + host_env_type - string("posix"), + target_env_type - string("posix") +]). +option_defaults_2(miscellaneous_option, [ + % Miscellaneous Options + filenames_from_stdin - bool(no), + typecheck_ambiguity_warn_limit - int(50), + typecheck_ambiguity_error_limit - int(3000), + help - bool(no), + version - bool(no), + fullarch - string(""), + cross_compiling - bool(no), + local_module_id - accumulating([]), + analysis_file_cache_dir - string(""), + compiler_sufficiently_recent - bool(no), + experiment - string(""), + ignore_par_conjunctions - bool(no), + control_granularity - bool(no), + distance_granularity - int(0), + implicit_parallelism - bool(no), + feedback_file - string(""), + par_loop_control - bool(no), + par_loop_control_preserve_tail_recursion - bool(no) +]). + + % please keep this in alphabetic order +short_option('c', compile_only). +short_option('C', target_code_only). +short_option('d', dump_hlds). +short_option('D', dump_hlds_alias). +short_option('e', errorcheck_only). +short_option('E', verbose_errors). +short_option('f', generate_source_file_mapping). +short_option('F', framework_directories). +short_option('h', help). +short_option('H', highlevel_code). +short_option('i', make_interface). +short_option('j', jobs). +short_option('I', search_directories). +short_option('k', keep_going). +short_option('l', link_libraries). +short_option('L', link_library_directories). +short_option('m', make). +short_option('M', generate_dependencies). +short_option('n', line_numbers). +short_option('N', debug_modes). +short_option('o', output_file_name). +short_option('O', opt_level). +short_option('p', profiling). +short_option('P', convert_to_mercury). +short_option('r', rebuild). +short_option('R', runtime_link_library_directories). +short_option('s', grade). +short_option('S', statistics). +short_option('T', debug_types). +short_option('t', typecheck_only). +short_option('v', verbose). +short_option('V', very_verbose). +short_option('w', inhibit_warnings). +short_option('x', make_xml_documentation). +short_option('?', help). + +% warning options +long_option("inhibit-warnings", inhibit_warnings). +long_option("inhibit-accumulator-warnings", inhibit_accumulator_warnings). +long_option("halt-at-warn", halt_at_warn). +long_option("halt-at-syntax-errors", halt_at_syntax_errors). +long_option("halt-at-auto-parallel-failure", halt_at_auto_parallel_failure). +long_option("warn-singleton-variables", warn_singleton_vars). +long_option("warn-overlapping-scopes", warn_overlapping_scopes). +long_option("warn-det-decls-too-lax", warn_det_decls_too_lax). +long_option("warn-inferred-erroneous", warn_inferred_erroneous). +long_option("warn-nothing-exported", warn_nothing_exported). +long_option("warn-unused-args", warn_unused_args). +long_option("warn-interface-imports", warn_interface_imports). +long_option("warn-non-contiguous-clauses", warn_non_contiguous_clauses). +long_option("warn-non-contiguous-foreign-procs", + warn_non_contiguous_foreign_procs). +long_option("warn-non-stratification", warn_non_stratification). +long_option("warn-missing-opt-files", warn_missing_opt_files). +long_option("warn-missing-trans-opt-files", warn_missing_trans_opt_files). +long_option("warn-missing-trans-opt-deps", warn_missing_trans_opt_deps). +long_option("warn-unification-cannot-succeed", + warn_unification_cannot_succeed). +long_option("warn-simple-code", warn_simple_code). +long_option("warn-duplicate-calls", warn_duplicate_calls). +long_option("warn-missing-module-name", warn_missing_module_name). +long_option("warn-wrong-module-name", warn_wrong_module_name). +long_option("warn-smart-recompilation", warn_smart_recompilation). +long_option("warn-undefined-options-variables", + warn_undefined_options_variables). +long_option("warn-non-tail-recursion", warn_non_tail_recursion). +long_option("warn-target-code", warn_target_code). +long_option("warn-up-to-date", warn_up_to_date). +long_option("warn-stubs", warn_stubs). +long_option("warn-dead-procs", warn_dead_procs). +long_option("warn-table-with-inline", warn_table_with_inline). +long_option("warn-non-term-special-preds", warn_non_term_special_preds). +long_option("warn-known-bad-format-calls", warn_known_bad_format_calls). +long_option("warn-unknown-format-calls", warn_unknown_format_calls). +long_option("warn-obsolete", warn_obsolete). +long_option("warn-insts-without-matching-type", + warn_insts_without_matching_type). +long_option("warn-unused-imports", warn_unused_imports). +long_option("inform-ite-instead-of-switch", inform_ite_instead_of_switch). +long_option("warn-unresolved-polymorphism", warn_unresolved_polymorphism). +long_option("warn-suspicious-foreign-procs", warn_suspicious_foreign_procs). +long_option("warn-state-var-shadowing", warn_state_var_shadowing). +long_option("inform-inferred", inform_inferred). +long_option("inform-inferred-types", inform_inferred_types). +long_option("inform-inferred-modes", inform_inferred_modes). + +% verbosity options +long_option("verbose", verbose). +long_option("very-verbose", very_verbose). +long_option("verbose-error-messages", verbose_errors). +long_option("verbose-recompilation", verbose_recompilation). +long_option("find-all-recompilation-reasons", + find_all_recompilation_reasons). +long_option("verbose-make", verbose_make). +long_option("verbose-commands", verbose_commands). +long_option("output-compile-error-lines", output_compile_error_lines). +long_option("report-cmd-line-args", report_cmd_line_args). +long_option("report-cmd-line-args-in-doterr", + report_cmd_line_args_in_doterr). +long_option("statistics", statistics). +long_option("detailed-statistics", detailed_statistics). +long_option("proc-size-statistics", proc_size_statistics). +long_option("debug-types", debug_types). +long_option("debug-modes", debug_modes). +long_option("debug-modes-statistics", debug_modes_statistics). +long_option("debug-modes-minimal", debug_modes_minimal). +long_option("debug-modes-verbose", debug_modes_verbose). +long_option("debug-modes-pred-id", debug_modes_pred_id). +long_option("debug-dep-par-conj", debug_dep_par_conj). +long_option("debug-determinism", debug_det). +long_option("debug-det", debug_det). +long_option("debug-code-gen-pred-id", debug_code_gen_pred_id). +long_option("debug-termination", debug_term). +long_option("debug-term", debug_term). +long_option("debug-opt", debug_opt). +long_option("debug-opt-pred-id", debug_opt_pred_id). +long_option("debug-opt-pred-name", debug_opt_pred_name). +long_option("debug-pd", debug_pd). + % debug-il-asm does very low-level printf style debugging of + % IL assembler. Each instruction is written on stdout before it + % is executed. It is a temporary measure until the IL debugging + % system built into .NET improves. +long_option("debug-il-asm", debug_il_asm). +long_option("debug-liveness", debug_liveness). +long_option("debug-stack-opt", debug_stack_opt). +long_option("debug-make", debug_make). +long_option("debug-closure", debug_closure). +long_option("debug-trail-usage", debug_trail_usage). +long_option("debug-mode-constraints", debug_mode_constraints). +long_option("debug-intermodule-analysis", debug_intermodule_analysis). +long_option("debug-mm-tabling-analysis", debug_mm_tabling_analysis). +long_option("debug-indirect-reuse", debug_indirect_reuse). +long_option("debug-type-rep", debug_type_rep). + +% output options (mutually exclusive) +long_option("generate-source-file-mapping", generate_source_file_mapping). +long_option("generate-dependency-file", generate_dependency_file). +long_option("generate-dependencies", generate_dependencies). +long_option("generate-module-order", generate_module_order). +long_option("generate-standalone-interface", generate_standalone_interface). +long_option("make-short-interface", make_short_interface). +long_option("make-short-int", make_short_interface). +long_option("make-interface", make_interface). +long_option("make-int", make_interface). +long_option("make-private-interface", make_private_interface). +long_option("make-priv-int", make_private_interface). +long_option("make-optimization-interface", make_optimization_interface). +long_option("make-optimisation-interface", make_optimization_interface). +long_option("make-opt-int", make_optimization_interface). +long_option("make-transitive-optimization-interface", + make_transitive_opt_interface). +long_option("make-transitive-optimisation-interface", + make_transitive_opt_interface). +long_option("make-trans-opt", make_transitive_opt_interface). +long_option("make-analysis-registry", make_analysis_registry). +long_option("make-xml-doc", make_xml_documentation). +long_option("make-xml-documentation", make_xml_documentation). +long_option("convert-to-mercury", convert_to_mercury). +long_option("convert-to-Mercury", convert_to_mercury). +long_option("pretty-print", convert_to_mercury). +long_option("typecheck-only", typecheck_only). +long_option("errorcheck-only", errorcheck_only). +long_option("target-code-only", target_code_only). +long_option("compile-only", compile_only). +long_option("compile-to-shared-lib", compile_to_shared_lib). +long_option("output-grade-string", output_grade_string). +long_option("output-link-command", output_link_command). +long_option("output-shared-lib-link-command", output_shared_lib_link_command). +long_option("output-libgrades", output_libgrades). +long_option("output-cc", output_cc). +long_option("output-cc-type", output_c_compiler_type). +long_option("output-c-compiler-type", output_c_compiler_type). +long_option("output-csharp-compiler-type", output_csharp_compiler_type). +long_option("output-cflags", output_cflags). +long_option("output-library-link-flags", output_library_link_flags). +long_option("output-grade-defines", output_grade_defines). +long_option("output-c-include-directory-flags", + output_c_include_directory_flags). +long_option("output-c-include-dir-flags", + output_c_include_directory_flags). + +% aux output options +long_option("smart-recompilation", smart_recompilation). +long_option("assume-gmake", assume_gmake). +long_option("generate-mmc-make-module-dependencies", + generate_mmc_make_module_dependencies). +long_option("generate-mmc-deps", generate_mmc_make_module_dependencies). +long_option("ssdb-trace", ssdb_trace_level). +long_option("link-ssdb-libs", link_ssdb_libs). +long_option("link-ssdebug-libs", link_ssdb_libs). +long_option("trace", trace_level). +long_option("trace-optimised", trace_optimized). +long_option("trace-optimized", trace_optimized). +long_option("trace-prof", trace_prof). +long_option("trace-table-io", trace_table_io). +long_option("trace-table-io-only-retry", trace_table_io_only_retry). +long_option("trace-table-io-states", trace_table_io_states). +long_option("trace-table-io-require", trace_table_io_require). +long_option("trace-table-io-all", trace_table_io_all). +long_option("trace-flag", trace_goal_flags). +long_option("profile-optimised", prof_optimized). +long_option("profile-optimized", prof_optimized). +long_option("exec-trace-tail-rec", exec_trace_tail_rec). +long_option("suppress-trace", suppress_trace). +long_option("force-disable-tracing", force_disable_tracing). +long_option("delay-death", delay_death). +long_option("delay-death-max-vars", delay_death_max_vars). +long_option("stack-trace-higher-order", stack_trace_higher_order). +long_option("force-disable-ssdebug", force_disable_ssdebug). +long_option("generate-bytecode", generate_bytecode). +long_option("line-numbers", line_numbers). +long_option("auto-comments", auto_comments). +long_option("frameopt-comments", frameopt_comments). +long_option("max-error-line-width", max_error_line_width). +long_option("show-dependency-graph", show_dependency_graph). +long_option("imports-graph", imports_graph). +long_option("dump-trace-counts", dump_trace_counts). +long_option("dump-hlds", dump_hlds). +long_option("hlds-dump", dump_hlds). +long_option("dump-hlds-pred-id", dump_hlds_pred_id). +long_option("dump-hlds-pred-name", dump_hlds_pred_name). +long_option("dump-hlds-alias", dump_hlds_alias). +long_option("dump-hlds-options", dump_hlds_options). +long_option("dump-hlds-inst-limit", dump_hlds_inst_limit). +long_option("dump-hlds-file-suffix", dump_hlds_file_suffix). +long_option("dump-same-hlds", dump_same_hlds). +long_option("dump-mlds", dump_mlds). +long_option("mlds-dump", dump_mlds). +long_option("verbose-dump-mlds", verbose_dump_mlds). +long_option("verbose-mlds-dump", verbose_dump_mlds). +long_option("sign-assembly", sign_assembly). +long_option("separate-assemblies", separate_assemblies). +long_option("mode-constraints", mode_constraints). +long_option("simple-mode-constraints", simple_mode_constraints). +long_option("prop-mode-constraints", prop_mode_constraints). +long_option("propagate-mode-constraints", prop_mode_constraints). +long_option("benchmark-modes", benchmark_modes). +long_option("benchmark-modes-repeat", benchmark_modes_repeat). + +% language semantics options +long_option("reorder-conj", reorder_conj). +long_option("reorder-disj", reorder_disj). +long_option("fully-strict", fully_strict). +long_option("strict-sequential", strict_sequential). +long_option("allow-stubs", allow_stubs). +long_option("infer-all", infer_all). +long_option("infer-types", infer_types). +long_option("infer-modes", infer_modes). +long_option("infer-determinism", infer_det). +long_option("infer-det", infer_det). +long_option("type-inference-iteration-limit", type_inference_iteration_limit). +long_option("mode-inference-iteration-limit", mode_inference_iteration_limit). +long_option("event-set-file-name", event_set_file_name). + +% compilation model options +long_option("grade", grade). +% target selection options +long_option("target", target). +long_option("il", il). +long_option("il-only", il_only). +long_option("IL-only", il_only). +long_option("compile-to-c", compile_to_c). +long_option("compile-to-C", compile_to_c). +long_option("java", java). +long_option("Java", java). +long_option("java-only", java_only). +long_option("Java-only", java_only). +long_option("csharp", csharp). +long_option("C#", csharp). +long_option("csharp-only", csharp_only). +long_option("C#-only", csharp_only). +long_option("x86_64", x86_64). +long_option("x86-64", x86_64). +long_option("x86_64-only", x86_64_only). +long_option("x86-64-only", x86_64_only). +long_option("erlang", erlang). +long_option("Erlang", erlang). +long_option("erlang-only", erlang_only). +long_option("Erlang-only", erlang_only). +% Optional features compilation model options: +% (a) debugging +long_option("debug", exec_trace). +long_option("decl-debug", decl_debug). +long_option("ssdb", source_to_source_debug). +long_option("ss-debug", source_to_source_debug). +long_option("source-to-source-debug", source_to_source_debug). + % (b) profiling +long_option("profiling", profiling). +long_option("time-profiling", time_profiling). +long_option("memory-profiling", memory_profiling). +long_option("deep-profiling", deep_profiling). +long_option("profile-calls", profile_calls). +long_option("profile-time", profile_time). +long_option("profile-memory", profile_memory). +long_option("profile-deep", profile_deep). +long_option("use-activation-counts", use_activation_counts). +long_option("pre-prof-transforms-simplify", pre_prof_transforms_simplify). +long_option("pre-implicit-parallelism-simplify", + pre_implicit_parallelism_simplify). +long_option("coverage-profiling", + coverage_profiling). +long_option("coverage-profiling-via-calls", + coverage_profiling_via_calls). +long_option("coverage-profiling-static", + coverage_profiling_static). +long_option("profile-deep-coverage-after-goal", + profile_deep_coverage_after_goal). +long_option("profile-deep-coverage-branch-ite", + profile_deep_coverage_branch_ite). +long_option("profile-deep-coverage-branch-switch", + profile_deep_coverage_branch_switch). +long_option("profile-deep-coverage-branch-disj", + profile_deep_coverage_branch_disj). +long_option("profile-deep-coverage-use-portcounts", + profile_deep_coverage_use_portcounts). +long_option("profile-deep-coverage-use-trivial", + profile_deep_coverage_use_trivial). +long_option("profile-for-implicit-parallelism", + profile_for_feedback). +long_option("profile-for-feedback", + profile_for_feedback). +long_option("use-zeroing-for-ho-cycles", + use_zeroing_for_ho_cycles). +long_option("use-lots-of-ho-specialization", + use_lots_of_ho_specialization). +long_option("deep-profile-tail-recursion", + deep_profile_tail_recursion). +long_option("record-term-sizes-as-words", record_term_sizes_as_words). +long_option("record-term-sizes-as-cells", record_term_sizes_as_cells). +long_option("experimental-complexity", experimental_complexity). +long_option("region-analysis", region_analysis). +% (c) miscellaneous optional features +long_option("gc", gc). +long_option("garbage-collection", gc). +long_option("parallel", parallel). +long_option("use-trail", use_trail). +long_option("trail-segments", trail_segments). +long_option("type-layout", type_layout). +long_option("maybe-thread-safe", maybe_thread_safe_opt). +long_option("extend-stacks-when-needed", extend_stacks_when_needed). +long_option("stack-segments", stack_segments). +long_option("use-regions", use_regions). +long_option("use-alloc-regions", use_alloc_regions). +long_option("use-regions-debug", use_regions_debug). +long_option("use-regions-profiling",use_regions_profiling). +% Data representation options +long_option("use-minimal-model-stack-copy", use_minimal_model_stack_copy). +long_option("use-minimal-model-own-stacks", use_minimal_model_own_stacks). +long_option("minimal-model-debug", minimal_model_debug). +long_option("single-prec-float", single_prec_float). +long_option("single-precision-float", single_prec_float). +long_option("pic-reg", pic_reg). +long_option("tags", tags). +long_option("num-tag-bits", num_tag_bits). +long_option("num-reserved-addresses", num_reserved_addresses). +long_option("num-reserved-objects", num_reserved_objects). +long_option("bits-per-word", bits_per_word). +long_option("bytes-per-word", bytes_per_word). +long_option("conf-low-tag-bits", conf_low_tag_bits). +long_option("sync-term-size", sync_term_size). +long_option("unboxed-float", unboxed_float). +long_option("unboxed-enums", unboxed_enums). +long_option("unboxed-no-tag-types", unboxed_no_tag_types). +long_option("highlevel-data", highlevel_data). +long_option("high-level-data", highlevel_data). +% LLDS back-end compilation model options +long_option("gcc-non-local-gotos", gcc_non_local_gotos). +long_option("gcc-global-registers", gcc_global_registers). +long_option("asm-labels", asm_labels). +long_option("use-float-registers", use_float_registers). +% MLDS back-end compilation model options +long_option("highlevel-code", highlevel_code). +long_option("high-level-code", highlevel_code). +long_option("highlevel-C", highlevel_code). +long_option("highlevel-c", highlevel_code). +long_option("high-level-C", highlevel_code). +long_option("high-level-c", highlevel_code). +long_option("gcc-nested-functions", gcc_nested_functions). +long_option("det-copy-out", det_copy_out). +long_option("nondet-copy-out", nondet_copy_out). +long_option("put-commit-in-own-func", put_commit_in_own_func). +long_option("put-nondet-env-on-heap", put_nondet_env_on_heap). +% IL back-end compilation model options +long_option("verifiable-code", verifiable_code). +long_option("verifiable", verifiable_code). +long_option("il-funcptr-types", il_funcptr_types). +long_option("IL-funcptr-types", il_funcptr_types). +long_option("il-refany-fields", il_refany_fields). +long_option("IL-refany-fields", il_refany_fields). +long_option("il-byref-tailcalls", il_byref_tailcalls). +long_option("IL-byref-tailcalls", il_byref_tailcalls). + +% internal use options +long_option("backend-foreign-languages", backend_foreign_languages). +long_option("agc-stack-layout", agc_stack_layout). +long_option("basic-stack-layout", basic_stack_layout). +long_option("procid-stack-layout", procid_stack_layout). +long_option("trace-stack-layout", trace_stack_layout). +long_option("body-typeinfo-liveness", body_typeinfo_liveness). +long_option("can-compare-constants-as-ints", can_compare_constants_as_ints). +long_option("pretest-equality-cast-pointers", pretest_equality_cast_pointers). +long_option("can-compare-compound-values", can_compare_compound_values). +long_option("lexically-order-constructors", + lexically_order_constructors). +long_option("mutable-always-boxed", mutable_always_boxed). +long_option("delay-partial-instantiations", delay_partial_instantiations). +long_option("allow-defn-of-builtins", allow_defn_of_builtins). +long_option("special-preds", special_preds). +long_option("type-ctor-info", type_ctor_info). +long_option("type-ctor-layout", type_ctor_layout). +long_option("type-ctor-functors", type_ctor_functors). +long_option("new-type-class-rtti", new_type_class_rtti). +long_option("rtti-line-numbers", rtti_line_numbers). +long_option("disable-mm-pneg", disable_minimal_model_stack_copy_pneg). +long_option("disable-mm-cut", disable_minimal_model_stack_copy_cut). +long_option("disable-trail-ops", disable_trail_ops). +long_option("size-region-ite-fixed", size_region_ite_fixed). +long_option("size-region-disj-fixed", size_region_disj_fixed). +long_option("size-region-commit-fixed", size_region_commit_fixed). +long_option("size-region-ite-protect", size_region_ite_protect). +long_option("size-region-ite-snapshot", size_region_ite_snapshot). +long_option("size-region-semi-disj-protect", size_region_semi_disj_protect). +long_option("size-region-disj-snapshot", size_region_disj_snapshot). +long_option("size-region-commit-entry", size_region_commit_entry). +long_option("solver-type-auto-init", solver_type_auto_init). +long_option("allow-multi-arm-switches", allow_multi_arm_switches). +long_option("type-check-constraints", type_check_constraints). +long_option("allow-argument-packing", allow_argument_packing). + +% code generation options +long_option("low-level-debug", low_level_debug). +long_option("table-debug", table_debug). +long_option("polymorphism", polymorphism). +long_option("trad-passes", trad_passes). +long_option("parallel-liveness", parallel_liveness). +long_option("parallel-code-gen", parallel_code_gen). +long_option("reclaim-heap-on-failure", reclaim_heap_on_failure). +long_option("reclaim-heap-on-semidet-failure", + reclaim_heap_on_semidet_failure). +long_option("reclaim-heap-on-nondet-failure", + reclaim_heap_on_nondet_failure). +long_option("branch-delay-slot", have_delay_slot). +long_option("have-delay-slot", have_delay_slot). +long_option("num-real-r-regs", num_real_r_regs). +long_option("num-real-f-regs", num_real_f_regs). +long_option("num-real-r-temps", num_real_r_temps). +long_option("num-real-f-temps", num_real_f_temps). +long_option("num-real-temps", num_real_r_temps). % obsolete +long_option("max-jump-table-size", max_jump_table_size). +% long_option("max-spec-do-call-closure", +% max_specialized_do_call_closure). +% long_option("max-spec-do-call-class-method", +% max_specialized_do_call_class_method). +long_option("compare-specialization", compare_specialization). +long_option("should-pretest-equality", should_pretest_equality). +long_option("fact-table-max-array-size",fact_table_max_array_size). +long_option("fact-table-hash-percent-full", + fact_table_hash_percent_full). +long_option("gcc-local-labels", gcc_local_labels). +long_option("prefer-switch", prefer_switch). +long_option("opt-no-return-calls", opt_no_return_calls). + +% optimization options + +long_option("opt-level", opt_level). +long_option("optimization-level", opt_level). +long_option("optimisation-level", opt_level). +long_option("opt-space", opt_space). +long_option("optimize-space", opt_space). +long_option("optimise-space", opt_space). +long_option("intermod-opt", intermodule_optimization). +long_option("intermodule-optimization", intermodule_optimization). +long_option("intermodule-optimisation", intermodule_optimization). +long_option("read-opt-files-transitively", read_opt_files_transitively). +long_option("use-opt-files", use_opt_files). +long_option("use-trans-opt-files", use_trans_opt_files). +long_option("transitive-intermodule-optimization", + transitive_optimization). +long_option("transitive-intermodule-optimisation", + transitive_optimization). +long_option("trans-intermod-opt", transitive_optimization). +long_option("intermodule-analysis", intermodule_analysis). +long_option("analysis-repeat", analysis_repeat). +long_option("analysis-file-cache", analysis_file_cache). + +% HLDS->HLDS optimizations +long_option("inlining", inlining). +long_option("inline-simple", inline_simple). +long_option("inline-builtins", inline_builtins). +long_option("inline-single-use", inline_single_use). +long_option("inline-call-cost", inline_call_cost). +long_option("inline-compound-threshold", inline_compound_threshold). +long_option("inline-simple-threshold", inline_simple_threshold). +long_option("intermod-inline-simple-threshold", + intermod_inline_simple_threshold). +long_option("from-ground-term-threshold", + from_ground_term_threshold). +long_option("inline-vars-threshold", inline_vars_threshold). +long_option("const-struct", enable_const_struct). +long_option("common-struct", common_struct). +long_option("common-struct-preds", common_struct_preds). +long_option("common-goal", common_goal). +long_option("excess-assign", excess_assign). +long_option("optimize-format-calls", optimize_format_calls). +long_option("optimize-duplicate-calls", optimize_duplicate_calls). +long_option("optimise-duplicate-calls", optimize_duplicate_calls). +long_option("optimise-constant-propagation", constant_propagation). +long_option("optimize-constant-propagation", constant_propagation). +long_option("optimize-saved-vars", optimize_saved_vars). +long_option("optimise-saved-vars", optimize_saved_vars). +long_option("loop-invariants", loop_invariants). +long_option("optimize-saved-vars-const", optimize_saved_vars_const). +long_option("optimise-saved-vars-const", optimize_saved_vars_const). +long_option("optimize-saved-vars-cell", optimize_saved_vars_cell). +long_option("optimise-saved-vars-cell", optimize_saved_vars_cell). +long_option("osv-loop", optimize_saved_vars_cell_loop). +long_option("osv-full-path", optimize_saved_vars_cell_full_path). +long_option("osv-on-stack", optimize_saved_vars_cell_on_stack). +long_option("osv-cand-head", + optimize_saved_vars_cell_candidate_headvars). +% The next four options are used by tupling.m as well; changes to them +% may require changes there as well. +long_option("osv-cvstore-cost", optimize_saved_vars_cell_cv_store_cost). +long_option("osv-cvload-cost", optimize_saved_vars_cell_cv_load_cost). +long_option("osv-fvstore-cost", optimize_saved_vars_cell_fv_store_cost). +long_option("osv-fvload-cost", optimize_saved_vars_cell_fv_load_cost). +long_option("osv-op-ratio", optimize_saved_vars_cell_op_ratio). +long_option("osv-node-ratio", optimize_saved_vars_cell_node_ratio). +long_option("osv-allpath-node-ratio", + optimize_saved_vars_cell_all_path_node_ratio). +long_option("osv-all-cand", + optimize_saved_vars_cell_include_all_candidates). +long_option("delay-construct", delay_construct). +long_option("delay-constructs", delay_construct). +long_option("follow-code", follow_code). +long_option("constraint-propagation", constraint_propagation). +long_option("local-constraint-propagation", local_constraint_propagation). +long_option("optimize-unused-args", optimize_unused_args). +long_option("optimise-unused-args", optimize_unused_args). +long_option("intermod-unused-args", intermod_unused_args). +long_option("optimize-higher-order", optimize_higher_order). +long_option("optimise-higher-order", optimize_higher_order). +long_option("higher-order-size-limit", higher_order_size_limit). +long_option("higher-order-arg-limit", higher_order_arg_limit). +long_option("unneeded-code", unneeded_code). +long_option("unneeded-code-copy-limit", unneeded_code_copy_limit). +long_option("unneeded-code-debug", unneeded_code_debug). +long_option("unneeded-code-debug-pred-name", unneeded_code_debug_pred_name). +long_option("type-specialization", type_specialization). +long_option("type-specialisation", type_specialization). +long_option("user-guided-type-specialization", + user_guided_type_specialization). +long_option("user-guided-type-specialisation", + user_guided_type_specialization). +% This option is for use in configure.in to test for some bug-fixes for +% type-specialization which are needed to compile the library. It's not +% documented, and should eventually be removed. +long_option("fixed-user-guided-type-specialization", + user_guided_type_specialization). +long_option("introduce-accumulators", introduce_accumulators). +long_option("optimise-constructor-last-call-accumulator", + optimize_constructor_last_call_accumulator). +long_option("optimize-constructor-last-call-accumulator", + optimize_constructor_last_call_accumulator). +long_option("optimise-constructor-last-call-null", + optimize_constructor_last_call_null). +long_option("optimize-constructor-last-call-null", + optimize_constructor_last_call_null). +long_option("optimise-constructor-last-call", + optimize_constructor_last_call). +long_option("optimize-constructor-last-call", + optimize_constructor_last_call). +long_option("optimize-dead-procs", optimize_dead_procs). +long_option("optimise-dead-procs", optimize_dead_procs). +long_option("deforestation", deforestation). +long_option("deforestation-depth-limit", deforestation_depth_limit). +long_option("deforestation-cost-factor", deforestation_cost_factor). +long_option("deforestation-vars-threshold", deforestation_vars_threshold). +long_option("deforestation-size-threshold", deforestation_size_threshold). +long_option("enable-termination", termination). +long_option("enable-term", termination). +long_option("check-termination", termination_check). +long_option("check-term", termination_check). +long_option("chk-term", termination_check). +long_option("verbose-check-termination",verbose_check_termination). +long_option("verb-check-term", verbose_check_termination). +long_option("verb-chk-term", verbose_check_termination). +long_option("termination-single-argument-analysis", + termination_single_args). +long_option("term-single-arg", termination_single_args). +long_option("termination-norm", termination_norm). +long_option("term-norm", termination_norm). +long_option("termination-error-limit", termination_error_limit). +long_option("term-err-limit", termination_error_limit). +long_option("termination-path-limit", termination_path_limit). +long_option("term-path-limit", termination_path_limit). +long_option("enable-termination2", termination2). +long_option("enable-term2", termination2). +long_option("check-termination2", check_termination2). +long_option("check-term2", check_termination2). +long_option("chk-term2", check_termination2). +long_option("verbose-check-termination2",verbose_check_termination2). +long_option("verb-check-term2", verbose_check_termination2). +long_option("verb-chk-term2", verbose_check_termination2). +long_option("termination2-widening-limit", widening_limit). +long_option("term2-widening-limit", widening_limit). +long_option("arg-size-analysis-only", arg_size_analysis_only). +long_option("termination2-propagate-failure-constraints", + propagate_failure_constrs). +long_option("term2-propagate-failure-constraints", + propagate_failure_constrs). +long_option("term2-propagate-failure-constrs", propagate_failure_constrs). +long_option("termination2-norm", termination2_norm). +long_option("term2-norm", termination2_norm). +long_option("termination2-maximum-matrix-size", term2_maximum_matrix_size). +long_option("term2-max-matrix-size", term2_maximum_matrix_size). +long_option("analyse-exceptions", analyse_exceptions). +long_option("analyse-closures", analyse_closures). +long_option("analyse-local-closures", analyse_closures). +long_option("analyse-trail-usage", analyse_trail_usage). +long_option("optimize-trail-usage", optimize_trail_usage). +long_option("optimize-region-ops", optimize_region_ops). +long_option("analyse-mm-tabling", analyse_mm_tabling). +long_option("untuple", untuple). +long_option("tuple", tuple). +long_option("tuple-trace-counts-file", tuple_trace_counts_file). +long_option("tuple-costs-ratio", tuple_costs_ratio). +long_option("tuple-min-args", tuple_min_args). +long_option("inline-par-builtins", inline_par_builtins). +long_option("always-specialize-in-dep-par-conjs", + always_specialize_in_dep_par_conjs). +long_option("allow-some-paths-only-waits", + allow_some_paths_only_waits). + +% CTGC related options. +long_option("structure-sharing", structure_sharing_analysis). +long_option("structure-sharing-widening", structure_sharing_widening). +long_option("structure-reuse", structure_reuse_analysis). +long_option("ctgc", structure_reuse_analysis). +long_option("structure-reuse-constraint", structure_reuse_constraint). +long_option("ctgc-constraint", structure_reuse_constraint). +long_option("structure-reuse-constraint-arg", structure_reuse_constraint_arg). +long_option("ctgc-constraint-arg", structure_reuse_constraint_arg). +long_option("structure-reuse-max-conditions", structure_reuse_max_conditions). +long_option("structure-reuse-repeat", structure_reuse_repeat). +long_option("structure-reuse-free-cells", structure_reuse_free_cells). + +% HLDS->LLDS optimizations +long_option("smart-indexing", smart_indexing). +long_option("dense-switch-req-density", dense_switch_req_density). +long_option("lookup-switch-req-density",lookup_switch_req_density). +long_option("dense-switch-size", dense_switch_size). +long_option("lookup-switch-size", lookup_switch_size). +long_option("string-switch-size", string_hash_switch_size). +long_option("string-hash-switch-size", string_hash_switch_size). +long_option("string-binary-switch-size", string_binary_switch_size). +long_option("tag-switch-size", tag_switch_size). +long_option("try-switch-size", try_switch_size). +long_option("binary-switch-size", binary_switch_size). +long_option("switch-single-rec-base-first", switch_single_rec_base_first). +long_option("switch-multi-rec-base-first", switch_multi_rec_base_first). +long_option("static-ground-terms", static_ground_cells). +% static_ground_floats should be set only in handle_options.m. +% long_option("static-ground-floats", static_ground_floats). +% static_code_addresses should be set only in handle_options.m. +% long_option("static-code-addresses", static_code_addresses). +long_option("use-atomic-cells", use_atomic_cells). +long_option("middle-rec", middle_rec). +long_option("simple-neg", simple_neg). +long_option("allow-hijacks", allow_hijacks). + +% MLDS optimizations +% Option `optimize' is used for both MLDS and LLDS optimizations, but since +% you can't use both at the same time it doesn't really matter. +long_option("mlds-optimize", optimize). +long_option("mlds-optimise", optimize). +long_option("mlds-peephole", optimize_peep). +long_option("optimize-tailcalls", optimize_tailcalls). +long_option("optimise-tailcalls", optimize_tailcalls). +long_option("optimize-initializations", optimize_initializations). +long_option("optimise-initializations", optimize_initializations). +long_option("eliminate-local-vars", eliminate_local_vars). +long_option("generate-trail-ops-inline", generate_trail_ops_inline). + +% LLDS optimizations +long_option("common-data", common_data). +long_option("common-layout-data", common_layout_data). +long_option("llds-optimize", optimize). +long_option("llds-optimise", optimize). +long_option("optimize-peep", optimize_peep). +long_option("optimise-peep", optimize_peep). +long_option("optimize-peep-mkword", optimize_peep_mkword). +long_option("optimise-peep-mkword", optimize_peep_mkword). +long_option("optimize-jumps", optimize_jumps). +long_option("optimise-jumps", optimize_jumps). +long_option("optimize-fulljumps", optimize_fulljumps). +long_option("optimise-fulljumps", optimize_fulljumps). +long_option("pessimize-tailcalls", pessimize_tailcalls). +long_option("checked-nondet-tailcalls", checked_nondet_tailcalls). +long_option("use-local-vars", use_local_vars). +long_option("local-var-access-threshold", local_var_access_threshold). +long_option("standardise-labels", standardize_labels). +long_option("standardize-labels", standardize_labels). +long_option("optimize-labels", optimize_labels). +long_option("optimise-labels", optimize_labels). +long_option("optimize-dups", optimize_dups). +long_option("optimise-dups", optimize_dups). +long_option("optimize-proc-dups", optimize_proc_dups). +long_option("optimise-proc-dups", optimize_proc_dups). +%%% long_option("optimize-copyprop", optimize_copyprop). +%%% long_option("optimise-copyprop", optimize_copyprop). +long_option("optimize-frames", optimize_frames). +long_option("optimise-frames", optimize_frames). +long_option("optimize-delay-slot", optimize_delay_slot). +long_option("optimise-delay-slot", optimize_delay_slot). +long_option("optimize-reassign", optimize_reassign). +long_option("optimise-reassign", optimize_reassign). +long_option("optimize-repeat", optimize_repeat). +long_option("optimise-repeat", optimize_repeat). +long_option("layout-compression-limit", layout_compression_limit). + +% LLDS->C optimizations +long_option("use-macro-for-redo-fail", use_macro_for_redo_fail). +long_option("emit-c-loops", emit_c_loops). +long_option("procs-per-c-function", procs_per_c_function). +long_option("procs-per-C-function", procs_per_c_function). +long_option("everything-in-one-c-function", everything_in_one_c_function). +long_option("everything-in-one-C-function", everything_in_one_c_function). +long_option("inline-alloc", inline_alloc). +long_option("local-thread-engine-base", local_thread_engine_base). + +% Erlang +long_option("erlang-switch-on-strings-as-atoms", + erlang_switch_on_strings_as_atoms). + +% Target code compilation options +long_option("target-debug", target_debug). + +long_option("cc", cc). +long_option("c-optimise", c_optimize). +long_option("c-optimize", c_optimize). +% XXX we should consider the relationship between c_debug and target_debug +% more carefully. Perhaps target_debug could imply C debug if the target is C. +% However for the moment they are just synonyms. +long_option("c-debug", target_debug). +long_option("c-include-directory", c_include_directory). +long_option("c-include-dir", c_include_directory). +long_option("ansi-c", ansi_c). +long_option("cflags", cflags). +long_option("cflag", quoted_cflag). + +long_option("gcc-flags", gcc_flags). +long_option("gcc-flag", quoted_gcc_flag). +long_option("clang-flags", clang_flags). +long_option("clang-flag", quoted_clang_flag). +long_option("msvc-flags", msvc_flags). +long_option("msvc-flag", quoted_msvc_flag). + +long_option("cflags-for-warnings", cflags_for_warnings). +long_option("cflags-for-optimization", cflags_for_optimization). +long_option("cflags-for-ansi", cflags_for_ansi). +long_option("cflags-for-regs", cflags_for_regs). +long_option("cflags-for-gotos", cflags_for_gotos). +long_option("cflags-for-threads", cflags_for_threads). +long_option("cflags-for-debug", cflags_for_debug). +long_option("cflags-for-pic", cflags_for_pic). +long_option("c-flag-to-name-object-file", c_flag_to_name_object_file). +long_option("object-file-extension", object_file_extension). +long_option("pic-object-file-extension", pic_object_file_extension). +long_option("link-with-pic-object-file-extension", + link_with_pic_object_file_extension). +long_option("c-compiler-type", c_compiler_type). +long_option("csharp-compiler-type", csharp_compiler_type). + + +long_option("java-compiler", java_compiler). +long_option("javac", java_compiler). +long_option("java-interpreter", java_interpreter). +long_option("java-flags", java_flags). +long_option("java-flag", quoted_java_flag). +% XXX we should consider the relationship between java_debug and target_debug +% more carefully. Perhaps target_debug could imply Java debug if the target +% is Java. However for the moment they are just synonyms. +long_option("java-debug", target_debug). +long_option("java-classpath", java_classpath). +long_option("java-object-file-extension", java_object_file_extension). + +long_option("il-assembler", il_assembler). +long_option("ilasm-flags", ilasm_flags). +long_option("ilasm-flag", quoted_ilasm_flag). +long_option("dotnet-library-version", dotnet_library_version). +long_option("support-ms-clr", support_ms_clr). +long_option("support-rotor-clr", support_rotor_clr). + +long_option("csharp-compiler", csharp_compiler). +long_option("csharp-flags", csharp_flags). +long_option("csharp-flag", quoted_csharp_flag). +long_option("cli-interpreter", cli_interpreter). + +long_option("erlang-compiler", erlang_compiler). +long_option("erlang-interpreter", erlang_interpreter). +long_option("erlang-flags", erlang_flags). +long_option("erlang-flag", quoted_erlang_flag). +long_option("erlang-include-directory", erlang_include_directory). +long_option("erlang-include-dir", erlang_include_directory). +long_option("erlang-object-file-extension", erlang_object_file_extension). +long_option("erlang-native-code", erlang_native_code). +long_option("erlang-inhibit-trivial-warnings", + erlang_inhibit_trivial_warnings). + +% link options +long_option("output-file", output_file_name). +long_option("ld-flags", ld_flags). +long_option("ld-flag", quoted_ld_flag). +long_option("ld-libflags", ld_libflags). +long_option("ld-libflag", quoted_ld_libflag). +long_option("library-directory", link_library_directories). +long_option("runtime-library-directory", runtime_link_library_directories). +long_option("library", link_libraries). +long_option("link-object", link_objects). +long_option("mercury-library", mercury_library_special). +long_option("ml", mercury_library_special). +long_option("mercury-library-directory", mercury_library_directory_special). +long_option("mld", mercury_library_directory_special). +long_option("search-library-files-directory", + search_library_files_directory_special). +long_option("search-lib-files-dir", + search_library_files_directory_special). +long_option("mercury-standard-library-directory", + mercury_standard_library_directory_special). +long_option("mercury-stdlib-dir", + mercury_standard_library_directory_special). +long_option("init-file-directory", init_file_directories). +long_option("init-file", init_files). +long_option("trace-init-file", trace_init_files). +long_option("linkage", linkage_special). +long_option("mercury-linkage", mercury_linkage_special). +long_option("demangle", demangle). +long_option("strip", strip). +long_option("main", main). +long_option("allow-undefined", allow_undefined). +long_option("use-readline", use_readline). +long_option("runtime-flags", runtime_flags). +long_option("extra-initialization-functions", + extra_initialization_functions). +long_option("extra-inits", extra_initialization_functions). +long_option("framework", frameworks). +long_option("framework-directory", framework_directories). + +long_option("shared-library-extension", shared_library_extension). +long_option("library-extension", library_extension). +long_option("executable-file-extension", executable_file_extension). +long_option("create-archive-command", create_archive_command). +long_option("create-archive-command-output-flag", + create_archive_command_output_flag). +long_option("create-archive-command-flags", create_archive_command_flags). +long_option("link-executable-command", link_executable_command). +long_option("link-shared-lib-command", link_shared_lib_command). +long_option("ranlib-command", ranlib_command). +long_option("ranlib-flags", ranlib_flags). +long_option("mkinit-command", mkinit_command). +long_option("mkinit-erl-command", mkinit_erl_command). +long_option("demangle-command", demangle_command). +long_option("filtercc-command", filtercc_command). +long_option("trace-libs", trace_libs). +long_option("thread-libs", thread_libs). +long_option("hwloc-libs", hwloc_libs). +long_option("hwloc-static-libs", hwloc_static_libs). +long_option("shared-libs", shared_libs). +long_option("math-lib", math_lib). +long_option("readline-libs", readline_libs). +long_option("linker-opt-separator", linker_opt_separator). +long_option("linker-debug-flags", linker_debug_flags). +long_option("shlib-linker-debug-flags", shlib_linker_debug_flags). +long_option("linker-trace-flags", linker_trace_flags). +long_option("shlib-linker-trace-flags", shlib_linker_trace_flags). +long_option("linker-thread-flags", linker_thread_flags). +long_option("shlib-linker-thread-flags", shlib_linker_thread_flags). +long_option("linker-static-flags", linker_static_flags). +long_option("linker-strip-flag", linker_strip_flag). +long_option("linker-link-lib-flag", linker_link_lib_flag). +long_option("linker-link-lib-suffix", linker_link_lib_suffix). +long_option("shlib-linker-link-lib-flag", shlib_linker_link_lib_flag). +long_option("shlib-linker-link-lib-suffix", shlib_linker_link_lib_suffix). +long_option("linker-path-flag", linker_path_flag). +long_option("linker-rpath-flag", linker_rpath_flag). +long_option("linker-rpath-separator", linker_rpath_separator). +long_option("shlib-linker-rpath-flag", shlib_linker_rpath_flag). +long_option("shlib-linker-rpath-separator", shlib_linker_rpath_separator). +long_option("linker-allow-undefined-flag", linker_allow_undefined_flag). +long_option("linker-error-undefined-flag", linker_error_undefined_flag). +long_option("shlib-linker-use-install-name", shlib_linker_use_install_name). +long_option("shlib-linker-install-name-flag", shlib_linker_install_name_flag). +long_option("shlib-linker-install-name-path", shlib_linker_install_name_path). +long_option("java-archive-command", java_archive_command). + +% build system options +long_option("make", make). +long_option("keep-going", keep_going). +long_option("rebuild", rebuild). +long_option("jobs", jobs). +long_option("track-flags", track_flags). +long_option("track-options", track_flags). +long_option("invoked-by-mmc-make", invoked_by_mmc_make). +long_option("pre-link-command", pre_link_command). +long_option("extra-init-command", extra_init_command). +long_option("mercury-configuration-directory", + mercury_configuration_directory_special). +long_option("mercury-config-dir", + mercury_configuration_directory_special). +long_option("install-prefix", install_prefix). +long_option("install-command", install_command). +long_option("install-command-dir-option", install_command_dir_option). +long_option("use-symlinks", use_symlinks). +long_option("library-grade", libgrades). +long_option("libgrade", libgrades). +long_option("libgrades-include-component", libgrades_include_components). +long_option("libgrades-include", libgrades_include_components). +long_option("libgrades-exclude-component", libgrades_exclude_components). +long_option("libgrades-exclude", libgrades_exclude_components). +long_option("library-linkage", lib_linkages). +long_option("lib-linkage", lib_linkages). +long_option("flags", flags_file). +long_option("flags-file", flags_file). +long_option("options-file", options_files). +long_option("config-file", config_file). +long_option("options-search-directory", options_search_directories). +long_option("use-subdirs", use_subdirs). +long_option("use-grade-subdirs", use_grade_subdirs). +long_option("search-directory", search_directories). +long_option("intermod-directory", intermod_directories). +long_option("use-search-directories-for-intermod", + use_search_directories_for_intermod). +long_option("libgrade-install-check", libgrade_install_check). +long_option("order-make-by-timestamp", order_make_by_timestamp). +long_option("show-make-times", show_make_times). +long_option("extra-lib-header", extra_library_header). +long_option("extra-library-header", extra_library_header). +long_option("restricted-command-line", restricted_command_line). +long_option("env-type", env_type). +long_option("host-env-type", host_env_type). +long_option("target-env-type", target_env_type). + +% misc options +long_option("typecheck-ambiguity-warn-limit", + typecheck_ambiguity_warn_limit). +long_option("typecheck-ambiguity-error-limit", + typecheck_ambiguity_error_limit). +long_option("help", help). +long_option("version", version). +long_option("filenames-from-stdin", filenames_from_stdin). +long_option("fullarch", fullarch). +long_option("cross-compiling", cross_compiling). +long_option("local-module-id", local_module_id). +long_option("analysis-file-cache-dir", analysis_file_cache_dir). +long_option("bug-intermod-2002-06-13", compiler_sufficiently_recent). +long_option("bug-intermod-2006-09-28", compiler_sufficiently_recent). +long_option("bug-foreign_import-2002-08-06", compiler_sufficiently_recent). +long_option("install-opt-files-2002-08-30", compiler_sufficiently_recent). +long_option("read-config-file-2003-03-01", compiler_sufficiently_recent). +% XXX this option won't be recognised because of the "no-" prefix, +% but "no-no-" will be recognised. +long_option("no-noncompact-ho-call-2004-01-15", compiler_sufficiently_recent). +long_option("trace-io-builtins-2006-08-14", compiler_sufficiently_recent). +long_option("compound-compare-builtins-2007-07-09", + compiler_sufficiently_recent). +% XXX this option won't be recognised because of the "no-" prefix, +% but "no-no-" will be recognised. +long_option("no-det-warning-compound-compare-2007-07-17", + compiler_sufficiently_recent). +long_option("foreign-enum-switch-fix", + compiler_sufficiently_recent). +long_option("failing-disjunct-in-switch-dup-fix", + compiler_sufficiently_recent). +long_option("store-at-ref-impure-2008-09-11", + compiler_sufficiently_recent). +long_option("java-export-ref-out", compiler_sufficiently_recent). +long_option("java-generics-2010-04-13", + compiler_sufficiently_recent). +long_option("experiment", experiment). +long_option("ignore-par-conjunctions", + ignore_par_conjunctions). +long_option("control-granularity", control_granularity). +long_option("distance-granularity", distance_granularity). +long_option("implicit-parallelism", implicit_parallelism). +long_option("feedback-file", feedback_file). +long_option("par-loop-control", par_loop_control). +long_option("par-loop-control-preserve-tail-recursion", + par_loop_control_preserve_tail_recursion). + +%-----------------------------------------------------------------------------% + +special_handler(grade, string(Grade), OptionTable0, Result) :- + ( convert_grade_option(Grade, OptionTable0, OptionTable) -> + Result = ok(OptionTable) + ; + Result = error("invalid grade `" ++ Grade ++ "'") + ). +special_handler(il, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(target, string("il"), !OptionTable). +special_handler(il_only, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(target, string("il"), !OptionTable), + map.set(target_code_only, bool(yes), !OptionTable). +special_handler(compile_to_c, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(target, string("c"), !OptionTable), + map.set(target_code_only, bool(yes), !OptionTable). +special_handler(java, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(target, string("java"), !OptionTable). +special_handler(java_only, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(target, string("java"), !OptionTable), + map.set(target_code_only, bool(yes), !OptionTable). +special_handler(csharp, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(target, string("csharp"), !OptionTable). +special_handler(csharp_only, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(target, string("csharp"), !OptionTable), + map.set(target_code_only, bool(yes), !OptionTable). +special_handler(x86_64, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(target, string("x86_64"), !OptionTable). +special_handler(x86_64_only, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(target, string("x86_64"), !OptionTable), + map.set(target_code_only, bool(yes), !OptionTable). +special_handler(erlang, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(target, string("erlang"), !OptionTable). +special_handler(erlang_only, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(target, string("erlang"), !OptionTable), + map.set(target_code_only, bool(yes), !OptionTable). +special_handler(profiling, bool(Value), !.OptionTable, ok(!:OptionTable)) :- + map.set(profile_time, bool(Value), !OptionTable), + map.set(profile_calls, bool(Value), !OptionTable), + map.set(profile_memory, bool(no), !OptionTable), + map.set(profile_deep, bool(no), !OptionTable). +special_handler(time_profiling, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(profile_time, bool(yes), !OptionTable), + map.set(profile_calls, bool(yes), !OptionTable), + map.set(profile_memory, bool(no), !OptionTable), + map.set(profile_deep, bool(no), !OptionTable). +special_handler(memory_profiling, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(profile_time, bool(no), !OptionTable), + map.set(profile_calls, bool(yes), !OptionTable), + map.set(profile_memory, bool(yes), !OptionTable), + map.set(profile_deep, bool(no), !OptionTable). +special_handler(deep_profiling, none, !.OptionTable, ok(!:OptionTable)) :- + map.set(profile_time, bool(no), !OptionTable), + map.set(profile_calls, bool(no), !OptionTable), + map.set(profile_memory, bool(no), !OptionTable), + map.set(profile_deep, bool(yes), !OptionTable). +special_handler(inlining, bool(Value), !.OptionTable, ok(!:OptionTable)) :- + map.set(inline_simple, bool(Value), !OptionTable), + map.set(inline_builtins, bool(Value), !OptionTable), + map.set(inline_single_use, bool(Value), !OptionTable), + ( + Value = yes, + map.set(inline_compound_threshold, int(10), !OptionTable) + ; + Value = no, + map.set(inline_compound_threshold, int(0), !OptionTable) + ). +special_handler(everything_in_one_c_function, none, !.OptionTable, + ok(!:OptionTable)) :- + map.set(procs_per_c_function, int(0), !OptionTable). +special_handler(reclaim_heap_on_failure, bool(Value), !.OptionTable, + ok(!:OptionTable)) :- + map.set(reclaim_heap_on_semidet_failure, bool(Value), !OptionTable), + map.set(reclaim_heap_on_nondet_failure, bool(Value), !OptionTable). +special_handler(strict_sequential, none, !.OptionTable, ok(!:OptionTable)) :- + override_options([ + reorder_conj - bool(no), + reorder_disj - bool(no), + fully_strict - bool(yes) + ], !OptionTable). +special_handler(inhibit_warnings, bool(Inhibit), !.OptionTable, + ok(!:OptionTable)) :- + bool.not(Inhibit, Enable), + override_options([ + inhibit_accumulator_warnings - bool(Inhibit), + warn_singleton_vars - bool(Enable), + warn_overlapping_scopes - bool(Enable), + warn_det_decls_too_lax - bool(Enable), + warn_inferred_erroneous - bool(Enable), + warn_nothing_exported - bool(Enable), + warn_interface_imports - bool(Enable), + warn_missing_opt_files - bool(Enable), + warn_missing_trans_opt_files - bool(Enable), + warn_missing_trans_opt_deps - bool(Enable), + warn_unification_cannot_succeed - bool(Enable), + warn_simple_code - bool(Enable), + warn_missing_module_name - bool(Enable), + warn_wrong_module_name - bool(Enable), + warn_smart_recompilation - bool(Enable), + warn_undefined_options_variables - bool(Enable), + warn_target_code - bool(Enable), + warn_up_to_date - bool(Enable), + warn_stubs - bool(Enable), + warn_dead_procs - bool(Enable), + warn_table_with_inline - bool(Enable), + warn_non_term_special_preds - bool(Enable), + warn_insts_without_matching_type - bool(Enable) + ], !OptionTable). +special_handler(infer_all, bool(Infer), !.OptionTable, ok(!:OptionTable)) :- + override_options([ + infer_types - bool(Infer), + infer_modes - bool(Infer), + infer_det - bool(Infer) + ], !OptionTable). +special_handler(opt_space, none, !.OptionTable, ok(!:OptionTable)) :- + opt_space(OptionSettingsList), + override_options(OptionSettingsList, !OptionTable). +special_handler(opt_level, int(N0), !.OptionTable, ok(!:OptionTable)) :- + ( N0 > 6 -> + N = 6 + ; N0 < -1 -> + N = -1 + ; + N = N0 + ), + map.set(opt_level_number, int(N), !OptionTable), + set_opt_level(N, !OptionTable). +special_handler(optimize_saved_vars, bool(Optimize), + !.OptionTable, ok(!:OptionTable)) :- + map.set(optimize_saved_vars_const, bool(Optimize), !OptionTable), + map.set(optimize_saved_vars_cell, bool(Optimize), !OptionTable). +special_handler(mercury_library_directory_special, string(Dir), + !.OptionTable, ok(!:OptionTable)) :- + !:OptionTable = option_table_add_mercury_library_directory( + !.OptionTable, Dir). +special_handler(search_library_files_directory_special, string(Dir), + OptionTable0, ok(OptionTable)) :- + OptionTable = option_table_add_search_library_files_directory( + OptionTable0, Dir). +special_handler(mercury_library_special, string(Lib), + OptionTable0, ok(OptionTable)) :- + OptionTable = + list.foldl(append_to_accumulating_option, [ + link_libraries - Lib, + mercury_libraries - Lib, + init_files - (Lib ++ ".init") + ], OptionTable0). +special_handler(mercury_standard_library_directory_special, + maybe_string(MaybeStdLibDir), OptionTable0, ok(OptionTable)) :- + OptionTable = + map.set(map.set(OptionTable0, + mercury_standard_library_directory, maybe_string(MaybeStdLibDir)), + mercury_configuration_directory, maybe_string(MaybeStdLibDir)). +special_handler(mercury_configuration_directory_special, + string(ConfDir), OptionTable0, ok(OptionTable)) :- + OptionTable = map.set(OptionTable0, mercury_configuration_directory, + maybe_string(yes(ConfDir))). +special_handler(quoted_cflag, string(Flag), + OptionTable0, ok(OptionTable)) :- + handle_quoted_flag(cflags, Flag, OptionTable0, OptionTable). +special_handler(quoted_gcc_flag, string(Flag), + OptionTable0, ok(OptionTable)) :- + handle_quoted_flag(gcc_flags, Flag, OptionTable0, OptionTable). +special_handler(quoted_clang_flag, string(Flag), + OptionTable0, ok(OptionTable)) :- + handle_quoted_flag(clang_flags, Flag, OptionTable0, OptionTable). +special_handler(quoted_msvc_flag, string(Flag), + OptionTable0, ok(OptionTable)) :- + handle_quoted_flag(msvc_flags, Flag, OptionTable0, OptionTable). +special_handler(quoted_java_flag, string(Flag), + OptionTable0, ok(OptionTable)) :- + handle_quoted_flag(java_flags, Flag, OptionTable0, OptionTable). +special_handler(quoted_ilasm_flag, string(Flag), + OptionTable0, ok(OptionTable)) :- + handle_quoted_flag(ilasm_flags, Flag, OptionTable0, OptionTable). +special_handler(quoted_csharp_flag, string(Flag), + OptionTable0, ok(OptionTable)) :- + handle_quoted_flag(csharp_flags, Flag, OptionTable0, OptionTable). +special_handler(quoted_erlang_flag, string(Flag), + OptionTable0, ok(OptionTable)) :- + handle_quoted_flag(erlang_flags, Flag, OptionTable0, OptionTable). +special_handler(quoted_ld_flag, string(Flag), + OptionTable0, ok(OptionTable)) :- + handle_quoted_flag(ld_flags, Flag, OptionTable0, OptionTable). +special_handler(quoted_ld_libflag, string(Flag), + OptionTable0, ok(OptionTable)) :- + handle_quoted_flag(ld_libflags, Flag, OptionTable0, OptionTable). +special_handler(linkage_special, string(Flag), OptionTable0, Result) :- + ( ( Flag = "shared" ; Flag = "static" ) -> + Result = ok( + (OptionTable0 ^ elem(mercury_linkage) := string(Flag)) + ^ elem(linkage) := string(Flag)) + ; + Result = error("argument of `--linkage' should be either " ++ + """shared"" or ""static"".") + ). +special_handler(mercury_linkage_special, string(Flag), + OptionTable0, Result) :- + ( ( Flag = "shared" ; Flag = "static" ) -> + Result = ok(OptionTable0 ^ elem(mercury_linkage) := string(Flag)) + ; + Result = error("argument of `--mercury-linkage' should be either " ++ + """shared"" or ""static"".") + ). + +special_handler(env_type, string(EnvTypeStr), OptionTable0, ok(OptionTable)) :- + OptionTable = + map.set(map.set(OptionTable0, + host_env_type, string(EnvTypeStr)), + target_env_type, string(EnvTypeStr)). + +special_handler(inform_inferred, bool(Inform), !.OptionTable, + ok(!:OptionTable)) :- + override_options([ + inform_inferred_types - bool(Inform), + inform_inferred_modes - bool(Inform) + ], !OptionTable). + +%-----------------------------------------------------------------------------% + +option_table_add_mercury_library_directory(OptionTable0, Dir) = + % The init_file_directories and link_library_directories for Mercury + % libraries are grade dependent, so they need to be handled in + % handle_options.m after we know the grade. + list.foldl(append_to_accumulating_option, [ + search_directories - dir.make_path_name(Dir, "ints"), + c_include_directory - dir.make_path_name(Dir, "inc"), + erlang_include_directory - dir.make_path_name(Dir, "inc"), + mercury_library_directories - Dir + ], OptionTable0). + +option_table_add_search_library_files_directory(OptionTable0, Dir) = + % Grade dependent directories need to be handled in handle_options.m + % after we know the grade. + list.foldl(append_to_accumulating_option, [ + search_directories - Dir, + c_include_directory - Dir, + erlang_include_directory - Dir, + search_library_files_directories - Dir + ], OptionTable0). + +:- func append_to_accumulating_option(pair(option, string), + option_table) = option_table. + +append_to_accumulating_option(Option - Value, OptionTable0) = + OptionTable0 ^ elem(Option) := + accumulating( + getopt_io.lookup_accumulating_option(OptionTable0, Option) + ++ [Value]). + +:- pred set_opt_level(int::in, option_table::in, option_table::out) is det. + +set_opt_level(N, !OptionTable) :- + % First reset all optimizations to their default + % (the default should be all optimizations off). + option_defaults_2(optimization_option, OptimizationDefaults), + override_options(OptimizationDefaults, !OptionTable), + + % Next enable the optimization levels from 0 up to N. + enable_opt_levels(0, N, !OptionTable). + +:- pred enable_opt_levels(int::in, int::in, + option_table::in, option_table::out) is det. + +enable_opt_levels(N0, N, !OptionTable) :- + ( N0 > N -> + true + ; opt_level(N0, !.OptionTable, OptionSettingsList) -> + override_options(OptionSettingsList, !OptionTable), + N1 = N0 + 1, + enable_opt_levels(N1, N, !OptionTable) + ; + unexpected($module, $pred, "unknown optimization level") + ). + +:- pred override_options(list(pair(option, option_data))::in, + option_table::in, option_table::out) is det. + +override_options([], !OptionTable). +override_options([Option - Value | Settings], !OptionTable) :- + map.set(Option, Value, !OptionTable), + override_options(Settings, !OptionTable). + +%-----------------------------------------------------------------------------% + +:- pred opt_space(list(pair(option, option_data))::out) is det. + +opt_space([ + unneeded_code_copy_limit - int(1), + optimize_dead_procs - bool(yes), + optimize_labels - bool(yes), + optimize_dups - bool(yes), + optimize_proc_dups - bool(yes), + optimize_fulljumps - bool(no), + optimize_reassign - bool(yes), + inline_alloc - bool(no), + use_macro_for_redo_fail - bool(no), + loop_invariants - bool(no) +]). + +%-----------------------------------------------------------------------------% + +:- pred opt_level(int::in, option_table::in, + list(pair(option, option_data))::out) is semidet. + +% Optimization level -1: +% Generate totally unoptimized code; turns off ALL optimizations that +% can be turned off, including HLDS->HLDS, HLDS->LLDS, LLDS->LLDS, LLDS->C, +% and C->object optimizations. +% (However, there are some optimizations that can't be disabled.) + +% Optimization level 0: aim to minimize overall compilation time. +% XXX I just guessed. We should run lots of experiments. + +opt_level(0, _, [ + common_data - bool(yes), + optimize - bool(yes), + optimize_repeat - int(1), + optimize_peep - bool(yes), + optimize_peep_mkword - bool(yes), + static_ground_cells - bool(yes), + smart_indexing - bool(yes), + optimize_jumps - bool(yes), + optimize_labels - bool(yes), + optimize_dead_procs - bool(yes), + excess_assign - bool(yes) % ??? +]). + +% Optimization level 1: apply optimizations which are cheap and +% have a good payoff while still keeping compilation time small. + +opt_level(1, OptionTable, [ + use_local_vars - bool(yes), + c_optimize - bool(yes), % XXX we want `gcc -O1' + optimize_frames - bool(yes), + optimize_delay_slot - bool(DelaySlot), + middle_rec - bool(yes), + emit_c_loops - bool(yes), + optimize_tailcalls - bool(yes) + % dups? +]) :- + getopt_io.lookup_bool_option(OptionTable, have_delay_slot, DelaySlot). + +% Optimization level 2: apply optimizations which have a good +% payoff relative to their cost; but include optimizations +% which are more costly than with -O1. + +opt_level(2, _, [ + optimize_fulljumps - bool(yes), + optimize_repeat - int(3), + optimize_dups - bool(yes), + follow_code - bool(yes), + inline_simple - bool(yes), + inline_single_use - bool(yes), + inline_compound_threshold - int(10), + common_struct - bool(yes), + user_guided_type_specialization - bool(yes), + % XXX While inst `array' is defined as `ground', we can't optimize + % duplicate calls (we might combine calls to `array.init'). + % optimize_duplicate_calls - bool(yes), + simple_neg - bool(yes), + + optimize_initializations - bool(yes) +]). + +% Optimization level 3: apply optimizations which usually have a good +% payoff even if they increase compilation time quite a bit. + +opt_level(3, _, [ + optimize_saved_vars_const - bool(yes), + optimize_unused_args - bool(yes), + optimize_higher_order - bool(yes), + deforestation - bool(yes), + local_constraint_propagation - bool(yes), + constant_propagation - bool(yes), + optimize_reassign - bool(yes), + % Disabled until a bug in extras/trailed_update/var.m is resolved. + % introduce_accumulators - bool(yes), + optimize_repeat - int(4) +]). + +% Optimization level 4: apply optimizations which may have some +% payoff even if they increase compilation time quite a bit. + +% Currently this enables the use of local variables +% and increases the inlining thresholds. + +opt_level(4, _, [ + inline_simple_threshold - int(8), + inline_compound_threshold - int(20), + higher_order_size_limit - int(30) +]). + +% Optimization level 5: apply optimizations which may have some +% payoff even if they increase compilation time a lot. + +% Currently this enables the search for construction unifications that can be +% delayed past failing computations, allows more passes of the low-level +% optimizations, and increases the inlining thresholds still further. +% We also enable eliminate_local_vars only at this level, +% because that pass is implemented pretty inefficiently. + +opt_level(5, _, [ + optimize_repeat - int(5), + delay_construct - bool(yes), + inline_compound_threshold - int(100), + higher_order_size_limit - int(40), + eliminate_local_vars - bool(yes), + loop_invariants - bool(yes) +]). + +% Optimization level 6: apply optimizations which may have any payoff even if +% they increase compilation time to completely unreasonable levels. + +% Currently this sets `everything_in_one_c_function', which causes the compiler +% to put everything in the one C function and treat calls to predicates in the +% same module as local. We also enable inlining of GC_malloc(), redo(), and +% fail(). + +opt_level(6, _, [ + procs_per_c_function - int(0), % everything in one C function + inline_alloc - bool(yes), + use_macro_for_redo_fail - bool(yes) +]). + +% The following optimization options are not enabled at any level: +% +% checked_nondet_tailcalls: +% This is deliberate, because the transformation +% might make code run slower. +% +% constraint_propagation: +% I think this is deliberate, because the transformation +% might make code run slower? +% +% unneeded_code: +% Because it can cause slowdowns at high optimization levels; +% cause unknown +% type_specialization: +% XXX why not? +% +% introduce_accumulators: +% XXX Disabled until a bug in extras/trailed_update/var.m +% is resolved. +% +% optimize_constructor_last_call: +% Not a speedup in general. + +%-----------------------------------------------------------------------------% + +:- pred handle_quoted_flag(option::in, string::in, + option_table::in, option_table::out) is det. + +handle_quoted_flag(Option, Flag, Table, + append_to_accumulating_option(Option - quote_arg(Flag), Table)). + +quote_arg(Arg0) = Arg :- + % XXX Instead of using dir.use_windows_paths, this should really + % test whether we are using a Unix or Windows shell. + ( dir.use_windows_paths -> + ( ( string_contains_whitespace(Arg0) ; Arg0 = "" ) -> + Arg = """" ++ Arg0 ++ """" + ; + Arg = Arg0 + ) + ; + ArgList = quote_arg_unix(string.to_char_list(Arg0)), + ( + ArgList = [], + Arg = """""" + ; + ArgList = [_ | _], + ( + list.member(Char, ArgList), + \+ + ( char.is_alnum_or_underscore(Char) + ; Char = ('-') + ; Char = ('/') + ; Char = ('.') + ; Char = (',') + ; Char = (':') + ) + -> + Arg = """" ++ string.from_char_list(ArgList) ++ """" + ; + Arg = string.from_char_list(ArgList) + ) + ) + ). + +:- pred string_contains_whitespace(string::in) is semidet. + +string_contains_whitespace(Str) :- + Chars = string.to_char_list(Str), + some [Char] ( + list.member(Char, Chars), + char.is_whitespace(Char) + ). + +:- func quote_arg_unix(list(char)) = list(char). + +quote_arg_unix([]) = []. +quote_arg_unix([Char | Chars0]) = Chars :- + Chars1 = quote_arg_unix(Chars0), + ( quote_char_unix(Char) -> + Chars = [('\\'), Char | Chars1] + ; + Chars = [Char | Chars1] + ). + +:- pred quote_char_unix(char::in) is semidet. + +quote_char_unix('\\'). +quote_char_unix('"'). +quote_char_unix('`'). +quote_char_unix('$'). + +%-----------------------------------------------------------------------------% + +inconsequential_options(InconsequentialOptions) :- + option_defaults_2(warning_option, WarningOptions), + option_defaults_2(verbosity_option, VerbosityOptions), + option_defaults_2(internal_use_option, InternalUseOptions), + option_defaults_2(build_system_option, BuildSystemOptions), + assoc_list.keys(WarningOptions, WarningKeys), + assoc_list.keys(VerbosityOptions, VerbosityKeys), + assoc_list.keys(InternalUseOptions, InternalUseKeys), + assoc_list.keys(BuildSystemOptions, BuildSystemKeys), + Keys = WarningKeys ++ VerbosityKeys ++ InternalUseKeys ++ BuildSystemKeys, + InconsequentialOptions = set.from_list(Keys). + +%-----------------------------------------------------------------------------% + +options_help --> + io.write_string("\t-?, -h, --help\n"), + io.write_string("\t\tPrint this usage message.\n"), + options_help_warning, + options_help_verbosity, + options_help_output, + options_help_aux_output, + options_help_semantics, + options_help_termination, + options_help_ctgc, + options_help_compilation_model, + options_help_code_generation, + options_help_optimization, + options_help_hlds_hlds_optimization, + options_help_hlds_llds_optimization, + options_help_llds_llds_optimization, + options_help_mlds_mlds_optimization, + options_help_hlds_elds_optimization, + options_help_output_optimization, + options_help_target_code_compilation, + options_help_link, + options_help_build_system, + options_help_misc. + +:- pred options_help_warning(io::di, io::uo) is det. + +options_help_warning --> + io.write_string("\nWarning Options:\n"), + write_tabbed_lines([ + "-w, --inhibit-warnings", + "\tDisable all warning messages.", + "--halt-at-warn", + "\tThis option causes the compiler to treat all ", + "\twarnings as if they were errors. This means that", + "\tif any warning is issued, the compiler will not", + "\tgenerate code --- instead, it will return a", + "\tnon-zero exit status.", + "--halt-at-syntax-errors", + "\tThis option causes the compiler to halt immediately", + "\tafter syntax checking and not do any semantic checking", + "\tif it finds any syntax errors in the program.", +% "--halt-at-auto-parallel-failure", +% "\tThis option causes the compiler to halt if it cannot perform", +% "\tan auto-parallelization requested by a feedback file.", + "--inhibit-accumulator-warnings", + "\tDon't warn about argument order rearrangement caused", + "\tby --introduce-accumulators.", + "--no-warn-singleton-variables", + "\tDon't warn about variables which only occur once.", + "--no-warn-overlapping-scopes", + "\tDon't warn about variables which occur in overlapping scopes.", + "--no-warn-det-decls-too-lax", + "\tDon't warn about determinism declarations", + "\twhich could have been stricter.", + "--no-warn-inferred-erroneous", + "\tDon't warn about procedures whose determinism is inferred", + "\terroneous but whose determinism declarations are laxer.", + "--no-warn-insts-without-matching-type", + "\tDon't warn about insts that are not consistent with any", + "\tof the types in scope.", + % XXX disabled until compiler unused_imports, + % don't forget to update the user_guide.texi + % "--no-warn-unused-imports", + % "\tDon't warn about modules that are imported but not used.", + "--warn-unused-imports", + "\tWarn about modules that are imported but not used.", + "--no-warn-nothing-exported", + "\tDon't warn about modules which export nothing.", + "--warn-unused-args", + "\tWarn about predicate arguments which are not used.", + "--warn-interface-imports", + "\tWarn about modules imported in the interface, but", + "\twhich are not used in the interface.", + "--no-warn-missing-opt-files", + "\tDisable warnings about `.opt' files which cannot be opened.", + "--warn-missing-trans-opt-files", + "\tEnable warnings about `.trans_opt' files which cannot", + "\tbe opened.", + "--no-warn-missing-trans-opt-deps", + "\tDisable warnings produced when the information required", + "\tto allow `.trans_opt' files to be read when creating other", + "\t`.trans_opt' files has been lost. The information can be", + "\trecreated by running `mmake .depend'", + "--no-warn-non-contiguous-clauses", + "\tDo not generate a warning if the clauses of a predicate or function", + "\tare not contiguous.", + "--warn-non-contiguous-foreign-procs", + "\tGenerate a warning if the clauses and foreign_procs of a predicate", + "\tor function are not contiguous.", + "--warn-non-stratification", + "\tWarn about possible non-stratification of the predicates and/or", + "\tfunctions in the module.", + "\tNon-stratification occurs when a predicate or function can call", + "\titself negatively through some path along its call graph.", + "--no-warn-unification-cannot-succeed", + "\tDisable warnings about unifications which cannot succeed.", + "--no-warn-simple-code", + "\tDisable warnings about constructs which are so", + "\tsimple that they are likely to be programming errors.", + "--warn-duplicate-calls", + "\tWarn about multiple calls to a predicate with the", + "\tsame input arguments.", + "--no-warn-missing-module-name", + "\tDisable warnings for modules that do no start with", + "\ta `:- module' declaration.", + "--no-warn-wrong-module-name", + "\tDisable warnings for modules whose `:- module'", + "\tdeclaration does not match the module's file name.", + "--no-warn-smart-recompilation", + "\tDisable warnings from the smart recompilation system.", + "--no-warn-undefined-options-variables", + "\tDo not warn about references to undefined variables in", + "\toptions files with `--make'.", + "--warn-non-tail-recursion", + "\tWarn about any directly recursive calls that are not tail calls.", + "--no-warn-up-to-date", + "\tDon't warn if targets specified on the command line", + "\twith `--make' are already up to date.", + "--no-warn-stubs", + "\tDisable warnings about procedures for which there are no", + "\tclauses. Note that this option only has any effect if", + "\tthe `--allow-stubs' option (described in the ""Language", + "\tSemantics Options"" section below) is enabled.", + "--warn-dead-procs", + "\tWarn about procedures which are never called.", + "--no-warn-target-code", + "\tDisable warnings from the compiler used to process the", + "\ttarget code (e.g. gcc).", + "--no-warn-table-with-inline", + "\tDisable warnings about tabled procedures that also have", + "\ta `pragma inline' declaration.", + "--no-warn-non-term-special-preds", + "\tDo not warn about types that have user-defined equality or", + "\tcomparison predicates that cannot be proved to terminate.", + "\tThis option is only enabled when termination analysis is enabled.", + "\t(See the ""Termination Analysis Options"" section below).", + "--no-warn-known-bad-format-calls", + "\tDo not warn about calls to string.format or io.format that", + "\tthe compiler knows for sure contain mismatches between the", + "\tformat string and the supplied values.", + "--warn-unknown-format-calls", + "\tWarn about calls to string.format or io.format for which", + "\tthe compiler cannot tell whether there are any mismatches", + "\tbetween the format string and the supplied values.", + "--no-warn-obsolete", + "\tDo not warn about calls to predicates or functions that have", + "\tbeen marked as obsolete.", + "--inform-ite-instead-of-switch", + "\tGenerate informational messages for if-then-elses that could be", + "\treplaced by switches.", + "--no-warn-unresolved-polymorphism", + "\tDo not warn about unresolved polymorphism.", + "--warn-suspicious-foreign-procs", + "\tWarn about possible errors in the bodies of foreign", + "\tprocedures.", + "--no-warn-state-var-shadowing", + "\tDo not warn about one state variable shadowing another.", + "--no-inform-inferred", + "\tDo not generate messages about inferred types or modes.", + "--no-inform-inferred-types", + "\tDo not generate messages about inferred types.", + "--no-inform-inferred-modes", + "\tDo not generate messages about inferred modes." + ]). + +:- pred options_help_verbosity(io::di, io::uo) is det. + +options_help_verbosity --> + io.write_string("\nVerbosity Options:\n"), + write_tabbed_lines([ + "-v, --verbose", + "\tOutput progress messages at each stage in the compilation.", + "-V, --very-verbose", + "\tOutput very verbose progress messages.", + "-E, --verbose-error-messages", + "\tExplain error messages. Asks the compiler to give you a more", + "\tdetailed explanation of any errors it finds in your program.", + "--no-verbose-make", + "\tDisable messages about the progress of builds using", + "\tthe `--make' option.", + "--verbose-commands", + "\tOutput each external command before it is run.", + "\tNote that some commands will only be printed with `--verbose'.", + "--verbose-recompilation", + "\tWhen using `--smart-recompilation', output messages", + "\texplaining why a module needs to be recompiled.", + "--find-all-recompilation-reasons", + "\tFind all the reasons why a module needs to be recompiled,", + "\tnot just the first. Implies `--verbose-recompilation'.", + "--output-compile-error-lines ", + "\tWith `--make', output the first lines of the `.err'", + "\tfile after compiling a module (default: 15).", + "--report-cmd-line-args-doterr", + "\tReport the command line arguments.", + "--report-cmd-line-args-in-doterr", + "\tReport the command line arguments for compilations whose output", + "\tmmake normally redirects to a .err file.", + "-S, --statistics", + "\tOutput messages about the compiler's time/space usage.", + "\tAt the moment this option implies `--no-trad-passes', so you get", + "\tinformation at the boundaries between phases of the compiler.", +% The only sensible way to use --detailed-statistics, based on --very-verbose, +% is implemented automatically in handle_options, so users shouldn't need to be +% aware of it. +% "--detailed-statistics", +% "\tOutput more detailed messages about the compiler's", +% "\ttime/space usage.", + "--proc-size-statistics ", + "\tAppend information about the size of each procedure in the module", + "\tin terms of goals and variables to the end of the named file.", +% --debug-types works only if the compiler was compiled with +% "--trace-flag type_checkpoint". +% "-T, --debug-types", +% "\tOutput detailed debugging traces of the type checking.", + "-N, --debug-modes", + "\tOutput debugging traces of the mode checking.", + "--debug-modes-statistics", + "\tOutput statistics after each step of mode checking.", + "--debug-modes-minimal", + "\tOutput only minimal debugging traces of the mode checking.", + "--debug-modes-verbose", + "\tOutput detailed debugging traces of the mode checking.", + "--debug-modes-pred-id ", + "\tWith --debug-modes, restrict the debugging traces to the", + "\tmode checking of the predicate or function with the specified", + "\tpred id.", +% --debug-dep-par-conj is a developer only option, +% and it is effective only if the compiler was compiled with the right +% trace flags. +% "--debug-dep-par-conj ", +% "\tOutput detailed debugging traces during the dependent", +% "\tAND-parallelism transformation of the predicate with the", +% "\tpredicate id.", + "--debug-det, --debug-determinism", + "\tOutput detailed debugging traces of determinism analysis.", +% --debug-code-gen-pred-id is a developer only option, +% and it is effective only if the compiler was compiled with the right +% trace flags. +% "--debug-code-gen-pred-id ", +% "\tOutput detailed debugging traces of code generation for the", +% "\tpredicate or function with the given pred id.", +% The new termination analyser is currently a work-in-progress. +% + %"--debug-term, --debug-termination", + %"\tOutput detailed debugging traces of the termination2 analysis.", + "--debug-opt", + "\tOutput detailed debugging traces of the optimization process.", + "--debug-opt-pred-id ", + "\tOutput detailed debugging traces of the optimization process", + "\tonly for the predicate/function with the specified pred id.", + "--debug-opt-pred-name ", + "\tOutput detailed debugging traces of the optimization process", + "\tonly for the predicate/function with the specified name.", + "--debug-pd", + "\tOutput detailed debugging traces of the partial", + "\tdeduction and deforestation process.", + "--debug-liveness ", + "\tOutput detailed debugging traces of the liveness analysis", + "\tof the predicate with the given predicate id.", + "--debug-make", + "\tOutput detailed debugging traces of the `--make' option.", +% This can be uncommented when the '--analyse-closures' option is uncommented. +% (See below.) +% "--debug-closure", +% "\tOutput detailed debugging traces of the closure analysis." + "--debug-trail-usage", + "\tOutput detailed debugging traces of the `--analyse-trail-usage'", + "\toption.", + "--debug-intermodule-analysis", + "\tOutput detailed debugging traces of the `--intermodule-analysis'", + "\toption.", + "--debug-indirect-reuse", + "\tOutput detailed debugging traces of the indirect reuse pass of", + "\t`--structure-reuse' option.", + "--debug-type-rep", + "\tOutput debugging traces of type representation choices." +% The mode constraints code is still experimental so this option is +% currently commented out. +% "--debug-mode-constraints", +% "\tOutput detailed debugging traces of the `--prop-mode-constraints'", +% "\toption." + ]). + +:- pred options_help_output(io::di, io::uo) is det. + +options_help_output --> + io.write_string("\nOutput Options:\n"), + write_tabbed_lines([ + "These options are mutually exclusive.", + "Only the first one specified will apply.", + "If none of these options are specified, the default action", + "is to link the named modules to produce an executable.\n", + "-f, --generate-source-file-mapping", + "\tOutput the module name to file name mapping for the list", + "\tof source files given as non-option arguments to mmc", + "\tto `Mercury.modules'. This must be done before", + "\t`mmc --generate-dependencies' if there are any modules", + "\tfor which the file name does not match the module name.", + "\tIf there are no such modules the mapping need not be", + "\tgenerated.", + "-M, --generate-dependencies", + "\tOutput `Make'-style dependencies for the module", + "\tand all of its dependencies to `.dep'.", + "--generate-dependency-file", + "\tOutput `Make'-style dependencies for the module", + "\tto `.d'.", + "--generate-module-order", + "\tOutput the strongly connected components of the module", + "\tdependency graph in top-down order to `.order'.", + "\tImplies --generate-dependencies.", + "--generate-standalone-interface ", + "\tOutput a stand-alone interface.", + "\t is used as the basename of any files generated for", + "\tthe stand-alone interface. (See the Stand-alone Interface", + "\tchapter of the Mercury User's Guide for further details.)", + "-i, --make-int, --make-interface", + "\tWrite the module interface to `.int',", + "\tand write the short interface to `.int2'", + "\tThis option should only be used by mmake.", + "--make-priv-int, --make-private-interface", + "\tWrite the private interface to `.int0'.", + "\tThis option should only be used by mmake.", + "--make-short-int, --make-short-interface", + "\tWrite the unqualified short interface to `.int3'.", + "\tThis option should only be used by mmake.", + "--make-opt-int, --make-optimization-interface", + "\tWrite inter-module optimization information to", + "\t`.opt'.", + "\tThis option should only be used by mmake.", + "--make-trans-opt", + "--make-transitive-optimization-interface", + "\tOutput transitive optimization information", + "\tinto the `.trans_opt' file.", + "\tThis option should only be used by mmake.", + "-x,--make-xml-doc,--make-xml-documentation", + "\tOutput XML documentation of the module", + "\tinto the `.xml' file.", + "\tThis option should only be used by mmake.", + "-P, --convert-to-mercury", + "\tConvert to Mercury. Output to file `.ugly'", + "\tThis option acts as a Mercury ugly-printer.", + "-t, --typecheck-only", + "\tJust check that the code is syntactically correct and", + "\ttype-correct. Don't check modes or determinism,", + "\tand don't generate any code.", + "-e, --errorcheck-only", + "\tCheck the module for errors, but do not generate any code.", + "-C, --target-code-only", + "\tGenerate target code (i.e. C code in `.c',", + "\tIL code in `.il', or Java code in", + "\t`.java'), but not object code.", + "-c, --compile-only", + "\tGenerate C code in `.c' and object code in `.o'", + "\tbut do not attempt to link the named modules.", + % --compile-to-shared-lib is intended only for use + % by the debugger's interactive query facility, + % so it isn't documented. + "--output-grade-string", + "\tCompute the grade of the library to link with based on", + "\tthe command line options, and print it to the standard", + "\toutput.", + "--output-link-command", + "\tPrint the command used to link executables to the", + "\tstandard output.", + "--output-shared-lib-link-command", + "\tPrint the command used to link shared libraries to the", + "\tstandard output.", + "--output-libgrades", + "\tPrint the list of compilation grades in which a library", + "\tto be installed should be built to the standard output.", + "--output-cc", + "\tPrint the command used to invoke the C compiler to the", + "\tstandard output.", + "--output-cc-type, --output-c-compiler-type", + "\tPrint the C compiler type to the standard output.", + "--output-cflags", + "\tPrint the flags with which the C compiler will be invoked", + "\tto the standard output.", + "--output-csharp-compiler-type", + "\tPrint the C# compiler type to the standard output.", + "--output-library-link-flags", + "\tPrint the flags that are passed to linker in order to link", + "\tagainst the current set of libraries. This includes the", + "\tstandard library as well as any other libraries specified", + "\tvia the --ml option. The flags are printed to the standard", + "\toutput.", + "--output-grade-defines", + "\tPrint the flags that are passed to the C compiler to define the", + "\tmacros used to specify the compilation grade.", + "\tThe flags are printed to the standard output.", + "--output-c-include-dir-flags, --output-c-include-directory-flags", + "\tPrint the flags that are passed to the C compiler to specify", + "\twhich directories to search for C header files.", + "\tThis includes the C header files from the standard library.", + "\tThe flags are printed to the standard output." + ]). + +:- pred options_help_aux_output(io::di, io::uo) is det. + +options_help_aux_output --> + io.write_string("\nAuxiliary Output Options:\n"), + write_tabbed_lines([ + "--smart-recompilation", + "\tWhen compiling, write program dependency information", + "\tto be used to avoid unnecessary recompilations if an", + "\timported module's interface changes in a way which does", + "\tnot invalidate the compiled code. `--smart-recompilation'", + "\tdoes not yet work with `--intermodule-optimization'.", + "--no-assume-gmake", + "\tWhen generating `.dep' files, generate Makefile", + "\tfragments that use only the features of standard make;", + "\tdo not assume the availability of GNU Make extensions.", + "\tWhen generating `.dep' files, generate dependencies", + "\tfor use by `mmc --make' in addition to the dependencies", + "\tused by mmake.", + "--generate-mmc-deps", + "--generate-mmc-make-module-dependencies", + "\tGenerate dependencies for use by `mmc --make' even", + "\twhen using Mmake. This is recommended when building a", + "\tlibrary for installation.", + +% XXX The source-to-source debugging transform is not ready for public +% consumption. + %"--link-ssdebug-libs", + %"--link-ssdb-libs", + %"\tLink the source to source debugging libraries into the", + %"\tthe executable.", + %"--ss-trace {none, shallow, deep}", + %"\tThe trace level to use for source to source debugging of", + %"\tthe given module.", + +% "--trace decl" is not documented, because it is for backwards +% compatibility only. It is now equivalent to `--trace rep'. +% "--trace {minimum, shallow, deep, decl, rep, default}", + "--trace {minimum, shallow, deep, rep, default}", + "\tGenerate code that includes the specified level", + "\tof execution tracing.", + "\tSee the Debugging chapter of the Mercury User's Guide", + "\tfor details.", + "--exec-trace-tail-rec", + "\tGenerate TAIL events for self-tail-recursive calls instead of", + "\tEXIT events. This allows these recursive calls to reuse", + "\ttheir parent call's stack frame, but it also means that", + "\tthe debugger won't have access to the contents of the reused", + "\tstack frames", +% "--suppress-trace ,", +% "\tSuppress the named aspects of the execution tracing system.", +% This is a developer-only option: +% "--force-disable-trace", +% "\tForce tracing to be set to trace level none.", +% "\tThis overrides all other tracing/grade options.", +% "\tIts main use is to turn off tracing in the browser", +% "\tdirectory, even for .debug and .decldebug grades.", + "--trace-optimized", + "\tDo not disable optimizations that can change the trace.", +% "--trace-prof" is not documented because if is only intended for developers +% of the deep profiler. +% "--trace-prof"", +% "\tEnable tracing of deep profiling service predicates.", +% I/O tabling is deliberately not documented. It is mean to be switched on, +% with consistent parameters, in debugging grades, and to be consistently +% switched off in non-debugging grades. Inconsistent use of the options +% governing I/O tabling can yield core dumps from the debugger, so these +% options are for implementors only. +% "--trace-table-io", +% "\tEnable the tabling of I/O actions, to allow the debugger", +% "\tto execute retry commands across I/O actions.", +% "--trace-table-io-only-retry", +% "\tSet up I/O tabling to support only retries across I/O", +% "\tactions, not the printing of actions or declarative", +% "\tdebugging. This reduces the size of the I/O action table.", +% "--trace-table-io-states", +% "\tWhen tabling I/O actions, table the io.state arguments", +% "\ttogether with the others. This should be required iff", +% "\tvalues of type io.state actually contain information.", +% "--trace-table-io-require", +% "\tRequire the tabling of I/O actions, i.e. generate an error", +% "\tif an I/O primitive does not have the tabled_for_io", +% "\tannotation.", +% "--trace-table-io-all", +% "\tTable all I/O actions even in the absence of annotations.", +% "\tIf a primitive has no annotation specifying the type of", +% "\ttabling required, deduce it from the values of the other", +% "\tannotations.", + "--trace-flag ", + "\tEnable the trace goals that depend on the trace flag.", + "--profile-optimized", + "\tDo not disable optimizations that can distort deep profiles.", + "--no-delay-death", + "\tWhen the trace level is `deep', the compiler normally", + "\tpreserves the values of variables as long as possible, even", + "\tbeyond the point of their last use, in order to make them", + "\taccessible from as many debugger events as possible.", + "\tHowever, it will not do this if this option is given.", + "--delay-death-max-vars ", + "\tDelay the deaths of variables only when the number of variables", + "\tin the procedure is no more than N. The default value is 1000.", + "--stack-trace-higher-order", + "\tEnable stack traces through predicates and functions with", + "\thigher-order arguments, even if stack tracing is not", + "\tsupported in general.", +% This is a developer-only option: +% "--force-disable-ssdebug", +% "\tDisable ssdebug transformation even in ssdebug grades.", +% "--tabling-via-extra-args", +% "\tGenerate output via extra_args in foreign_procs.", +% "--allow-table-reset", +% "\tGenerate C code for resetting tabling data structures.", + "--generate-bytecode", + "\tOutput a bytecode form of the module for use", + "\tby an experimental debugger.", + "-n-, --no-line-numbers", + "\tDo not put source line numbers in the generated code.", + "\tThe generated code may be in C (the usual case),", + "\tor in Mercury (with the option --convert-to-mercury).", + "--auto-comments", + "\tOutput comments in the `.c' file.", +% This option is for developers only. Since it can include one C comment inside +% another, the resulting code is not guaranteed to be valid C. +% "--frameopt-comments", +% "\tGet frameopt.m to generate comments describing its operation.", + "\t(The code may be easier to understand if you also", + "\tuse the `--no-llds-optimize' option.)", + "--max-error-line-width ", + "\tSet the maximum width of an error message line to characters", + "\t(unless a long single word forces the line over this limit).", + "--show-dependency-graph", + "\tWrite out the dependency graph to `.dependency_graph'.", + "--imports-graph", + "\tWrite out the imports graph to `.imports_graph'.", + "\tThe imports graph contains the directed graph module A", + "\timports module B.", + "\tThe resulting file can be processed by the graphviz tools.", +% This option is for developers only. +% "--dump-trace-counts ", +% "\tIf the compiler was compiled with debugging enabled and is being", +% "\trun with trace counting enabled, write out the trace counts file", +% "\tafter the specified stage to `.trace_counts.-'.", +% "\tStage numbers range from 1-599.", +% "\tMultiple dump options accumulate.", + "-d , --dump-hlds ", + "\tDump the HLDS (high level intermediate representation) after", + "\tthe specified stage to `.hlds_dump.-'.", + "\tStage numbers range from 1-599.", + "\tMultiple dump options accumulate.", + "--dump-hlds-pred-id ", + "\tDump the HLDS only of the predicate/function with the given", + "\tpred id.", + "--dump-hlds-pred-name ", + "\tDump the HLDS only of the predicate/function with the given", + "\tname.", +% This option is for developers only. +% "-D, --dump-hlds-alias ", +% "\tWith `--dump-hlds', include extra detail in the dump.", +% "\tEach dump alias is shorthand for a set of option letters.", +% "\tThe list of aliases is in handle_options.m", + "--dump-hlds-options ", + "\tWith `--dump-hlds', include extra detail in the dump.", + "\tEach type of detail is included in the dump if its", + "\tcorresponding letter occurs in the option argument", + "\t(see the Mercury User's Guide for details).", + "--dump-hlds-inst-limit ", + "\tDump at most N insts in each inst table.", + "--dump-hlds-file-suffix ", + "\tAppend the given suffix to the names of the files created by", + "\tthe `--dump-hlds' option.", + "--dump-same-hlds", + "\tCreate a file for a HLDS stage even if the file notes only that", + "\tthis stage is identical to the previously dumped HLDS stage.", + "--dump-mlds ", + "\tDump the MLDS (medium level intermediate representation)", + "\tafter the specified stage, as C code,", + "\tto`.c_dump.-',", + "\tand `.h_dump.-'.", + "\tStage numbers range from 1-99.", + "\tMultiple dump options accumulate.", + "--verbose-dump-mlds ", + "\tDump the internal compiler representation of the MLDS, after", + "\tthe specified stage, to `.mlds_dump.-'." +% The mode constraints code is still experimental so these options are +% currently commented out. +% "--mode-constraints" +% "\tRun constraint based mode analysis. The default is to", +% "\tuse the robdd solution using the full (subtyping)", +% "\tconstraints and dump results.", +% "--simple-mode-constraints", +% "\tUse only the simplified constraint system when running", +% "\tthe robdd solver constraints based mode analysis.", +% "--prop-mode-constraints", +% "\tUse the new propagation solver for constraints based", +% "\tmode analysis.", +% IL options are commented out to reduce confusion. +% "--sign-assembly", +% "\tSign the current assembly with the Mercury strong name.", +% "\tTo use assemblies created with this command all the Mercury", +% "\tmodules must be compiled with this option enabled.", +% "\tThis option is specific to the IL backend, and is likely", +% "\tto be deprecated at a later date." + + /* XXX currently broken. + "--separate-assemblies", + "\tPlace sub-modules in separate assemblies.", + "\tThis option is specific to the IL backend." + */ + ]). + +:- pred options_help_semantics(io::di, io::uo) is det. + +options_help_semantics --> + io.write_string("\nLanguage semantics options:\n"), + io.write_string("(See the Mercury language reference manual for detailed explanations.)\n"), + write_tabbed_lines([ + "--no-reorder-conj", + "\tExecute conjunctions left-to-right except where the modes imply", + "\tthat reordering is unavoidable.", + "--no-reorder-disj", + "\tExecute disjunctions strictly left-to-right.", + "--no-fully-strict", + "\tAllow infinite loops or goals with determinism erroneous to be", + "\toptimised away.", + "--allow-stubs", + "\tAllow procedures to have no clauses. Any calls to", + "\tsuch procedures will raise an exception at run-time.", + "\tThis option is sometimes useful during program development.", + "\t(See also the documentation for the `--warn-stubs' option", + "\tin the ""Warning Options"" section.)", + "--infer-all", + "\tAbbreviation for `--infer-types --infer-modes --infer-det'.", + "--infer-types", + "\tIf there is no type declaration for a predicate or function,", + "\ttry to infer the type, rather than just reporting an error.", + "--infer-modes", + "\tIf there is no mode declaration for a predicate,", + "\ttry to infer the modes, rather than just reporting an error.", + + "--no-infer-det, --no-infer-determinism", + "\tIf there is no determinism declaration for a procedure,", + "\tdon't try to infer the determinism, just report an error.", + "--type-inference-iteration-limit ", + "\tPerform at most passes of type inference (default: 60).", + "--mode-inference-iteration-limit ", + "\tPerform at most passes of mode inference (default: 30).", + "--event-set-file-name ", + "\tGet the specification of user-defined events from ." + ]). + + +:- pred options_help_ctgc(io::di, io::uo) is det. + +options_help_ctgc --> + io.write_string("\nCompile Time Garbage Collection Options:\n"), + write_tabbed_lines([ + "--structure-sharing", + "\tPerform structure sharing analysis.", + "--structure-sharing-widening ", + "\tPerform widening when the set of structure sharing pairs becomes", + "\tlarger than . When n=0, widening is not enabled.", + "\t(default: 0).", + "--structure-reuse, --ctgc", + "\tPerform structure reuse analysis (Compile Time Garbage ", + "\tCollection).", + "--structure-reuse-constraint {same_cons_id, ", + "\twithin_n_cells_difference}, --ctgc-constraint {same_cons_id,", + "\twithin_n_cells_difference}", + "\tConstraint on the way we allow structure reuse. `same_cons_id'", + "\tspecifies that reuse is only allowed between terms of the same", + "\ttype and constructor. `within_n_cells_difference' states that", + "\treuse is allowed as long as the arities between the reused term", + "\tand new term does not exceed a certain threshold. The threshold ", + "\tneeds to be set using `--structure-reuse-constraint-arg'.", + "\t(default: within_n_cells_difference, with threshold 0)", + "--structure-reuse-constraint-arg, --ctgc-constraint-arg", + "\tSpecify the maximum difference in arities between the terms that", + "\tcan be reused, and the terms that reuse these terms.", + "\t(default: 0)" + +% This option is for developers only. +% "--structure-reuse-max-conditions", +% "\tSoft limit on the number of reuse conditions to accumulate", +% "\tfor a procedure. (default: 10)" + +% This option is likely to break many optimisations which haven't been updated. +% "--structure-reuse-free-cells", +% "\tImmediately free cells which are known to be dead but which", +% "\tcannot be reused." + ]). + +:- pred options_help_termination(io::di, io::uo) is det. + +options_help_termination --> + io.write_string("\nTermination Analysis Options:\n"), + write_tabbed_lines([ + "--enable-term, --enable-termination", + "\tAnalyse each predicate to discover if it terminates.", + "--chk-term, --check-term, --check-termination", + "\tEnable termination analysis, and emit warnings for some", + "\tpredicates or functions that cannot be proved to terminate.", + "\tIn many cases where the compiler is unable to prove termination", + "\tthe problem is either a lack of information about the", + "\ttermination properties of other predicates, or because language", + "\tconstructs (such as higher order calls) were used which could", + "\tnot be analysed. In these cases the compiler does not emit a", + "\twarning of non-termination, as it is likely to be spurious.", + "--verb-chk-term, --verb-check-term, --verbose-check-termination", + "\tEnable termination analysis, and emit warnings for all", + "\tpredicates or functions that cannot be proved to terminate.", + "--term-single-arg , --termination-single-argument-analysis ", + "\tWhen performing termination analysis, try analyzing", + "\trecursion on single arguments in strongly connected", + "\tcomponents of the call graph that have up to procedures.", + "\tSetting this limit to zero disables single argument analysis.", + "--termination-norm {simple, total, num-data-elems}", + "\tThe norm defines how termination analysis measures the size", + "\tof a memory cell. The `simple' norm says that size is always", + "\tone. The `total' norm says that it is the number of words", + "\tin the cell. The `num-data-elems' norm says that it is the", + "\tnumber of words in the cell that contain something other", + "\tthan pointers to cells of the same type.", + "--term-err-limit , --termination-error-limit ", + "\tPrint at most reasons for any single termination error", + "\t(default: 3).", + "--term-path-limit , --termination-path-limit ", + "\tPerform termination analysis only on predicates", + "\twith at most paths (default: 256)." + +% The following options are used to control the new termination analyser. +% They are currently disabled because that is still a work-in-progress. +% +% "--enable-term2, --enable-termination2", +% "\tAnalyse each predicate to discover if it terminates. ", +% "\tThis uses an alternative termination analysis based", +% "\ton convex constraints.", +% "--chk-term2, --check-termination2", +% "\tEnable the alternative termination analysis, and emit warnings for", +% "\tsome predicates or functions that cannot be proved to terminate. In", +% "\tmany cases where the compiler is unable to prove termination", +% "\tthe problem is either a lack of information about the", +% "\ttermination properties of other predicates, or because language", +% "\tconstructs (such as higher order calls) were used which could", +% "\tnot be analysed. In these cases the compiler does not emit a", +% "\twarning of non-termination, as it is likely to be spurious.", +% "--verb-chk-term2, --verb-check-term2, --verbose-check-termination2", +% "--termination2-norm {simple, total, num-data-elems}", +% "\tTell the alternative termination analyser which norm to use.", +% "\tSee the description of the `--termination-norm' option for a", +% "\tdescription of the different types of norm available." +% "--term2-widening-limit , --termination2-widening-limit ", +% "\tSet the threshold for the number of iterations after which the", +% "\targument size analyser invokes widening.", +% "--term2-propagate-failure-constrs, --termination2-propagate-failure-constraints", +% "\tMake the argument analyser infer information about the sizes of any" +% "\tinputs to a goal in contexts where that goal fails." +% "--term2-max-matrix-size , --termination2-maximum-matrix-size ", +% "\tLimit the sizes of constraints systems in the analyser to ", +% "\tconstraints. Use approximations of some constraint operations,", +% "\tsuch as projection, if this threshold is exceeded. This will", +% "\tspeed up the analysis at the cost of reduced precision.", + +% This option is for developers only. +% It is useful for benchmarking the argument size analysis. +% "--term2-argument-size-analysis-only, --term2-arg-size-analysis-only", +% "\tPerform argument size analysis on each SCC but do not", +% "\tattempt to infer termination," + ]). + +:- pred options_help_compilation_model(io::di, io::uo) is det. + +options_help_compilation_model --> + io.write_string("\nCompilation model options:\n"), + write_tabbed_lines([ + "The following compilation options affect the generated", + "code in such a way that the entire program must be", + "compiled with the same setting of these options,", + "and it must be linked to a version of the Mercury", + "library which has been compiled with the same setting.", + "", + "-s , --grade ", + "\tSelect the compilation model. The should be one of", + "\tthe base grades `none', `reg', `jump', `asm_jump', `fast', ", + "\t`asm_fast', `hl', `hlc', `il', or `java',", +% The hl, hl_nest, and hlc_nest are not yet documented, because +% the --high-level-data option is not yet supported for C, +% and the --gcc-nested-functions option is not yet documented. +% The ilc grade is not documented because it is not useful; +% it has been superceded by the il grade. + "\tor one of those with one or more of the grade modifiers", + "\t`.gc', `.mps', `.prof', `.memprof', `.profdeep', `.tr',", + "\t`.spf', `.stseg', `.debug', `.par' and/or `.pic_reg' appended.", + "\tDepending on your particular installation, only a subset", + "\tof these possible grades will have been installed.", + "\tAttempting to use a grade which has not been installed", + "\twill result in an error at link time." + ]), + + io.write_string("\n Target selection compilation model options:\n"), + write_tabbed_lines([ + "--target c\t\t\t(grades: none, reg, jump, fast,", + "\t\t\t\t\tasm_jump, asm_fast, hl, hlc)", + "--target il\t\t\t(grades: il)", + "--target csharp\t\t\t(grades: csharp)", + "--target java\t\t\t(grades: java)", + "--target erlang\t\t\t(grades: erlang)", + "\tSpecify the target language: C, IL, C#, Java or Erlang.", + "\tThe default is C. ""IL"" (also known as ""CIL"" or ""MSIL"")", + "\tis the Intermediate Language for the .NET Common Language", + "\tRuntime.", + "\tTargets other than C imply `--high-level-code' (see below).", + +% IL options are commented out to reduce confusion. +% "--il", +% "\tAn abbreviation for `--target il'.", +% "--il-only", +% "\tAn abbreviation for `--target il --target-code-only'.", +% "\tGenerate IL code in `.il', but do not generate", +% "\tobject code.", +% +% "--dotnet-library-version ", +% "\tThe version number for the mscorlib assembly distributed", +% "\twith the Microsoft .NET SDK.", +% +% "--no-support-ms-clr", +% "\tDon't use MS CLR specific workarounds in the generated code.", +% +% "--support-rotor-clr", +% "\tUse specific workarounds for the ROTOR CLR in the generated", +% "\tcode.", + + "--csharp", + "\tAn abbreviation for `--target csharp'.", + "--csharp-only", + "\tAn abbreviation for `--target csharp --target-code-only'.", + "\tGenerate C# code in `.cs', but do not generate", + "\tobject code.", + + "--java", + "\tAn abbreviation for `--target java'.", + "--java-only", + "\tAn abbreviation for `--target java --target-code-only'.", + "\tGenerate Java code in `.java', but do not generate", + "\tobject code.", + + "--erlang", + "\tAn abbreviation for `--target erlang'.", + "--erlang-only", + "\tAn abbreviation for `--target erlang --target-code-only'.", + "\tGenerate Erlang code in `.erl', but do not generate", + "\tobject code.", + + "--compile-to-c", + "\tAn abbreviation for `--target c --target-code-only'.", + "\tGenerate C code in `.c', but do not generate object", + "\tcode." + ]), + + io.write_string("\n Optional feature compilation model options:\n"), + io.write_string(" Debugging\n"), + write_tabbed_lines([ + "--debug\t\t\t\t(grade modifier: `.debug')", + "\tEnable Mercury-level debugging.", + "\tSee the Debugging chapter of the Mercury User's Guide", + "\tfor details.", + "\tThis option is not yet supported for the `--high-level-code'", + "\tback-ends.", + "--decl-debug\t\t\t\t(grade modifier: `.decldebug')", + "\tEnable full support for declarative debugging.", + "\tThis allows subterm dependency tracking in the declarative", + "\tdebugger.", + "\tSee the Debugging chapter of the Mercury User's Guide", + "\tfor details.", + "\tThis option is not yet supported for the `--high-level-code'", + "\tback-ends." +% XXX The source-to-source debugging transform is not ready for public +% consumption. +% "--ss-debug\t\t\t\t(grade modifier: `.ssdebug')", +% "\tEnable the source-to-source debugging transform." + ]), + io.write_string(" Profiling\n"), + write_tabbed_lines([ + "-p, --profiling, --time-profiling", + "\t\t\t\t(grade modifier: `.prof')", + "\tEnable time and call profiling. Insert profiling hooks in the", + "\tgenerated code, and also output some profiling", + "\tinformation (the static call graph) to the file", + "\t`.prof'.", + "\tThis option is not supported for the IL, C# or Java back-ends.", + "--memory-profiling\t\t(grade modifier: `.memprof')", + "\tEnable memory and call profiling.", + "\tThis option is not supported for the IL, C# or Java back-ends.", + "--deep-profiling\t\t(grade modifier: `.profdeep')", + "\tEnable deep profiling.", + "\tThis option is not supported for the high-level C, IL, C#", + "\tor Java back-ends.", + +% This option is not documented, it is intended for use by developers only. +% +% "--pre-prof-transforms-simplify", +% "\tForce the pre-profiling simplification pass that is usually", +% "\tenabled when building a profiling version of a program. This", +% "\tallows a developer to enable this pass when using a", +% "\tnon-profiling build. It can be used to test that generated code", +% "\tintroduced in earlier passes is well-formed before it is", +% "\tpotentially removed by the dead procedure elimination pass later", +% "\ton.", +% + +% XXX The following options are not documented, +% because they are currently not useful. +% The idea was for you to be able to use --profile-calls +% and --profile-time separately, but that doesn't work +% because compiling with --profile-time instead of +% --profile-calls results in different code addresses, +% so you can't combine the data from versions of +% your program compiled with different options. +% +% "--profile-calls\t\t(grade modifier: `.profcalls')", +% "\tSimilar to `--profiling', except that only gathers", +% "\tcall counts, not timing information.", +% "\tUseful on systems where time profiling is not supported,", +% "\tbut not as useful as `--memory-profiling'.", +% "--profile-time\t\t(grade modifier: `.proftime')", +% "\tSimilar to `--profiling', except that it only gathers", +% "\ttiming information, not call counts.", +% "--profile-memory\t\t(grade modifier: `.profmem')", +% "\tSimilar to `--memory-profiling', except that it only", +% "\tgathers memory usage information, not call counts.", + + "--no-coverage-profiling", + "\tDisable coverage profiling.", +% The following options are for implementors only (intended for experiments). +% "--coverage-profiling-via-calls", +% "\tUse calls to implement coverage points, not inline foreign code.", + +% "--coverage-profiling-static", +% "\tDisable dynamic coverage profiling, this uses less memory and may ", +% "\tbe faster.", + +% "Switches to effect coverage profiling (part of deep profiling). ", +% "they enable different types of coverage points.", + +% "--no-profile-deep-coverage-after-goal", +% "\tDisable coverage points after goals.", +% "--no-profile-deep-coverage-branch-ite", +% "\tDisable coverage points at the beginning of then and else", +% "\tbranches.", +% "--no-profile-deep-coverage-branch-switch", +% "\tDisable coverage points at the beginning of switch branches.", +% "--no-profile-deep-coverage-branch-disj", +% "\tDisable coverage points at the beginning of disjunction branches.", + +% I beleive these options are broken - pbone. +% "Switches to tune the coverage profiling pass, useful for ", +% "debugging.", +% +% "--no-profile-deep-coverage-use-portcounts", +% "\tTurn off usage of port counts in the deep profiler to provide", +% "\tsome coverage information.", +% "--no-profile-deep-coverage-use-trivial", +% "\tTurn off usage of trivial goal information", + + "--profile-for-feedback", + "\tSelect deep profiling options suitable for profiler directed", + "\timplicit parallelism.", + "\t--profile-for-implicit-parallelism is a deprecated synonym for", + "\tthis option", + + "--record-term-sizes-as-words\t\t(grade modifier: `.tsw')", + "\tAugment each heap cells with its size in words.", + "--record-term-sizes-as-cells\t\t(grade modifier: `.tsc')", + "\tAugment each heap cells with its size in cells.", + + "--experimental-complexity=\t\t", + "\tEnable experimental complexity analysis for the predicates", + "\tlisted in the given file.", + "\tThis option is supported for the C back-end, with", + "\t--no-highlevel-code.", + + "--threadscope\t\t(grade modifier: `.threadscope')", + "\tEnable support for profiling parallel execution.", + "\tThis option is supported by the low-level C back-end parallel", + "\tgrades on some processors, See README.ThreadScope for details." + ]), + + io.write_string(" Miscellaneous optional features\n"), + write_tabbed_lines([ + "--gc {none, boehm, hgc, mps, accurate, automatic}", + "--garbage-collection {none, boehm, hgc, mps, accurate, automatic}", + "\t\t\t\t(`java', `csharp', `il' and `erlang'", + "\t\t\t\t\tgrades use `--gc automatic',", + "\t\t\t\t`.gc' grades use `--gc boehm',", + "\t\t\t\t`.hgc' grades use `--gc hgc',", + "\t\t\t\t`.mps' grades use `--gc mps',", + "\t\t\t\tother grades use `--gc none'.)", + "\tSpecify which method of garbage collection to use", + "\t(default: boehm).", + "\t`boehm' is Hans Boehm et al's conservative collector.", + "\t`hgc' is our own conservative collector;", + "\t`accurate' is our own type-accurate copying GC;", + "\tit requires `--high-level-code'.", + "\t`mps' is a different conservative collector, based on", + "\tRavenbrook Limited's MPS (Memory Pool System) kit.", + "\t`automatic' means the target language provides it.", + "\tThis is the case for the IL, C#, Java and Erlang back-ends,", + "\twhich always use the garbage collector of the underlying", + "\timplementation.", + "--use-trail\t\t\t(grade modifier: `.tr')", + "\tEnable use of a trail.", + "\tThis is necessary for interfacing with constraint solvers,", + "\tor for backtrackable destructive update.", + "\tThis option is not yet supported for the IL, C# or Java back-ends.", + "--trail-segments\t\t\t(grade modifier: `.trseg')", + "\tAs above, but use a dynamically sized trail that is composed", + "\tof small segments. This can help to avoid trail exhaustion", + "\tat the cost of increased execution time.", + "--parallel\t\t(grade modifier: `.par')", + "\tEnable parallel execution support for the low-level C grades.", + "\tEnable concurrency (via pthreads) for the high-level C grades.", + "--maybe-thread-safe {yes, no}", + "\tSpecify how to treat the `maybe_thread_safe' foreign code", + "\tattribute. `yes' means that a foreign procedure with the", + "\t`maybe_thread_safe' option is treated as though it has a", + "\t`thread_safe' attribute. `no' means that the foreign", + "\tprocedure is treated as though it has a `not_thread_safe'", + "\tattribute. The default is no.", + "--single-prec-float\t\t(grade modifier: `.spf')", + "\tUse single precision floats so that, on 32-bit machines,", + "\tfloating point values don't need to be boxed. Double", + "\tprecision floats are used by default." + % This is commented out as this feature is still experimental. + %"--extend-stacks-when-needed", + %"\tSpecify that code that increments a stack pointer must", + %"\textend the stack when this is needed.", + % RBMM is undocumented since it is still experimental. + % should also document rbmmd rbmmp rbmmdp + %"--use-regions\t\t(grade modifier: `.rbmm')", + %"\tEnable support for region-based memory managment." + %"--use-alloc-regions", + %"\tCompute and use the exact set of regions", + %"\t that may be allocated into by a call." + ]), + + io.write_string("\n LLDS back-end compilation model options:\n"), + write_tabbed_lines([ + + "--gcc-global-registers\t\t(grades: reg, fast, asm_fast)", + "--no-gcc-global-registers\t(grades: none, jump, asm_jump)", + "\tSpecify whether or not to use GNU C's", + "\tglobal register variables extension.", + "\tThis option is ignored if the `--high-level-code' option is", + "\tenabled.", + "--gcc-non-local-gotos\t\t(grades: jump, fast, asm_jump, asm_fast)", + "--no-gcc-non-local-gotos\t(grades: none, reg)", + "\tSpecify whether or not to use GNU C's", + "\t""labels as values"" extension.", + "\tThis option is ignored if the `--high-level-code' option is", + "\tenabled.", + "--asm-labels\t\t\t(grades: asm_jump, asm_fast)", + "--no-asm-labels\t\t\t(grades: none, reg, jump, fast)", + "\tSpecify whether or not to use GNU C's", + "\tasm extensions for inline assembler labels.", + "\tThis option is ignored if the `--high-level-code' option is", + "\tenabled.", + "--pic-reg\t\t\t(grade modifier: `.pic_reg')", + "[For Unix with intel x86 architecture only]", + "\tSelect a register usage convention that is compatible,", + "\twith position-independent code (gcc's `-fpic' option).", + "\tThis is necessary when using shared libraries on Intel x86", + "\tsystems running Unix. On other systems it has no effect.", + "--stack-segments\t\t(grade modifier: `.stseg')", + "\tSpecify whether to use dynamically sized stacks that are", + "\tcomposed of small segments. This can help to avoid stack", + "\texhaustion at the cost of increased execution time.", + "\tThis option is ignored if the `--high-level-code' option is", + "\tenabled." + % This is a developer only option. +% "--use-float-registers", +% "(This option is not for general use.)", +% "\tUse float registers for argument passing." + ]), + + io.write_string("\n MLDS back-end compilation model options:\n"), + write_tabbed_lines([ +% These grades (hl_nest, and hlc_nest) are not yet documented, +% because the --gcc-nested-functions option is not yet documented. +% "-H, --high-level-code\t\t\t(grades: hl_nest, hlc_nest)", +% The ilc grade is not documented because it is not useful; +% it has been superceded by the il grade. + "-H, --high-level-code\t\t\t(grades: hl, hlc, il, csharp, java)", + "\tUse an alternative back-end that generates high-level code", + "\trather than the very low-level code that is generated by our", + "\toriginal back-end.", +% The hl_nest grade is not yet documented, +% because the --gcc-nested-functions option is not yet documented. +% because it is not yet supported +% "--high-level-data\t\t\t(grades: hl, hl_nest, il, csharp, java)", + "--high-level-data\t\t\t(grades: hl, il, csharp, java)", + "\tUse an alternative higher-level data representation.", +% "--high-level\t\t\t(grades: hl, hl_nest, il, csharp, java)", + "--high-level\t\t\t(grades: hl, il, csharp, java)", + "\tAn abbreviation for `--high-level-code --high-level-data'." +% The --gcc-nested-functions option is not yet documented, +% because it doesn't pass our test suite, and it is +% probably not very useful. +% "--gcc-nested-functions\t\t(grades: hl_nest, hlc_nest)", +% "\tSpecify whether or not to use GNU C's nested functions extension.", +% "\tThis option is ignored if the `--high-level-code' option is not enabled.", +% The --det-copy-out option is not yet documented, +% because it is not yet tested much and probably not very useful, +% except for Java, where it is the default. +% "--det-copy-out", +% "\tSpecify whether to handle output arguments for det/semidet", +% "\tprocedures using return-by-value rather than pass-by-reference.", +% "\tThis option is ignored if the `--high-level-code' option is not enabled.", +% The --nondet-copy-out option is not yet documented, +% because it is probably not very useful except for IL and Java, +% where it is the default. +% "--nondet-copy-out\t\t(grades: il, ilc)", +% "\tSpecify whether to handle output arguments for nondet", +% "\tprocedures using pass-by-value rather than pass-by-reference.", +% "\tThis option is ignored if the `--high-level-code' option is not enabled.", +% The --put-commit-in-own-func option is not documented because +% it is enabled automatically (by handle_options) in the situations +% where it is needed; the user should never need to set it. +% "--put-commit-in-own-func", +% "\tPut each commit in its own C function.", +% "\tThis option only affects the MLDS back-ends.", +% "\tIt is needed for the high-level C back-end,", +% "\twhere commits are implemented via setjmp()/longjmp(),", +% "\tsince longjmp() may clobber any non-volatile local vars", +% "\tin the function that called setjmp().", +% The --put-nondet-env-on-heap option is not documented because +% it is enabled automatically (by handle_options) in the situations +% where it is needed; the user should never need to set it. +% "--put-nondet-env-on-heap", +% "\tAllocate the environment structures used for", +% "\tnondeterministic Mercury procedures on the heap,", +% "\trather than on the stack." +% ]), +% io.write_string("\n IL back-end compilation model options:\n"), +% write_tabbed_lines([ +% +% The --verifiable-code option is not yet documented because it is not yet fully +% implemented. +% "--verifiable, --verifiable-code\t\t\t", +% "\tEnsure that the generated IL code is verifiable.", +% +% The --il-refany-fields option is not documented because currently there +% are no IL implementations for which it is useful. +% "--il-refany-fields", +% "\tGenerate IL code that assumes that the CLI implementation", +% "\tsupports value types with fields of type `refany'.", +% "\tUsing this option could in theory allow more efficient", +% "\tverifiable IL code for nondeterministic Mercury procedures,", +% "\tif the CLI implementation supported it." +% "\tHowever, the current Microsoft CLR does not support it." +% +% The --il-byref-tailcalls option is not documented because currently there +% are no IL implementations for which it is useful. +% "--il-byref-tailcalls", +% "\tGenerate IL code that assumes that the CLI verifier", +% "\tsupports tail calls with byref arguments." +% +% The --il-funcptr-types option is not documented because it is not yet +% implemented. +% "--il-funcptr-types", +% "\tGenerate IL code that assumes that the IL assembler", +% "\tsupports function pointer types." +% "\tThe ECMA CLI specification allows function pointer types," +% "\tbut some CLR implementations, e.g. the old Beta 2 version of" +% "\tthe Microsoft CLR implementation, do not support them." + ]), + + io.write_string("\n Developer compilation model options:\n"), + io.write_string("\n Data representation\n"), + write_tabbed_lines([ + "--tags {none, low, high} (This option is not for general use.)", + "\tSpecify whether to use the low bits or the high bits of ", + "\teach word as tag bits (default: low).", + % "\t\t`--tags none' implies `--num-tag-bits 0'.", + "--num-tag-bits (This option is not for general use.)", + "\tUse tag bits.", + "--num-reserved-addresses (This option is not for general use.)", + "\tTreat the integer values from 0 up to - 1 as reserved", + "\taddresses that can be used to represent nullary constructors", + "\t(constants) of discriminated union types.", + "--num-reserved-objects (This option is not for general use.)", + "\tAllocate up to global objects per type,", + "\tfor representing nullary constructors", + "\t(constants) of discriminated union types." + + % The --conf-low-tag-bits option is reserved for use + % by the `mmc' script; it is deliberately not documented. + + % The --bits-per-word option is intended for use + % by the `mmc' script; it is deliberately not documented. + + % The --bytes-per-word option is intended for use + % by the `mmc' script; it is deliberately not documented. + + % This is a developer only option. +% "--unboxed-float", +% "(This option is not for general use.)", +% "\tDon't box floating point numbers.", +% "\tThis assumes that a Mercury float will fit in a word.", +% "\tThe C code needs to be compiled with `-UBOXED_FLOAT'.", +% "\tIt may also need to be compiled with", +% "\t`-DUSE_SINGLE_PREC_FLOAT', if double precision", +% "\tfloats don't fit into a word." + + % This is a developer only option. +% "--no-unboxed-enums", +% "(This option is not for general use.)", +% "\tBox enumerations. This option is disabled by default.", + + % This is a developer only option. +% "--no-unboxed-no-tag-types", +% "(This option is not for general use.)", +% "\tBox no-tag types. This option is disabled by default." + + ]), + io.write_string("\n Developer optional features\n"), + write_tabbed_lines([ + "--use-minimal-model-stack-copy", + "(This option is not for general use.)", + "\tEnable the use of the standard form of minimal model tabling.", + + "--use-minimal-model-own-stacks", + "(This option is not for general use.)", + "\tEnable the use of an experimental form of minimal model tabling.", + + "--minimal-model-debug", + "(This option is not for general use.)", + "\tEnables extra data structures that assist in debugging", + "\tminimal model tabling.", + + "--no-type-layout", + "(This option is not for general use.)", + "\tDon't output type_ctor_layout structures or references", + "\tto them. (The C code also needs to be compiled with", + "\t`-DNO_TYPE_LAYOUT')." + + % This is a developer only option. +% "--basic-stack-layout", +% "(This option is not for general use.)", +% "\tGenerate the simple stack_layout structures required", +% "\tfor stack traces.", + + % This is a developer only option. +% "--agc-stack-layout", +% "(This option is not for general use.)", +% "\tGenerate the stack_layout structures required for", +% "\taccurate garbage collection.", + + % This is a developer only option. +% "--procid-stack-layout", +% "(This option is not for general use.)", +% "\tGenerate the stack_layout structures required for", +% "\tlooking up procedure identification information.", + + % This is a developer only option. +% "--trace-stack-layout", +% "(This option is not for general use.)", +% "\tGenerate the stack_layout structures required for", +% "\texecution tracing.", + + % This is a developer only option. +% "--body-typeinfo-liveness", +% "(This option is not for general use.)", +% For documentation, see the comment in the type declaration. + + % This is a developer only option. +% "--can-compare-constants-as-ints", +% "(This option is not for general use.)", +% For documentation, see the comment in the type declaration. + + % This is a developer only option. +% "--pretest-equality-cast-pointers", +% "(This option is not for general use.)", +% For documentation, see the comment in the type declaration. + + % This is a developer only option. +% "--can-compare-compound-values" +% "(This option is not for general use.)", +% For documentation, see the comment in the type declaration. + + % This is a developer only option. +% "--lexically-order-constructors" +% "(This option is not for general use.)", +% For documentation, see the comment in the type declaration. + + % This is a developer only option. +% "--mutable-always-boxed", +% "(This option is not for general use.)", +% For documentation, see the comment in the type declaration. + + % This is a developer only option. +% "--delay-partial-instantiations", +% "(This option is not for general use.)", +% For documentation, see delay_partial_inst.m + + % This is a developer only option. +% "--allow-defn-of-builtins", +% "(This option is not for general use.)", +% For documentation, see the comment in the type declaration. + + % This is a developer only option. +% "--special-preds", +% "(This option is not for general use.)", +% For documentation, see the comment in the type declaration. + + % All these are developer only options. +% "(These options are not for general use.)", +% For documentation, see runtime/mercury_region.h. +% "--size-region-ite-fixed" +% "--size-region-disj-fixed" +% "--size-region-commit-fixed" +% "--size-region-ite-protect" +% "--size-region-ite-snapshot" +% "--size-region-disj-protect" +% "--size-region-disj-snapshot" +% "--size-region-commit-entry" + + % This is a developer only option. +% "--solver-type-auto-init", +% "(This option is not for general use.)", +% Allow automatic initialisation of solver types. + + % This is a developer only option. +% "--allow-multi-arm-switches", +% "(This option is not for general use.)", +% Allow the compiler to generate switches in which one arm handles +% more than one cons_id. + + % This is a developer only option. +% "--type-check-constraints", +% "(This option is not for general use.)", +% Use the constraint based type checker instead of the old one. + + % This is a developer only option. +% "--allow-argument-packing", +% "(This option is not for general use.)", +% Allow the compiler to pack multiple constructor arguments into +% a single field. + ]). + +:- pred options_help_code_generation(io::di, io::uo) is det. + +options_help_code_generation --> + io.write_string("\nCode generation options:\n"), + write_tabbed_lines([ +% "--low-level-debug", +% "\tEnables various low-level debugging stuff, that was in", +% "\tthe distant past used to debug the low-level code generation.", +% "\tYou don't want to use this option unless you are hacking", +% "\tthe Mercury compiler itself (and probably not even then).", +% "\tCauses the generated code to become VERY big and VERY", +% "\tinefficient. Slows down compilation a LOT.", + +% "--table-debug", +% "\tEnables the generation of code that helps to debug tabling", +% "\tprimitives.", + + "--no-trad-passes", + "\tThe default `--trad-passes' completely processes each predicate", + "\tbefore going on to the next predicate.", + "\tThis option tells the compiler", + "\tto complete each phase of code generation on all predicates", + "\tbefore going on the next phase on all predicates.", + % "--parallel-liveness", + % "Use multiple threads when computing liveness.", + % "At the moment this option implies `--no-trad-passes',", + % "and requires the compiler to be built in a", + % "low-level parallel grade and running with multiple engines.", + % "--parallel-code-gen", + % "Use multiple threads when generating code.", + % "At the moment this option implies `--no-trad-passes',", + % "and requires the compiler to be built in a", + % "low-level parallel grade and running with multiple engines.", + % "\t--no-polymorphism", + % "\t\tDon't handle polymorphic types.", + % "\t\t(Generates slightly more efficient code, but stops", + % "\t\tpolymorphism from working except in special cases.)", + "--no-reclaim-heap-on-nondet-failure", + "\tDon't reclaim heap on backtracking in nondet code.", + "--no-reclaim-heap-on-semidet-failure", + "\tDon't reclaim heap on backtracking in semidet code.", + "--no-reclaim-heap-on-failure", + "\tCombines the effect of the two options above.", + + "--max-jump-table-size=", + "\tThe maximum number of entries a jump table can have.", + "\tThe special value 0 indicates the table size is unlimited.", + "\tThis option can be useful to avoid exceeding fixed limits", + "\timposed by some C compilers.", + + % This is a developer only option. +% "--compare-specialization=", +% "\tGenerate quadratic instead of linear compare predicates for", +% "\ttypes with up to n function symbols. Higher values of n lead to", +% "\tfaster but also bigger compare predicates.", + + % This is a developer only option. +% "--no-should-pretest-equality", +% "\tIf specified, do not add a test for the two values being equal", +% "\tas words to the starts of potentially expensive unify and compare", +% "\tpredicates." + + "--fact-table-max-array-size ", + "\tSpecify the maximum number of elements in a single", + "\t`:- pragma fact_table' data array (default: 1024).", + "--fact-table-hash-percent-full ", + "\tSpecify how full the `:- pragma fact_table' hash tables", + "\tshould be allowed to get. Given as an integer percentage", + "\t(valid range: 1 to 100, default: 90)." + +% This option is not yet documented because the `--gcc-nested-functions' option +% is not documented. +% "--gcc-local-labels", +% "\tThis option has no effect unless both the `--high-level-code' option", +% "\tand the `--gcc-nested-functions' options are enabled.", +% "\tIf this option is enabled, the Mercury compiler will generate", +% "\tC code that uses GNU C's local labels extension to allow", +% "\tGNU C nested functions to exit into their containing function", +% "\tvia a `goto'.", +% "\tIf this option is not enabled, the default behaviour is to", +% "\tuse the standard ANSI/ISO C setjmp() and longjmp() functions." + +% This option is not yet documented because it is not yet useful -- currently +% we don't take advantage of GNU C's computed gotos extension. +% "--no-prefer-switch", +% "\tGenerate code using computed gotos rather than switches.", +% "\tThis makes the generated code less readable, but potentially", +% "\tslightly more efficient.", +% "\tThis option has no effect unless the `--high-level-code' option", +% "\tis enabled. It also has no effect if the `--target' option is", +% "\tset to `il'.", +% This optimization is for implementors only. Turning this option on provides +% the fairest possible test of --optimize-saved-vars-cell. +% "--no-opt-no-return-calls", +% "\tDo not optimize the stack usage of calls that cannot return.", + + ]), + + io.write_string("\n Code generation target options:\n"), + write_tabbed_lines([ + "--branch-delay-slot \t(This option is not for general use.)", + "\tAssume that branch instructions have a delay slot.", + "--num-real-r-regs \t(This option is not for general use.)", + "\tAssume registers r1 up to r are real general purpose", + "\tregisters.", + "--num-real-f-regs \t(This option is not for general use.)", + "\tAssume registers f1 up to f are real floating point", + "\tregisters.", + "--num-real-r-temps \t(This option is not for general use.)", + "\tAssume that non-float temporaries will fit into", + "\treal machine registers.", + "--num-real-f-temps \t(This option is not for general use.)", + "\tAssume that float temporaries will fit into", + "\treal machine registers." + ]). + +:- pred options_help_optimization(io::di, io::uo) is det. + +options_help_optimization --> + io.write_string("\nOptimization Options:\n"), + write_tabbed_lines([ + "-O , --opt-level , --optimization-level ", + "\tSet optimization level to .", + "\tOptimization level -1 means no optimization", + "\twhile optimization level 6 means full optimization.", + % "\t\tFor a full description of each optimization level,", + % "\t\tsee the Mercury User's Guide.", + "--opt-space, --optimize-space", + "\tTurn on optimizations that reduce code size", + "\tand turn off optimizations that significantly", + "\tincrease code size.", + "--intermod-opt", + "--intermodule-optimization", + "\tPerform inlining and higher-order specialization of", + "\tthe code for predicates imported from other modules.", + "\tThis option must be set throughout the compilation process.", + "--trans-intermod-opt", + "--transitive-intermodule-optimization", + "\tImport the transitive intermodule optimization data.", + "\tThis data is imported from `.trans_opt' files.", + "\tNote that `--transitive-intermodule-optimization' does not", + "\twork with `mmc --make'.", + "--no-read-opt-files-transitively", + "\tOnly read the inter-module optimization information", + "\tfor directly imported modules, not the transitive", + "\tclosure of the imports.", + "--use-opt-files", + "\tPerform inter-module optimization using any", + "\t`.opt' files which are already built,", + "\te.g. those for the standard library, but do", + "\tnot build any others.", + "--use-trans-opt-files", + "\tPerform inter-module optimization using any", + "\t`.trans_opt' files which are already built,", + "\te.g. those for the standard library, but do", + "\tnot build any others.", + "--intermodule-analysis", + "\tPerform analyses such as termination analysis and", + "\tunused argument elimination across module boundaries.", + "\tThis option is not yet fully implemented.", + "--analysis-repeat ", + "\tThe maximum number of times to repeat analyses of", + "\tsuboptimal modules with `--intermodule-analysis'", + "\t(default: 0)." + % This is commented out as this feature is still experimental. +% "--analysis-file-cache", +% "\tEnable caching of parsed analysis files. This may", +% "\timprove compile times with `--intermodule-analysis'." + ]). + +:- pred options_help_hlds_hlds_optimization(io::di, io::uo) is det. + +options_help_hlds_hlds_optimization --> + io.write_string("\n High-level (HLDS -> HLDS) optimizations:\n"), + write_tabbed_lines([ + "--no-inlining", + "\tDisable all forms of inlining.", + "--no-inline-simple", + "\tDisable the inlining of simple procedures.", + "--no-inline-builtins", + "\tGenerate builtins (e.g. arithmetic operators) as calls to", + "\tout of line procedures. This is done by default when,", + "\tdebugging, as without this option the execution of", + "\tbuiltins is not traced.", + "--no-inline-single-use", + "\tDisable the inlining of procedures called only once.", + "--inline-call-cost ", + "\tAssume that the cost of a call is the given parameter.", + "\tUsed only in conjunction with --inline-compound-threshold.", + "\tmultiplied by the number of times it is called,", + "--inline-compound-threshold ", + "\tInline a procedure if its size (measured roughly", + "\tin terms of the number of connectives in its internal form)", + "\tless the assumed call cost, multiplied by the number of times", + "\tit is called is below the given threshold.", + "--inline-simple-threshold ", + "\tInline a procedure if its size is less than the", + "\tgiven threshold.", + "--intermod-inline-simple-threshold", + "\tSimilar to `--inline-simple-threshold', except used to", + "\tdetermine which predicates should be included in", + "\t`.opt' files. Note that changing this between writing", + "\tthe `.opt' file and compiling to C may cause link errors,", + "\tand too high a value may result in reduced performance.", + "--inline-vars-threshold ", + "\tDon't inline a call if it would result in a procedure", + "\tcontaining more than variables. Procedures", + "\tcontaining large numbers of variables can cause", + "\tslow compilation.", +% "--from-ground-term-threshold ", +% "\tWrap a from_ground_term scope around the expanded,", +% "\tsuperhomogeneous form of a ground term that involves at least.", +% "\tthe given number of function symbols.", + "--no-const-struct", + "\tDisable the gathering of constant structures in a separate table.", + "--no-common-struct", + "\tDisable optimization of common term structures.", +% "--common-struct-preds ", +% "\tLimit common struct optimization to the preds with the given ids.", + +% Common goal optimization should not be turned off, since it can +% break programs that would otherwise compile properly (e.g., +% benchmarks/icfp2000). This is kept as a developer-only option. +% +% "--no-common-goal", +% "\tDisable optimization of common goals.", +% "\tAt the moment this optimization", +% "\tdetects only common deconstruction unifications.", +% "\tDisabling this optimization reduces the class of predicates", +% "\tthat the compiler considers to be deterministic.", + + "--constraint-propagation", + "\tEnable the constraint propagation transformation,", + "\twhich attempts to transform the code so that goals", + "\twhich can fail are executed as early as possible.", + "--local-constraint-propagation", + "\tEnable the constraint propagation transformation,", + "\tbut only rearrange goals within each procedure.", + "\tSpecialized versions of procedures will not be created.", + "--prev-code", + "\tMigrate into the start of branched goals.", + "--no-follow-code", + "\tDon't migrate into the end of branched goals.", + "--excess-assign", + "\tRemove excess assignment unifications.", + "--no-optimize-format-calls", + "\tDo not attempt to interpret the format string in calls to", + "\tstring.format and related predicates at compile time;", + "\talways leave this to be done at runtime.", + "--optimize-duplicate-calls", + "\tOptimize away multiple calls to a predicate", + "\twith the same input arguments.", + "--loop-invariants", + "\tHoist loop invariants out of loops.", + "--delay-constructs", + "\tReorder goals to move construction unifications after", + "\tprimitive goals that can fail.", + % "--optimize-saved-vars-const", + % "\tMinimize the number of variables saved across calls by", + % "\tintroducing duplicate copies of variables bound to", + % "\tconstants in each interval between flushes where they", + % "\tare needed.", + % "--optimize-saved-vars-cell", + % "\tMinimize the number of variables saved across calls by", + % "\ttrying to use saved variables pointing to cells to reach", + % "\tthe variables stored in those cells.", + "--optimize-saved-vars", + "\tMinimize the number of variables saved across calls.", + "--optimize-unused-args", + "\tRemove unused predicate arguments.", + "\tThis will cause the compiler to generate more", + "\tefficient code for many polymorphic predicates.", + "--intermod-unused-args", + "\tPerform unused argument removal across module boundaries.", + "\tThis option implies `--optimize-unused-args' and", + "\t`--intermodule-optimization'.", + + "--optimize-higher-order", + "\tEnable specialization of higher-order predicates.", + "--type-specialization", + "\tEnable specialization of polymorphic predicates where the", + "\tpolymorphic types are known.", + "--user-guided-type-specialization", + "\tEnable specialization of polymorphic predicates for which", + "\tthere are `:- pragma type_spec' declarations.", + "--higher-order-size-limit", + "\tSet the maximum goal size of specialized versions created by", + "\t`--optimize-higher-order' and `--type-specialization'.", + "\tGoal size is measured as the number of calls, unifications", + "\tand branched goals.", + "--higher-order-arg-limit", + "\tSet the maximum size of higher-order arguments to", + "\tbe specialized by `--optimize-higher-order' and", + "\t`--type-specialization'.", + "--unneeded-code", + "\tRemove goals from computation paths where their outputs are", + "\tnot needed, provided the semantics options allow the deletion", + "\tor movement of the goal.", + "--unneeded-code-copy-limit", + "\tGives the maximum number of places to which a goal may be copied", + "\twhen removing it from computation paths on which its outputs are", + "\tnot needed. A value of zero forbids goal movement and allows", + "\tonly goal deletion; a value of one prevents any increase in the", + "\tsize of the code.", +% "--unneeded-code-debug", +% "\tPrint progress messages during the unneeded code elimination", +% "\tpasses.", +% "--unneeded-code-debug-pred-name ", +% "\tPrint the definition of at the start of each pass", +% "\tof the unneeded code elimination algorithm.", + "--introduce-accumulators", + "\tAttempt to introduce accumulating variables into", + "\tprocedures, so as to make them tail recursive.", +% "--optimize-constructor-last-call-accumulator", +% "\tEnable the optimization via accumulators of ""last"" calls", +% "\tthat are followed by constructor application.", +% "--optimize-constructor-last-call-null", +% "\tWhen --optimize-constructor-last-call is enabled, put NULL in" +% "\tuninitialized fields (to prevent the garbage collector from", +% "\tlooking at and following a random bit pattern).", + "--optimize-constructor-last-call", + "\tEnable the optimization of ""last"" calls that are followed by", + "\tconstructor application.", + "--deforestation", + "\tEnable deforestation. Deforestation is a program", + "\ttransformation whose aim is to avoid the construction of", + "\tintermediate data structures and to avoid repeated traversals", + "\tover data structures within a conjunction.", + "--deforestation-depth-limit ", + "\tSpecify a depth limit to prevent infinite loops in the", + "\tdeforestation algorithm.", + "\tA value of -1 specifies no depth limit. The default is 4.", + "--deforestation-vars-threshold ", + "\tSpecify a rough limit on the number of variables", + "\tin a procedure created by deforestation.", + "\tA value of -1 specifies no limit. The default is 200.", + "--deforestation-size-threshold ", + "\tSpecify a rough limit on the size of a goal", + "\tto be optimized by deforestation.", + "\tA value of -1 specifies no limit. The default is 15.", + "--analyse-exceptions", + "\tEnable exception analysis. Identify those", + "\tprocedures that will not throw an exception.", + "\tSome optimizations can make use of this information.", +% XXX The options controlling closure analysis are currently +% commented out because it isn't useful. It can be uncommented when +% we actually have something that uses it. +% "--analyse-closures", +% "\tEnable closure analysis. Try to identify the possible", +% "\tvalues that higher-order valued variables can take.", +% "\tSome optimizations can make use of this information.", + "--analyse-trail-usage", + "\tEnable trail usage analysis. Identify those", + "\tprocedures that will not modify the trail.", + "\tThis information is used to reduce the overhead", + "\tof trailing.", +% `--no-optimize-trail-usage' is a developer-only option. +% It is intended for the benchmarking of trail usage optimization. +% Otherwise, it should not be turned off as doing so interferes with +% the results of the trail usage analysis. + % "--no-optimize-trail-usage", + % "\tDo not try and restrict trailing to those parts", + % "\tof the program that actually use it.", +% `--no-optimize-region-ops' is a developer-only option. +% It is intended for the benchmarking of region ops optimization. + % "--no-optimize-region-ops", + % "\tDo not try and restrict region operations to those parts", + % "\tof the program that actually use it.", + "--analyse-mm-tabling", + "\tIdentify those goals that do not call procedures", + "\tthat are evaluated using minimal model tabling.", + "\tThis information is used to reduce the overhead", + "\tof minimal model tabling." + % "--untuple", + % "\tExpand out procedure arguments when the argument type", + % "\tis a tuple or a type with exactly one functor.", + % "\tNote: this is almost always a pessimization.", + % "--tuple", + % "\tTry to find opportunities for procedures to pass some", + % "\targuments to each other as a tuple rather than as", + % "\tindividual arguments.", + % "\tNote: so far this has mostly a detrimental effect.", + % "--tuple-trace-counts-file", + % "\tSupply a trace counts summary file for the tupling", + % "\ttransformation. The summary should be made from a sample", + % "\trun of the program you are compiling, compiled without", + % "\toptimizations.", + % "--tuple-costs-ratio", + % "\tA value of 110 for this parameter means the tupling", + % "\ttransformation will transform a procedure if it thinks", + % "\tthat procedure would be 10% worse, on average, than", + % "\twhatever transformed version of the procedure it has in", + % "\tmind. The default is 100.", + % "--tuple-min-args", + % "\tThe minimum number of input arguments that the tupling", + % "\ttransformation will consider passing together as a", + % "\ttuple. This is mostly to speed up the compilation", + % "\tprocess by not pursuing (presumably) unfruitful searches.", +% This is for measurements by implementors only. +% "--no-inline-par-builtins", +% "\tGenerate calls to the predicates of par_builtin.m, instead of", +% "\tbodily including their definitions as C code.", +% Actually, this is the default for now. +% This is for measurements by implementors only. +% "--always-specialize-in-dep-par-conjs", +% "\tWhen the transformation for handling dependent parallel conjunctions", +% "\tadds waits and/or signals around a call, create a specialized", +% "\tversion of the called procedure, even if this is not profitable.", +% '--region-analysis' is not documented because it is still experimental. +% "--region-analysis", +% "\tEnable the analysis for region-based memory management." + ]). + +:- pred options_help_hlds_llds_optimization(io::di, io::uo) is det. + +options_help_hlds_llds_optimization --> + io.write_string("\n Medium-level (HLDS -> LLDS) optimizations:\n"), + write_tabbed_lines([ + "--no-smart-indexing", + "\tGenerate switches as a simple if-then-else chains;", + "\tdisable string hashing and integer table-lookup indexing.", + "--dense-switch-req-density ", + "\tThe jump table generated for an atomic switch", + "\tmust have at least this percentage of full slots (default: 25).", + "--lookup-switch-req-density ", + "\tThe jump table generated for an atomic switch", + "\tin which all the outputs are constant terms", + "\tmust have at least this percentage of full slots (default: 25).", + "--dense-switch-size ", + "\tThe jump table generated for an atomic switch", + "\tmust have at least this many entries (default: 4).", + "--lookup-switch-size ", + "\tThe lookup table generated for an atomic switch", + "\tmust have at least this many entries (default: 4).", + "--string-hash-switch-size ", + "\tThe hash table generated for a string switch", + "\tmust have at least this many entries (default: 8).", + "--string-binary-switch-size ", + "\tThe binary search table generated for a string switch", + "\tmust have at least this many entries (default: 4).", + "--tag-switch-size ", + "\tThe number of alternatives in a tag switch", + "\tmust be at least this number (default: 3).", + "--try-switch-size ", + "\tThe number of alternatives in a try/retry chain switch", + "\tmust be at least this number (default: 3).", + "--binary-switch-size ", + "\tThe number of alternatives in a binary search switch", + "\tmust be at least this number (default: 4).", +% These options are only for performance tests. +% "--switch-single-rec-base-first", +% "\tIn a switch with two arms, one a base case and one with a single", +% "\trecursive call, put the base case first. +% "--switch-multi-rec-base-first", +% "\tIn a switch with two arms, one a base case and one with multiple", +% "\trecursive calls, put the base case first. + "--no-static-ground-terms", + "\tDisable the optimization of constructing constant ground terms", + "\tat compile time and storing them as static constants.", + "\tNote that auxiliary data structures created by the compiler", + "\tfor purposes such as debugging will still be created as", + "\tstatic constants.", + "--no-use-atomic-cells", + "\tDon't use the atomic variants of the Boehm gc allocator calls,", + "\teven when this would otherwise be possible.", + "--no-middle-rec", + "\tDisable the middle recursion optimization.", + "--no-simple-neg", + "\tDon't generate simplified code for simple negations." +% "--no-allow-hijacks", +% "\tDo not generate code in which a procedure hijacks", +% "\ta nondet stack frame that possibly belongs to", +% "\tanother procedure invocation". + ]). + +:- pred options_help_llds_llds_optimization(io::di, io::uo) is det. + +options_help_llds_llds_optimization --> + io.write_string("\n Low-level (LLDS -> LLDS) optimizations:\n"), + write_tabbed_lines([ + "--no-common-data", + "\tDisable optimization of common data structures.", + "--no-common-layout-data", + "\tDisable optimization of common subsequences in layout structures.", + "--no-llds-optimize", + "\tDisable the low-level optimization passes.", + "--optimize-dead-procs", + "\tEnable dead predicate elimination.", + "--no-optimize-peep", + "\tDisable local peephole optimizations.", +% This is useful for developers only, to test whether a gcc bug has been fixed. +% "--no-optimize-peep-mkword", +% "\tDisable peephole optimizations of words created by mkword.", + "--no-optimize-jumps", + "\tDisable elimination of jumps to jumps.", + "--no-optimize-fulljumps", + "\tDisable elimination of jumps to ordinary code.", + "--pessimize-tailcalls", + "\tDisable the optimization of tailcalls.", + "--checked-nondet-tailcalls", + "\tConvert nondet calls into tail calls whenever possible, even", + "\twhen this requires a runtime check. This option tries to", + "\tminimize stack consumption, possibly at the expense of speed.", + "--no-use-local-vars", + "\tDisable the transformation to use local variables in C code", + "\tblocks wherever possible.", +% This is useful for developers only. +% "--standardize-labels", +% "\tStandardize internal labels in the generated code.", + "--no-optimize-labels", + "\tDisable elimination of dead labels and code.", + "--optimize-dups", + "\tEnable elimination of duplicate code within procedures.", + "--optimize-proc-dups", + "\tEnable elimination of duplicate procedures.", +%%% "--optimize-copyprop", +%%% "\tEnable the copy propagation optimization.", + "--no-optimize-frames", + "\tDisable stack frame optimizations.", + "--no-optimize-delay-slot", + "\tDisable branch delay slot optimizations.", + "--optimize-reassign", + "\tOptimize away assignments to locations that already hold", + "\tthe assigned value.", + "--optimize-repeat ", + "\tIterate most optimizations at most times (default: 3).", + "--layout-compression-limit ", + "\tAttempt to compress the layout structures used by the debugger", + "\tonly as long as the arrays involved have at most elements", + "\t(default: 4000)." + ]). + +:- pred options_help_mlds_mlds_optimization(io::di, io::uo) is det. + +options_help_mlds_mlds_optimization --> + io.write_string("\n MLDS -> MLDS optimizations:\n"), + write_tabbed_lines([ + "--no-mlds-optimize", + "\tDisable the MLDS->MLDS optimization passes.", + "--no-mlds-peephole", + "\tDo not perform peephole optimization of the MLDS.", + "--no-optimize-tailcalls", + "\tTreat tailcalls as ordinary calls, rather than optimizing", + "\tby turning self-tailcalls into loops.", + "--no-optimize-initializations", + "\tLeave initializations of local variables as", + "\tassignment statements, rather than converting such", + "\tassignment statements into initializers.", + "--eliminate-local-vars", + "\tEliminate local variables with known values, where possible,", + "\tby replacing occurrences of such variables with their values.", + "--no-generate-trail-ops-inline", + "\tDo not generate trailing operations inline,", + "\tbut instead insert calls to the versions of these operations", + "\tin the standard library." +]). + +:- pred options_help_hlds_elds_optimization(io::di, io::uo) is det. + +options_help_hlds_elds_optimization --> + io.write_string("\n HLDS -> ELDS optimizations:\n"), + write_tabbed_lines([ + "--erlang-switch-on-strings-as-atoms", + "\tEnable a workaround for slow HiPE compilation of large string", + "\tswitches by converting the string to an atom at runtime and", + "\tswitching on atoms. Do not enable if the string switched on", + "\tcould be longer than 255 characters at runtime." + ]). + +:- pred options_help_output_optimization(io::di, io::uo) is det. + +options_help_output_optimization --> + io.write_string("\n Output-level (LLDS -> C) optimizations:\n"), + write_tabbed_lines([ + "--use-macro-for-redo-fail", + "\tEmit the fail or redo macro instead of a branch", + "\tto the fail or redo code in the runtime system.", + "\tThis produces slightly bigger but slightly faster code.", + "--no-emit-c-loops", + "\tUse only gotos, don't emit C loop constructs.", + "--procs-per-c-function ", + "\tPut the code for up to Mercury", + "\tprocedures in a single C function. The default", + "\tvalue of is one. Increasing can produce", + "\tslightly more efficient code, but makes compilation slower.", + "--everything-in-one-c-function", + "\tThis option has the effect of putting the code for all", + "\tthe Mercury procedures in a single C function,", + "\twhich produces the most efficient code but tends to", + "\tseverely stress the C compiler on large modules.", + "--no-local-thread-engine-base", + "\tDon't copy the thread-local Mercury engine base address", + "\tinto local variables. This option only affects low-level", + "\tparallel grades not using the global register variables", + "\textension." + ]). + +:- pred options_help_target_code_compilation(io::di, io::uo) is det. + +options_help_target_code_compilation --> + io.write_string("\n Target code compilation:\n"), + write_tabbed_lines([ + "\tNote that if you are using Mmake, you need to pass these", + "\toptions to the target code compiler (e.g. `mgnuc')", + "\trather than to `mmc'.", + + "--target-debug", + "\tEnable debugging of the generated target code.", + "\tIf the target language is C, this has the same effect as", + "\t`--c-debug' (see below).", + "\tIf the target language is IL or C#, this causes the compiler to", + "\tpass `/debug' to the IL assembler or C# compiler.)", + + "--cc ", + "\tSpecify which C compiler to use.", + + "--no-c-optimize", + "\tDon't enable the C compiler's optimizations.", + + "--no-ansi-c", + "\tDon't specify to the C compiler that the ANSI dialect", + "\tof C should be used. Use the full contents of system", + "\theaders, rather than the ANSI subset.", + + "--c-debug", + "\tEnable debugging of the generated C code.", + "\t(This has the same effect as `--cflags ""-g""'", + "\tand disables stripping of the executable.)", + + "--c-include-directory , --c-include-dir ", + "\tAppend to the list of directories to be searched for", + "\tC header files. Note that if you want to override", + "\tthis list, rather than append to it, then you can set the", + "\t`MERCURY_MC_ALL_C_INCL_DIRS' environment variable to a", + "\tsequence of `--c-include-directory' options.", + + "--inline-alloc", + "\tInline calls to GC_malloc().", + "\tThis can improve performance a fair bit,", + "\tbut may significantly increase code size.", + "\tThis option has no effect if `--gc boehm'", + "\tis not set or if the C compiler is not GNU C.", + + "--cflags , --cflag